Skip to content

Commit 6cba83f

Browse files
committed
More fixes
1 parent b93e078 commit 6cba83f

8 files changed

Lines changed: 73 additions & 52 deletions

File tree

.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": "44ff5c06778e86b845dab595ebf338ba876d495e",
3+
"commit": "82eeab1ff6d8412193f03432404f97f13d81ce4d",
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": "44ff5c06778e86b845dab595ebf338ba876d495e"
35+
"_commit": "82eeab1ff6d8412193f03432404f97f13d81ce4d"
3636
}
3737
},
3838
"directory": null

.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: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ 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: # zizmor: ignore[dangerous-triggers] # TODO: Fix our cron job hell
20-
workflows: [Scheduled build triggerer]
2118

2219
concurrency:
2320
group: ${{ github.workflow }}-${{ github.ref }}
@@ -144,7 +141,7 @@ jobs:
144141
submodules: false
145142
save_artifacts: true
146143
upload_to_pypi: false
147-
upload_to_anaconda: ${{ (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }}
144+
upload_to_anaconda: ${{ github.event_name == 'workflow_dispatch' }}
148145
anaconda_user: scientific-python-nightly-wheels
149146
anaconda_package: sunpy
150147
anaconda_keep_n_latest: 1
@@ -168,7 +165,7 @@ jobs:
168165
if: startsWith(github.ref, 'refs/tags/v')
169166
name: Upload to PyPI
170167
runs-on: ubuntu-latest
171-
needs: [build_dists]
168+
needs: [build_dists, publish_pure]
172169
permissions:
173170
id-token: write
174171
environment:
@@ -187,7 +184,7 @@ jobs:
187184
uses: pypa/gh-action-pypi-publish@v1 # zizmor: ignore[unpinned-uses]
188185

189186
notify:
190-
if: always() && (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_run')
187+
if: ${{ !cancelled() && github.event_name == 'workflow_dispatch' }}
191188
needs: [publish_pure, online]
192189
environment:
193190
name: matrix
@@ -199,5 +196,5 @@ jobs:
199196
github_token: ${{ secrets.GITHUB_TOKEN }}
200197
homeserver: ${{ secrets.matrix_homeserver }}
201198
roomid: '!JYqfIVJjWANcHnfktY:cadair.com'
202-
ignore_pattern: '.*Load.*'
199+
ignore_pattern: '.*(Load|report overall).*'
203200
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 }}"

.github/workflows/cron.yml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: Cron
22

33
on:
4-
# Trigger on completion of the scheduled_builds.yml file (only on main)
5-
workflow_run:
6-
workflows: [Scheduled build triggerer]
74
# Manual runs through the web UI and also non-main cron job triggering
85
workflow_dispatch:
96
# We also want this workflow triggered if the 'Run cron CI' label is added
@@ -37,7 +34,7 @@ jobs:
3734
cron:
3835
# Run on all triggers other than pull_request unless there's a label
3936
if: (github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'Run cron CI'))
40-
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
37+
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@a138926f6e4f9667d1306c24f24f5bdcaa01fbab # v2.5.0
4138
with:
4239
default_python: '3.12'
4340
submodules: false
@@ -62,14 +59,14 @@ jobs:
6259
permissions:
6360
issues: write
6461
steps:
65-
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
62+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
6663
with:
6764
name: py314-devdeps-reportlog-(ubuntu-latest)
6865
path: pytest-log
6966

7067
- run: ls -lha pytest-log/
7168

72-
- uses: scientific-python/issue-from-pytest-log-action@558a3dfdd251069b328d3fded994824ddbefc47b # v1.4.0
69+
- uses: scientific-python/issue-from-pytest-log-action@8e905db353437cda1d6a773de245343fbfc940dd # v1.5.0
7370
with:
7471
log-path: pytest-log/pytest-log.jsonl
7572
issue-title: "Cron devdeps build failure"
@@ -78,7 +75,7 @@ jobs:
7875
cron-online:
7976
# Run on all triggers other than pull_request unless there's a label
8077
if: (github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'Run cron CI'))
81-
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
78+
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@a138926f6e4f9667d1306c24f24f5bdcaa01fbab # v2.5.0
8279
with:
8380
default_python: '3.12'
8481
submodules: false
@@ -102,37 +99,43 @@ jobs:
10299
if: (github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'Run cron CI'))
103100
runs-on: ubuntu-latest
104101
steps:
105-
- uses: actions/checkout@v6
102+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
106103
with:
107104
fetch-depth: 0
108105
lfs: true
109-
- uses: conda-incubator/setup-miniconda@v3
106+
persist-credentials: false
107+
108+
- uses: conda-incubator/setup-miniconda@fc2d68f6413eb2d87b895e92f8584b5b94a10167 # v3.3.0
110109
with:
111110
activate-environment: sunpy-test
112111
environment-file: sunpy-dev-env.yml
113112
python-version: "3.13"
114113
conda-remove-defaults: "true"
114+
115115
- name: Install sunpy
116116
shell: bash -el {0}
117117
run: |
118118
pip install --no-deps --no-build-isolation .
119+
119120
- name: Run test
120121
shell: bash -el {0}
121122
run: |
122123
conda list
123124
cd /tmp
124125
pytest -vvv -r a --pyargs sunpy --cov-report=xml --cov=sunpy --cov-config=$GITHUB_WORKSPACE/pyproject.toml $GITHUB_WORKSPACE/docs -n auto --color=yes
125-
- uses: codecov/codecov-action@v5
126+
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
126127
with:
127-
token: ${{ secrets.CODECOV_TOKEN }}
128+
token: ${{ secrets.CODECOV_TOKEN }} # zizmor: ignore[secrets-outside-env]
128129
files: ./coverage.xml
129130

130131
notify:
131-
if: always() && (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_run')
132+
if: ${{ !cancelled() && github.event_name == 'workflow_dispatch' }}
132133
needs: [cron, cron-online, conda]
133134
runs-on: ubuntu-latest
135+
environment:
136+
name: matrix
134137
steps:
135-
- uses: Cadair/matrix-notify-action@main
138+
- uses: Cadair/matrix-notify-action@31c7cc36051ee7dc4157a22c1f13dbc7d68e5120 # v2
136139
with:
137140
matrix_token: ${{ secrets.matrix_access_token }}
138141
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/scheduled_builds.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,30 @@ on:
1717
# │ │ │ │ ┌───────── day of the week (0 - 6 or SUN-SAT)
1818
- cron: '0 7 * * 1,3,5' # Every Mon,Wed,Fri at 07:00 UTC
1919

20+
permissions: {}
21+
2022
jobs:
2123
dispatch_release_branches:
2224
if: github.repository == 'sunpy/sunpy'
25+
permissions:
26+
actions: write
2327
runs-on: ubuntu-latest
2428
strategy:
2529
fail-fast: false
2630
matrix:
2731
include:
28-
# We do not include main here as the workflows on main are
29-
# triggered by the workflow_run trigger, therefore we only
30-
# need to list any non-main branches here.
32+
- branch: "main"
3133
- branch: "7.0"
3234
- branch: "7.1"
3335
steps:
34-
- run: gh workflow run ci.yml --repo sunpy/sunpy --ref ${{ matrix.branch }}
35-
- run: gh workflow run cron.yml --repo sunpy/sunpy --ref ${{ matrix.branch }}
36-
env:
37-
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
36+
- name: Trigger workflow dispatch for CI workflow
37+
uses: benc-uk/workflow-dispatch@7a027648b88c2413826b6ddd6c76114894dc5ec4 # v1.3.1
38+
with:
39+
workflow: CI
40+
ref: "${{ matrix.branch }}"
41+
42+
- name: Trigger workflow dispatch for Cron workflow
43+
uses: benc-uk/workflow-dispatch@7a027648b88c2413826b6ddd6c76114894dc5ec4 # v1.3.1
44+
with:
45+
workflow: Cron
46+
ref: "${{ matrix.branch }}"

.github/workflows/stale_bot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
pull-requests: write
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/stale@v10
19+
- uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0
2020
with:
2121
repo-token: ${{ secrets.GITHUB_TOKEN }}
2222
operations-per-run: 50

.pre-commit-config.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ repos:
4040
exclude: *exclude_dirs
4141
- id: check-added-large-files
4242
args: ["--enforce-all", "--maxkb=1054"]
43-
exclude: ""
4443
- id: end-of-file-fixer
4544
types_or: [python, rst]
4645
- id: mixed-line-ending
@@ -51,11 +50,6 @@ repos:
5150
- id: typos
5251
types_or: [python, rst]
5352
exclude: *exclude_dirs
54-
- repo: meta
55-
hooks:
56-
- id: check-hooks-apply
57-
# This may fail if you do not have matching files in the data/ or extern/ directories
58-
- id: check-useless-excludes
5953
- repo: local
6054
hooks:
6155
- id: generate-sunpy-net-hek-attrs

0 commit comments

Comments
 (0)