Skip to content

Commit f1d4cb9

Browse files
authored
Merge pull request sunpy#8545 from SunPyBot/cruft-manual-update
Updates from package template
2 parents 23a7544 + bdfe85c commit f1d4cb9

14 files changed

Lines changed: 195 additions & 117 deletions

.cruft.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"template": "https://github.com/sunpy/package-template",
3-
"commit": "4268346dead7b529a3d53df19bcf374bb2bbef34",
3+
"commit": "28d86966c43434a03346abf6e740b45206792da6",
44
"checkout": null,
55
"context": {
66
"cookiecutter": {
@@ -32,7 +32,7 @@
3232
".github/workflows/sub_package_update.yml"
3333
],
3434
"_template": "https://github.com/sunpy/package-template",
35-
"_commit": "4268346dead7b529a3d53df19bcf374bb2bbef34"
35+
"_commit": "28d86966c43434a03346abf6e740b45206792da6"
3636
}
3737
},
3838
"directory": null

.github/dependabot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ updates:
44
directory: "/"
55
schedule:
66
interval: "monthly"
7+
cooldown:
8+
default-days: 7

.github/workflows/asv-regular.yml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,46 +11,54 @@ on:
1111
# │ │ │ │ ┌───────── day of the week (0 - 6 or SUN-SAT)
1212
- cron: "37 3 * * *" # Every day at 3:37am UTC
1313

14+
permissions: {}
15+
1416
jobs:
1517
asv-run:
1618
if: ${{ github.repository == 'sunpy/sunpy' }}
1719
runs-on: ubuntu-latest
20+
environment:
21+
name: asv-upload
1822
steps:
1923
- name: Checkout sunpy repo
20-
uses: actions/checkout@v6
24+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2125
with:
2226
fetch-depth: "0"
27+
persist-credentials: false
28+
2329
- name: Checkout sunpy-benchmarks repo
24-
uses: actions/checkout@v6
30+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2531
with:
2632
repository: sunpy/sunpy-benchmarks
2733
ref: main
2834
path: asv_results
29-
- name: Set up Python 3.11
30-
uses: actions/setup-python@v6
35+
persist-credentials: false
36+
37+
- name: Set up Python
38+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
3139
with:
32-
python-version: "3.11"
40+
python-version: "3.14"
3341
architecture: "x64"
42+
3443
- name: Install dependencies
3544
run: |
3645
sudo apt-get install -y libopencv-dev
3746
python -m pip install --upgrade pip
3847
pip install asv virtualenv
48+
3949
- name: Add machine info for ASV
4050
run: asv machine --machine GH-Actions --os ubuntu-latest --arch x64 --cpu "2-core unknown" --ram 7GB
41-
- name: Run benchmarks for commits since v2.1
42-
run: taskset -c 0 asv run --skip-existing-successful --steps 50 v3.0.dev..
43-
- name: Install SSH Client 🔑
44-
uses: webfactory/ssh-agent@v0.9.1
45-
with:
46-
ssh-private-key: ${{ secrets.ASV_CI_KEY }}
51+
52+
- name: Run benchmarks for commits since v5.0
53+
run: taskset -c 0 asv run --skip-existing-successful --steps 50 v4.1.dev..
54+
4755
- name: Push results
48-
uses: JamesIves/github-pages-deploy-action@v4
56+
uses: JamesIves/github-pages-deploy-action@d92aa235d04922e8f08b40ce78cc5442fcfbfa2f # v4.8.0
4957
with:
5058
branch: main
5159
folder: asv_results
60+
token: ${{ secrets.GH_PAT_TOKEN }}
5261
repository-name: sunpy/sunpy-benchmarks
53-
ssh-key: true
5462
commit-message: |
5563
Push new results from GitHub Actions
5664
repository: ${{ github.repository }}

.github/workflows/ci.yml

Lines changed: 53 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,16 @@ on:
1515
pull_request:
1616
# Allow manual runs through the web UI
1717
workflow_dispatch:
18-
# Trigger on completion of the scheduled_builds.yml file (only on main)
19-
workflow_run:
20-
workflows: [Scheduled build triggerer]
2118

