diff --git a/.github/actions/setup_lfs/action.yml b/.github/actions/setup_lfs/action.yml index fe8156a1cd0..e65045956ca 100644 --- a/.github/actions/setup_lfs/action.yml +++ b/.github/actions/setup_lfs/action.yml @@ -27,7 +27,7 @@ runs: shell: bash - name: Restore LFS cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 id: lfs-cache-refdata with: path: tardis-refdata/.git/lfs @@ -49,7 +49,7 @@ runs: # uses fake ternary # for reference: https://github.com/orgs/community/discussions/26738#discussioncomment-3253176 if: ${{ steps.lfs-cache-refdata.outputs.cache-hit != 'true' && always() || false }} - uses: actions/cache/save@v3 + uses: actions/cache/save@v4 id: lfs-cache-refdata-save with: path: tardis-refdata/.git/lfs @@ -67,7 +67,7 @@ runs: shell: bash - name: Restore LFS cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 id: lfs-cache-regression-data with: path: tardis-regression-data/.git/lfs @@ -89,7 +89,7 @@ runs: # uses fake ternary # for reference: https://github.com/orgs/community/discussions/26738#discussioncomment-3253176 if: ${{ steps.lfs-cache-regression-data.outputs.cache-hit != 'true' && always() || false }} - uses: actions/cache/save@v3 + uses: actions/cache/save@v4 id: lfs-cache-regression-data-save with: path: tardis-regression-data/.git/lfs diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 5088149cd78..627a144ae84 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -33,20 +33,20 @@ jobs: contains(github.event.pull_request.labels.*.name, 'benchmarks'))) runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 if: github.event_name != 'pull_request_target' with: fetch-depth: 0 - name: Checkout pull/${{ github.event.number }} - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.sha }} fetch-depth: 0 if: github.event_name == 'pull_request_target' - name: Restore Atom Data - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 id: atom-data-restore with: path: benchmarks/data/kurucz_cd23_chianti_H_He.h5 @@ -59,7 +59,7 @@ jobs: wget -q "$REPO_URL/items?path=atom_data/kurucz_cd23_chianti_H_He.h5&versionType=branch&version=master&resolveLfs=true" -O benchmarks/data/kurucz_cd23_chianti_H_He.h5 - name: Save Atom Data - uses: actions/cache/save@v3 + uses: actions/cache/save@v4 if: ${{ steps.atom-data-restore.outputs.cache-hit != 'true' && always() || false }} id: atom-data-cache-save with: @@ -186,7 +186,7 @@ jobs: URL: https://github.com/${{ github.repository_owner }}/${{ github.event.repository.name }}/actions/runs/${{ github.run_id }}?check_suite_focus=true - name: Save results artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() with: name: asv-benchmark-results-${{ runner.os }} diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index fefb7048d2f..7fc44e742e2 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -157,7 +157,7 @@ jobs: EVENT: ${{ github.event_name }} - name: Deploy ${{ env.DEST_DIR }} - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.BOT_TOKEN }} publish_branch: ${{ env.DEPLOY_BRANCH }} diff --git a/.github/workflows/clean-docs.yml b/.github/workflows/clean-docs.yml index 8126ab7cb23..cbbed1b1b53 100644 --- a/.github/workflows/clean-docs.yml +++ b/.github/workflows/clean-docs.yml @@ -5,26 +5,24 @@ name: clean-docs on: - delete: - branches: # remove deleted branches - - '*' + branches: # remove deleted branches + - "*" - pull_request_target: # remove closed or merged pull requests + pull_request_target: # remove closed or merged pull requests branches: - - '*' + - "*" types: - closed env: - DEPLOY_BRANCH: gh-pages # deployed docs branch + DEPLOY_BRANCH: gh-pages # deployed docs branch jobs: clean: runs-on: ubuntu-latest steps: - - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set folder to delete run: | diff --git a/.github/workflows/codestyle.yml b/.github/workflows/codestyle.yml index 3f59212bd56..82bba3de516 100644 --- a/.github/workflows/codestyle.yml +++ b/.github/workflows/codestyle.yml @@ -17,10 +17,10 @@ jobs: black: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: 3.x diff --git a/.github/workflows/docstr-cov.yml b/.github/workflows/docstr-cov.yml index 645d285bffd..6ebe1fd1e24 100644 --- a/.github/workflows/docstr-cov.yml +++ b/.github/workflows/docstr-cov.yml @@ -1,4 +1,4 @@ -# Log in to jsonbin.org with tardis-bot GitHub account to get an API key and +# Log in to jsonbin.org with tardis-bot GitHub account to get an API key and # store it as a repository secret. # Updated badge will be available at: @@ -9,11 +9,11 @@ name: docstr-cov on: push: branches: - - master + - master pull_request: branches: - - master + - master env: THRESHOLD: 0.05 @@ -25,13 +25,12 @@ jobs: check: runs-on: ubuntu-latest steps: - - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.x @@ -47,7 +46,7 @@ jobs: elif [[ ${{ github.event_name }} == 'pull_request' ]]; then echo "BASE=${{ github.event.pull_request.base.sha }}" >> $GITHUB_ENV echo "HEAD=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV - + else echo "Unexpected event trigger" exit 1 diff --git a/.github/workflows/mailmap.yml b/.github/workflows/mailmap.yml index 13e977060e6..4ca95d7a198 100644 --- a/.github/workflows/mailmap.yml +++ b/.github/workflows/mailmap.yml @@ -12,7 +12,7 @@ jobs: check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 diff --git a/.github/workflows/post-release.yml b/.github/workflows/post-release.yml index 5216453b00e..1f86be25591 100644 --- a/.github/workflows/post-release.yml +++ b/.github/workflows/post-release.yml @@ -8,13 +8,13 @@ on: release: types: [published] - workflow_dispatch: # manual trigger + workflow_dispatch: # manual trigger jobs: changelog: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: repository: tardis-sn/tardis token: ${{ secrets.BOT_TOKEN }} @@ -26,7 +26,7 @@ jobs: - name: Update changelog run: github-changes -o tardis-sn -r tardis --only-pulls --use-commit-body -f CHANGELOG.md -k ${{ secrets.BOT_TOKEN }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: changelog path: CHANGELOG.md @@ -34,15 +34,15 @@ jobs: citation: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Wait for Zenodo webhook run: sleep 180 - name: Setup Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: - python-version: '3.x' + python-version: "3.x" - name: Install doi2cff run: pip install git+https://github.com/citation-file-format/doi2cff @@ -52,7 +52,7 @@ jobs: rm CITATION.cff doi2cff init 10.5281/zenodo.592480 - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: citation path: CITATION.cff @@ -60,23 +60,23 @@ jobs: credits: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Wait for Zenodo webhook run: sleep 180 - name: Setup Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: - python-version: '3.x' + python-version: "3.x" - - name: Install rst-include + - name: Install rst-include run: pip install rst-include==2.1.2.2 requests==2.27.1 - name: Update README.rst run: python .ci-helpers/update_credits.py - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: credits path: | @@ -87,9 +87,9 @@ jobs: needs: [changelog, citation, credits] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: path: /tmp diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 51cb50333de..69268254ed0 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -6,8 +6,8 @@ name: pre-release on: schedule: - - cron: '0 0 * * 0' - workflow_dispatch: # manual trigger + - cron: "0 0 * * 0" + workflow_dispatch: # manual trigger defaults: run: @@ -17,7 +17,7 @@ jobs: zenodo: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: repository: tardis-sn/tardis_zenodo token: ${{ secrets.BOT_TOKEN }} @@ -28,14 +28,14 @@ jobs: KEY_SECRET_JSON: ${{ secrets.ZENODO_KEY_SECRET_JSON }} - name: Download Lock File - run: wget -q https://raw.githubusercontent.com/tardis-sn/tardis/master/conda-linux-64.lock - + run: wget -q https://raw.githubusercontent.com/tardis-sn/tardis/master/conda-linux-64.lock + - name: Generate Cache Key - run: | + run: | file_hash=$(cat conda-linux-64.lock | shasum -a 256 | cut -d' ' -f1) echo "file_hash=$file_hash" >> "${GITHUB_OUTPUT}" id: cache-environment-key - + - uses: mamba-org/setup-micromamba@v1 with: environment-file: conda-linux-64.lock @@ -52,7 +52,7 @@ jobs: run: jupyter nbconvert gather_data.ipynb --to html --execute --ExecutePreprocessor.timeout=6000 --allow-errors if: failure() - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: zenodo_json path: .zenodo.json @@ -61,9 +61,9 @@ jobs: needs: zenodo runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: path: /tmp @@ -137,4 +137,4 @@ jobs: if: steps.create-pr.outputs.pull-request-operation == 'created' compare_refdata: - uses: tardis-sn/tardis-refdata/.github/workflows/compare-refdata.yml@master + uses: tardis-sn/tardis-refdata/.github/workflows/compare-refdata.yml@master diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c02b21fcbc1..be32edfaa4d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,23 +9,23 @@ on: branches: [master] types: [closed] - workflow_dispatch: # manual trigger + workflow_dispatch: # manual trigger jobs: create: if: github.event_name == 'workflow_dispatch' || - (startsWith(github.head_ref, 'pre-release-20') && github.event.pull_request.merged == true) + (startsWith(github.head_ref, 'pre-release-20') && github.event.pull_request.merged == true) runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: - python-version: '3.x' + python-version: "3.x" - name: Install setuptools_scm run: pip install 'setuptools_scm<7' @@ -34,7 +34,7 @@ jobs: run: python .ci-helpers/get_current_version.py - name: Get next version - run: | + run: | python .ci-helpers/get_next_version.py echo "NEW_TAG=$(python .ci-helpers/get_next_version.py)" >> $GITHUB_ENV diff --git a/.github/workflows/update-refdata.yml b/.github/workflows/update-refdata.yml index f70a22eab70..467c2c300e6 100644 --- a/.github/workflows/update-refdata.yml +++ b/.github/workflows/update-refdata.yml @@ -9,8 +9,8 @@ on: types: [update-refdata-command] env: - PYTEST_FLAGS: --tardis-refdata=${{ github.workspace }}/tardis-refdata --tardis-regression-data=${{ github.workspace }}/tardis-regression-data --generate-reference - CACHE_NUMBER: 1 # increase to reset cache manually + PYTEST_FLAGS: --tardis-refdata=${{ github.workspace }}/tardis-refdata --tardis-regression-data=${{ github.workspace }}/tardis-regression-data --generate-reference + CACHE_NUMBER: 1 # increase to reset cache manually concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} @@ -25,22 +25,22 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout pull/${{ github.event.client_payload.pull_request.number }} - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.event.client_payload.pull_request.head.sha }} - + - name: Setup LFS uses: ./.github/actions/setup_lfs - + - name: Download Lock File - run: wget -q https://raw.githubusercontent.com/tardis-sn/tardis/master/conda-linux-64.lock - + run: wget -q https://raw.githubusercontent.com/tardis-sn/tardis/master/conda-linux-64.lock + - name: Generate Cache Key - run: | + run: | file_hash=$(cat conda-linux-64.lock | shasum -a 256 | cut -d' ' -f1) echo "file_hash=$file_hash" >> "${GITHUB_OUTPUT}" id: cache-environment-key - + - uses: mamba-org/setup-micromamba@v1 with: environment-file: conda-linux-64.lock @@ -79,7 +79,7 @@ jobs: These are the changes made by https://github.com/tardis-sn/tardis/pull/${{ github.event.client_payload.pull_request.number }}, please be careful before merging this pull request. id: create-pr - + - name: Create pull request regression data uses: peter-evans/create-pull-request@v4 with: @@ -111,7 +111,7 @@ jobs: - name: Post comment (success) uses: peter-evans/create-or-update-comment@v2 with: - token: ${{ secrets.BOT_TOKEN }} + token: ${{ secrets.BOT_TOKEN }} issue-number: ${{ github.event.client_payload.pull_request.number }} comment-id: ${{ steps.fc.outputs.comment-id }} edit-mode: replace @@ -127,13 +127,13 @@ jobs: env: REFDATA_URL: https://github.com/tardis-sn/tardis-refdata/pulls REGDATA_URL: https://github.com/tardis-sn/tardis-regression-data/pulls - + if: success() - name: Post comment (failure) uses: peter-evans/create-or-update-comment@v2 with: - token: ${{ secrets.BOT_TOKEN }} + token: ${{ secrets.BOT_TOKEN }} issue-number: ${{ github.event.client_payload.pull_request.number }} comment-id: ${{ steps.fc.outputs.comment-id }} edit-mode: replace