From 6bff0bc25abd160c774d2f8fe727813e43655c01 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sat, 29 Jan 2022 11:37:58 -0600 Subject: [PATCH 001/130] created releasenotes template --- doc/releasenotes/template.rst | 54 +++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 doc/releasenotes/template.rst diff --git a/doc/releasenotes/template.rst b/doc/releasenotes/template.rst new file mode 100644 index 000000000..1528d33b7 --- /dev/null +++ b/doc/releasenotes/template.rst @@ -0,0 +1,54 @@ +==================== +Release notes for vx.x.x +==================== +.. + When documenting a bug fix or feature, please do so in the following format + +.. + - `Fixed typo in depcode.py `_ + +--------- +Reviewers +--------- +.. + List of people who reviewed PRs for this release + +The following people reviewed code for this release of SaltProc: + +.. + `@gh_username `_ + From da9c84ab370d32f5131c66554d384dfd5fbebf42 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sat, 29 Jan 2022 12:11:49 -0600 Subject: [PATCH 002/130] add section on api changes to template.rst --- doc/releasenotes/template.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/releasenotes/template.rst b/doc/releasenotes/template.rst index 1528d33b7..02e6eb7db 100644 --- a/doc/releasenotes/template.rst +++ b/doc/releasenotes/template.rst @@ -23,6 +23,13 @@ New Features Describe any new features to the code. +------------------ +Python API Changes +------------------ +.. + Describe any changes to the API + + --------- Bug Fixes --------- From 5d4c0c5b06152d9e7c633e004f89b5e5e04ba6a5 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sat, 29 Jan 2022 12:54:25 -0600 Subject: [PATCH 003/130] creaetd 0.4.0 release notes --- doc/releasenotes/0.4.0.rst | 163 +++++++++++++++++++++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 doc/releasenotes/0.4.0.rst diff --git a/doc/releasenotes/0.4.0.rst b/doc/releasenotes/0.4.0.rst new file mode 100644 index 000000000..d6975aca9 --- /dev/null +++ b/doc/releasenotes/0.4.0.rst @@ -0,0 +1,163 @@ +======================== +Release notes for v0.4.0 +======================== + +.. + When documenting a bug fix or feature, please do so in the following format + +.. + - `Fixed typo in depcode.py `_ by @pr_author_username + +.. + Links to packages/issues/bug fixes/contributors/reviewers + +.. _jsonschema: https://github.com/Julian/jsonschema + +.. _@yardasol: https://github.com/yardasol +.. _@abachma2: https://github.com/abachma2 +.. _@LukeSeifert: https://github.com/LukeSeifert +.. _@munkm: https://github.com/munkm + +------- +Summary +------- + +.. + Describe generally the features of this release + +This version of SaltProc is a compatibility-breaking code refactor in preparation for supporting OpenMC. + + +------------------ +Dependency Changes +------------------ + +.. + Describe any new/removed/modified package dependencies + +- Saltproc now requires the following packages + - (new) -> `jsonschema`_ + + +------------ +New Features +------------ + +.. + Describe any new features to the code. + +- `Refactor app.py and simulation.py to prepare for OpenMC support `_ by `@yardasol`_ +- `New input file format that is checked against a verifiable JSON Schema `_ by `@yardasol`_ +- `Release notes in the online docs `_ by `@yardasol`_ + + +--------- +Bug Fixes +--------- + +.. + Describe any bug fixes. + +- `Fix typos in process_j312.bash `_ + + +-------------- +Script Changes +-------------- + +.. + Describe any script additions/modifications/removals + +- The following scripts hav been renamed: + - ``process_j312.sh`` -> ``process_j312.bash`` + + +------------------ +Python API Changes +------------------ + +- New tests for previously untested functions in ``simulation.py``: + - ``test_check_switch_geo_trigger`` + - ``test_store_after_repr`` + - ``test_store_mat_data`` + - ``test_store_run_init_info`` + - ``test_store_run_step_info`` + +- The following class methods have been added/(re)moved: + - ``App.check_restart()`` -> ``Simulation.check_restart()`` + - ``Simulation.switch_to_next_geometry`` -> ``DepcodeSerpent.switch_to_next_geometry`` + - ``Simulation.runsim_no_reproc`` -> ``test/integration_tests/test_no_reproc_run.py::runsim_no_reproc`` + - ``Simulation.store_run_step_info`` + - ``Simulation.store_run_init_info`` + - (new) -> ``Depcode.switch_to_next_geometry`` + - (new) -> ``Depcode.read_depcode_info`` + - (new) -> ``Depcode.read_repcode_step_param`` + +- Updated input file structure: + - ``App.depcode_inp`` dictionary + - (new) -> ``App.depcode_inp['codename']`` + - ``App.exec_path`` + - ``App.template_file`` + - ``App.neutron_pop`` -> ``App.depcode_inp['npop']`` + - ``App.active_cycles`` + - ``App.inactive_cycles`` + - ``App.geo_file`` -> ``App.depcode_inp['geo_file_paths']`` + - ``App.simulation_inp`` dictionary: + - (new) -> ``App.simulation['sim_name']`` + - ``App.db_file`` -> ``App.simulation['db_name']`` + - ``App.restart_flag`` + - ``App.adjust_geo`` + - ``App.reactor_inp`` dictionary + - (new) -> ``App.reactor_inp['volume']`` + - (new) -> ``App.reactor_inp['mass_flowrate']`` + - ``App.power_levels`` + - ``App.depl_hist`` + +- The following class attributes have been added/(re)moved: + - ``Depcode`` class: + - ``template_path`` -> ``template_inputfile_path`` + - ``input_path`` -> ``iter_inputfile`` + - ``geo_file`` -> ``geo_files`` + - ``Simulation`` class: + - ``h5_file`` -> ``db_path`` + - (new) -> ``restart_flag`` + - (new) -> ``adjust_geo`` + - ``iter_matfile`` -> (removed) + +- The signatures for the following class methods have changed to better make use of object data encapsulation: + - ``Depcode.read_dep_comp`` + - ``Depcode.write_depcode_input`` + - ``Depcode.write_mat_file`` + - ``DepcodeSerpent.read_depcode_template`` + + +------------ +Contributors +------------ + +.. + List of people who contributed features and fixes to this release + +The following people contributed code to this release of SaltProc: + +.. + `@gh_username `_ + +- `@yardasol`_ + + +--------- +Reviewers +--------- + +.. + List of people who reviewed PRs for this release + +The following people reviewed code for this release of SaltProc: + +.. + `@gh_username `_ + +- `@abachma2`_ +- `@LukeSeifert`_ +- `@munkm`_ From 95ef0ac8f7e0e09603a45750a67ad4b9e692d383 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sat, 29 Jan 2022 12:57:20 -0600 Subject: [PATCH 004/130] Added index.rst for releasenotes --- doc/releasenotes/index.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 doc/releasenotes/index.rst diff --git a/doc/releasenotes/index.rst b/doc/releasenotes/index.rst new file mode 100644 index 000000000..18926bcd0 --- /dev/null +++ b/doc/releasenotes/index.rst @@ -0,0 +1,10 @@ +.. _releasenotes: + +============= +Release Notes +============= + +.. toctree:: + :maxdepth: 1 + + 0.4.0 From e5e6b56f515820a782f358946775f4f87f88b313 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sat, 29 Jan 2022 13:01:26 -0600 Subject: [PATCH 005/130] update releasenotes template --- doc/releasenotes/template.rst | 57 ++++++++++++++++++++++++++++++----- 1 file changed, 49 insertions(+), 8 deletions(-) diff --git a/doc/releasenotes/template.rst b/doc/releasenotes/template.rst index 02e6eb7db..5fbd7b05f 100644 --- a/doc/releasenotes/template.rst +++ b/doc/releasenotes/template.rst @@ -1,42 +1,79 @@ -==================== +======================== Release notes for vx.x.x -==================== +======================== + .. When documenting a bug fix or feature, please do so in the following format .. - - `Fixed typo in depcode.py `_ by @pr_author_username + +.. + Links to packages/issues/bug fixes/contributors/reviewers + + ------- Summary ------- + .. Describe generally the features of this release + +------------------ +Dependency Changes +------------------ + +.. + Describe any new/removed/modified package dependencies + + + + ------------ New Features ------------ + .. Describe any new features to the code. ------------------- -Python API Changes ------------------- -.. - Describe any changes to the API --------- Bug Fixes --------- + .. Describe any bug fixes. + + +-------------- +Script Changes +-------------- + +.. + Describe any script additions/modifications/removals + + + + +------------------ +Python API Changes +------------------ + +.. + Describe any changes to the API + + + + ------------ Contributors ------------ @@ -48,6 +85,9 @@ The following people contributed code to this release of SaltProc: .. `@gh_username `_ + + + --------- Reviewers --------- @@ -59,3 +99,4 @@ The following people reviewed code for this release of SaltProc: .. `@gh_username `_ + From 597b68e3c40452d0f39b3cd775cbb6ab6b8dac41 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sat, 29 Jan 2022 13:02:05 -0600 Subject: [PATCH 006/130] add releasenotes to main index.rst --- doc/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/index.rst b/doc/index.rst index dd5ad5830..a27cbcbab 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -32,6 +32,7 @@ Documentation installation examples src/index + releasenotes How to cite Indices and tables From 470907dde033d2c74265276024897e8eed760309 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sat, 29 Jan 2022 13:06:11 -0600 Subject: [PATCH 007/130] typo fix in doc/index.rst --- doc/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/index.rst b/doc/index.rst index a27cbcbab..61595404c 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -32,7 +32,7 @@ Documentation installation examples src/index - releasenotes + releasenotes/index How to cite Indices and tables From 3347254f1f0ebef6878662a803804c7f9240a4a9 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sat, 29 Jan 2022 13:09:29 -0600 Subject: [PATCH 008/130] typo fixes in releasenotes/0.4.0.rst --- doc/releasenotes/0.4.0.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/doc/releasenotes/0.4.0.rst b/doc/releasenotes/0.4.0.rst index d6975aca9..33da466bf 100644 --- a/doc/releasenotes/0.4.0.rst +++ b/doc/releasenotes/0.4.0.rst @@ -36,6 +36,7 @@ Dependency Changes Describe any new/removed/modified package dependencies - Saltproc now requires the following packages + - (new) -> `jsonschema`_ @@ -69,6 +70,7 @@ Script Changes Describe any script additions/modifications/removals - The following scripts hav been renamed: + - ``process_j312.sh`` -> ``process_j312.bash`` @@ -77,6 +79,7 @@ Python API Changes ------------------ - New tests for previously untested functions in ``simulation.py``: + - ``test_check_switch_geo_trigger`` - ``test_store_after_repr`` - ``test_store_mat_data`` @@ -84,6 +87,7 @@ Python API Changes - ``test_store_run_step_info`` - The following class methods have been added/(re)moved: + - ``App.check_restart()`` -> ``Simulation.check_restart()`` - ``Simulation.switch_to_next_geometry`` -> ``DepcodeSerpent.switch_to_next_geometry`` - ``Simulation.runsim_no_reproc`` -> ``test/integration_tests/test_no_reproc_run.py::runsim_no_reproc`` @@ -94,7 +98,9 @@ Python API Changes - (new) -> ``Depcode.read_repcode_step_param`` - Updated input file structure: + - ``App.depcode_inp`` dictionary + - (new) -> ``App.depcode_inp['codename']`` - ``App.exec_path`` - ``App.template_file`` @@ -102,29 +108,38 @@ Python API Changes - ``App.active_cycles`` - ``App.inactive_cycles`` - ``App.geo_file`` -> ``App.depcode_inp['geo_file_paths']`` + - ``App.simulation_inp`` dictionary: + - (new) -> ``App.simulation['sim_name']`` - ``App.db_file`` -> ``App.simulation['db_name']`` - ``App.restart_flag`` - ``App.adjust_geo`` + - ``App.reactor_inp`` dictionary + - (new) -> ``App.reactor_inp['volume']`` - (new) -> ``App.reactor_inp['mass_flowrate']`` - ``App.power_levels`` - ``App.depl_hist`` - The following class attributes have been added/(re)moved: + - ``Depcode`` class: + - ``template_path`` -> ``template_inputfile_path`` - ``input_path`` -> ``iter_inputfile`` - ``geo_file`` -> ``geo_files`` + - ``Simulation`` class: + - ``h5_file`` -> ``db_path`` - (new) -> ``restart_flag`` - (new) -> ``adjust_geo`` - ``iter_matfile`` -> (removed) - The signatures for the following class methods have changed to better make use of object data encapsulation: + - ``Depcode.read_dep_comp`` - ``Depcode.write_depcode_input`` - ``Depcode.write_mat_file`` From 999086beaea0d7abbaffc9bae9aec1cb847f9257 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sat, 29 Jan 2022 13:15:31 -0600 Subject: [PATCH 009/130] Add checkbox for filling out changelog to pr template --- .github/pull_request_template.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index f63c7e90b..e01a574bc 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -21,6 +21,7 @@ - [ ] All new and existing tests passed. - [ ] CI tests pass - [ ] Local tests pass (including Serpent2 integration tests) +- [ ] I have recorded my changes in the changelog for the upcoming release ## Associated Issues and PRs From d738e32b52605e62301ab9f47ba969e743924afe Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 11:40:11 -0600 Subject: [PATCH 010/130] inital version of workflow to populate releasenotes --- .github/workflows/populate-releasenotes.yml | 34 +++++++++++++++++++++ saltproc/version.py | 4 +-- 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/populate-releasenotes.yml diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml new file mode 100644 index 000000000..40312fd33 --- /dev/null +++ b/.github/workflows/populate-releasenotes.yml @@ -0,0 +1,34 @@ +# Preamble +name: Populate SaltProc release notes + +on: + release: + type: [created, edited, published] + push: + branches: + - master + paths: + - 'doc/releasenotes/**' + # enable worflow to be run manually + workflow_dispatch: + +jobs: + deploy-docs: + runs-on: ubuntu-latest + defaults: + run: + shell: bash -l {0} + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: '3.9' + + - name: install pandoc + run: pip install pandoc + + - name: Convert .rst to .md + run: pandoc -s -o RELEASENOTES.md doc/releasenodes/{$RELEASE_VERISON}.rst + + - name: Populate the release description with RELEASENOTES.md diff --git a/saltproc/version.py b/saltproc/version.py index bdfb452b8..84e19d0f2 100644 --- a/saltproc/version.py +++ b/saltproc/version.py @@ -3,8 +3,8 @@ # Format expected by setup.py and doc/source/conf.py: string of form "X.Y.Z" _version_major = 0 -_version_minor = 3 -_version_micro = '1' # use '' for first of series, number for 1 and above +_version_minor = 4 +_version_micro = '0' # use '' for first of series, number for 1 and above _version_extra = 'dev' # _version_extra = '0' # Uncomment this for full releases From 9a9e761eb0c4d996941c065886f183532b5e165c Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 12:03:12 -0600 Subject: [PATCH 011/130] testing of github api --- .github/workflows/populate-releasenotes.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 40312fd33..9ff9fba44 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -5,10 +5,10 @@ on: release: type: [created, edited, published] push: - branches: - - master - paths: - - 'doc/releasenotes/**' + # branches: + # - master + # paths: + # - 'doc/releasenotes/**' # enable worflow to be run manually workflow_dispatch: @@ -31,4 +31,15 @@ jobs: - name: Convert .rst to .md run: pandoc -s -o RELEASENOTES.md doc/releasenodes/{$RELEASE_VERISON}.rst + - name: Get release data in an environment variable + run: DESCRIPTION="$(cat RELEASENOTES.md)" + - name: Populate the release description with RELEASENOTES.md + run: + curl --request PATCH \ + --url https://api.github.com/repos/${{ github.repository }}/releases/tags/v0.4.0 \ + --header 'Accept: application/vnd.github.v3+json' \ + --header 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' \ + --header 'content-type: application/json' \ + --data '{body:${{ DESCRIPTION }}}' + From 950b4d9c7539a5ccd730afc673a61211a900f6e9 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 12:32:49 -0600 Subject: [PATCH 012/130] more testing --- .github/workflows/populate-releasenotes.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 9ff9fba44..84913469c 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -25,11 +25,18 @@ jobs: with: python-version: '3.9' - - name: install pandoc - run: pip install pandoc + - name: install pandoc and jq + run: | + pip install pandoc + apt install jq + + + # NEED TO FIND A WAY TO ACCESS THE FIRST JSON OBJECT IN THE OUTPUT + - name: Get most recent release version + run: RELEASE_VERSION="$(gh api repos/${{ github.repository }}/releases/ | jq '[.0] | .tag_name')"" - name: Convert .rst to .md - run: pandoc -s -o RELEASENOTES.md doc/releasenodes/{$RELEASE_VERISON}.rst + run: pandoc -s -o RELEASENOTES.md doc/releasenotes/${{ RELEASE_VERISON }}.rst - name: Get release data in an environment variable run: DESCRIPTION="$(cat RELEASENOTES.md)" @@ -37,9 +44,9 @@ jobs: - name: Populate the release description with RELEASENOTES.md run: curl --request PATCH \ - --url https://api.github.com/repos/${{ github.repository }}/releases/tags/v0.4.0 \ + --url https://api.github.com/repos/${{ github.repository }}/releases/tags/$RELEASE_VERSION \ --header 'Accept: application/vnd.github.v3+json' \ --header 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' \ --header 'content-type: application/json' \ - --data '{body:${{ DESCRIPTION }}}' + --data '{body:$DESCRIPTION}' From c91c59039b721885f249fcc890b21f48a73fb164 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 12:34:11 -0600 Subject: [PATCH 013/130] more testing --- .github/workflows/populate-releasenotes.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 84913469c..562698a54 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -47,6 +47,5 @@ jobs: --url https://api.github.com/repos/${{ github.repository }}/releases/tags/$RELEASE_VERSION \ --header 'Accept: application/vnd.github.v3+json' \ --header 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' \ - --header 'content-type: application/json' \ --data '{body:$DESCRIPTION}' From 805780b5a593046efc2c7f0ee2ca4117cbd55c29 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 12:37:35 -0600 Subject: [PATCH 014/130] more testing --- .github/workflows/populate-releasenotes.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 562698a54..718474be0 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -43,9 +43,8 @@ jobs: - name: Populate the release description with RELEASENOTES.md run: - curl --request PATCH \ - --url https://api.github.com/repos/${{ github.repository }}/releases/tags/$RELEASE_VERSION \ - --header 'Accept: application/vnd.github.v3+json' \ - --header 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' \ - --data '{body:$DESCRIPTION}' + gh api repos/${{ github.repository }}/releases/tags/$RELEASE_VERSION \ + -X PATCH -H 'Accept: application/vnd.github.v3+json' \ + -H 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' \ + --data '{"body":"$DESCRIPTION"}' From d35851fcb32e1d336b2611a64c57cac207d1700d Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 12:40:36 -0600 Subject: [PATCH 015/130] more testing --- .github/workflows/populate-releasenotes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 718474be0..258f6bed2 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -46,5 +46,5 @@ jobs: gh api repos/${{ github.repository }}/releases/tags/$RELEASE_VERSION \ -X PATCH -H 'Accept: application/vnd.github.v3+json' \ -H 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' \ - --data '{"body":"$DESCRIPTION"}' + -F body="${DESCRIPTION}" From 4eee1d3d9525f25243c91fb56060b0ba78414059 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 12:42:25 -0600 Subject: [PATCH 016/130] more testing --- .github/workflows/populate-releasenotes.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 258f6bed2..42ca1ba65 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -42,9 +42,10 @@ jobs: run: DESCRIPTION="$(cat RELEASENOTES.md)" - name: Populate the release description with RELEASENOTES.md - run: + run: | gh api repos/${{ github.repository }}/releases/tags/$RELEASE_VERSION \ - -X PATCH -H 'Accept: application/vnd.github.v3+json' \ - -H 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' \ - -F body="${DESCRIPTION}" + -X PATCH -H 'Accept: application/vnd.github.v3+json' \ + -H 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' \ + -F body="${DESCRIPTION}" + From bc08bf13bd5e555f0d1e78e911e4a110b320f652 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 12:43:13 -0600 Subject: [PATCH 017/130] more testing --- .github/workflows/populate-releasenotes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 42ca1ba65..0d4dc7700 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -36,7 +36,7 @@ jobs: run: RELEASE_VERSION="$(gh api repos/${{ github.repository }}/releases/ | jq '[.0] | .tag_name')"" - name: Convert .rst to .md - run: pandoc -s -o RELEASENOTES.md doc/releasenotes/${{ RELEASE_VERISON }}.rst + run: pandoc -s -o RELEASENOTES.md doc/releasenotes/$RELEASE_VERISON.rst - name: Get release data in an environment variable run: DESCRIPTION="$(cat RELEASENOTES.md)" From 63548d2c0420aefeae44705956a8bcb51856f64d Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 12:45:58 -0600 Subject: [PATCH 018/130] more testing --- .github/workflows/populate-releasenotes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 0d4dc7700..0b53353ea 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -28,7 +28,7 @@ jobs: - name: install pandoc and jq run: | pip install pandoc - apt install jq + sudo apt install jq # NEED TO FIND A WAY TO ACCESS THE FIRST JSON OBJECT IN THE OUTPUT From a5bf05c08a7665262811db3c06afd47a3935ed4d Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 12:47:23 -0600 Subject: [PATCH 019/130] more testing --- .github/workflows/populate-releasenotes.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 0b53353ea..664c66ad6 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -25,15 +25,11 @@ jobs: with: python-version: '3.9' - - name: install pandoc and jq - run: | - pip install pandoc - sudo apt install jq - + - name: install pandoc + run: pip install pandoc - # NEED TO FIND A WAY TO ACCESS THE FIRST JSON OBJECT IN THE OUTPUT - name: Get most recent release version - run: RELEASE_VERSION="$(gh api repos/${{ github.repository }}/releases/ | jq '[.0] | .tag_name')"" + run: RELEASE_VERSION="$(gh api repos/${{ github.repository }}/releases/ | jq '[.0] | .tag_name')" - name: Convert .rst to .md run: pandoc -s -o RELEASENOTES.md doc/releasenotes/$RELEASE_VERISON.rst From 9f0742dbc72278269c990f99cfbc8bd7c760184e Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 12:50:04 -0600 Subject: [PATCH 020/130] more testing --- .github/workflows/populate-releasenotes.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 664c66ad6..6279da462 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -28,11 +28,14 @@ jobs: - name: install pandoc run: pip install pandoc + - name: auth gh + run: gh auth login + - name: Get most recent release version run: RELEASE_VERSION="$(gh api repos/${{ github.repository }}/releases/ | jq '[.0] | .tag_name')" - name: Convert .rst to .md - run: pandoc -s -o RELEASENOTES.md doc/releasenotes/$RELEASE_VERISON.rst + run: pandoc -s -o RELEASENOTES.md doc/releasenotes/${RELEASE_VERISON}.rst - name: Get release data in an environment variable run: DESCRIPTION="$(cat RELEASENOTES.md)" From 587cbbb0d14416fdf70e9ab1fa73184658f79d86 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 12:51:25 -0600 Subject: [PATCH 021/130] try adding GITHUB_TOKEN to gh auth request --- .github/workflows/populate-releasenotes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 6279da462..ab32c8e3e 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -29,7 +29,7 @@ jobs: run: pip install pandoc - name: auth gh - run: gh auth login + run: gh auth login --with-token ${{ secrets.GITHUB_TOKEN }} - name: Get most recent release version run: RELEASE_VERSION="$(gh api repos/${{ github.repository }}/releases/ | jq '[.0] | .tag_name')" From fdb7041a226aa94753153476f24986c008a4383d Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 12:53:35 -0600 Subject: [PATCH 022/130] try adding GITHUB_TOKEN to gh auth request --- .github/workflows/populate-releasenotes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index ab32c8e3e..8ac99c224 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -29,7 +29,7 @@ jobs: run: pip install pandoc - name: auth gh - run: gh auth login --with-token ${{ secrets.GITHUB_TOKEN }} + run: gh auth login --with-token process.env.GITHUB_TOKEN - name: Get most recent release version run: RELEASE_VERSION="$(gh api repos/${{ github.repository }}/releases/ | jq '[.0] | .tag_name')" From 6efe3936bfb0e151d2fd9604a38fce22a1befe74 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 13:00:23 -0600 Subject: [PATCH 023/130] try following gh api isntructions for gh actions --- .github/workflows/populate-releasenotes.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 8ac99c224..e32c1bdaf 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -28,11 +28,10 @@ jobs: - name: install pandoc run: pip install pandoc - - name: auth gh - run: gh auth login --with-token process.env.GITHUB_TOKEN - - name: Get most recent release version run: RELEASE_VERSION="$(gh api repos/${{ github.repository }}/releases/ | jq '[.0] | .tag_name')" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Convert .rst to .md run: pandoc -s -o RELEASENOTES.md doc/releasenotes/${RELEASE_VERISON}.rst From 496761b234e13767e77d79359fdb98d1ea84d683 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 13:01:50 -0600 Subject: [PATCH 024/130] typo fix for jq --- .github/workflows/populate-releasenotes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index e32c1bdaf..c15113fd0 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -29,7 +29,7 @@ jobs: run: pip install pandoc - name: Get most recent release version - run: RELEASE_VERSION="$(gh api repos/${{ github.repository }}/releases/ | jq '[.0] | .tag_name')" + run: RELEASE_VERSION="$(gh api repos/${{ github.repository }}/releases/ | jq '.[0] | .tag_name')" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 11b3dcd81f547c6c0bcbba8c110073e5ed77aec2 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 13:03:12 -0600 Subject: [PATCH 025/130] typo fix for jq --- .github/workflows/populate-releasenotes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index c15113fd0..515fd4772 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -29,7 +29,7 @@ jobs: run: pip install pandoc - name: Get most recent release version - run: RELEASE_VERSION="$(gh api repos/${{ github.repository }}/releases/ | jq '.[0] | .tag_name')" + run: RELEASE_VERSION="$(gh api repos/${{ github.repository }}/releases --jq '.[0] | .tag_name')" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 9207c71315d629ed8daed649de996dec71e39fbe Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 13:06:06 -0600 Subject: [PATCH 026/130] 0.4.0.rst -> v0.4.0.rst --- doc/releasenotes/{0.4.0.rst => v0.3.0.rst} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename doc/releasenotes/{0.4.0.rst => v0.3.0.rst} (100%) diff --git a/doc/releasenotes/0.4.0.rst b/doc/releasenotes/v0.3.0.rst similarity index 100% rename from doc/releasenotes/0.4.0.rst rename to doc/releasenotes/v0.3.0.rst From cba504cbdf90cfdb9c6d92b6092dd7dd55961c10 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 13:06:32 -0600 Subject: [PATCH 027/130] typo fix for pandoc --- .github/workflows/populate-releasenotes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 515fd4772..f4e38513a 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -34,7 +34,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Convert .rst to .md - run: pandoc -s -o RELEASENOTES.md doc/releasenotes/${RELEASE_VERISON}.rst + run: pandoc -s -o RELEASENOTES.md doc/releasenotes/$RELEASE_VERISON.rst - name: Get release data in an environment variable run: DESCRIPTION="$(cat RELEASENOTES.md)" From 21833e209c9ac9f96d16938f296bdb7112b5eb9b Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 13:10:53 -0600 Subject: [PATCH 028/130] v0.3.0.rst -> v0.4.0.rst --- doc/releasenotes/{v0.3.0.rst => v0.4.0.rst} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename doc/releasenotes/{v0.3.0.rst => v0.4.0.rst} (100%) diff --git a/doc/releasenotes/v0.3.0.rst b/doc/releasenotes/v0.4.0.rst similarity index 100% rename from doc/releasenotes/v0.3.0.rst rename to doc/releasenotes/v0.4.0.rst From 25d88560454390860572e0ecf2deead9f5547330 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 13:16:17 -0600 Subject: [PATCH 029/130] use conda; update pandoc installation --- .github/workflows/populate-releasenotes.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index f4e38513a..0bd52c61d 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -21,12 +21,23 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + + - name: Set up conda + uses: conda-incubator/setup-miniconda@v2 with: - python-version: '3.9' + miniforge-variant: Mambaforge # mamba is faster than base conda + miniforge-version: latest + activate-environment: saltproc-doc-env + use-mamba: true + use-only-tar-bz2: true + - run: | + conda config --env --set pip_interop_enabled True + - name: install pandoc - run: pip install pandoc + run: | + mamba install -c conda-forge pandoc + pip install --upgrade pandoc - name: Get most recent release version run: RELEASE_VERSION="$(gh api repos/${{ github.repository }}/releases --jq '.[0] | .tag_name')" From 50bf57d58c5468811f0248a3075500ae26504423 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 13:22:36 -0600 Subject: [PATCH 030/130] try making RELEASE_VERSION an environment variable --- .github/workflows/populate-releasenotes.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 0bd52c61d..2c9c410e6 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -12,6 +12,9 @@ on: # enable worflow to be run manually workflow_dispatch: +env: + RELEASE_VERSION: '' + jobs: deploy-docs: runs-on: ubuntu-latest @@ -40,12 +43,12 @@ jobs: pip install --upgrade pandoc - name: Get most recent release version - run: RELEASE_VERSION="$(gh api repos/${{ github.repository }}/releases --jq '.[0] | .tag_name')" + run: ${{ env.RELEASE_VERSION }}="$(gh api repos/${{ github.repository }}/releases --jq '.[0] | .tag_name')" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Convert .rst to .md - run: pandoc -s -o RELEASENOTES.md doc/releasenotes/$RELEASE_VERISON.rst + run: pandoc -s -o RELEASENOTES.md doc/releasenotes/${{ env.RELEASE_VERISON }}.rst - name: Get release data in an environment variable run: DESCRIPTION="$(cat RELEASENOTES.md)" From b40f82eddfeb1f997dc0c880d7364329d44d8e02 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 13:25:37 -0600 Subject: [PATCH 031/130] use conda instead of mamba --- .github/workflows/populate-releasenotes.yml | 30 +++++++++++++-------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 2c9c410e6..664bddbc1 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -24,22 +24,30 @@ jobs: steps: - uses: actions/checkout@v2 - - - name: Set up conda - uses: conda-incubator/setup-miniconda@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v2 with: - miniforge-variant: Mambaforge # mamba is faster than base conda - miniforge-version: latest - activate-environment: saltproc-doc-env - use-mamba: true - use-only-tar-bz2: true - - run: | - conda config --env --set pip_interop_enabled True + python-version: 3.8 + - name: Add conda to system path + run: | + # $CONDA is an environment variable pointing to the root of the miniconda directory + echo $CONDA/bin >> $GITHUB_PATH + + # - name: Set up conda + # uses: conda-incubator/setup-miniconda@v2 + # with: + # miniforge-variant: Mambaforge # mamba is faster than base conda + # miniforge-version: latest + # activate-environment: saltproc-doc-env + # use-mamba: true + # use-only-tar-bz2: true + # - run: | + # conda config --env --set pip_interop_enabled True - name: install pandoc run: | - mamba install -c conda-forge pandoc + conda install -c conda-forge pandoc pip install --upgrade pandoc - name: Get most recent release version From 362efe6edbb1a7305bfc27450482ff2638d0c739 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 13:35:58 -0600 Subject: [PATCH 032/130] try fixing method to set custom env vars --- .github/workflows/populate-releasenotes.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 664bddbc1..9adf84629 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -24,10 +24,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up Python 3.8 + - name: Set up Python 3.9 uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: 3.9 - name: Add conda to system path run: | # $CONDA is an environment variable pointing to the root of the miniconda directory @@ -51,7 +51,7 @@ jobs: pip install --upgrade pandoc - name: Get most recent release version - run: ${{ env.RELEASE_VERSION }}="$(gh api repos/${{ github.repository }}/releases --jq '.[0] | .tag_name')" + run: echo "RELEASE_VERSION=$(gh api repos/${{ github.repository }}/releases --jq '.[0] | .tag_name')" >> $GITHUB_ENV env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -59,13 +59,15 @@ jobs: run: pandoc -s -o RELEASENOTES.md doc/releasenotes/${{ env.RELEASE_VERISON }}.rst - name: Get release data in an environment variable - run: DESCRIPTION="$(cat RELEASENOTES.md)" + run: echo "DESCRIPTION=$(cat RELEASENOTES.md)" >> $GITHUB_ENV - name: Populate the release description with RELEASENOTES.md run: | gh api repos/${{ github.repository }}/releases/tags/$RELEASE_VERSION \ -X PATCH -H 'Accept: application/vnd.github.v3+json' \ -H 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' \ - -F body="${DESCRIPTION}" + -F body=${{ env.DESCRIPTION }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 7b3118f323ade23b30c5ac65e40f3ac77f975e49 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 13:36:16 -0600 Subject: [PATCH 033/130] remove gloval env var --- .github/workflows/populate-releasenotes.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 9adf84629..18d055bb0 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -12,9 +12,6 @@ on: # enable worflow to be run manually workflow_dispatch: -env: - RELEASE_VERSION: '' - jobs: deploy-docs: runs-on: ubuntu-latest From 4de329f72b4e224e5474c5902e051e9da3ebc5ff Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 13:37:47 -0600 Subject: [PATCH 034/130] typo fix --- .github/workflows/populate-releasenotes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 18d055bb0..a7f4370fd 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -53,7 +53,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Convert .rst to .md - run: pandoc -s -o RELEASENOTES.md doc/releasenotes/${{ env.RELEASE_VERISON }}.rst + run: pandoc -s -o RELEASENOTES.md doc/releasenotes/${{ env.RELEASE_VERSION }}.rst - name: Get release data in an environment variable run: echo "DESCRIPTION=$(cat RELEASENOTES.md)" >> $GITHUB_ENV From ec17d180d1d351d9601b044339744313bf0cda8e Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 13:40:24 -0600 Subject: [PATCH 035/130] make DESCRIPTION as string --- .github/workflows/populate-releasenotes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index a7f4370fd..6832bdcfa 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -56,7 +56,7 @@ jobs: run: pandoc -s -o RELEASENOTES.md doc/releasenotes/${{ env.RELEASE_VERSION }}.rst - name: Get release data in an environment variable - run: echo "DESCRIPTION=$(cat RELEASENOTES.md)" >> $GITHUB_ENV + run: echo "DESCRIPTION='$(cat RELEASENOTES.md)'" >> $GITHUB_ENV - name: Populate the release description with RELEASENOTES.md run: | From 847ccf72184f5746fcacc2fc78a93fe91001bd36 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 13:41:52 -0600 Subject: [PATCH 036/130] make DESCRIPTION as string --- .github/workflows/populate-releasenotes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 6832bdcfa..1865b8ed9 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -56,7 +56,7 @@ jobs: run: pandoc -s -o RELEASENOTES.md doc/releasenotes/${{ env.RELEASE_VERSION }}.rst - name: Get release data in an environment variable - run: echo "DESCRIPTION='$(cat RELEASENOTES.md)'" >> $GITHUB_ENV + run: echo 'DESCRIPTION="$(cat RELEASENOTES.md)"' >> $GITHUB_ENV - name: Populate the release description with RELEASENOTES.md run: | From 6e270901d98261481f4c1831d9f8567aa4c34d64 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 13:49:25 -0600 Subject: [PATCH 037/130] try to get DESCRIPTION variable working --- .github/workflows/populate-releasenotes.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 1865b8ed9..35bc8ab74 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -56,13 +56,12 @@ jobs: run: pandoc -s -o RELEASENOTES.md doc/releasenotes/${{ env.RELEASE_VERSION }}.rst - name: Get release data in an environment variable - run: echo 'DESCRIPTION="$(cat RELEASENOTES.md)"' >> $GITHUB_ENV + run: echo "DESCRIPTION=$(cat RELEASENOTES.md)" >> $GITHUB_ENV - name: Populate the release description with RELEASENOTES.md run: | - gh api repos/${{ github.repository }}/releases/tags/$RELEASE_VERSION \ + gh api repos/${{ github.repository }}/releases/tags/${{ env.RELEASE_VERSION }} \ -X PATCH -H 'Accept: application/vnd.github.v3+json' \ - -H 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' \ -F body=${{ env.DESCRIPTION }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From bf4f97799fa0e79799dde52c204e64647119c96d Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 13:55:21 -0600 Subject: [PATCH 038/130] try calling cat directly --- .github/workflows/populate-releasenotes.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 35bc8ab74..340eb4603 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -55,14 +55,14 @@ jobs: - name: Convert .rst to .md run: pandoc -s -o RELEASENOTES.md doc/releasenotes/${{ env.RELEASE_VERSION }}.rst - - name: Get release data in an environment variable - run: echo "DESCRIPTION=$(cat RELEASENOTES.md)" >> $GITHUB_ENV + # - name: Get release data in an environment variable + # run: echo "DESCRIPTION=$(cat RELEASENOTES.md)" >> $GITHUB_ENV - name: Populate the release description with RELEASENOTES.md run: | gh api repos/${{ github.repository }}/releases/tags/${{ env.RELEASE_VERSION }} \ -X PATCH -H 'Accept: application/vnd.github.v3+json' \ - -F body=${{ env.DESCRIPTION }} + -F body="$(cat DESCRITPION.md)" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From f614364d1a91bc89d1299b55df5f541a871198eb Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 13:56:45 -0600 Subject: [PATCH 039/130] typo fix --- .github/workflows/populate-releasenotes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 340eb4603..16106ffb0 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -62,7 +62,7 @@ jobs: run: | gh api repos/${{ github.repository }}/releases/tags/${{ env.RELEASE_VERSION }} \ -X PATCH -H 'Accept: application/vnd.github.v3+json' \ - -F body="$(cat DESCRITPION.md)" + -F body="$(cat RELEASENOTES.md)" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From c0d718519e8d425d574a37b488d5f8b0ac89bd36 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 14:06:16 -0600 Subject: [PATCH 040/130] try using curl --- .github/workflows/populate-releasenotes.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 16106ffb0..2536875d6 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -60,9 +60,14 @@ jobs: - name: Populate the release description with RELEASENOTES.md run: | - gh api repos/${{ github.repository }}/releases/tags/${{ env.RELEASE_VERSION }} \ - -X PATCH -H 'Accept: application/vnd.github.v3+json' \ - -F body="$(cat RELEASENOTES.md)" + curl -X PATCH \ + -H 'Accept: application/vnd.github.v3+json' \ + https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ env.RELEASE_VERSION }} \ + -d '{"body":"$(cat RELEASENOTES.md)"}' + # run: | + # gh api repos/${{ github.repository }}/releases/tags/${{ env.RELEASE_VERSION }} \ + # -X PATCH -H 'Accept: application/vnd.github.v3+json' \ + # -F body="$(cat RELEASENOTES.md)" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 1481c38dba30646a9edbf03c7c85eb98408fc11e Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 14:29:52 -0600 Subject: [PATCH 041/130] try using gh release create --- .github/workflows/populate-releasenotes.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 2536875d6..a1de6bd69 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -59,15 +59,18 @@ jobs: # run: echo "DESCRIPTION=$(cat RELEASENOTES.md)" >> $GITHUB_ENV - name: Populate the release description with RELEASENOTES.md + # run: | + # curl -X PATCH \ + # -H 'Accept: application/vnd.github.v3+json' \ + # https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ env.RELEASE_VERSION }} \ + # -d '{"body":"$(cat RELEASENOTES.md)"}' run: | - curl -X PATCH \ - -H 'Accept: application/vnd.github.v3+json' \ - https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ env.RELEASE_VERSION }} \ - -d '{"body":"$(cat RELEASENOTES.md)"}' - # run: | - # gh api repos/${{ github.repository }}/releases/tags/${{ env.RELEASE_VERSION }} \ - # -X PATCH -H 'Accept: application/vnd.github.v3+json' \ - # -F body="$(cat RELEASENOTES.md)" + gh release create ${{ env.RELEASE_VERSION }} -t ${{ env.RELEASE_VERSION }} -dp -F RELEASENOTES.md + + # run: | + # gh api repos/${{ github.repository }}/releases/tags/${{ env.RELEASE_VERSION }} \ + # -X PATCH -H 'Accept: application/vnd.github.v3+json' \ + # -F body="$(cat RELEASENOTES.md)" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 5a53b7896ca87bc86c2bdf1b5d604137af6e795b Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 14:31:56 -0600 Subject: [PATCH 042/130] rerun test --- .github/workflows/populate-releasenotes.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index a1de6bd69..9cf3cfff8 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -64,8 +64,7 @@ jobs: # -H 'Accept: application/vnd.github.v3+json' \ # https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ env.RELEASE_VERSION }} \ # -d '{"body":"$(cat RELEASENOTES.md)"}' - run: | - gh release create ${{ env.RELEASE_VERSION }} -t ${{ env.RELEASE_VERSION }} -dp -F RELEASENOTES.md + run: gh release create ${{ env.RELEASE_VERSION }} -t ${{ env.RELEASE_VERSION }} -dp -F RELEASENOTES.md # run: | # gh api repos/${{ github.repository }}/releases/tags/${{ env.RELEASE_VERSION }} \ From 07af7da277046f2211c378b56c825029f2314e9d Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 14:39:09 -0600 Subject: [PATCH 043/130] added comment --- .github/workflows/populate-releasenotes.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 9cf3cfff8..4daa6ebce 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -52,6 +52,10 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ## will need a way to clear the current release + # - name: Clear current release + # run: gh release + - name: Convert .rst to .md run: pandoc -s -o RELEASENOTES.md doc/releasenotes/${{ env.RELEASE_VERSION }}.rst From 463763b991c0075a7365d56710c262b49545a1ff Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 14:41:17 -0600 Subject: [PATCH 044/130] added comment --- .github/workflows/populate-releasenotes.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 4daa6ebce..ebc28988f 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -53,6 +53,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ## will need a way to clear the current release + ## or we just run this on publish ... # - name: Clear current release # run: gh release From 87e7e5701af29be6f88b0c4c19722b6d5f3c81ba Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 17:54:30 -0600 Subject: [PATCH 045/130] try using request-action --- .github/workflows/populate-releasenotes.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index ebc28988f..ff59d7fc4 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -64,17 +64,27 @@ jobs: # run: echo "DESCRIPTION=$(cat RELEASENOTES.md)" >> $GITHUB_ENV - name: Populate the release description with RELEASENOTES.md + - uses: octokit/request-action@v2.x + id: populate_release_description + with: + route: PATCH /repos/{owner}/{repo}/releases/{tag} + owner: yardasol + repo: saltproc + head_sha: ${{ github.sha }} + tag: ${{ env.RELEASE_VERSION }} + output: | + body: test # run: | # curl -X PATCH \ # -H 'Accept: application/vnd.github.v3+json' \ # https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ env.RELEASE_VERSION }} \ # -d '{"body":"$(cat RELEASENOTES.md)"}' - run: gh release create ${{ env.RELEASE_VERSION }} -t ${{ env.RELEASE_VERSION }} -dp -F RELEASENOTES.md + # run: gh release create ${{ env.RELEASE_VERSION }} -t ${{ env.RELEASE_VERSION }} -dp -F RELEASENOTES.md - # run: | - # gh api repos/${{ github.repository }}/releases/tags/${{ env.RELEASE_VERSION }} \ - # -X PATCH -H 'Accept: application/vnd.github.v3+json' \ - # -F body="$(cat RELEASENOTES.md)" + # run: | + # gh api repos/${{ github.repository }}/releases/tags/${{ env.RELEASE_VERSION }} \ + # -X PATCH -H 'Accept: application/vnd.github.v3+json' \ + # -F body="$(cat RELEASENOTES.md)" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 45f143c421736d564ea70270a22fb29d17680ac3 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 17:55:48 -0600 Subject: [PATCH 046/130] typo fix --- .github/workflows/populate-releasenotes.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index ff59d7fc4..42dc629fa 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -21,6 +21,7 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Set up Python 3.9 uses: actions/setup-python@v2 with: @@ -64,7 +65,7 @@ jobs: # run: echo "DESCRIPTION=$(cat RELEASENOTES.md)" >> $GITHUB_ENV - name: Populate the release description with RELEASENOTES.md - - uses: octokit/request-action@v2.x + uses: octokit/request-action@v2.x id: populate_release_description with: route: PATCH /repos/{owner}/{repo}/releases/{tag} From 387d7426c54f5907377ef455da46414413836c72 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 18:00:08 -0600 Subject: [PATCH 047/130] typo fix --- .github/workflows/populate-releasenotes.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 42dc629fa..785a2483d 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -68,11 +68,7 @@ jobs: uses: octokit/request-action@v2.x id: populate_release_description with: - route: PATCH /repos/{owner}/{repo}/releases/{tag} - owner: yardasol - repo: saltproc - head_sha: ${{ github.sha }} - tag: ${{ env.RELEASE_VERSION }} + route: PATCH /repos/${{ github.repository }}/releases/${{ env.RELEASE_VERSION }} output: | body: test # run: | From 199481f1cef4bc8d6ca07648be6590c570589ce5 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 18:04:11 -0600 Subject: [PATCH 048/130] typo fix --- .github/workflows/populate-releasenotes.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 785a2483d..27197d3fc 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -69,8 +69,7 @@ jobs: id: populate_release_description with: route: PATCH /repos/${{ github.repository }}/releases/${{ env.RELEASE_VERSION }} - output: | - body: test + body: "test" # run: | # curl -X PATCH \ # -H 'Accept: application/vnd.github.v3+json' \ From 55c1677901328c5f14f4d3d43f70c6dc7c9e5315 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 18:09:16 -0600 Subject: [PATCH 049/130] try adding /tags/ to slug --- .github/workflows/populate-releasenotes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 27197d3fc..3ee17d4dd 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -68,7 +68,7 @@ jobs: uses: octokit/request-action@v2.x id: populate_release_description with: - route: PATCH /repos/${{ github.repository }}/releases/${{ env.RELEASE_VERSION }} + route: PATCH /repos/${{ github.repository }}/releases/tags/${{ env.RELEASE_VERSION }} body: "test" # run: | # curl -X PATCH \ From d56ede2dad63ee68a8c5e23ab7a29ff6d70c2fdf Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 18:38:20 -0600 Subject: [PATCH 050/130] update releasenote --- doc/releasenotes/v0.4.0.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/releasenotes/v0.4.0.rst b/doc/releasenotes/v0.4.0.rst index 33da466bf..99ab2b031 100644 --- a/doc/releasenotes/v0.4.0.rst +++ b/doc/releasenotes/v0.4.0.rst @@ -25,7 +25,7 @@ Summary .. Describe generally the features of this release -This version of SaltProc is a compatibility-breaking code refactor in preparation for supporting OpenMC. +This version of SaltProc refactors the code in preparation for supporting OpenMC. ------------------ From 3fc462421fd2ba7efa7a73539c8c1e37197d2463 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 20:58:33 -0600 Subject: [PATCH 051/130] added test script --- doc/releasenotes/test.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 doc/releasenotes/test.sh diff --git a/doc/releasenotes/test.sh b/doc/releasenotes/test.sh new file mode 100644 index 000000000..2cedda65f --- /dev/null +++ b/doc/releasenotes/test.sh @@ -0,0 +1,8 @@ +files=$(git diff --name-only HEAD HEAD~1) + +#I'm trying to make a script that will get the version nams +# from the changelogs to pass ot a gh action +for file in $files +do + IFS='/' read -ra arr <<< "$file" + VERSION=lnlnlnlf From c32c480c92dd073b855c8ef4e300aad740303861 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 21:00:22 -0600 Subject: [PATCH 052/130] add helpful comment to populate-releasenotes.yml --- .github/workflows/populate-releasenotes.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 3ee17d4dd..bb1a87880 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -48,8 +48,13 @@ jobs: conda install -c conda-forge pandoc pip install --upgrade pandoc + - name: Determine which release note has been updated + run: git + + ###### use the release id to do POST and PATCH requests + - name: Get most recent release version - run: echo "RELEASE_VERSION=$(gh api repos/${{ github.repository }}/releases --jq '.[0] | .tag_name')" >> $GITHUB_ENV + run: echo "RELEASE_VERSION=$(gh api repos/${{ github.repository }}/releases/latest --jq '.[0] | .tag_name')" >> $GITHUB_ENV env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 12ef1c10170defdb27ea481c4c13fc06d25cce7e Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 21:03:31 -0600 Subject: [PATCH 053/130] added another helpful comment --- .github/workflows/populate-releasenotes.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index bb1a87880..b26c065b9 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -70,6 +70,10 @@ jobs: # run: echo "DESCRIPTION=$(cat RELEASENOTES.md)" >> $GITHUB_ENV - name: Populate the release description with RELEASENOTES.md + # this finally worked after running: + # curl -i -X PATCH -H "Authorization: token {token goes here}" -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/yardasol/saltproc/releases/58264343 -d '{"name":"test"}' + # I could porbably make this work with eitehr the octockit actions, just raw curl, + # or potnatially cleaner would be gh api uses: octokit/request-action@v2.x id: populate_release_description with: From 41224de33d1f44ef8b84df297c366282a7673bf8 Mon Sep 17 00:00:00 2001 From: yardasol Date: Sun, 30 Jan 2022 21:14:41 -0600 Subject: [PATCH 054/130] make pandoc output github flavored markdown --- .github/workflows/populate-releasenotes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index b26c065b9..5639ac5e4 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -64,7 +64,7 @@ jobs: # run: gh release - name: Convert .rst to .md - run: pandoc -s -o RELEASENOTES.md doc/releasenotes/${{ env.RELEASE_VERSION }}.rst + run: pandoc -s -o RELEASENOTES.md -f rst -t gfm doc/releasenotes/${{ env.RELEASE_VERSION }}.rst # - name: Get release data in an environment variable # run: echo "DESCRIPTION=$(cat RELEASENOTES.md)" >> $GITHUB_ENV From 3bcdc8ba47e02516253758fa3513ac9003a56c88 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 14:03:13 -0600 Subject: [PATCH 055/130] add RELEASE_ID variable to workflow --- .github/workflows/populate-releasenotes.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 5639ac5e4..09ee1d21e 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -2,8 +2,6 @@ name: Populate SaltProc release notes on: - release: - type: [created, edited, published] push: # branches: # - master @@ -53,8 +51,10 @@ jobs: ###### use the release id to do POST and PATCH requests - - name: Get most recent release version - run: echo "RELEASE_VERSION=$(gh api repos/${{ github.repository }}/releases/latest --jq '.[0] | .tag_name')" >> $GITHUB_ENV + - name: Get most recent draft release version + run: | + echo "RELEASE_VERSION=$(gh api repos/${{ github.repository }}/releases --jq '.[0] | .name')" >> $GITHUB_ENV + echo "RELEASE_ID=$(gh api repos/${{ github.repository }}/releases --jq '.[0] | .id')" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 72c1dceafdf844acea6abb8785c2742bc132da88 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 14:16:07 -0600 Subject: [PATCH 056/130] finalize step to populate the release notes body --- .github/workflows/populate-releasenotes.yml | 27 ++++----------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 09ee1d21e..a0352ff21 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -66,30 +66,13 @@ jobs: - name: Convert .rst to .md run: pandoc -s -o RELEASENOTES.md -f rst -t gfm doc/releasenotes/${{ env.RELEASE_VERSION }}.rst - # - name: Get release data in an environment variable - # run: echo "DESCRIPTION=$(cat RELEASENOTES.md)" >> $GITHUB_ENV - name: Populate the release description with RELEASENOTES.md - # this finally worked after running: - # curl -i -X PATCH -H "Authorization: token {token goes here}" -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/yardasol/saltproc/releases/58264343 -d '{"name":"test"}' - # I could porbably make this work with eitehr the octockit actions, just raw curl, - # or potnatially cleaner would be gh api - uses: octokit/request-action@v2.x - id: populate_release_description - with: - route: PATCH /repos/${{ github.repository }}/releases/tags/${{ env.RELEASE_VERSION }} - body: "test" - # run: | - # curl -X PATCH \ - # -H 'Accept: application/vnd.github.v3+json' \ - # https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ env.RELEASE_VERSION }} \ - # -d '{"body":"$(cat RELEASENOTES.md)"}' - # run: gh release create ${{ env.RELEASE_VERSION }} -t ${{ env.RELEASE_VERSION }} -dp -F RELEASENOTES.md - - # run: | - # gh api repos/${{ github.repository }}/releases/tags/${{ env.RELEASE_VERSION }} \ - # -X PATCH -H 'Accept: application/vnd.github.v3+json' \ - # -F body="$(cat RELEASENOTES.md)" + run: | + gh api repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }} \ + -H 'Accept: application/vnd.github.v3+json' \ + -X PATCH \ + -F body="$(cat RELEASENOTES.md)" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 77d807f5a05c516ae6621cd1a5b0321df41bd053 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 14:27:51 -0600 Subject: [PATCH 057/130] add if statement to steps --- .github/workflows/populate-releasenotes.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index a0352ff21..7110088ef 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -46,11 +46,6 @@ jobs: conda install -c conda-forge pandoc pip install --upgrade pandoc - - name: Determine which release note has been updated - run: git - - ###### use the release id to do POST and PATCH requests - - name: Get most recent draft release version run: | echo "RELEASE_VERSION=$(gh api repos/${{ github.repository }}/releases --jq '.[0] | .name')" >> $GITHUB_ENV @@ -58,16 +53,13 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - ## will need a way to clear the current release - ## or we just run this on publish ... - # - name: Clear current release - # run: gh release - - name: Convert .rst to .md + if: contains("$(ls doc/releasenotes/v*.rst)", env.RELEASE_VERSION) run: pandoc -s -o RELEASENOTES.md -f rst -t gfm doc/releasenotes/${{ env.RELEASE_VERSION }}.rst - name: Populate the release description with RELEASENOTES.md + if: contains($(ls), 'RELEASENOTES.md') run: | gh api repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }} \ -H 'Accept: application/vnd.github.v3+json' \ From a45e818e9471c9e8d996a70da1f3d2aca4c2588b Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 14:30:37 -0600 Subject: [PATCH 058/130] comment out if statement --- .github/workflows/populate-releasenotes.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 7110088ef..4823a36f9 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -54,12 +54,12 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Convert .rst to .md - if: contains("$(ls doc/releasenotes/v*.rst)", env.RELEASE_VERSION) + #if: contains("$(ls doc/releasenotes/v*.rst)", env.RELEASE_VERSION) run: pandoc -s -o RELEASENOTES.md -f rst -t gfm doc/releasenotes/${{ env.RELEASE_VERSION }}.rst - name: Populate the release description with RELEASENOTES.md - if: contains($(ls), 'RELEASENOTES.md') + #if: contains($(ls), 'RELEASENOTES.md') run: | gh api repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }} \ -H 'Accept: application/vnd.github.v3+json' \ From 180dad19dafca8bfb4d243a7b45eead6b34b2bc4 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 14:33:44 -0600 Subject: [PATCH 059/130] fix populate-releasenotes job name --- .github/workflows/populate-releasenotes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 4823a36f9..ccaea06e1 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -11,7 +11,7 @@ on: workflow_dispatch: jobs: - deploy-docs: + populate-releasenotes: runs-on: ubuntu-latest defaults: run: From 25865bdd1b1a22a29d0ce954d85ca91277149046 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 14:35:57 -0600 Subject: [PATCH 060/130] try addinggithub token to header --- .github/workflows/populate-releasenotes.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index ccaea06e1..bb6c68e5f 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -62,6 +62,7 @@ jobs: #if: contains($(ls), 'RELEASENOTES.md') run: | gh api repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }} \ + -H "Authroize: token {GITHUB_TOKEN}" -H 'Accept: application/vnd.github.v3+json' \ -X PATCH \ -F body="$(cat RELEASENOTES.md)" From aa1c5671c30f6149513c2d713bf4110c0c1ce300 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 14:38:43 -0600 Subject: [PATCH 061/130] typo fix --- .github/workflows/populate-releasenotes.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index bb6c68e5f..d388e0549 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -62,11 +62,11 @@ jobs: #if: contains($(ls), 'RELEASENOTES.md') run: | gh api repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }} \ - -H "Authroize: token {GITHUB_TOKEN}" - -H 'Accept: application/vnd.github.v3+json' \ + -H "Authorize: token ${{ GITHUB_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ -X PATCH \ -F body="$(cat RELEASENOTES.md)" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + #env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 0268cd33e1c8721e6d83013f07c28943b59e5d55 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 14:39:35 -0600 Subject: [PATCH 062/130] typo fix --- .github/workflows/populate-releasenotes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index d388e0549..a8a006be9 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -62,7 +62,7 @@ jobs: #if: contains($(ls), 'RELEASENOTES.md') run: | gh api repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }} \ - -H "Authorize: token ${{ GITHUB_TOKEN }}" \ + -H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ -H "Accept: application/vnd.github.v3+json" \ -X PATCH \ -F body="$(cat RELEASENOTES.md)" From 990fef7cfed2e0bb41fa7d6756210ed6b1a848c6 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 14:40:56 -0600 Subject: [PATCH 063/130] use gh auth via GITHUB_TOKEN --- .github/workflows/populate-releasenotes.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index a8a006be9..f2d7d52b2 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -66,7 +66,7 @@ jobs: -H "Accept: application/vnd.github.v3+json" \ -X PATCH \ -F body="$(cat RELEASENOTES.md)" - #env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From cd6df6ce3d42a7b4b0a9a8dcb1f689107f25ad52 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 14:42:52 -0600 Subject: [PATCH 064/130] remove Authorize header --- .github/workflows/populate-releasenotes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index f2d7d52b2..5d93111e7 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -62,7 +62,7 @@ jobs: #if: contains($(ls), 'RELEASENOTES.md') run: | gh api repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }} \ - -H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ + # -H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ -H "Accept: application/vnd.github.v3+json" \ -X PATCH \ -F body="$(cat RELEASENOTES.md)" From 57a60feb2dedc7c0dbbffbe5c7a43f5126b132c2 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 14:44:33 -0600 Subject: [PATCH 065/130] remove Authorize line --- .github/workflows/populate-releasenotes.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 5d93111e7..bf43fb3df 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -62,7 +62,6 @@ jobs: #if: contains($(ls), 'RELEASENOTES.md') run: | gh api repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }} \ - # -H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ -H "Accept: application/vnd.github.v3+json" \ -X PATCH \ -F body="$(cat RELEASENOTES.md)" From 2b5c31e63bd6114d64cf87bd713244e098c57fc4 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 14:51:24 -0600 Subject: [PATCH 066/130] Add ACCESS_TOKEN --- .github/workflows/populate-releasenotes.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index bf43fb3df..99130753e 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -62,6 +62,7 @@ jobs: #if: contains($(ls), 'RELEASENOTES.md') run: | gh api repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }} \ + -H "Authorize: token ${{ secrets.ACCESS_TOKEN }}" \ -H "Accept: application/vnd.github.v3+json" \ -X PATCH \ -F body="$(cat RELEASENOTES.md)" From 4f4b1e839532ed89292ee33b5af6cb535bf566e0 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 14:54:44 -0600 Subject: [PATCH 067/130] try setting write permission for metadata --- .github/workflows/populate-releasenotes.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 99130753e..cdc5d61b5 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -10,6 +10,9 @@ on: # enable worflow to be run manually workflow_dispatch: +permissions: + metadata: write + jobs: populate-releasenotes: runs-on: ubuntu-latest From 73aba3e5e10e2a5390fa8d41910f3aae3b8c7bde Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 15:03:23 -0600 Subject: [PATCH 068/130] try using differnt auth header --- .github/workflows/populate-releasenotes.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index cdc5d61b5..b46dedc7f 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -10,9 +10,6 @@ on: # enable worflow to be run manually workflow_dispatch: -permissions: - metadata: write - jobs: populate-releasenotes: runs-on: ubuntu-latest @@ -65,7 +62,7 @@ jobs: #if: contains($(ls), 'RELEASENOTES.md') run: | gh api repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }} \ - -H "Authorize: token ${{ secrets.ACCESS_TOKEN }}" \ + -H "authorization: BEARER ${{ secrets.GITHUB_TOKEN }}" \ -H "Accept: application/vnd.github.v3+json" \ -X PATCH \ -F body="$(cat RELEASENOTES.md)" From a933d6dcde22566d69182eb71c89265beb817ed3 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 15:22:00 -0600 Subject: [PATCH 069/130] : --- .github/workflows/populate-releasenotes.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index b46dedc7f..0626117a7 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -61,11 +61,12 @@ jobs: - name: Populate the release description with RELEASENOTES.md #if: contains($(ls), 'RELEASENOTES.md') run: | - gh api repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }} \ - -H "authorization: BEARER ${{ secrets.GITHUB_TOKEN }}" \ + curl --url https://api.github.com/repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }} \ + -H "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ -H "Accept: application/vnd.github.v3+json" \ -X PATCH \ - -F body="$(cat RELEASENOTES.md)" + -d '{"body":"curl test"}' + #-F body="$(cat RELEASENOTES.md)" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From c1e693036bbba453bc94584e2b760c3df13e8404 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 15:33:34 -0600 Subject: [PATCH 070/130] try using octokit aciton --- .github/workflows/populate-releasenotes.yml | 22 ++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 0626117a7..65ed4393b 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -54,19 +54,23 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Convert .rst to .md - #if: contains("$(ls doc/releasenotes/v*.rst)", env.RELEASE_VERSION) run: pandoc -s -o RELEASENOTES.md -f rst -t gfm doc/releasenotes/${{ env.RELEASE_VERSION }}.rst - name: Populate the release description with RELEASENOTES.md - #if: contains($(ls), 'RELEASENOTES.md') - run: | - curl --url https://api.github.com/repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }} \ - -H "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ - -H "Accept: application/vnd.github.v3+json" \ - -X PATCH \ - -d '{"body":"curl test"}' - #-F body="$(cat RELEASENOTES.md)" + uses: octokit/request-actions@v2.x + with: + route: PATCH /repos/{owner}/{repo}/releases/{id} + owner: yardasol + repo: saltproc + id: ${{ env.RELEASE_ID }} + body: "ocotkit aciton test" + #run: | + # gh api repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }} \ + # -H "Authorize: ${{ secrets.GITHUB_TOKEN }}" \ + # -H "Accept: application/vnd.github.v3+json" \ + # -X PATCH \ + # -F body="$(cat RELEASENOTES.md)" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From a70d7f05d9f5e54850a3c848ca95a601586f1d41 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 15:34:26 -0600 Subject: [PATCH 071/130] typo fix --- .github/workflows/populate-releasenotes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 65ed4393b..239db4fe9 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -58,7 +58,7 @@ jobs: - name: Populate the release description with RELEASENOTES.md - uses: octokit/request-actions@v2.x + uses: octokit/request-action@v2.x with: route: PATCH /repos/{owner}/{repo}/releases/{id} owner: yardasol From 1554678a237cb824d0031e77679298131cd37e29 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 15:38:46 -0600 Subject: [PATCH 072/130] typo fix --- .github/workflows/populate-releasenotes.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 239db4fe9..8ec32ec1a 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -60,11 +60,11 @@ jobs: - name: Populate the release description with RELEASENOTES.md uses: octokit/request-action@v2.x with: - route: PATCH /repos/{owner}/{repo}/releases/{id} + route: PATCH /repos/{owner}/{repo}/releases/{release_id} owner: yardasol repo: saltproc - id: ${{ env.RELEASE_ID }} - body: "ocotkit aciton test" + release_id: ${{ env.RELEASE_ID }} + body: "$(cat RELEASENOTES.md)" #run: | # gh api repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }} \ # -H "Authorize: ${{ secrets.GITHUB_TOKEN }}" \ From 2c172ed1b759faaca70dff88972e45617669aaf4 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 15:46:14 -0600 Subject: [PATCH 073/130] try gh apiagain --- .github/workflows/populate-releasenotes.yml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 8ec32ec1a..b8e767306 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -58,19 +58,12 @@ jobs: - name: Populate the release description with RELEASENOTES.md - uses: octokit/request-action@v2.x - with: - route: PATCH /repos/{owner}/{repo}/releases/{release_id} - owner: yardasol - repo: saltproc - release_id: ${{ env.RELEASE_ID }} - body: "$(cat RELEASENOTES.md)" - #run: | - # gh api repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }} \ - # -H "Authorize: ${{ secrets.GITHUB_TOKEN }}" \ - # -H "Accept: application/vnd.github.v3+json" \ - # -X PATCH \ - # -F body="$(cat RELEASENOTES.md)" + run: | + gh api repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }} \ + -H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + -X PATCH \ + -F body="$(cat RELEASENOTES.md)" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 08acc10f3516298a61aa793c941292b1bf812609 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 15:46:49 -0600 Subject: [PATCH 074/130] typo fix --- .github/workflows/populate-releasenotes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index b8e767306..efa52df2e 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -58,7 +58,7 @@ jobs: - name: Populate the release description with RELEASENOTES.md - run: | + run: | gh api repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }} \ -H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ -H "Accept: application/vnd.github.v3+json" \ From 0756c728d005f7d3ed29700d4aed8d20aa65f9cf Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 15:50:37 -0600 Subject: [PATCH 075/130] try using example from the docs --- .github/workflows/populate-releasenotes.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index efa52df2e..88fe8d249 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -59,12 +59,13 @@ jobs: - name: Populate the release description with RELEASENOTES.md run: | - gh api repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }} \ - -H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ - -H "Accept: application/vnd.github.v3+json" \ - -X PATCH \ - -F body="$(cat RELEASENOTES.md)" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - + curl --request PATCH \ + --url https://api.github.com/repos/${{ github.repository }}/releases/${{ env.RELASE_ID }} \ + --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ + --header 'content-type: application/json' \ + --data '{ + "title": "v0.4.0", + "body": "This issue was automatically created by the GitHub Action workflow **${{ github.workflow }}**. \n\n The commit hash was: _${{ github.sha }}_." + }' \ + --fail + From 437c9d1cb1529da2f71d66770c66d80c2b602853 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 15:57:24 -0600 Subject: [PATCH 076/130] missing export to GITHUB_ENV --- .github/workflows/populate-releasenotes.yml | 23 ++++++++++----------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 88fe8d249..dfae31634 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -49,7 +49,7 @@ jobs: - name: Get most recent draft release version run: | echo "RELEASE_VERSION=$(gh api repos/${{ github.repository }}/releases --jq '.[0] | .name')" >> $GITHUB_ENV - echo "RELEASE_ID=$(gh api repos/${{ github.repository }}/releases --jq '.[0] | .id')" + echo "RELEASE_ID=$(gh api repos/${{ github.repository }}/releases --jq '.[0] | .id')" >> $GITHUB_ENV env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -58,14 +58,13 @@ jobs: - name: Populate the release description with RELEASENOTES.md - run: | - curl --request PATCH \ - --url https://api.github.com/repos/${{ github.repository }}/releases/${{ env.RELASE_ID }} \ - --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ - --header 'content-type: application/json' \ - --data '{ - "title": "v0.4.0", - "body": "This issue was automatically created by the GitHub Action workflow **${{ github.workflow }}**. \n\n The commit hash was: _${{ github.sha }}_." - }' \ - --fail - + run: | + gh api repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }} \ + -H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + -X PATCH \ + -F body="$(cat RELEASENOTES.md)" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + From 820e3a3b3527a9506ccc591bb70c9176a624d397 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 15:58:05 -0600 Subject: [PATCH 077/130] typo fix --- .github/workflows/populate-releasenotes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index dfae31634..fe70698c6 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -58,7 +58,7 @@ jobs: - name: Populate the release description with RELEASENOTES.md - run: | + run: | gh api repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }} \ -H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ -H "Accept: application/vnd.github.v3+json" \ From 734054e0664c5405b4f88467db90e8cda8a41f63 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 16:10:54 -0600 Subject: [PATCH 078/130] fix arrow character --- doc/releasenotes/v0.4.0.rst | 45 +++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/doc/releasenotes/v0.4.0.rst b/doc/releasenotes/v0.4.0.rst index 99ab2b031..99dba6b5d 100644 --- a/doc/releasenotes/v0.4.0.rst +++ b/doc/releasenotes/v0.4.0.rst @@ -18,6 +18,7 @@ Release notes for v0.4.0 .. _@LukeSeifert: https://github.com/LukeSeifert .. _@munkm: https://github.com/munkm + ------- Summary ------- @@ -37,7 +38,7 @@ Dependency Changes - Saltproc now requires the following packages - - (new) -> `jsonschema`_ + - (new) → `jsonschema`_ ------------ @@ -71,7 +72,7 @@ Script Changes - The following scripts hav been renamed: - - ``process_j312.sh`` -> ``process_j312.bash`` + - ``process_j312.sh`` → ``process_j312.bash`` ------------------ @@ -88,38 +89,38 @@ Python API Changes - The following class methods have been added/(re)moved: - - ``App.check_restart()`` -> ``Simulation.check_restart()`` - - ``Simulation.switch_to_next_geometry`` -> ``DepcodeSerpent.switch_to_next_geometry`` - - ``Simulation.runsim_no_reproc`` -> ``test/integration_tests/test_no_reproc_run.py::runsim_no_reproc`` + - ``App.check_restart()`` → ``Simulation.check_restart()`` + - ``Simulation.switch_to_next_geometry`` → ``DepcodeSerpent.switch_to_next_geometry`` + - ``Simulation.runsim_no_reproc`` → ``test/integration_tests/test_no_reproc_run.py::runsim_no_reproc`` - ``Simulation.store_run_step_info`` - ``Simulation.store_run_init_info`` - - (new) -> ``Depcode.switch_to_next_geometry`` - - (new) -> ``Depcode.read_depcode_info`` - - (new) -> ``Depcode.read_repcode_step_param`` + - (new) → ``Depcode.switch_to_next_geometry`` + - (new) → ``Depcode.read_depcode_info`` + - (new) → ``Depcode.read_repcode_step_param`` - Updated input file structure: - ``App.depcode_inp`` dictionary - - (new) -> ``App.depcode_inp['codename']`` + - (new) → ``App.depcode_inp['codename']`` - ``App.exec_path`` - ``App.template_file`` - - ``App.neutron_pop`` -> ``App.depcode_inp['npop']`` + - ``App.neutron_pop`` → ``App.depcode_inp['npop']`` - ``App.active_cycles`` - ``App.inactive_cycles`` - - ``App.geo_file`` -> ``App.depcode_inp['geo_file_paths']`` + - ``App.geo_file`` → ``App.depcode_inp['geo_file_paths']`` - ``App.simulation_inp`` dictionary: - - (new) -> ``App.simulation['sim_name']`` - - ``App.db_file`` -> ``App.simulation['db_name']`` + - (new) → ``App.simulation['sim_name']`` + - ``App.db_file`` → ``App.simulation['db_name']`` - ``App.restart_flag`` - ``App.adjust_geo`` - ``App.reactor_inp`` dictionary - - (new) -> ``App.reactor_inp['volume']`` - - (new) -> ``App.reactor_inp['mass_flowrate']`` + - (new) → ``App.reactor_inp['volume']`` + - (new) → ``App.reactor_inp['mass_flowrate']`` - ``App.power_levels`` - ``App.depl_hist`` @@ -127,16 +128,16 @@ Python API Changes - ``Depcode`` class: - - ``template_path`` -> ``template_inputfile_path`` - - ``input_path`` -> ``iter_inputfile`` - - ``geo_file`` -> ``geo_files`` + - ``template_path`` → ``template_inputfile_path`` + - ``input_path`` → ``iter_inputfile`` + - ``geo_file`` → ``geo_files`` - ``Simulation`` class: - - ``h5_file`` -> ``db_path`` - - (new) -> ``restart_flag`` - - (new) -> ``adjust_geo`` - - ``iter_matfile`` -> (removed) + - ``h5_file`` → ``db_path`` + - (new) → ``restart_flag`` + - (new) → ``adjust_geo`` + - ``iter_matfile`` → (removed) - The signatures for the following class methods have changed to better make use of object data encapsulation: From 3d9113a7e63931948f007fa0e0021d5b8ad0cf6c Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 16:12:51 -0600 Subject: [PATCH 079/130] fix columns --- .github/workflows/populate-releasenotes.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index fe70698c6..1df65d54b 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -3,10 +3,10 @@ name: Populate SaltProc release notes on: push: - # branches: - # - master - # paths: - # - 'doc/releasenotes/**' + branches: + - master + paths: + - 'doc/releasenotes/v**.rst' # enable worflow to be run manually workflow_dispatch: @@ -54,7 +54,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Convert .rst to .md - run: pandoc -s -o RELEASENOTES.md -f rst -t gfm doc/releasenotes/${{ env.RELEASE_VERSION }}.rst + run: pandoc -s -o RELEASENOTES.md -f rst -t gfm doc/releasenotes/${{ env.RELEASE_VERSION }}.rst --columns 1000 - name: Populate the release description with RELEASENOTES.md From 1385d58a379d766306e3e01e89b9ebca2796564d Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 16:15:19 -0600 Subject: [PATCH 080/130] add v0.3.0.rst to release notes --- doc/releasenotes/v0.3.0.rst | 52 +++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 doc/releasenotes/v0.3.0.rst diff --git a/doc/releasenotes/v0.3.0.rst b/doc/releasenotes/v0.3.0.rst new file mode 100644 index 000000000..eea3b39bf --- /dev/null +++ b/doc/releasenotes/v0.3.0.rst @@ -0,0 +1,52 @@ +This release of SaltProc adds several new features, including a refactor of ``depcode``, updated documentation, and installation guides. Make sure you apply `this bug fix `__ in your Serpent2 code if you haven't already. + +New Features +============ + +- Complete refactor of the code into object-oriented python. +- Adds a Sparging system package -- contained in the ``sparger`` and ``separator`` modules -- that calculates removal efficiencies for various target isotopes (i.e. Xe, Kr, H). +- Adds a script for creating a Serpent2 compatible cross section library +- Refactors the ``depcode`` module by making ``Depcode`` a purley abstract class; add the ``DepcodeSerpent`` class which is an instance of ``Depcode`` + +Bug Fixes +========= + +- `Remove cruft in master `__ +- `Update Geometry file syntax to Serpent 2 standards `__ +- `Update issue and PR templates `__ +- `Fix incorrect variable call in ``app.read_dot`` `__ +- `Fix typos in documentation `__ + +Commit list +=========== + +- Isotope find by @jbae11 in https://github.com/arfc/saltproc/pull/23 +- Saltproc capability addition and UI improvement by @jbae11 in https://github.com/arfc/saltproc/pull/29 +- Completely refactored and changed after latest Teddy's release (0.2.0) by @andrewryh in https://github.com/arfc/saltproc/pull/37 +- Update README.md only to address #41 by @andrewryh in https://github.com/arfc/saltproc/pull/45 +- Bringing SaltProc repository up to date by @andrewryh in https://github.com/arfc/saltproc/pull/47 +- Scripts and input files for sensitivity analysis of msbr design by @mehmeturkmen in https://github.com/arfc/saltproc/pull/48 +- Saltproc multiple run flexibility by @mehmeturkmen in https://github.com/arfc/saltproc/pull/49 +- Adding sparging system to saltproc by @mehmeturkmen in https://github.com/arfc/saltproc/pull/50 +- The updated "overview.rst" file for the latest change in Saltproc by @mehmeturkmen in https://github.com/arfc/saltproc/pull/53 +- Improved separator using Jiaqi's new correlation by @mehmeturkmen in https://github.com/arfc/saltproc/pull/54 +- Create ci.yml by @yardasol in https://github.com/arfc/saltproc/pull/61 +- Call ``name`` instead of ``__string__`` to assign ``mat_name`` by @yardasol in https://github.com/arfc/saltproc/pull/63 +- Add issue + PR templates by @yardasol in https://github.com/arfc/saltproc/pull/66 +- Update README and Contributing by @yardasol in https://github.com/arfc/saltproc/pull/71 +- Refactor depcode by @yardasol in https://github.com/arfc/saltproc/pull/64 +- 2nd attempt: Update issue template formatting. by @yardasol in https://github.com/arfc/saltproc/pull/75 +- Update example and integration test input files to serpent 2 syntax by @yardasol in https://github.com/arfc/saltproc/pull/89 +- Remove cruft files from ``master`` branch by @yardasol in https://github.com/arfc/saltproc/pull/86 +- ``doc`` additions, docstring typo fixes, cross section processing scripts by @yardasol in https://github.com/arfc/saltproc/pull/90 +- Patch #90 (pep8 issues, docstring consistency) by @yardasol in https://github.com/arfc/saltproc/pull/92 + +Contributors +============ + +- @yardasol +- @mehmeturkmen +- @andrewryh +- @jbae11 + +**Full Changelog**: https://github.com/arfc/saltproc/compare/v0.2.0...v0.3.0 From fcc810b35576b342e0aadb3d8e1c633018d6eeba Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 16:50:10 -0600 Subject: [PATCH 081/130] added next_release_minor workflow --- .github/workflows/next_release_minor.yml | 57 ++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/next_release_minor.yml diff --git a/.github/workflows/next_release_minor.yml b/.github/workflows/next_release_minor.yml new file mode 100644 index 000000000..e2e71b7ba --- /dev/null +++ b/.github/workflows/next_release_minor.yml @@ -0,0 +1,57 @@ +# Preamble +name: Create next minor release + +on: + release: [publish] + # enable worflow to be run manually + workflow_dispatch: + +jobs: + next-relese-minor: + runs-on: ubuntu-latest + defaults: + run: + shell: bash -l {0} + + steps: + - uses: actions/checkout@v2 + + - name: Get most recent release version + run: | + echo "RELEASE_VERSION=$(gh api repos/${{ github.repository }}/releases/tags --jq '.[0] | .name')" >> $GITHUB_ENV + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Increment minor version + run: | + IFS='.' read -ra arr <<< ${{ env.RELEASE_VERSION }} + MINOR_VERSION=$((${arr[1]}+1)) + arr[1]=$MINOR_VERSION + NEW_RELEASE_VERSION="${arr[0]}.${arr[1]}.${arr[2]}" + echo "NEW_RELEASE_VERSION="$NEW_RELEASE_VERSION >> $GITHUB_ENV + + - name: Create a new release and milestone. + run: | + gh api repos/${{ github.repository }}/releases \ + -H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + -X POST \ + -F name=${{ env.NEW_RELEASE_VERSION }} \ + -F draft=true \ + -F tag_name=${{ env.NEW_RELEASE_VERSION }} + gh api repos/${{ github.repository }}/milestones \ + -H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + -X POST \ + -F title=${{ env.NEW_RELEASE_VERSION }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create new release notes + run: | + cp doc/releasenotes/template.rst doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst + sed -i "s/vx.x.x/${{ env.NEW_RELEASE_VERSION }}/g" doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst + git add doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst + git commit -m "created ${{ env.NEW_RELEASE_VERSION }} release notes" + git fetch origin + git push origin master From 2c77852020ebd6772a7a9714fb06c612bda4fc2a Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 16:54:27 -0600 Subject: [PATCH 082/130] added next_release_micro workflow --- .github/workflows/next_release_micro.yml | 56 ++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/next_release_micro.yml diff --git a/.github/workflows/next_release_micro.yml b/.github/workflows/next_release_micro.yml new file mode 100644 index 000000000..420c665ab --- /dev/null +++ b/.github/workflows/next_release_micro.yml @@ -0,0 +1,56 @@ +# Preamble +name: Create next micro release + +on: + # enable worflow to be run manually + workflow_dispatch: + +jobs: + next-relese-micro: + runs-on: ubuntu-latest + defaults: + run: + shell: bash -l {0} + + steps: + - uses: actions/checkout@v2 + + - name: Get most recent release version + run: | + echo "RELEASE_VERSION=$(gh api repos/${{ github.repository }}/releases/tags --jq '.[0] | .name')" >> $GITHUB_ENV + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Increment micro version + run: | + IFS='.' read -ra arr <<< ${{ env.RELEASE_VERSION }} + MINOR_VERSION=$((${arr[2]}+1)) + arr[2]=$MICRO_VERSION + NEW_RELEASE_VERSION="${arr[0]}.${arr[1]}.${arr[2]}" + echo "NEW_RELEASE_VERSION="$NEW_RELEASE_VERSION >> $GITHUB_ENV + + - name: Create a new release and milestone. + run: | + gh api repos/${{ github.repository }}/releases \ + -H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + -X POST \ + -F name=${{ env.NEW_RELEASE_VERSION }} \ + -F draft=true \ + -F tag_name=${{ env.NEW_RELEASE_VERSION }} + gh api repos/${{ github.repository }}/milestones \ + -H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + -X POST \ + -F title=${{ env.NEW_RELEASE_VERSION }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create new release notes + run: | + cp doc/releasenotes/template.rst doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst + sed -i "s/vx.x.x/${{ env.NEW_RELEASE_VERSION }}/g" doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst + git add doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst + git commit -m "created ${{ env.NEW_RELEASE_VERSION }} release notes" + git fetch origin + git push origin master From f9718948e7645eb9654c312cce14c59fecd72c47 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 16:59:21 -0600 Subject: [PATCH 083/130] testing --- .github/workflows/next_release_minor.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/next_release_minor.yml b/.github/workflows/next_release_minor.yml index e2e71b7ba..6039d2c5c 100644 --- a/.github/workflows/next_release_minor.yml +++ b/.github/workflows/next_release_minor.yml @@ -2,7 +2,8 @@ name: Create next minor release on: - release: [publish] + release: + type: [published] # enable worflow to be run manually workflow_dispatch: From 2441fb1964734e04cfa32f2a55064d8d1688cfc5 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 17:00:38 -0600 Subject: [PATCH 084/130] renmae release workflows --- ...lease_minor.yml => next-release-minor.yml} | 0 .github/workflows/next_release_micro.yml | 56 ------------------- 2 files changed, 56 deletions(-) rename .github/workflows/{next_release_minor.yml => next-release-minor.yml} (100%) delete mode 100644 .github/workflows/next_release_micro.yml diff --git a/.github/workflows/next_release_minor.yml b/.github/workflows/next-release-minor.yml similarity index 100% rename from .github/workflows/next_release_minor.yml rename to .github/workflows/next-release-minor.yml diff --git a/.github/workflows/next_release_micro.yml b/.github/workflows/next_release_micro.yml deleted file mode 100644 index 420c665ab..000000000 --- a/.github/workflows/next_release_micro.yml +++ /dev/null @@ -1,56 +0,0 @@ -# Preamble -name: Create next micro release - -on: - # enable worflow to be run manually - workflow_dispatch: - -jobs: - next-relese-micro: - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - - steps: - - uses: actions/checkout@v2 - - - name: Get most recent release version - run: | - echo "RELEASE_VERSION=$(gh api repos/${{ github.repository }}/releases/tags --jq '.[0] | .name')" >> $GITHUB_ENV - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Increment micro version - run: | - IFS='.' read -ra arr <<< ${{ env.RELEASE_VERSION }} - MINOR_VERSION=$((${arr[2]}+1)) - arr[2]=$MICRO_VERSION - NEW_RELEASE_VERSION="${arr[0]}.${arr[1]}.${arr[2]}" - echo "NEW_RELEASE_VERSION="$NEW_RELEASE_VERSION >> $GITHUB_ENV - - - name: Create a new release and milestone. - run: | - gh api repos/${{ github.repository }}/releases \ - -H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ - -H "Accept: application/vnd.github.v3+json" \ - -X POST \ - -F name=${{ env.NEW_RELEASE_VERSION }} \ - -F draft=true \ - -F tag_name=${{ env.NEW_RELEASE_VERSION }} - gh api repos/${{ github.repository }}/milestones \ - -H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ - -H "Accept: application/vnd.github.v3+json" \ - -X POST \ - -F title=${{ env.NEW_RELEASE_VERSION }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Create new release notes - run: | - cp doc/releasenotes/template.rst doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst - sed -i "s/vx.x.x/${{ env.NEW_RELEASE_VERSION }}/g" doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst - git add doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst - git commit -m "created ${{ env.NEW_RELEASE_VERSION }} release notes" - git fetch origin - git push origin master From bf4337bf65b1aa4de7e6117cf365b709d18068aa Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 17:00:57 -0600 Subject: [PATCH 085/130] rename release workflows --- .github/workflows/next-release-micro.yml | 56 ++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/next-release-micro.yml diff --git a/.github/workflows/next-release-micro.yml b/.github/workflows/next-release-micro.yml new file mode 100644 index 000000000..420c665ab --- /dev/null +++ b/.github/workflows/next-release-micro.yml @@ -0,0 +1,56 @@ +# Preamble +name: Create next micro release + +on: + # enable worflow to be run manually + workflow_dispatch: + +jobs: + next-relese-micro: + runs-on: ubuntu-latest + defaults: + run: + shell: bash -l {0} + + steps: + - uses: actions/checkout@v2 + + - name: Get most recent release version + run: | + echo "RELEASE_VERSION=$(gh api repos/${{ github.repository }}/releases/tags --jq '.[0] | .name')" >> $GITHUB_ENV + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Increment micro version + run: | + IFS='.' read -ra arr <<< ${{ env.RELEASE_VERSION }} + MINOR_VERSION=$((${arr[2]}+1)) + arr[2]=$MICRO_VERSION + NEW_RELEASE_VERSION="${arr[0]}.${arr[1]}.${arr[2]}" + echo "NEW_RELEASE_VERSION="$NEW_RELEASE_VERSION >> $GITHUB_ENV + + - name: Create a new release and milestone. + run: | + gh api repos/${{ github.repository }}/releases \ + -H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + -X POST \ + -F name=${{ env.NEW_RELEASE_VERSION }} \ + -F draft=true \ + -F tag_name=${{ env.NEW_RELEASE_VERSION }} + gh api repos/${{ github.repository }}/milestones \ + -H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + -X POST \ + -F title=${{ env.NEW_RELEASE_VERSION }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create new release notes + run: | + cp doc/releasenotes/template.rst doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst + sed -i "s/vx.x.x/${{ env.NEW_RELEASE_VERSION }}/g" doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst + git add doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst + git commit -m "created ${{ env.NEW_RELEASE_VERSION }} release notes" + git fetch origin + git push origin master From e9aec164c1156cf30829ee1bad3af3fa89636614 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 17:02:37 -0600 Subject: [PATCH 086/130] test if editin relase body trggers publish --- .github/workflows/populate-releasenotes.yml | 6 +++--- doc/releasenotes/v0.4.0.rst | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 1df65d54b..5fad6ea02 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -3,10 +3,10 @@ name: Populate SaltProc release notes on: push: - branches: - - master + # branches: + # - master paths: - - 'doc/releasenotes/v**.rst' + - 'doc/releasenotes/v0.4.0.rst' # enable worflow to be run manually workflow_dispatch: diff --git a/doc/releasenotes/v0.4.0.rst b/doc/releasenotes/v0.4.0.rst index 99dba6b5d..fdc05d1e6 100644 --- a/doc/releasenotes/v0.4.0.rst +++ b/doc/releasenotes/v0.4.0.rst @@ -12,7 +12,6 @@ Release notes for v0.4.0 Links to packages/issues/bug fixes/contributors/reviewers .. _jsonschema: https://github.com/Julian/jsonschema - .. _@yardasol: https://github.com/yardasol .. _@abachma2: https://github.com/abachma2 .. _@LukeSeifert: https://github.com/LukeSeifert From 47fc47f3aab82c46bcd487e13c00d10def8733a3 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 17:04:20 -0600 Subject: [PATCH 087/130] tst the release-minor worklfow --- .github/workflows/next-release-minor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/next-release-minor.yml b/.github/workflows/next-release-minor.yml index 6039d2c5c..f0b40af89 100644 --- a/.github/workflows/next-release-minor.yml +++ b/.github/workflows/next-release-minor.yml @@ -55,4 +55,4 @@ jobs: git add doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst git commit -m "created ${{ env.NEW_RELEASE_VERSION }} release notes" git fetch origin - git push origin master + git push origin test From ef2f642ff953049a93e9d0e950536dd02b2e9038 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 17:09:43 -0600 Subject: [PATCH 088/130] try next-minore release --- .github/workflows/next-release-minor.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/next-release-minor.yml b/.github/workflows/next-release-minor.yml index f0b40af89..75c70552d 100644 --- a/.github/workflows/next-release-minor.yml +++ b/.github/workflows/next-release-minor.yml @@ -2,6 +2,9 @@ name: Create next minor release on: + push: + paths: + - '**.yml' release: type: [published] # enable worflow to be run manually From 0be44ddca72926fcaa2f425bdaef95e6d8bd3766 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 17:16:56 -0600 Subject: [PATCH 089/130] reset populate-releasenotes.yml --- .github/workflows/populate-releasenotes.yml | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index 5fad6ea02..b9de8863d 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -3,10 +3,8 @@ name: Populate SaltProc release notes on: push: - # branches: - # - master paths: - - 'doc/releasenotes/v0.4.0.rst' + - 'doc/releasenotes/v**.rst' # enable worflow to be run manually workflow_dispatch: @@ -29,18 +27,6 @@ jobs: # $CONDA is an environment variable pointing to the root of the miniconda directory echo $CONDA/bin >> $GITHUB_PATH - # - name: Set up conda - # uses: conda-incubator/setup-miniconda@v2 - # with: - # miniforge-variant: Mambaforge # mamba is faster than base conda - # miniforge-version: latest - # activate-environment: saltproc-doc-env - # use-mamba: true - # use-only-tar-bz2: true - # - run: | - # conda config --env --set pip_interop_enabled True - - - name: install pandoc run: | conda install -c conda-forge pandoc From 6202d6c9d5079251d73f2df27ba60bf2ac9f1c4e Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 17:17:04 -0600 Subject: [PATCH 090/130] typo fix --- .github/workflows/next-release-minor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/next-release-minor.yml b/.github/workflows/next-release-minor.yml index 75c70552d..e476a3367 100644 --- a/.github/workflows/next-release-minor.yml +++ b/.github/workflows/next-release-minor.yml @@ -22,7 +22,7 @@ jobs: - name: Get most recent release version run: | - echo "RELEASE_VERSION=$(gh api repos/${{ github.repository }}/releases/tags --jq '.[0] | .name')" >> $GITHUB_ENV + echo "RELEASE_VERSION=$(gh api repos/${{ github.repository }}/tags --jq '.[0] | .name')" >> $GITHUB_ENV env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 9f200ba9a9e71f93e7cd9d9f3ff4bb81b89c36d3 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 17:21:28 -0600 Subject: [PATCH 091/130] typo fix --- .github/workflows/next-release-minor.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/next-release-minor.yml b/.github/workflows/next-release-minor.yml index e476a3367..92832cea7 100644 --- a/.github/workflows/next-release-minor.yml +++ b/.github/workflows/next-release-minor.yml @@ -43,6 +43,12 @@ jobs: -F name=${{ env.NEW_RELEASE_VERSION }} \ -F draft=true \ -F tag_name=${{ env.NEW_RELEASE_VERSION }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + + - name: Create a new milestone. + run: | gh api repos/${{ github.repository }}/milestones \ -H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ -H "Accept: application/vnd.github.v3+json" \ @@ -59,3 +65,6 @@ jobs: git commit -m "created ${{ env.NEW_RELEASE_VERSION }} release notes" git fetch origin git push origin test + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + From c2b6e1dc78d91e29f60cdfb8104e61c7e53e70f5 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 17:22:29 -0600 Subject: [PATCH 092/130] typo fix --- .github/workflows/next-release-minor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/next-release-minor.yml b/.github/workflows/next-release-minor.yml index 92832cea7..100b2b603 100644 --- a/.github/workflows/next-release-minor.yml +++ b/.github/workflows/next-release-minor.yml @@ -47,8 +47,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Create a new milestone. - run: | + - name: Create a new milestone. + run: | gh api repos/${{ github.repository }}/milestones \ -H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ -H "Accept: application/vnd.github.v3+json" \ From 94f8d5922ecaeffcac2ed66f49e50fa39feb69a9 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 17:27:17 -0600 Subject: [PATCH 093/130] typo fix --- .github/workflows/next-release-minor.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/next-release-minor.yml b/.github/workflows/next-release-minor.yml index 100b2b603..87a7801d9 100644 --- a/.github/workflows/next-release-minor.yml +++ b/.github/workflows/next-release-minor.yml @@ -11,7 +11,7 @@ on: workflow_dispatch: jobs: - next-relese-minor: + next-release-minor: runs-on: ubuntu-latest defaults: run: @@ -34,14 +34,13 @@ jobs: NEW_RELEASE_VERSION="${arr[0]}.${arr[1]}.${arr[2]}" echo "NEW_RELEASE_VERSION="$NEW_RELEASE_VERSION >> $GITHUB_ENV - - name: Create a new release and milestone. + - name: Create a new release run: | gh api repos/${{ github.repository }}/releases \ -H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ -H "Accept: application/vnd.github.v3+json" \ -X POST \ - -F name=${{ env.NEW_RELEASE_VERSION }} \ - -F draft=true \ + -F name=${{ env.NEW_RELEASE_VERSION }} -F draft=true \ -F tag_name=${{ env.NEW_RELEASE_VERSION }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 0fe7cfcbaa06681795c787497924643dfc40ef1b Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 17:28:46 -0600 Subject: [PATCH 094/130] typo fix --- .github/workflows/next-release-minor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/next-release-minor.yml b/.github/workflows/next-release-minor.yml index 87a7801d9..b18df71fc 100644 --- a/.github/workflows/next-release-minor.yml +++ b/.github/workflows/next-release-minor.yml @@ -40,7 +40,7 @@ jobs: -H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ -H "Accept: application/vnd.github.v3+json" \ -X POST \ - -F name=${{ env.NEW_RELEASE_VERSION }} -F draft=true \ + -f name=${{ env.NEW_RELEASE_VERSION }} --field draft=true \ -F tag_name=${{ env.NEW_RELEASE_VERSION }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 604b8fd592edf9a694fe1ce08349e06ecc20770b Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 17:30:16 -0600 Subject: [PATCH 095/130] typo fix --- .github/workflows/next-release-minor.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/next-release-minor.yml b/.github/workflows/next-release-minor.yml index b18df71fc..6ef0bb661 100644 --- a/.github/workflows/next-release-minor.yml +++ b/.github/workflows/next-release-minor.yml @@ -40,8 +40,9 @@ jobs: -H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ -H "Accept: application/vnd.github.v3+json" \ -X POST \ - -f name=${{ env.NEW_RELEASE_VERSION }} --field draft=true \ - -F tag_name=${{ env.NEW_RELEASE_VERSION }} + -f name=${{ env.NEW_RELEASE_VERSION }} \ + -F tag_name=${{ env.NEW_RELEASE_VERSION }} \ + --field draft=true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From db2f4ef98759461ca9a30c6e0056f2e7adff439c Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 17:32:00 -0600 Subject: [PATCH 096/130] typo fix --- .github/workflows/next-release-minor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/next-release-minor.yml b/.github/workflows/next-release-minor.yml index 6ef0bb661..a040a3df9 100644 --- a/.github/workflows/next-release-minor.yml +++ b/.github/workflows/next-release-minor.yml @@ -40,9 +40,9 @@ jobs: -H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ -H "Accept: application/vnd.github.v3+json" \ -X POST \ - -f name=${{ env.NEW_RELEASE_VERSION }} \ + -F name=${{ env.NEW_RELEASE_VERSION }} \ -F tag_name=${{ env.NEW_RELEASE_VERSION }} \ - --field draft=true + -F draft=true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From c1c87b227c00874cc92803c2c804a567f822200e Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 17:34:17 -0600 Subject: [PATCH 097/130] typo fix --- .github/workflows/next-release-minor.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/next-release-minor.yml b/.github/workflows/next-release-minor.yml index a040a3df9..b7afa4746 100644 --- a/.github/workflows/next-release-minor.yml +++ b/.github/workflows/next-release-minor.yml @@ -19,6 +19,8 @@ jobs: steps: - uses: actions/checkout@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} - name: Get most recent release version run: | From c41318f2c4490c8ab516379a746884d601916a93 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 17:41:58 -0600 Subject: [PATCH 098/130] typo fix --- .github/workflows/next-release-minor.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/next-release-minor.yml b/.github/workflows/next-release-minor.yml index b7afa4746..9bee08b22 100644 --- a/.github/workflows/next-release-minor.yml +++ b/.github/workflows/next-release-minor.yml @@ -20,7 +20,8 @@ jobs: steps: - uses: actions/checkout@v2 with: - token: ${{ secrets.GITHUB_TOKEN }} + persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token. + fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. - name: Get most recent release version run: | @@ -64,6 +65,9 @@ jobs: cp doc/releasenotes/template.rst doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst sed -i "s/vx.x.x/${{ env.NEW_RELEASE_VERSION }}/g" doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst git add doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst + + git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" git commit -m "created ${{ env.NEW_RELEASE_VERSION }} release notes" git fetch origin git push origin test From 8a5cce274e950cbf0392045180bf11188dea215c Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 17:42:57 -0600 Subject: [PATCH 099/130] fix deploy docs running on every push to master --- .github/workflows/deploy-docs.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index c091583cc..31b715782 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -5,8 +5,6 @@ on: release: type: [published] push: - branches: - - master paths: - 'doc/**' - 'saltproc/**' From c0d26dce8d466c9c56eadb2bcc002be6656a74c1 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 17:44:45 -0600 Subject: [PATCH 100/130] typo fix --- .github/workflows/next-release-minor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/next-release-minor.yml b/.github/workflows/next-release-minor.yml index 9bee08b22..6d3c84a34 100644 --- a/.github/workflows/next-release-minor.yml +++ b/.github/workflows/next-release-minor.yml @@ -68,8 +68,8 @@ jobs: git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" + git chekout origin test git commit -m "created ${{ env.NEW_RELEASE_VERSION }} release notes" - git fetch origin git push origin test env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From ec03fa0d502cae24c79d70b9c6f9a0025501a584 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 17:46:15 -0600 Subject: [PATCH 101/130] typo fix --- .github/workflows/next-release-minor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/next-release-minor.yml b/.github/workflows/next-release-minor.yml index 6d3c84a34..a653c8053 100644 --- a/.github/workflows/next-release-minor.yml +++ b/.github/workflows/next-release-minor.yml @@ -68,7 +68,7 @@ jobs: git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" - git chekout origin test + git checkout origin test git commit -m "created ${{ env.NEW_RELEASE_VERSION }} release notes" git push origin test env: From d2f3993b1c41ab4f26da0270c82d5079466157a0 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 17:47:40 -0600 Subject: [PATCH 102/130] typo fix --- .github/workflows/next-release-minor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/next-release-minor.yml b/.github/workflows/next-release-minor.yml index a653c8053..a20906793 100644 --- a/.github/workflows/next-release-minor.yml +++ b/.github/workflows/next-release-minor.yml @@ -68,9 +68,9 @@ jobs: git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" - git checkout origin test + git checkout test git commit -m "created ${{ env.NEW_RELEASE_VERSION }} release notes" - git push origin test + git push test env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From fec2c2fceb97e74b137f691068cddf594b63a9d2 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 17:49:01 -0600 Subject: [PATCH 103/130] typo fix --- .github/workflows/next-release-minor.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/next-release-minor.yml b/.github/workflows/next-release-minor.yml index a20906793..04e968c5a 100644 --- a/.github/workflows/next-release-minor.yml +++ b/.github/workflows/next-release-minor.yml @@ -70,7 +70,6 @@ jobs: git config --local user.name "github-actions[bot]" git checkout test git commit -m "created ${{ env.NEW_RELEASE_VERSION }} release notes" - git push test env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 19a352cbd3781fc47390f67fa1b1a64d109a7568 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 17:52:24 -0600 Subject: [PATCH 104/130] typo fix --- .github/workflows/next-release-micro.yml | 34 ++++++++++++++++++------ .github/workflows/next-release-minor.yml | 8 ++---- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/.github/workflows/next-release-micro.yml b/.github/workflows/next-release-micro.yml index 420c665ab..3f576fe2c 100644 --- a/.github/workflows/next-release-micro.yml +++ b/.github/workflows/next-release-micro.yml @@ -1,12 +1,17 @@ # Preamble -name: Create next micro release +name: Create next minor release on: + push: + paths: + - '**.yml' + release: + type: [published] # enable worflow to be run manually workflow_dispatch: jobs: - next-relese-micro: + next-release-micro: runs-on: ubuntu-latest defaults: run: @@ -14,10 +19,13 @@ jobs: steps: - uses: actions/checkout@v2 + with: + persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token. + fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. - name: Get most recent release version run: | - echo "RELEASE_VERSION=$(gh api repos/${{ github.repository }}/releases/tags --jq '.[0] | .name')" >> $GITHUB_ENV + echo "RELEASE_VERSION=$(gh api repos/${{ github.repository }}/tags --jq '.[0] | .name')" >> $GITHUB_ENV env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -29,15 +37,21 @@ jobs: NEW_RELEASE_VERSION="${arr[0]}.${arr[1]}.${arr[2]}" echo "NEW_RELEASE_VERSION="$NEW_RELEASE_VERSION >> $GITHUB_ENV - - name: Create a new release and milestone. + - name: Create a new release run: | gh api repos/${{ github.repository }}/releases \ -H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ -H "Accept: application/vnd.github.v3+json" \ -X POST \ -F name=${{ env.NEW_RELEASE_VERSION }} \ - -F draft=true \ - -F tag_name=${{ env.NEW_RELEASE_VERSION }} + -F tag_name=${{ env.NEW_RELEASE_VERSION }} \ + -F draft=true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + + - name: Create a new milestone. + run: | gh api repos/${{ github.repository }}/milestones \ -H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ -H "Accept: application/vnd.github.v3+json" \ @@ -51,6 +65,10 @@ jobs: cp doc/releasenotes/template.rst doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst sed -i "s/vx.x.x/${{ env.NEW_RELEASE_VERSION }}/g" doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst git add doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst + + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git checkout master git commit -m "created ${{ env.NEW_RELEASE_VERSION }} release notes" - git fetch origin - git push origin master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/next-release-minor.yml b/.github/workflows/next-release-minor.yml index 04e968c5a..d1910117c 100644 --- a/.github/workflows/next-release-minor.yml +++ b/.github/workflows/next-release-minor.yml @@ -2,9 +2,6 @@ name: Create next minor release on: - push: - paths: - - '**.yml' release: type: [published] # enable worflow to be run manually @@ -66,10 +63,9 @@ jobs: sed -i "s/vx.x.x/${{ env.NEW_RELEASE_VERSION }}/g" doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst git add doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst - git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config --local user.email "github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" - git checkout test + git checkout master git commit -m "created ${{ env.NEW_RELEASE_VERSION }} release notes" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - From 010e08a8eaca81a930bcc50c96610c74c72fc0c2 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 17:53:30 -0600 Subject: [PATCH 105/130] typo fix --- .github/workflows/next-release-micro.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/next-release-micro.yml b/.github/workflows/next-release-micro.yml index 3f576fe2c..6cc73f857 100644 --- a/.github/workflows/next-release-micro.yml +++ b/.github/workflows/next-release-micro.yml @@ -32,7 +32,7 @@ jobs: - name: Increment micro version run: | IFS='.' read -ra arr <<< ${{ env.RELEASE_VERSION }} - MINOR_VERSION=$((${arr[2]}+1)) + MICRO_VERSION=$((${arr[2]}+1)) arr[2]=$MICRO_VERSION NEW_RELEASE_VERSION="${arr[0]}.${arr[1]}.${arr[2]}" echo "NEW_RELEASE_VERSION="$NEW_RELEASE_VERSION >> $GITHUB_ENV From 4de5fef7e546b4b24ff7711d0f733978d4545a8f Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 17:55:16 -0600 Subject: [PATCH 106/130] typo fix --- .github/workflows/next-release-micro.yml | 3 ++- .github/workflows/next-release-minor.yml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/next-release-micro.yml b/.github/workflows/next-release-micro.yml index 6cc73f857..5c6d7e5b3 100644 --- a/.github/workflows/next-release-micro.yml +++ b/.github/workflows/next-release-micro.yml @@ -68,7 +68,8 @@ jobs: git config --local user.email "github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" - git checkout master + git checkout test git commit -m "created ${{ env.NEW_RELEASE_VERSION }} release notes" + git push env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/next-release-minor.yml b/.github/workflows/next-release-minor.yml index d1910117c..7132c42bf 100644 --- a/.github/workflows/next-release-minor.yml +++ b/.github/workflows/next-release-minor.yml @@ -67,5 +67,6 @@ jobs: git config --local user.name "github-actions[bot]" git checkout master git commit -m "created ${{ env.NEW_RELEASE_VERSION }} release notes" + git push env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 2a99f5b46c865e887f15f54322da068b20a11d9e Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 18:00:39 -0600 Subject: [PATCH 107/130] typo fix --- .github/workflows/next-release-micro.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/next-release-micro.yml b/.github/workflows/next-release-micro.yml index 5c6d7e5b3..0df25fbfc 100644 --- a/.github/workflows/next-release-micro.yml +++ b/.github/workflows/next-release-micro.yml @@ -20,8 +20,8 @@ jobs: steps: - uses: actions/checkout@v2 with: - persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token. fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. + token: ${{ secrets.GITHUB_TOKEN }} - name: Get most recent release version run: | @@ -65,11 +65,7 @@ jobs: cp doc/releasenotes/template.rst doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst sed -i "s/vx.x.x/${{ env.NEW_RELEASE_VERSION }}/g" doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst git add doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst - git config --local user.email "github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" - git checkout test - git commit -m "created ${{ env.NEW_RELEASE_VERSION }} release notes" + git commit -am "created ${{ env.NEW_RELEASE_VERSION }} release notes" git push - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From bd012912910454db12071f5468c9bebb4075f187 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 1 Feb 2022 00:01:34 +0000 Subject: [PATCH 108/130] created v0.4.1 release notes --- doc/releasenotes/v0.4.1.rst | 102 ++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 doc/releasenotes/v0.4.1.rst diff --git a/doc/releasenotes/v0.4.1.rst b/doc/releasenotes/v0.4.1.rst new file mode 100644 index 000000000..82a8fcc2a --- /dev/null +++ b/doc/releasenotes/v0.4.1.rst @@ -0,0 +1,102 @@ +======================== +Release notes for v0.4.1 +======================== + +.. + When documenting a bug fix or feature, please do so in the following format + +.. + - `Fixed typo in depcode.py `_ by @pr_author_username + +.. + Links to packages/issues/bug fixes/contributors/reviewers + + + + +------- +Summary +------- + +.. + Describe generally the features of this release + + + + +------------------ +Dependency Changes +------------------ + +.. + Describe any new/removed/modified package dependencies + + + + +------------ +New Features +------------ + +.. + Describe any new features to the code. + + + + +--------- +Bug Fixes +--------- + +.. + Describe any bug fixes. + + + + +-------------- +Script Changes +-------------- + +.. + Describe any script additions/modifications/removals + + + + +------------------ +Python API Changes +------------------ + +.. + Describe any changes to the API + + + + +------------ +Contributors +------------ +.. + List of people who contributed features and fixes to this release + +The following people contributed code to this release of SaltProc: + +.. + `@gh_username `_ + + + + +--------- +Reviewers +--------- +.. + List of people who reviewed PRs for this release + +The following people reviewed code for this release of SaltProc: + +.. + `@gh_username `_ + + From 0c264b8acc694fc02de0e4c3653f0e04357d4647 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 18:03:29 -0600 Subject: [PATCH 109/130] finalize release workflows --- .github/workflows/next-release-micro.yml | 6 ------ .github/workflows/next-release-minor.yml | 9 ++------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/.github/workflows/next-release-micro.yml b/.github/workflows/next-release-micro.yml index 0df25fbfc..24b8ff9b0 100644 --- a/.github/workflows/next-release-micro.yml +++ b/.github/workflows/next-release-micro.yml @@ -2,11 +2,6 @@ name: Create next minor release on: - push: - paths: - - '**.yml' - release: - type: [published] # enable worflow to be run manually workflow_dispatch: @@ -20,7 +15,6 @@ jobs: steps: - uses: actions/checkout@v2 with: - fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. token: ${{ secrets.GITHUB_TOKEN }} - name: Get most recent release version diff --git a/.github/workflows/next-release-minor.yml b/.github/workflows/next-release-minor.yml index 7132c42bf..fd6ff9de6 100644 --- a/.github/workflows/next-release-minor.yml +++ b/.github/workflows/next-release-minor.yml @@ -17,8 +17,7 @@ jobs: steps: - uses: actions/checkout@v2 with: - persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token. - fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. + token: ${{ secrets.GITHUB_TOKEN }} - name: Get most recent release version run: | @@ -62,11 +61,7 @@ jobs: cp doc/releasenotes/template.rst doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst sed -i "s/vx.x.x/${{ env.NEW_RELEASE_VERSION }}/g" doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst git add doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst - git config --local user.email "github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" - git checkout master - git commit -m "created ${{ env.NEW_RELEASE_VERSION }} release notes" + git commit -am "created ${{ env.NEW_RELEASE_VERSION }} release notes" git push - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 6a6308b2de95356e88cb9250fa3bca37313454ad Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 31 Jan 2022 18:06:13 -0600 Subject: [PATCH 110/130] officially remove cruft --- .github/workflows/populate-releasenotes.yml | 2 - doc/releasenotes/test.sh | 8 -- doc/releasenotes/v0.4.1.rst | 102 -------------------- 3 files changed, 112 deletions(-) delete mode 100644 doc/releasenotes/test.sh delete mode 100644 doc/releasenotes/v0.4.1.rst diff --git a/.github/workflows/populate-releasenotes.yml b/.github/workflows/populate-releasenotes.yml index b9de8863d..1fe2991e2 100644 --- a/.github/workflows/populate-releasenotes.yml +++ b/.github/workflows/populate-releasenotes.yml @@ -52,5 +52,3 @@ jobs: -F body="$(cat RELEASENOTES.md)" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - diff --git a/doc/releasenotes/test.sh b/doc/releasenotes/test.sh deleted file mode 100644 index 2cedda65f..000000000 --- a/doc/releasenotes/test.sh +++ /dev/null @@ -1,8 +0,0 @@ -files=$(git diff --name-only HEAD HEAD~1) - -#I'm trying to make a script that will get the version nams -# from the changelogs to pass ot a gh action -for file in $files -do - IFS='/' read -ra arr <<< "$file" - VERSION=lnlnlnlf diff --git a/doc/releasenotes/v0.4.1.rst b/doc/releasenotes/v0.4.1.rst deleted file mode 100644 index 82a8fcc2a..000000000 --- a/doc/releasenotes/v0.4.1.rst +++ /dev/null @@ -1,102 +0,0 @@ -======================== -Release notes for v0.4.1 -======================== - -.. - When documenting a bug fix or feature, please do so in the following format - -.. - - `Fixed typo in depcode.py `_ by @pr_author_username - -.. - Links to packages/issues/bug fixes/contributors/reviewers - - - - -------- -Summary -------- - -.. - Describe generally the features of this release - - - - ------------------- -Dependency Changes ------------------- - -.. - Describe any new/removed/modified package dependencies - - - - ------------- -New Features ------------- - -.. - Describe any new features to the code. - - - - ---------- -Bug Fixes ---------- - -.. - Describe any bug fixes. - - - - --------------- -Script Changes --------------- - -.. - Describe any script additions/modifications/removals - - - - ------------------- -Python API Changes ------------------- - -.. - Describe any changes to the API - - - - ------------- -Contributors ------------- -.. - List of people who contributed features and fixes to this release - -The following people contributed code to this release of SaltProc: - -.. - `@gh_username `_ - - - - ---------- -Reviewers ---------- -.. - List of people who reviewed PRs for this release - -The following people reviewed code for this release of SaltProc: - -.. - `@gh_username `_ - - From 2e14a9b94ce4456f445adae9ce453a70938a3c58 Mon Sep 17 00:00:00 2001 From: yardasol Date: Tue, 1 Feb 2022 09:26:38 -0600 Subject: [PATCH 111/130] fix name for next-release-micro.yml --- .github/workflows/next-release-micro.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/next-release-micro.yml b/.github/workflows/next-release-micro.yml index 24b8ff9b0..95eca6b60 100644 --- a/.github/workflows/next-release-micro.yml +++ b/.github/workflows/next-release-micro.yml @@ -1,5 +1,5 @@ # Preamble -name: Create next minor release +name: Create next micro release on: # enable worflow to be run manually From f06e828cf29ab2001758ff7a733c19c045d91846 Mon Sep 17 00:00:00 2001 From: yardasol Date: Tue, 1 Feb 2022 09:31:26 -0600 Subject: [PATCH 112/130] add header to v0.3.0 release notes --- doc/releasenotes/v0.3.0.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/releasenotes/v0.3.0.rst b/doc/releasenotes/v0.3.0.rst index eea3b39bf..4e64855c1 100644 --- a/doc/releasenotes/v0.3.0.rst +++ b/doc/releasenotes/v0.3.0.rst @@ -1,3 +1,7 @@ +======================== +Release notes for v0.3.0 +======================== + This release of SaltProc adds several new features, including a refactor of ``depcode``, updated documentation, and installation guides. Make sure you apply `this bug fix `__ in your Serpent2 code if you haven't already. New Features From d22b1507962e0b06be30bb04997bec63d3d2a58a Mon Sep 17 00:00:00 2001 From: yardasol Date: Tue, 1 Feb 2022 09:31:45 -0600 Subject: [PATCH 113/130] fix releasenotes/index.rst --- doc/releasenotes/index.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/releasenotes/index.rst b/doc/releasenotes/index.rst index 18926bcd0..6a08ee65a 100644 --- a/doc/releasenotes/index.rst +++ b/doc/releasenotes/index.rst @@ -7,4 +7,5 @@ Release Notes .. toctree:: :maxdepth: 1 - 0.4.0 + v0.4.0 + v0.3.0 From 845ba47a2f34a2cf7938f6013aa7a6f4c8a51567 Mon Sep 17 00:00:00 2001 From: yardasol Date: Tue, 1 Feb 2022 09:39:07 -0600 Subject: [PATCH 114/130] update release workflows to add new version to releasenotes/index.rst --- .github/workflows/next-release-micro.yml | 2 ++ .github/workflows/next-release-minor.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/next-release-micro.yml b/.github/workflows/next-release-micro.yml index 95eca6b60..fcaae09f2 100644 --- a/.github/workflows/next-release-micro.yml +++ b/.github/workflows/next-release-micro.yml @@ -58,7 +58,9 @@ jobs: run: | cp doc/releasenotes/template.rst doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst sed -i "s/vx.x.x/${{ env.NEW_RELEASE_VERSION }}/g" doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst + sed -i "s/${{ env.RELEASE_VERSION }}/${{ env.NEW_RELEASE_VERSION }}\n ${{ env.RELEASE_VERSION }}/g" doc/releasenotes/index.rst git add doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst + git add doc/releasenotes/index.rst git config --local user.email "github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" git commit -am "created ${{ env.NEW_RELEASE_VERSION }} release notes" diff --git a/.github/workflows/next-release-minor.yml b/.github/workflows/next-release-minor.yml index fd6ff9de6..4d4459ac6 100644 --- a/.github/workflows/next-release-minor.yml +++ b/.github/workflows/next-release-minor.yml @@ -60,7 +60,9 @@ jobs: run: | cp doc/releasenotes/template.rst doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst sed -i "s/vx.x.x/${{ env.NEW_RELEASE_VERSION }}/g" doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst + sed -i "s/${{ env.RELEASE_VERSION }}/${{ env.NEW_RELEASE_VERSION }}\n ${{ env.RELEASE_VERSION }}/g" doc/releasenotes/index.rst git add doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst + git add doc/releasenotes/index.rst git config --local user.email "github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" git commit -am "created ${{ env.NEW_RELEASE_VERSION }} release notes" From 12dbb0e342a12ed4425ce82fefaccbb11c0fa3b6 Mon Sep 17 00:00:00 2001 From: yardasol Date: Tue, 1 Feb 2022 09:48:30 -0600 Subject: [PATCH 115/130] Added bullet on recording changes in the release notes to CONTRIBUTING.md --- CONTRIBUTING.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0b085d42c..0e088c1ff 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -87,6 +87,9 @@ Please use the provided pull request template. In particular: - **Make sure the test suite passes** on your computer. To do so, run `py.test saltproc` in the repository directory. At a minumum, you must run the tests requring serpent locally as they are not tested by our CI + - Describe your feature/change/fix in the release notes (located in `doc/releasenotes`) + for the currently in-development release version. Use the descriptive comments and + examples as reference. - Please reference relevant Github issues in your commit message using `GH1234` or `#1234`. - Changes should be PEP8 compatible [PEP8](http://www.python.org/dev/peps/pep-0008/). From 869610d799a0aecb9f574dd4fe26e06e2d2c466c Mon Sep 17 00:00:00 2001 From: yardasol Date: Tue, 1 Feb 2022 09:59:35 -0600 Subject: [PATCH 116/130] add devguide ref to index.rst --- doc/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/index.rst b/doc/index.rst index 61595404c..af50d0760 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -33,6 +33,7 @@ Documentation examples src/index releasenotes/index + devguive/index How to cite Indices and tables From 5a77d3b7291a7947dcf1d1f0b378853963d928c3 Mon Sep 17 00:00:00 2001 From: yardasol Date: Tue, 1 Feb 2022 09:59:46 -0600 Subject: [PATCH 117/130] create devguide --- doc/devguide/contributing.rst | 110 ++++++++++++++++++++++++++++++++++ doc/devguide/index.rst | 23 +++++++ 2 files changed, 133 insertions(+) create mode 100644 doc/devguide/contributing.rst create mode 100644 doc/devguide/index.rst diff --git a/doc/devguide/contributing.rst b/doc/devguide/contributing.rst new file mode 100644 index 000000000..5674d7819 --- /dev/null +++ b/doc/devguide/contributing.rst @@ -0,0 +1,110 @@ +Contributing +============ + +Thanks for Your Help! +--------------------- + +Contributing is so kind of you. In SaltProc, all contributions, bug reports, bug fixes, documentation improvements, enhancements and ideas are welcome. + +The `GitHub "issues" tab `__ contains some issues labeled "Difficulty:1-Beginner". Those are open issues that would be a good quick way to get started. Browse them to see if you want to get started on one. + +Bug Reports +~~~~~~~~~~~ + +Is something in the code not working? Consider making a bug report! In particular: + +- Please include a short but detailed, self-contained Python snippet or explanation for reproducing the problem. + +- Explain what the expected behavior was, and what you saw instead. + +Feature Requests +~~~~~~~~~~~~~~~~ + +If you have an idea that could add to or improve SaltProc, and know how to implement it, consider making a Feature Request! + +Discussion +~~~~~~~~~~ + +If you + +- have feedback or a feature idea that aren't concrete/focused enough to go into a Feature Request Issue +- want to show off cool work you have done with the software + +please use our `Discussions page `__! + +Instructions for setting up a development environment +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The SaltProc is compatible with Python >=3.5. Anaconda is the recommended distribution to use to work on SAltProc; we will assume that if you want to use another distribution or your own set up, you can translate the instructions. + +You can download Anaconda at https://www.continuum.io/Downloads for the full install. You can also download a mini Anaconda install for a bare-bones install -- this is good for a build server or if you don't have much space. The mini Anaconda installs are available at https://conda.io/miniconda.html. + +Once your Anaconda package is installed and available, create a Python 3.6 environment in Anaconda -- + +:: + + conda create -q -n saltproc-test-environment python=3.6 scipy numpy matplotlib pytest pytables flake8 + +Each of these commands will take a bit of time -- give it a few minutes to download and install the packages and their dependences. Once complete, switch to each and install additional packages needed to run and test. + +Activate the 3.6 environment and install pyne, networkx and pydotplus + +:: + + source activate saltproc-test-environment + conda install -c conda-forge pyne networkx pydotplus + +Setup Serpent Monte Carlo code environment +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The SaltProc assumes that Serpent directory is added in ``$PATH`` as follows: + +:: + + export PATH="/path/to/serpent/executable:$PATH" + +Run the tests +^^^^^^^^^^^^^ + +Tests are automatically detected and run with pytest. Start in the root directory where you have cloned the saltproc repository and run in development environment + +:: + + source active saltproc-test-environment + py.test saltproc + +Run style tests with flake8 +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Adherance to style checks in flake8 is encouraged though not strictly enforced. While you should not feel compelled to fix existing failures, please do not add additional flake8 issues. + +:: + + run flake8 from the root of the pyrk working directory to get all flake8 issues + run flake8 and provide a filename to just run checks on that file + +Pull Requests +^^^^^^^^^^^^^ + +Please use the provided pull request template. In particular: + +- **Make sure the test suite passes** on your computer. To do so, run ``py.test saltproc`` in the repository directory. At a minumum, you must run the tests requring serpent locally as they are not tested by our CI +- Describe your feature/change/fix in the release notes (located in ``doc/releasenotes``) for the currently in-development release version. Use the descriptive comments and examples as reference. +- Please reference relevant Github issues in your commit message using ``GH1234`` or ``#1234``. +- Changes should be PEP8 compatible `PEP8 `__. +- Keep style fixes to a separate commit to make your PR more readable. +- Docstrings ideally follow the `sphinx autodoc `__ +- Write tests. +- When writing tests, please make sure they are in a ``tests`` directory. +- When you start working on a PR, start by creating a new branch pointing at the latest commit on github master. +- The SaltProc copyright policy is detailed in the `LICENSE `__. + +More developer docs +~~~~~~~~~~~~~~~~~~~ + +- We are working on it. + +Meta +~~~~ + +Note, this contributing file was adapted from the one at the `pandas `__ repo. Thanks pandas! diff --git a/doc/devguide/index.rst b/doc/devguide/index.rst new file mode 100644 index 000000000..482dbb94c --- /dev/null +++ b/doc/devguide/index.rst @@ -0,0 +1,23 @@ +.. _devguide: + +================= +Developer's Guide +================= +.. _git workflow: https://git-scm.com/book/en/v2/Getting-Started-About-Version-Control + +Welcome to the SaltProc developer's guide. Here you'll find +all the information you need to be an efficient and effective contributor +to SaltProc. + +.. note:: The SaltProc developer's guide is a work in progress. + Information contained within may change, so make sure to check the + release notes for updates! + +If you're new to software development, please familiarize yourself with the +`git workflow`_ before getting started. We'll be using terminoigy +in this developer's guide that relies on understanding it. + +.. toctree:: + :maxdepth: 2 + + contributing From 7899b87f2b3acfac7fe565551aaeba6ef24f3001 Mon Sep 17 00:00:00 2001 From: yardasol Date: Tue, 1 Feb 2022 10:01:23 -0600 Subject: [PATCH 118/130] fix typo in main index.rst --- doc/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/index.rst b/doc/index.rst index af50d0760..ffdbb370d 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -33,7 +33,7 @@ Documentation examples src/index releasenotes/index - devguive/index + devguide/index How to cite Indices and tables From b5d0ee359fa02759241dd24c04e363681f65db76 Mon Sep 17 00:00:00 2001 From: yardasol Date: Tue, 1 Feb 2022 10:02:56 -0600 Subject: [PATCH 119/130] typo fix in devguide/index.rst --- doc/devguide/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/devguide/index.rst b/doc/devguide/index.rst index 482dbb94c..058c875eb 100644 --- a/doc/devguide/index.rst +++ b/doc/devguide/index.rst @@ -20,4 +20,4 @@ in this developer's guide that relies on understanding it. .. toctree:: :maxdepth: 2 - contributing + contributing From 0f8944e263600edc32efa53481123ba2e12184d1 Mon Sep 17 00:00:00 2001 From: yardasol Date: Tue, 1 Feb 2022 10:04:56 -0600 Subject: [PATCH 120/130] add header to CONTRIBUTING.md --- CONTRIBUTING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0e088c1ff..d01eb7b59 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,3 +1,5 @@ +# Contributing + ### Thanks for Your Help! Contributing is so kind of you. In SaltProc, all contributions, bug reports, From 7375e4a64be2ab03a112733925399b174c7d85f5 Mon Sep 17 00:00:00 2001 From: yardasol Date: Tue, 1 Feb 2022 10:05:13 -0600 Subject: [PATCH 121/130] change toctree depth in devguide/index.rst --- doc/devguide/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/devguide/index.rst b/doc/devguide/index.rst index 058c875eb..e3141e898 100644 --- a/doc/devguide/index.rst +++ b/doc/devguide/index.rst @@ -18,6 +18,6 @@ If you're new to software development, please familiarize yourself with the in this developer's guide that relies on understanding it. .. toctree:: - :maxdepth: 2 + :maxdepth: 1 contributing From 86953e8571ec39fa0d700af7f7982c1f22547977 Mon Sep 17 00:00:00 2001 From: yardasol Date: Tue, 1 Feb 2022 10:09:03 -0600 Subject: [PATCH 122/130] Add acknowledgement of OpenMC docpages --- doc/index.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/index.rst b/doc/index.rst index ffdbb370d..5b09a167d 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -71,6 +71,9 @@ Acknowledgment SaltProc uses `Shablona`_ template which is universal solution for small scientific python projects developed at University of Washington `eScience Insititute`_. +`OpenMC's docpages`_ heavily inspired the strucutre and format for SaltProc's docpages. + +.. _OpenMC's docpages: https://docs.openmc.org/en/stable/index.html .. _Shablona: https://github.com/uwescience/shablona .. _eScience Insititute: https://escience.washington.edu From e7bc7c7846ecd97896d991e6055333afb3628cc4 Mon Sep 17 00:00:00 2001 From: yardasol Date: Tue, 1 Feb 2022 10:14:37 -0600 Subject: [PATCH 123/130] Add reference to sphinx-multiversion in the acknowledgements sections --- doc/index.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/index.rst b/doc/index.rst index 5b09a167d..a6e961d8e 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -73,6 +73,9 @@ scientific python projects developed at University of Washington `eScience Insit `OpenMC's docpages`_ heavily inspired the strucutre and format for SaltProc's docpages. +We make our versioned documentation using `sphinx-multiversion`_. + +.. _sphinx-multiversion: https://github.com/Holzhaus/sphinx-multiversion .. _OpenMC's docpages: https://docs.openmc.org/en/stable/index.html .. _Shablona: https://github.com/uwescience/shablona .. _eScience Insititute: https://escience.washington.edu From 9c6c9d59169f187dcb42e5bd7094b73298157cab Mon Sep 17 00:00:00 2001 From: yardasol Date: Tue, 1 Feb 2022 15:17:12 -0600 Subject: [PATCH 124/130] added lines to allow automatic updating of version spec in version.py file --- .github/workflows/next-release-micro.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/next-release-micro.yml b/.github/workflows/next-release-micro.yml index fcaae09f2..28121ca9a 100644 --- a/.github/workflows/next-release-micro.yml +++ b/.github/workflows/next-release-micro.yml @@ -27,8 +27,11 @@ jobs: run: | IFS='.' read -ra arr <<< ${{ env.RELEASE_VERSION }} MICRO_VERSION=$((${arr[2]}+1)) + arr[1]=$MINOR_VERSION arr[2]=$MICRO_VERSION NEW_RELEASE_VERSION="${arr[0]}.${arr[1]}.${arr[2]}" + echo "MINOR_VERSION"=$MINOR_VERSION >> $GITHUB_ENV + echo "MICRO_VERSION"=$MICRO_VERSION >> $GITHUB_ENV echo "NEW_RELEASE_VERSION="$NEW_RELEASE_VERSION >> $GITHUB_ENV - name: Create a new release @@ -56,12 +59,18 @@ jobs: - name: Create new release notes run: | + echo "Configure git" + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + echo "Make edits to docfiles and version.py" cp doc/releasenotes/template.rst doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst sed -i "s/vx.x.x/${{ env.NEW_RELEASE_VERSION }}/g" doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst sed -i "s/${{ env.RELEASE_VERSION }}/${{ env.NEW_RELEASE_VERSION }}\n ${{ env.RELEASE_VERSION }}/g" doc/releasenotes/index.rst + sed -i "s/_version_micro = *\'+[0-9]*\'/_version_micro = ${{ env.MICRO_VERSION }}/g" saltproc/version.py + echo "Add, commit, and push changes" git add doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst git add doc/releasenotes/index.rst - git config --local user.email "github-actions[bot]@users.noreply.github.com" - git config --local user.name "github-actions[bot]" git commit -am "created ${{ env.NEW_RELEASE_VERSION }} release notes" + git add saltproc/version.py + git commit -am "updated version to ${{ env.NEW_RELEASE_VERSION }}-dev" git push From dd0691e4532d814ac158c2c1dfa5edfddbf47c8c Mon Sep 17 00:00:00 2001 From: yardasol Date: Tue, 1 Feb 2022 15:27:26 -0600 Subject: [PATCH 125/130] added lines to allow automatic updating of version spec in version.py file --- .github/workflows/next-release-micro.yml | 8 ++++++-- .github/workflows/next-release-minor.yml | 14 ++++++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/next-release-micro.yml b/.github/workflows/next-release-micro.yml index 28121ca9a..f4a6514b0 100644 --- a/.github/workflows/next-release-micro.yml +++ b/.github/workflows/next-release-micro.yml @@ -62,11 +62,15 @@ jobs: echo "Configure git" git config --local user.email "github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" - echo "Make edits to docfiles and version.py" + echo "Make edits to docfiles" cp doc/releasenotes/template.rst doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst sed -i "s/vx.x.x/${{ env.NEW_RELEASE_VERSION }}/g" doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst sed -i "s/${{ env.RELEASE_VERSION }}/${{ env.NEW_RELEASE_VERSION }}\n ${{ env.RELEASE_VERSION }}/g" doc/releasenotes/index.rst - sed -i "s/_version_micro = *\'+[0-9]*\'/_version_micro = ${{ env.MICRO_VERSION }}/g" saltproc/version.py + echo "Make edits to version.py" + sed -i "s/_version_micro = *'*[0-9]*'/_version_micro = ${{ env.MICRO_VERSION }}/g" saltproc/version.py + sed -i "s/_version_minor = *'*[0-9]*'/_version_minor = ${{ env.MINOR_VERSION }}/g" saltproc/version.py + sed -i "s/*#*\s_version_extra = 'dev'/_version_extra = 'dev'/g" saltproc/version.py + sed -i "s/*#*\s_version_extra = '0'/\#\s_version_extra = '0'/g" saltproc/version.py echo "Add, commit, and push changes" git add doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst git add doc/releasenotes/index.rst diff --git a/.github/workflows/next-release-minor.yml b/.github/workflows/next-release-minor.yml index 4d4459ac6..4f08a9634 100644 --- a/.github/workflows/next-release-minor.yml +++ b/.github/workflows/next-release-minor.yml @@ -58,12 +58,22 @@ jobs: - name: Create new release notes run: | + echo "Configure git" + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + echo "Make edits to docfiles" cp doc/releasenotes/template.rst doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst sed -i "s/vx.x.x/${{ env.NEW_RELEASE_VERSION }}/g" doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst sed -i "s/${{ env.RELEASE_VERSION }}/${{ env.NEW_RELEASE_VERSION }}\n ${{ env.RELEASE_VERSION }}/g" doc/releasenotes/index.rst + echo "Make edits to version.py" + sed -i "s/_version_micro = *'*[0-9]*'/_version_micro = ''/g" saltproc/version.py + sed -i "s/_version_minor = *'*[0-9]*'/_version_minor = ${{ env.MINOR_VERSION }}/g" saltproc/version.py + sed -i "s/*#*\s_version_extra = 'dev'/_version_extra = 'dev'/g" saltproc/version.py + sed -i "s/*#*\s_version_extra = '0'/\#\s_version_extra = '0'/g" saltproc/version.py + echo "Add, commit, and push changes" git add doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst git add doc/releasenotes/index.rst - git config --local user.email "github-actions[bot]@users.noreply.github.com" - git config --local user.name "github-actions[bot]" git commit -am "created ${{ env.NEW_RELEASE_VERSION }} release notes" + git add saltproc/version.py + git commit -am "updated version to ${{ env.NEW_RELEASE_VERSION }}-dev" git push From 834c4740f89a556be951091cc162a0f2faefd198 Mon Sep 17 00:00:00 2001 From: yardasol Date: Tue, 1 Feb 2022 15:36:43 -0600 Subject: [PATCH 126/130] fix typos in regular expressions --- .github/workflows/next-release-micro.yml | 4 ++-- .github/workflows/next-release-minor.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/next-release-micro.yml b/.github/workflows/next-release-micro.yml index f4a6514b0..e67a6c5f9 100644 --- a/.github/workflows/next-release-micro.yml +++ b/.github/workflows/next-release-micro.yml @@ -69,8 +69,8 @@ jobs: echo "Make edits to version.py" sed -i "s/_version_micro = *'*[0-9]*'/_version_micro = ${{ env.MICRO_VERSION }}/g" saltproc/version.py sed -i "s/_version_minor = *'*[0-9]*'/_version_minor = ${{ env.MINOR_VERSION }}/g" saltproc/version.py - sed -i "s/*#*\s_version_extra = 'dev'/_version_extra = 'dev'/g" saltproc/version.py - sed -i "s/*#*\s_version_extra = '0'/\#\s_version_extra = '0'/g" saltproc/version.py + sed -i "s/# _version_extra = 'dev'/_version_extra = 'dev'/g" saltproc/version.py + sed -i "s/_version_extra = '0'/# _version_extra = '0'/g" saltproc/version.py echo "Add, commit, and push changes" git add doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst git add doc/releasenotes/index.rst diff --git a/.github/workflows/next-release-minor.yml b/.github/workflows/next-release-minor.yml index 4f08a9634..dc540070d 100644 --- a/.github/workflows/next-release-minor.yml +++ b/.github/workflows/next-release-minor.yml @@ -68,8 +68,8 @@ jobs: echo "Make edits to version.py" sed -i "s/_version_micro = *'*[0-9]*'/_version_micro = ''/g" saltproc/version.py sed -i "s/_version_minor = *'*[0-9]*'/_version_minor = ${{ env.MINOR_VERSION }}/g" saltproc/version.py - sed -i "s/*#*\s_version_extra = 'dev'/_version_extra = 'dev'/g" saltproc/version.py - sed -i "s/*#*\s_version_extra = '0'/\#\s_version_extra = '0'/g" saltproc/version.py + sed -i "s/# _version_extra = 'dev'/_version_extra = 'dev'/g" saltproc/version.py + sed -i "s/_version_extra = '0'/# _version_extra = '0'/g" saltproc/version.py echo "Add, commit, and push changes" git add doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst git add doc/releasenotes/index.rst From 88c5d64f7e058f4a4c93c2e7204cd66b935814f2 Mon Sep 17 00:00:00 2001 From: yardasol Date: Wed, 2 Feb 2022 15:50:52 -0600 Subject: [PATCH 127/130] remove next-release-micro.yml --- .github/workflows/next-release-micro.yml | 80 ------------------------ 1 file changed, 80 deletions(-) delete mode 100644 .github/workflows/next-release-micro.yml diff --git a/.github/workflows/next-release-micro.yml b/.github/workflows/next-release-micro.yml deleted file mode 100644 index e67a6c5f9..000000000 --- a/.github/workflows/next-release-micro.yml +++ /dev/null @@ -1,80 +0,0 @@ -# Preamble -name: Create next micro release - -on: - # enable worflow to be run manually - workflow_dispatch: - -jobs: - next-release-micro: - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - - steps: - - uses: actions/checkout@v2 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Get most recent release version - run: | - echo "RELEASE_VERSION=$(gh api repos/${{ github.repository }}/tags --jq '.[0] | .name')" >> $GITHUB_ENV - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Increment micro version - run: | - IFS='.' read -ra arr <<< ${{ env.RELEASE_VERSION }} - MICRO_VERSION=$((${arr[2]}+1)) - arr[1]=$MINOR_VERSION - arr[2]=$MICRO_VERSION - NEW_RELEASE_VERSION="${arr[0]}.${arr[1]}.${arr[2]}" - echo "MINOR_VERSION"=$MINOR_VERSION >> $GITHUB_ENV - echo "MICRO_VERSION"=$MICRO_VERSION >> $GITHUB_ENV - echo "NEW_RELEASE_VERSION="$NEW_RELEASE_VERSION >> $GITHUB_ENV - - - name: Create a new release - run: | - gh api repos/${{ github.repository }}/releases \ - -H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ - -H "Accept: application/vnd.github.v3+json" \ - -X POST \ - -F name=${{ env.NEW_RELEASE_VERSION }} \ - -F tag_name=${{ env.NEW_RELEASE_VERSION }} \ - -F draft=true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - - name: Create a new milestone. - run: | - gh api repos/${{ github.repository }}/milestones \ - -H "Authorize: token ${{ secrets.GITHUB_TOKEN }}" \ - -H "Accept: application/vnd.github.v3+json" \ - -X POST \ - -F title=${{ env.NEW_RELEASE_VERSION }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Create new release notes - run: | - echo "Configure git" - git config --local user.email "github-actions[bot]@users.noreply.github.com" - git config --local user.name "github-actions[bot]" - echo "Make edits to docfiles" - cp doc/releasenotes/template.rst doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst - sed -i "s/vx.x.x/${{ env.NEW_RELEASE_VERSION }}/g" doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst - sed -i "s/${{ env.RELEASE_VERSION }}/${{ env.NEW_RELEASE_VERSION }}\n ${{ env.RELEASE_VERSION }}/g" doc/releasenotes/index.rst - echo "Make edits to version.py" - sed -i "s/_version_micro = *'*[0-9]*'/_version_micro = ${{ env.MICRO_VERSION }}/g" saltproc/version.py - sed -i "s/_version_minor = *'*[0-9]*'/_version_minor = ${{ env.MINOR_VERSION }}/g" saltproc/version.py - sed -i "s/# _version_extra = 'dev'/_version_extra = 'dev'/g" saltproc/version.py - sed -i "s/_version_extra = '0'/# _version_extra = '0'/g" saltproc/version.py - echo "Add, commit, and push changes" - git add doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst - git add doc/releasenotes/index.rst - git commit -am "created ${{ env.NEW_RELEASE_VERSION }} release notes" - git add saltproc/version.py - git commit -am "updated version to ${{ env.NEW_RELEASE_VERSION }}-dev" - git push From 60608a66b1afcefe17ac25a1c5cb3f45870af86e Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 7 Feb 2022 14:41:36 -0600 Subject: [PATCH 128/130] add beginning-of-line chars to regexs where needed --- .github/workflows/next-release-minor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/next-release-minor.yml b/.github/workflows/next-release-minor.yml index dc540070d..033513438 100644 --- a/.github/workflows/next-release-minor.yml +++ b/.github/workflows/next-release-minor.yml @@ -68,8 +68,8 @@ jobs: echo "Make edits to version.py" sed -i "s/_version_micro = *'*[0-9]*'/_version_micro = ''/g" saltproc/version.py sed -i "s/_version_minor = *'*[0-9]*'/_version_minor = ${{ env.MINOR_VERSION }}/g" saltproc/version.py - sed -i "s/# _version_extra = 'dev'/_version_extra = 'dev'/g" saltproc/version.py - sed -i "s/_version_extra = '0'/# _version_extra = '0'/g" saltproc/version.py + sed -i "s/^# _version_extra = 'dev'/_version_extra = 'dev'/g" saltproc/version.py + sed -i "s/^_version_extra = '0'/# _version_extra = '0'/g" saltproc/version.py echo "Add, commit, and push changes" git add doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst git add doc/releasenotes/index.rst From 7f25cd428eab99b70a84fc3c007cd3b1ea0cea14 Mon Sep 17 00:00:00 2001 From: yardasol Date: Mon, 7 Feb 2022 16:06:30 -0600 Subject: [PATCH 129/130] remove where not needed in _version_micro --- saltproc/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/saltproc/version.py b/saltproc/version.py index 84e19d0f2..a891a85f2 100644 --- a/saltproc/version.py +++ b/saltproc/version.py @@ -4,7 +4,7 @@ # Format expected by setup.py and doc/source/conf.py: string of form "X.Y.Z" _version_major = 0 _version_minor = 4 -_version_micro = '0' # use '' for first of series, number for 1 and above +_version_micro = '' # use '' for first of series, number for 1 and above _version_extra = 'dev' # _version_extra = '0' # Uncomment this for full releases From 0ee8734e3f65068defeae81cebd4343577f2c4cb Mon Sep 17 00:00:00 2001 From: yardasol <45364492+yardasol@users.noreply.github.com> Date: Mon, 7 Feb 2022 16:11:32 -0600 Subject: [PATCH 130/130] Update .github/workflows/next-release-minor.yml --- .github/workflows/next-release-minor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/next-release-minor.yml b/.github/workflows/next-release-minor.yml index 033513438..df6b82158 100644 --- a/.github/workflows/next-release-minor.yml +++ b/.github/workflows/next-release-minor.yml @@ -69,7 +69,7 @@ jobs: sed -i "s/_version_micro = *'*[0-9]*'/_version_micro = ''/g" saltproc/version.py sed -i "s/_version_minor = *'*[0-9]*'/_version_minor = ${{ env.MINOR_VERSION }}/g" saltproc/version.py sed -i "s/^# _version_extra = 'dev'/_version_extra = 'dev'/g" saltproc/version.py - sed -i "s/^_version_extra = '0'/# _version_extra = '0'/g" saltproc/version.py + sed -i "s/^_version_extra = ''# _version_extra = ''/g" saltproc/version.py echo "Add, commit, and push changes" git add doc/releasenotes/${{ env.NEW_RELEASE_VERSION }}.rst git add doc/releasenotes/index.rst