2219
concurrency:
2320
group: ${{ github.workflow }}-${{ github.ref }}
2421
cancel-in-progress: true
2522

23+
permissions: {}
24+
2625
jobs:
2726
core:
28-
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2
27+
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2 # zizmor: ignore[unpinned-uses]
2928
with:
3029
submodules: false
3130
coverage: codecov
@@ -39,11 +38,10 @@ jobs:
3938
sdist_verify:
4039
runs-on: ubuntu-latest
4140
steps:
42-
- uses: actions/checkout@v6
41+
- uses: actions/checkout@v6 # zizmor: ignore[unpinned-uses]
4342
with:
44-
fetch-tags: true
45-
fetch-depth: 0
46-
- uses: actions/setup-python@v6
43+
persist-credentials: false
44+
- uses: actions/setup-python@v6 # zizmor: ignore[unpinned-uses]
4745
with:
4846
python-version: '3.13'
4947
- run: python -m pip install -U --user build
@@ -52,8 +50,8 @@ jobs:
5250
- run: python -m twine check dist/*
5351

5452
test:
55-
needs: [core]
56-
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2
53+
needs: [core, sdist_verify]
54+
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2 # zizmor: ignore[unpinned-uses]
5755
with:
5856
submodules: false
5957
coverage: codecov
@@ -74,7 +72,7 @@ jobs:
7472

7573
docs:
7674
needs: [core]
77-
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2
75+
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2 # zizmor: ignore[unpinned-uses]
7876
with:
7977
default_python: '3.13'
8078
submodules: false
@@ -95,7 +93,7 @@ jobs:
9593
online:
9694
if: "!startsWith(github.event.ref, 'refs/tags/v')"
9795
needs: [docs]
98-
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2
96+
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2 # zizmor: ignore[unpinned-uses]
9997
with:
10098
default_python: '3.13'
10199
submodules: false
@@ -118,7 +116,7 @@ jobs:
118116
secrets:
119117
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
120118

121-
publish:
119+
build_dists:
122120
# Build wheels on PRs only when labelled. Releases will only be published if tagged ^v.*
123121
# see https://github-actions-workflows.openastronomy.org/en/latest/publish.html#upload-to-pypi
124122
if: |
@@ -128,50 +126,75 @@ jobs:
128126
contains(github.event.pull_request.labels.*.name, 'Run publish')
129127
)
130128
needs: [test, docs]
131-
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish.yml@v2
129+
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish.yml@v2 # zizmor: ignore[unpinned-uses]
132130
with:
133-
upload_to_anaconda: ${{ (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }}
134-
anaconda_user: scientific-python-nightly-wheels
135-
anaconda_package: sunpy
136-
anaconda_keep_n_latest: 1
137-
sdist: false
138-
test_extras: 'tests'
139-
test_command: 'pytest -p no:warnings --doctest-rst --pyargs sunpy'
140-
submodules: false
131+
sdist: false # Built with a universal wheel below
141132
targets: |
142133
- cp3{12,13,14}-manylinux*_x86_64
143134
- cp3{12,13,14}-macosx_x86_64
144135
- cp3{12,13,14}-macosx_arm64
145136
- cp3{12,13,14}-win_amd64
146137
- target: cp3{12,13,14}-manylinux_aarch64
147138
runs-on: ubuntu-24.04-arm
139+
test_extras: 'tests'
140+
test_command: 'pytest -p no:warnings --doctest-rst --pyargs sunpy'
141+
submodules: false
142+
save_artifacts: true
143+
upload_to_pypi: false
144+
upload_to_anaconda: ${{ github.event_name == 'workflow_dispatch' }}
145+
anaconda_user: scientific-python-nightly-wheels
146+
anaconda_package: sunpy
147+
anaconda_keep_n_latest: 1
148148
secrets:
149-
pypi_token: ${{ secrets.pypi_token }}
150149
anaconda_token: ${{ secrets.anaconda_org_upload_token }}
151150

152151
publish_pure:
153-
needs: [publish]
154-
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v2
152+
needs: [test, docs]
153+
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v2 # zizmor: ignore[unpinned-uses]
155154
with:
156155
python-version: "3.13"
157156
test_extras: 'tests'
158157
test_command: 'pytest -p no:warnings --doctest-rst -m "not mpl_image_compare" --pyargs sunpy'
159158
submodules: false
160159
env: |
161160
SUNPY_NO_BUILD_ANA_EXTENSION: 1
162-
secrets:
163-
pypi_token: ${{ secrets.pypi_token }}
161+
save_artifacts: true
162+
upload_to_pypi: false
163+
164+
publish:
165+
if: startsWith(github.ref, 'refs/tags/v')
166+
name: Upload to PyPI
167+
runs-on: ubuntu-latest
168+
needs: [build_dists, publish_pure]
169+
permissions:
170+
id-token: write
171+
environment:
172+
name: pypi
173+
steps:
174+
- name: Download artifacts
175+
uses: actions/download-artifact@v7 # zizmor: ignore[unpinned-uses]
176+
with:
177+
merge-multiple: true
178+
pattern: dist-*
179+
path: dist
180+
181+
- run: ls -lha dist/
182+
183+
- name: Run upload
184+
uses: pypa/gh-action-pypi-publish@v1.13.0 # zizmor: ignore[unpinned-uses]
164185

165186
notify:
166-
if: always() && (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_run')
187+
if: ${{ !cancelled() && github.event_name == 'workflow_dispatch' }}
167188
needs: [publish_pure, online]
189+
environment:
190+
name: matrix
168191
runs-on: ubuntu-latest
169192
steps:
170-
- uses: Cadair/matrix-notify-action@main
193+
- uses: Cadair/matrix-notify-action@main # zizmor: ignore[unpinned-uses]
171194
with:
172195
matrix_token: ${{ secrets.matrix_access_token }}
173196
github_token: ${{ secrets.GITHUB_TOKEN }}
174197
homeserver: ${{ secrets.matrix_homeserver }}
175198
roomid: '!JYqfIVJjWANcHnfktY:cadair.com'
176-
ignore_pattern: '.*Load.*'
199+
ignore_pattern: '.*(Load|report overall).*'
177200
summarise_success: true

.github/workflows/ci_benchmarks.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ concurrency:
88
group: ${{ github.workflow }}-${{ github.ref }}
99
cancel-in-progress: true
1010

11+
permissions: {}
12+
1113
jobs:
1214
benchmarks:
1315
if: |
@@ -16,21 +18,26 @@ jobs:
1618
runs-on: ubuntu-latest
1719
steps:
1820
- name: Checkout sunpy repo
19-
uses: actions/checkout@v6
21+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2022
with:
2123
fetch-depth: 0
24+
persist-credentials: false
25+
2226
- name: Install Python
23-
uses: actions/setup-python@v6
27+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
2428
with:
2529
python-version: "3.14"
30+
2631
- name: Install dependencies
2732
run: |
2833
sudo apt-get update
2934
sudo apt-get install -y libopencv-dev
3035
python -m pip install --upgrade pip
3136
pip install asv virtualenv
37+
3238
- name: Add machine info for ASV
3339
run: asv machine --yes
40+
3441
- name: Run benchmarks
3542
id: asv
3643
shell: bash -e {0}
@@ -48,7 +55,10 @@ jobs:
4855
status=${PIPESTATUS[0]}
4956
echo "EOF" >> $GITHUB_OUTPUT
5057
exit $status
58+
5159
- name: Post the summary
5260
if: always()
5361
run: |
54-
echo "${{ steps.asv.outputs.TEXT }}" | egrep "\| *Change *\| *Before *\[|BENCHMARKS NOT SIGNIFICANTLY CHANGED." -A 1000 | tee -a $GITHUB_STEP_SUMMARY
62+
echo "$ASV_TEXT" | egrep "\| *Change *\| *Before *\[|BENCHMARKS NOT SIGNIFICANTLY CHANGED." -A 1000 | tee -a $GITHUB_STEP_SUMMARY
63+
env:
64+
ASV_TEXT: "${{ steps.asv.outputs.TEXT }}"

0 commit comments

Comments
 (0)