From e91c2a9af3a37901308bb433cc110e5e010a585a Mon Sep 17 00:00:00 2001 From: Cadair <1391051+Cadair@users.noreply.github.com> Date: Thu, 6 Aug 2026 13:31:24 +0000 Subject: [PATCH 01/10] Run cruft update from package template --- .cruft.json | 4 ++-- .github/workflows/ci.yml | 10 +++++----- .github/workflows/sub_package_update.yml | 2 +- .pre-commit-config.yaml | 10 +++++++++- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.cruft.json b/.cruft.json index 4f5e0e940..7283d9fe5 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/sunpy/package-template", - "commit": "fb26c9794c872939b7e72bc7f30b943628384a8e", + "commit": "febd45b05a8eb80d6171683bf54fbe764a0c9063", "checkout": null, "context": { "cookiecutter": { @@ -33,7 +33,7 @@ ".github/workflows/sub_package_update.yml" ], "_template": "https://github.com/sunpy/package-template", - "_commit": "fb26c9794c872939b7e72bc7f30b943628384a8e" + "_commit": "febd45b05a8eb80d6171683bf54fbe764a0c9063" } }, "directory": null diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52700d2a3..8d19623ee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ permissions: {} jobs: core: - uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2 # zizmor: ignore[unpinned-uses] + uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v3 # zizmor: ignore[unpinned-uses] with: submodules: false coverage: codecov @@ -37,7 +37,7 @@ jobs: sdist_verify: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 # zizmor: ignore[unpinned-uses] + - uses: actions/checkout@v7 # zizmor: ignore[unpinned-uses] with: persist-credentials: false - uses: actions/setup-python@v6 # zizmor: ignore[unpinned-uses] @@ -50,7 +50,7 @@ jobs: test: needs: [core, sdist_verify] - uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2 # zizmor: ignore[unpinned-uses] + uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v3 # zizmor: ignore[unpinned-uses] with: submodules: false coverage: codecov @@ -67,7 +67,7 @@ jobs: docs: needs: [core] - uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2 # zizmor: ignore[unpinned-uses] + uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v3 # zizmor: ignore[unpinned-uses] with: default_python: '3.13' submodules: false @@ -112,7 +112,7 @@ jobs: contains(github.event.pull_request.labels.*.name, 'Run publish') ) needs: [test, docs] - uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v2 # zizmor: ignore[unpinned-uses] + uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v3 # zizmor: ignore[unpinned-uses] with: python-version: '3.13' test_extras: 'all,tests' diff --git a/.github/workflows/sub_package_update.yml b/.github/workflows/sub_package_update.yml index c81875654..9c019f281 100644 --- a/.github/workflows/sub_package_update.yml +++ b/.github/workflows/sub_package_update.yml @@ -22,7 +22,7 @@ jobs: contents: write pull-requests: write steps: - - uses: actions/checkout@v6 # zizmor: ignore[unpinned-uses] + - uses: actions/checkout@v7 # zizmor: ignore[unpinned-uses] with: persist-credentials: false diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 70acf99f8..52c60f10d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,11 +1,19 @@ repos: - repo: https://github.com/zizmorcore/zizmor-pre-commit +<<<<<<< rev: v1.26.1 +======= + rev: v1.28.0 +>>>>>>> hooks: - id: zizmor # This should be before any formatting hooks like isort - repo: https://github.com/astral-sh/ruff-pre-commit +<<<<<<< rev: "v0.15.20" +======= + rev: "v0.16.1" +>>>>>>> hooks: - id: ruff args: ["--fix"] @@ -45,7 +53,7 @@ repos: - id: mixed-line-ending types_or: [python, rst] - repo: https://github.com/codespell-project/codespell - rev: v2.4.2 + rev: v2.4.3 hooks: - id: codespell args: [ "--write-changes" ] From 5f8ecd85b2f8b1e51ff8a8e6928eedbec788b310 Mon Sep 17 00:00:00 2001 From: SunPyBot Date: Thu, 6 Aug 2026 15:04:45 +0000 Subject: [PATCH 02/10] Run cruft update from package template --- .cruft.json | 4 ++-- tox.ini | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.cruft.json b/.cruft.json index 7283d9fe5..767f15132 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/sunpy/package-template", - "commit": "febd45b05a8eb80d6171683bf54fbe764a0c9063", + "commit": "5c98b2c9fc7ea81ebdcbae21a76e52e3c959dc77", "checkout": null, "context": { "cookiecutter": { @@ -33,7 +33,7 @@ ".github/workflows/sub_package_update.yml" ], "_template": "https://github.com/sunpy/package-template", - "_commit": "febd45b05a8eb80d6171683bf54fbe764a0c9063" + "_commit": "5c98b2c9fc7ea81ebdcbae21a76e52e3c959dc77" } }, "directory": null diff --git a/tox.ini b/tox.ini index e41473dc2..edec6eac6 100644 --- a/tox.ini +++ b/tox.ini @@ -35,7 +35,8 @@ pass_env = LOCALE_ARCHIVE # If the user has set a LC override we should follow it LC_ALL -set_env = +setenv = + COVERAGE_FILE={toxinidir}/.coverage MPLBACKEND = agg COLUMNS = 180 PYTEST_COMMAND = pytest -vvv -r fEs --pyargs ndcube --cov-report=xml --cov=ndcube --cov-config={toxinidir}/.coveragerc {toxinidir}/docs From bc20496a9ef40fc7fec4e37bdc838b479903bf7a Mon Sep 17 00:00:00 2001 From: SunPyBot Date: Thu, 6 Aug 2026 15:48:41 +0000 Subject: [PATCH 03/10] Run cruft update from package template --- .cruft.json | 4 ++-- tox.ini | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.cruft.json b/.cruft.json index 767f15132..84e8c0042 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/sunpy/package-template", - "commit": "5c98b2c9fc7ea81ebdcbae21a76e52e3c959dc77", + "commit": "4c1ef6590b67cb54046d6aaf15dd20bcf6e1af39", "checkout": null, "context": { "cookiecutter": { @@ -33,7 +33,7 @@ ".github/workflows/sub_package_update.yml" ], "_template": "https://github.com/sunpy/package-template", - "_commit": "5c98b2c9fc7ea81ebdcbae21a76e52e3c959dc77" + "_commit": "4c1ef6590b67cb54046d6aaf15dd20bcf6e1af39" } }, "directory": null diff --git a/tox.ini b/tox.ini index edec6eac6..2e6dee00c 100644 --- a/tox.ini +++ b/tox.ini @@ -35,7 +35,7 @@ pass_env = LOCALE_ARCHIVE # If the user has set a LC override we should follow it LC_ALL -setenv = +set_env = COVERAGE_FILE={toxinidir}/.coverage MPLBACKEND = agg COLUMNS = 180 From 9311a61e1d5aa04652d1f2ad90b8b1ea4c86b9b3 Mon Sep 17 00:00:00 2001 From: SunPyBot Date: Fri, 7 Aug 2026 01:33:43 +0000 Subject: [PATCH 04/10] Run cruft update from package template --- .cruft.json | 4 ++-- .github/workflows/ci.yml | 14 +++++++------- .github/workflows/label_sync.yml | 2 +- .github/workflows/sub_package_update.yml | 8 ++++---- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.cruft.json b/.cruft.json index 84e8c0042..6f97d354c 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/sunpy/package-template", - "commit": "4c1ef6590b67cb54046d6aaf15dd20bcf6e1af39", + "commit": "35179454100c2f83118c49ac4a4a15e3c670365e", "checkout": null, "context": { "cookiecutter": { @@ -33,7 +33,7 @@ ".github/workflows/sub_package_update.yml" ], "_template": "https://github.com/sunpy/package-template", - "_commit": "4c1ef6590b67cb54046d6aaf15dd20bcf6e1af39" + "_commit": "35179454100c2f83118c49ac4a4a15e3c670365e" } }, "directory": null diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d19623ee..9bcb12ce1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ permissions: {} jobs: core: - uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v3 # zizmor: ignore[unpinned-uses] + uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@8c8bb6c6c962542921f993d47d26df38dccd50b1 # v3.0.2 with: submodules: false coverage: codecov @@ -37,10 +37,10 @@ jobs: sdist_verify: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v7 # zizmor: ignore[unpinned-uses] + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - - uses: actions/setup-python@v6 # zizmor: ignore[unpinned-uses] + - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 with: python-version: '3.13' - run: python -m pip install -U --user build @@ -50,7 +50,7 @@ jobs: test: needs: [core, sdist_verify] - uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v3 # zizmor: ignore[unpinned-uses] + uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@8c8bb6c6c962542921f993d47d26df38dccd50b1 # v3.0.2 with: submodules: false coverage: codecov @@ -67,7 +67,7 @@ jobs: docs: needs: [core] - uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v3 # zizmor: ignore[unpinned-uses] + uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@8c8bb6c6c962542921f993d47d26df38dccd50b1 # v3.0.2 with: default_python: '3.13' submodules: false @@ -112,7 +112,7 @@ jobs: contains(github.event.pull_request.labels.*.name, 'Run publish') ) needs: [test, docs] - uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v3 # zizmor: ignore[unpinned-uses] + uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@8c8bb6c6c962542921f993d47d26df38dccd50b1 # v3.0.2 with: python-version: '3.13' test_extras: 'all,tests' @@ -132,7 +132,7 @@ jobs: name: pypi steps: - name: Download artifacts - uses: actions/download-artifact@v8 # zizmor: ignore[unpinned-uses] + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: merge-multiple: true pattern: dist-* diff --git a/.github/workflows/label_sync.yml b/.github/workflows/label_sync.yml index 7f2177583..cc1d5fbd8 100644 --- a/.github/workflows/label_sync.yml +++ b/.github/workflows/label_sync.yml @@ -18,6 +18,6 @@ jobs: runs-on: ubuntu-latest name: Label Sync steps: - - uses: srealmoreno/label-sync-action@850ba5cef2b25e56c6c420c4feed0319294682fd + - uses: srealmoreno/label-sync-action@850ba5cef2b25e56c6c420c4feed0319294682fd # v2.0.0 with: config-file: https://raw.githubusercontent.com/sunpy/.github/main/labels.yml diff --git a/.github/workflows/sub_package_update.yml b/.github/workflows/sub_package_update.yml index 9c019f281..0d47fd07f 100644 --- a/.github/workflows/sub_package_update.yml +++ b/.github/workflows/sub_package_update.yml @@ -22,11 +22,11 @@ jobs: contents: write pull-requests: write steps: - - uses: actions/checkout@v7 # zizmor: ignore[unpinned-uses] + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - - uses: actions/setup-python@v6 # zizmor: ignore[unpinned-uses] + - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 with: python-version: "3.14" @@ -79,7 +79,7 @@ jobs: - name: Create pull request if: steps.cruft_json.outputs.has_changes == '1' - uses: peter-evans/create-pull-request@v8 # zizmor: ignore[unpinned-uses] + uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 with: token: ${{ secrets.GITHUB_TOKEN }} add-paths: "." @@ -105,7 +105,7 @@ jobs: issues: write steps: - name: Open an issue if workflow fails - uses: actions/github-script@v9 # zizmor: ignore[unpinned-uses] + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: github-token: ${{ github.token }} # This script is adapted from https://github.com/scientific-python/issue-from-pytest-log-action From b3bfd3850cae4ff5e439418e5329351e3bc915cf Mon Sep 17 00:00:00 2001 From: SunPyBot Date: Sun, 9 Aug 2026 08:33:58 +0000 Subject: [PATCH 05/10] Run cruft update from package template --- .cruft.json | 4 ++-- .github/dependabot.yml | 2 +- .github/workflows/ci.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.cruft.json b/.cruft.json index 6f97d354c..bc37bfc69 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/sunpy/package-template", - "commit": "35179454100c2f83118c49ac4a4a15e3c670365e", + "commit": "77f399bf46b6da8d5bf84a2bef4d1c33bb663c30", "checkout": null, "context": { "cookiecutter": { @@ -33,7 +33,7 @@ ".github/workflows/sub_package_update.yml" ], "_template": "https://github.com/sunpy/package-template", - "_commit": "35179454100c2f83118c49ac4a4a15e3c670365e" + "_commit": "77f399bf46b6da8d5bf84a2bef4d1c33bb663c30" } }, "directory": null diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e8eb01ec3..b66a0740e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,7 +5,7 @@ updates: schedule: interval: "monthly" cooldown: - default-days: 7 + default-days: 14 # Most updates should be from the package template groups: actions: patterns: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9bcb12ce1..16d49c9aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -150,7 +150,7 @@ jobs: environment: name: matrix steps: - - uses: Cadair/matrix-notify-action@main # zizmor: ignore[unpinned-uses] + - uses: Cadair/matrix-notify-action@v2 # zizmor: ignore[unpinned-uses] with: workflow_description: 'CI Workflow' matrix_token: ${{ secrets.MATRIX_ACCESS_TOKEN }} From 55960689dba98d5a6c3c7b54f649270f280eca9e Mon Sep 17 00:00:00 2001 From: SunPyBot Date: Sun, 9 Aug 2026 08:51:20 +0000 Subject: [PATCH 06/10] Run cruft update from package template --- .cruft.json | 4 ++-- .github/workflows/ci.yml | 6 +++--- .github/workflows/sub_package_update.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.cruft.json b/.cruft.json index bc37bfc69..f88ebf52e 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/sunpy/package-template", - "commit": "77f399bf46b6da8d5bf84a2bef4d1c33bb663c30", + "commit": "fce102b07567ef9fd7f808a87b2bd39f6579ecb0", "checkout": null, "context": { "cookiecutter": { @@ -33,7 +33,7 @@ ".github/workflows/sub_package_update.yml" ], "_template": "https://github.com/sunpy/package-template", - "_commit": "77f399bf46b6da8d5bf84a2bef4d1c33bb663c30" + "_commit": "fce102b07567ef9fd7f808a87b2bd39f6579ecb0" } }, "directory": null diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 16d49c9aa..a24e55c37 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: '3.13' - run: python -m pip install -U --user build @@ -141,7 +141,7 @@ jobs: - run: ls -lha dist/ - name: Run upload - uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0 + uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2 notify: if: ${{ !cancelled() && (github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') }} @@ -150,7 +150,7 @@ jobs: environment: name: matrix steps: - - uses: Cadair/matrix-notify-action@v2 # zizmor: ignore[unpinned-uses] + - uses: Cadair/matrix-notify-action@31c7cc36051ee7dc4157a22c1f13dbc7d68e5120 # v2 with: workflow_description: 'CI Workflow' matrix_token: ${{ secrets.MATRIX_ACCESS_TOKEN }} diff --git a/.github/workflows/sub_package_update.yml b/.github/workflows/sub_package_update.yml index 0d47fd07f..a1682cbe4 100644 --- a/.github/workflows/sub_package_update.yml +++ b/.github/workflows/sub_package_update.yml @@ -26,7 +26,7 @@ jobs: with: persist-credentials: false - - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: "3.14" From 33de65775222a7ec989296b7eb57b9cd30e87731 Mon Sep 17 00:00:00 2001 From: SunPyBot Date: Tue, 11 Aug 2026 00:47:34 +0000 Subject: [PATCH 07/10] Run cruft update from package template --- .cruft.json | 5 +++-- .pre-commit-config.yaml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.cruft.json b/.cruft.json index f88ebf52e..8899cfbb2 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/sunpy/package-template", - "commit": "fce102b07567ef9fd7f808a87b2bd39f6579ecb0", + "commit": "9810f983b63cad4d9abfb6088a40617578a6d965", "checkout": null, "context": { "cookiecutter": { @@ -24,6 +24,7 @@ "include_cruft_update_github_workflow": "y", "use_extended_ruff_linting": "y", "matrix_room_id": "!TWSJXVpyflnZOzmSQz:matrix.org", + "extra_ci_jobs": "", "_sphinx_theme": "sunpy", "_parent_project": "", "_install_requires": "", @@ -33,7 +34,7 @@ ".github/workflows/sub_package_update.yml" ], "_template": "https://github.com/sunpy/package-template", - "_commit": "fce102b07567ef9fd7f808a87b2bd39f6579ecb0" + "_commit": "9810f983b63cad4d9abfb6088a40617578a6d965" } }, "directory": null diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 52c60f10d..7a3aba230 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,7 @@ repos: rev: "v0.16.1" >>>>>>> hooks: - - id: ruff + - id: ruff-check args: ["--fix"] types: [python] # Define here once and then reference using YAML anchor From a45f5d8ca22b0cbc2b21e697f70b455be692903f Mon Sep 17 00:00:00 2001 From: SunPyBot Date: Tue, 11 Aug 2026 14:34:10 +0000 Subject: [PATCH 08/10] Run cruft update from package template --- .cruft.json | 8 ++++---- .github/workflows/sub_package_update.yml | 20 ++++++++++++++++++-- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/.cruft.json b/.cruft.json index 8899cfbb2..54c674ddd 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/sunpy/package-template", - "commit": "9810f983b63cad4d9abfb6088a40617578a6d965", + "commit": "3b0538eca35e08f61b6f2cee4351eb9e56b6cce2", "checkout": null, "context": { "cookiecutter": { @@ -22,6 +22,7 @@ "enable_dynamic_dev_versions": "y", "include_example_code": "n", "include_cruft_update_github_workflow": "y", + "use_pat_in_cruft_update_workflow": "y", "use_extended_ruff_linting": "y", "matrix_room_id": "!TWSJXVpyflnZOzmSQz:matrix.org", "extra_ci_jobs": "", @@ -30,11 +31,10 @@ "_install_requires": "", "_copy_without_render": [ "docs/_templates", - "docs/_static", - ".github/workflows/sub_package_update.yml" + "docs/_static" ], "_template": "https://github.com/sunpy/package-template", - "_commit": "9810f983b63cad4d9abfb6088a40617578a6d965" + "_commit": "3b0538eca35e08f61b6f2cee4351eb9e56b6cce2" } }, "directory": null diff --git a/.github/workflows/sub_package_update.yml b/.github/workflows/sub_package_update.yml index a1682cbe4..5888e12af 100644 --- a/.github/workflows/sub_package_update.yml +++ b/.github/workflows/sub_package_update.yml @@ -5,6 +5,12 @@ name: Automatic Update from package template on: # Allow manual runs through the web UI workflow_dispatch: + inputs: + extra_context: + description: 'JSON of cookiecutter variables to update (passed to cruft --variables-to-update), e.g. {"project": "new-name"}' + required: false + default: '' + type: string schedule: # ┌───────── minute (0 - 59) # │ ┌───────── hour (0 - 23) @@ -19,8 +25,10 @@ jobs: update: runs-on: ubuntu-latest permissions: - contents: write pull-requests: write + environment: + name: sub_package_update + deployment: false steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: @@ -51,11 +59,18 @@ jobs: - name: Run update if available id: cruft_update if: steps.check.outputs.has_changes == '1' + env: + EXTRA_CONTEXT: ${{ inputs.extra_context }} run: | git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" git config --global user.name "${GITHUB_ACTOR}" - cruft_output=$(cruft update --skip-apply-ask --refresh-private-variables) + EXTRA_ARGS=() + if [ -n "$EXTRA_CONTEXT" ]; then + EXTRA_ARGS=(--variables-to-update "$EXTRA_CONTEXT") + fi + + cruft_output=$(cruft update --skip-apply-ask --refresh-private-variables "${EXTRA_ARGS[@]}") echo $cruft_output git restore --staged . @@ -82,6 +97,7 @@ jobs: uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 with: token: ${{ secrets.GITHUB_TOKEN }} + branch-token: ${{ secrets.WORKFLOWS_UPDATE_PAT }} add-paths: "." commit-message: "Automatic package template update" branch: "cruft/update" From 3978224f47079c6e1eb05d48c0accc8e2cfee776 Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Tue, 11 Aug 2026 16:51:02 +0100 Subject: [PATCH 09/10] Fixes --- .cruft.json | 6 +- .github/workflows/sub_package_update.yml | 181 ----------------------- .pre-commit-config.yaml | 10 +- 3 files changed, 4 insertions(+), 193 deletions(-) delete mode 100644 .github/workflows/sub_package_update.yml diff --git a/.cruft.json b/.cruft.json index 54c674ddd..75a140469 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/sunpy/package-template", - "commit": "3b0538eca35e08f61b6f2cee4351eb9e56b6cce2", + "commit": "4ba8b7c6a6bf4f51f7154978ae8d2f3710ef89e5", "checkout": null, "context": { "cookiecutter": { @@ -21,7 +21,7 @@ "use_compiled_extensions": "n", "enable_dynamic_dev_versions": "y", "include_example_code": "n", - "include_cruft_update_github_workflow": "y", + "include_cruft_update_github_workflow": "n", "use_pat_in_cruft_update_workflow": "y", "use_extended_ruff_linting": "y", "matrix_room_id": "!TWSJXVpyflnZOzmSQz:matrix.org", @@ -34,7 +34,7 @@ "docs/_static" ], "_template": "https://github.com/sunpy/package-template", - "_commit": "3b0538eca35e08f61b6f2cee4351eb9e56b6cce2" + "_commit": "4ba8b7c6a6bf4f51f7154978ae8d2f3710ef89e5" } }, "directory": null diff --git a/.github/workflows/sub_package_update.yml b/.github/workflows/sub_package_update.yml deleted file mode 100644 index 5888e12af..000000000 --- a/.github/workflows/sub_package_update.yml +++ /dev/null @@ -1,181 +0,0 @@ -# This template is taken from the cruft example code, for further information please see: -# https://cruft.github.io/cruft/#automating-updates-with-github-actions -name: Automatic Update from package template - -on: - # Allow manual runs through the web UI - workflow_dispatch: - inputs: - extra_context: - description: 'JSON of cookiecutter variables to update (passed to cruft --variables-to-update), e.g. {"project": "new-name"}' - required: false - default: '' - type: string - schedule: - # ┌───────── minute (0 - 59) - # │ ┌───────── hour (0 - 23) - # │ │ ┌───────── day of the month (1 - 31) - # │ │ │ ┌───────── month (1 - 12 or JAN-DEC) - # │ │ │ │ ┌───────── day of the week (0 - 6 or SUN-SAT) - - cron: '0 7 * * 1' # Every Monday at 7am UTC - -permissions: {} - -jobs: - update: - runs-on: ubuntu-latest - permissions: - pull-requests: write - environment: - name: sub_package_update - deployment: false - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 - with: - python-version: "3.14" - - - name: Install Cruft - run: python -m pip install git+https://github.com/Cadair/cruft@patch-p1 - - - name: Check if update is available - continue-on-error: false - id: check - run: | - CHANGES=0 - if [ -f .cruft.json ]; then - if ! cruft check; then - CHANGES=1 - fi - else - echo "No .cruft.json file" - fi - - echo "has_changes=$CHANGES" >> "$GITHUB_OUTPUT" - - - name: Run update if available - id: cruft_update - if: steps.check.outputs.has_changes == '1' - env: - EXTRA_CONTEXT: ${{ inputs.extra_context }} - run: | - git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" - git config --global user.name "${GITHUB_ACTOR}" - - EXTRA_ARGS=() - if [ -n "$EXTRA_CONTEXT" ]; then - EXTRA_ARGS=(--variables-to-update "$EXTRA_CONTEXT") - fi - - cruft_output=$(cruft update --skip-apply-ask --refresh-private-variables "${EXTRA_ARGS[@]}") - echo $cruft_output - git restore --staged . - - if [[ "$cruft_output" == *"Failed to cleanly apply the update, there may be merge conflicts."* ]]; then - echo merge_conflicts=1 >> $GITHUB_OUTPUT - else - echo merge_conflicts=0 >> $GITHUB_OUTPUT - fi - - - name: Check if only .cruft.json is modified - id: cruft_json - if: steps.check.outputs.has_changes == '1' - run: | - git status --porcelain=1 - if [[ "$(git status --porcelain=1)" == " M .cruft.json" ]]; then - echo "Only .cruft.json is modified. Exiting workflow early." - echo "has_changes=0" >> "$GITHUB_OUTPUT" - else - echo "has_changes=1" >> "$GITHUB_OUTPUT" - fi - - - name: Create pull request - if: steps.cruft_json.outputs.has_changes == '1' - uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - branch-token: ${{ secrets.WORKFLOWS_UPDATE_PAT }} - add-paths: "." - commit-message: "Automatic package template update" - branch: "cruft/update" - delete-branch: true - draft: ${{ steps.cruft_update.outputs.merge_conflicts == '1' }} - title: "Updates from the package template" - labels: | - No Changelog Entry Needed - Backport 2.4 - body: | - This is an autogenerated PR, which will applies the latest changes from the [SunPy Package Template](https://github.com/sunpy/package-template). - If this pull request has been opened as a draft there are conflicts which need fixing. - - **To run the CI on this pull request you will need to close it and reopen it.** - - report-fail: - if: failure() - needs: [update] - runs-on: ubuntu-latest - permissions: - issues: write - steps: - - name: Open an issue if workflow fails - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 - with: - github-token: ${{ github.token }} - # This script is adapted from https://github.com/scientific-python/issue-from-pytest-log-action - # Under MIT license (c) Scientific Python Developers - script: | - const fs = require('fs'); - - // Edit these if needed for your repo - const variables = { - owner: context.repo.owner, - name: context.repo.repo, - label: "Infrastructure", - creator: "app/github-actions", - title: "SunPy Package Template auto-update failed." - }; - - const logs = 'The package update workflow failed.' - const workflow_url = `https://github.com/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`; - const issue_body = `[Workflow Run URL](${workflow_url})\n${logs}`; - - const query_string = `repo:${variables.owner}/${variables.name} author:${variables.creator} label:${variables.label} is:open in:title ${variables.title}`; - - // Run GraphQL query against GitHub API to find the most recent open issue used for reporting failures - const query = `query { - search(query: "${query_string}", type:ISSUE, first: 1) { - edges { - node { - ... on Issue { - body - id - number - } - } - } - } - }`; - - const result = await github.graphql(query); - - // If no issue is open, create a new issue, - // else update the body of the existing issue. - if (result.search.edges.length === 0) { - await github.rest.issues.create({ - owner: variables.owner, - repo: variables.name, - body: issue_body, - title: variables.title, - labels: [variables.label, "pre-commit.ci autofix"], - }); - } else { - await github.rest.issues.update({ - owner: variables.owner, - repo: variables.name, - issue_number: result.search.edges[0].node.number, - body: issue_body - }); - } diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7a3aba230..67b3b8962 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,19 +1,11 @@ repos: - repo: https://github.com/zizmorcore/zizmor-pre-commit -<<<<<<< - rev: v1.26.1 -======= rev: v1.28.0 ->>>>>>> hooks: - id: zizmor # This should be before any formatting hooks like isort - repo: https://github.com/astral-sh/ruff-pre-commit -<<<<<<< - rev: "v0.15.20" -======= rev: "v0.16.1" ->>>>>>> hooks: - id: ruff-check args: ["--fix"] @@ -21,7 +13,7 @@ repos: # Define here once and then reference using YAML anchor exclude: &exclude_dirs ^ndcube/(data|extern)/ - repo: https://github.com/PyCQA/isort - rev: 9.0.0a3 + rev: 8.0.1 hooks: - id: isort types: [python] From 4c6ded5ee5c6405f5ef0c23fab3bfcb4b2f980f0 Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Tue, 11 Aug 2026 16:51:35 +0100 Subject: [PATCH 10/10] cron --- .cruft.json | 2 +- .github/workflows/ci.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.cruft.json b/.cruft.json index 75a140469..3e1f70069 100644 --- a/.cruft.json +++ b/.cruft.json @@ -25,7 +25,7 @@ "use_pat_in_cruft_update_workflow": "y", "use_extended_ruff_linting": "y", "matrix_room_id": "!TWSJXVpyflnZOzmSQz:matrix.org", - "extra_ci_jobs": "", + "extra_ci_jobs": "cron", "_sphinx_theme": "sunpy", "_parent_project": "", "_install_requires": "", diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a24e55c37..606bce804 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,12 +91,12 @@ jobs: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'Run cron CI') ) - uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2 # zizmor: ignore[unpinned-uses] + needs: [core] + uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@8c8bb6c6c962542921f993d47d26df38dccd50b1 # v3.0.2 with: - default_python: '3.13' submodules: false - coverage: codecov toxdeps: tox-pypi-filter + coverage: codecov envs: | - linux: py314-devdeps secrets: