From 82dd0408ccadb9bf88e63dd08e8bfe4f366dd304 Mon Sep 17 00:00:00 2001 From: Cadair <1391051+Cadair@users.noreply.github.com> Date: Thu, 6 Aug 2026 13:31:25 +0000 Subject: [PATCH 1/5] 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 | 6 +++--- .readthedocs.yaml | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.cruft.json b/.cruft.json index 73199919..1ef9d66d 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/sunpy/package-template", - "commit": "0c0f34c2ccd536ba8320fcda29c4d8e0f8f9adc5", + "commit": "febd45b05a8eb80d6171683bf54fbe764a0c9063", "checkout": null, "context": { "cookiecutter": { @@ -33,7 +33,7 @@ ".github/workflows/sub_package_update.yml" ], "_template": "https://github.com/sunpy/package-template", - "_commit": "0c0f34c2ccd536ba8320fcda29c4d8e0f8f9adc5" + "_commit": "febd45b05a8eb80d6171683bf54fbe764a0c9063" } }, "directory": null diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 897730bc..ac2a34be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,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 @@ -45,7 +45,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] @@ -58,7 +58,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 @@ -75,7 +75,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 @@ -110,7 +110,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 bfb213a8..95279f44 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 ddcbd646..45155589 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,11 +1,11 @@ repos: - repo: https://github.com/zizmorcore/zizmor-pre-commit - rev: v1.25.2 + 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.15" + rev: "v0.16.1" hooks: - id: ruff args: ["--fix"] @@ -45,7 +45,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" ] diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 4ea33746..4bb8346d 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -3,7 +3,7 @@ version: 2 build: os: ubuntu-lts-latest tools: - python: "mambaforge-latest" + python: "miniforge3-latest" jobs: post_checkout: - git fetch --unshallow || true From c7652cbb51d9dfd351f26b7cb0f430fdfd58d5ba Mon Sep 17 00:00:00 2001 From: SunPyBot Date: Thu, 6 Aug 2026 15:04:46 +0000 Subject: [PATCH 2/5] 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 1ef9d66d..d8823dc5 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 500b941a..90b6dbd0 100644 --- a/tox.ini +++ b/tox.ini @@ -27,7 +27,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 build_docs,online: HOME = {envtmpdir} From 0418a6c6822b273e454fa3564450cc9b78ac6b34 Mon Sep 17 00:00:00 2001 From: SunPyBot Date: Thu, 6 Aug 2026 15:50:14 +0000 Subject: [PATCH 3/5] 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 d8823dc5..0e27a60d 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 90b6dbd0..b91f2c26 100644 --- a/tox.ini +++ b/tox.ini @@ -27,7 +27,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 5cc0bda37c6cad8ec1f9c46d9fd8d7476e59e941 Mon Sep 17 00:00:00 2001 From: SunPyBot Date: Fri, 7 Aug 2026 01:33:42 +0000 Subject: [PATCH 4/5] 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 0e27a60d..7f844ec8 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 ac2a34be..644f95e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,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 @@ -45,10 +45,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 @@ -58,7 +58,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 @@ -75,7 +75,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 @@ -110,7 +110,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' @@ -130,7 +130,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 7f217758..cc1d5fbd 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 95279f44..6d95a13a 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: "." @@ -104,7 +104,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 6f089ef5130be6699e8251205458fbd69c356efc Mon Sep 17 00:00:00 2001 From: SunPyBot Date: Fri, 7 Aug 2026 04:05:28 +0000 Subject: [PATCH 5/5] Run cruft update from package template --- .cruft.json | 2 +- .github/workflows/sub_package_update.yml | 164 ----------------------- 2 files changed, 1 insertion(+), 165 deletions(-) delete mode 100644 .github/workflows/sub_package_update.yml diff --git a/.cruft.json b/.cruft.json index 7f844ec8..ab699e71 100644 --- a/.cruft.json +++ b/.cruft.json @@ -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_extended_ruff_linting": "n", "matrix_room_id": "", "_sphinx_theme": "sunpy", diff --git a/.github/workflows/sub_package_update.yml b/.github/workflows/sub_package_update.yml deleted file mode 100644 index 6d95a13a..00000000 --- a/.github/workflows/sub_package_update.yml +++ /dev/null @@ -1,164 +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: - 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: - contents: write - pull-requests: write - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.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' - 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) - 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 }} - 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 - 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 - }); - }