Skip to content

Commit e0faf8f

Browse files
committed
Update cruft with batchpr
1 parent 8834793 commit e0faf8f

5 files changed

Lines changed: 143 additions & 18 deletions

File tree

.cruft.json

Lines changed: 3 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": "9599f755e4f7880fe20f0f07bbf500d8c41de34d",
44
"checkout": null,
55
"context": {
66
"cookiecutter": {
@@ -23,6 +23,7 @@
2323
"include_example_code": "n",
2424
"include_cruft_update_github_workflow": "y",
2525
"use_extended_ruff_linting": "y",
26+
"matrix_room_id": "",
2627
"_sphinx_theme": "sunpy",
2728
"_parent_project": "",
2829
"_install_requires": "",
@@ -32,7 +33,7 @@
3233
".github/workflows/sub_package_update.yml"
3334
],
3435
"_template": "https://github.com/sunpy/package-template",
35-
"_commit": "4268346dead7b529a3d53df19bcf374bb2bbef34"
36+
"_commit": "9599f755e4f7880fe20f0f07bbf500d8c41de34d"
3637
}
3738
},
3839
"directory": null

.github/workflows/ci.yml

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ concurrency:
2727
group: ${{ github.workflow }}-${{ github.ref }}
2828
cancel-in-progress: true
2929

30+
permissions: {}
31+
3032
jobs:
3133
core:
32-
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2
34+
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2 # zizmor: ignore[unpinned-uses]
3335
with:
3436
submodules: false
3537
coverage: codecov
@@ -42,8 +44,10 @@ jobs:
4244
sdist_verify:
4345
runs-on: ubuntu-latest
4446
steps:
45-
- uses: actions/checkout@v6
46-
- uses: actions/setup-python@v6
47+
- uses: actions/checkout@v6 # zizmor: ignore[unpinned-uses]
48+
with:
49+
persist-credentials: false
50+
- uses: actions/setup-python@v6 # zizmor: ignore[unpinned-uses]
4751
with:
4852
python-version: '3.13'
4953
- run: python -m pip install -U --user build
@@ -53,7 +57,7 @@ jobs:
5357

5458
test:
5559
needs: [core, sdist_verify]
56-
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2
60+
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2 # zizmor: ignore[unpinned-uses]
5761
with:
5862
submodules: false
5963
coverage: codecov
@@ -69,7 +73,7 @@ jobs:
6973

7074
docs:
7175
needs: [core]
72-
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2
76+
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2 # zizmor: ignore[unpinned-uses]
7377
with:
7478
default_python: '3.13'
7579
submodules: false
@@ -120,7 +124,7 @@ jobs:
120124
token: ${{ secrets.CODECOV_TOKEN }}
121125
files: ./coverage.xml
122126

123-
publish:
127+
build_dists:
124128
# Build wheels on PRs only when labelled. Releases will only be published if tagged ^v.*
125129
# see https://github-actions-workflows.openastronomy.org/en/latest/publish.html#upload-to-pypi
126130
if: |
@@ -130,11 +134,40 @@ jobs:
130134
contains(github.event.pull_request.labels.*.name, 'Run publish')
131135
)
132136
needs: [test, docs]
133-
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v2
137+
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v2 # zizmor: ignore[unpinned-uses]
134138
with:
135139
python-version: '3.13'
136140
test_extras: 'tests'
137141
test_command: 'pytest -p no:warnings --doctest-rst -m "not mpl_image_compare" --pyargs sunkit_image'
138142
submodules: false
143+
<<<<<<<
139144
secrets:
140145
pypi_token: ${{ secrets.pypi_token }}
146+
=======
147+
save_artifacts: true
148+
upload_to_pypi: false
149+
150+
publish:
151+
if: startsWith(github.ref, 'refs/tags/v')
152+
name: Upload to PyPI
153+
runs-on: ubuntu-latest
154+
needs: [build_dists]
155+
permissions:
156+
id-token: write
157+
environment:
158+
name: pypi
159+
steps:
160+
- name: Download artifacts
161+
uses: actions/download-artifact@v8 # zizmor: ignore[unpinned-uses]
162+
with:
163+
merge-multiple: true
164+
pattern: dist-*
165+
path: dist
166+
167+
- run: ls -lha dist/
168+
169+
- name: Run upload
170+
uses: pypa/gh-action-pypi-publish@v1.13.0 # zizmor: ignore[unpinned-uses]
171+
172+
173+
>>>>>>>

.github/workflows/sub_package_update.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,20 @@ on:
1313
# │ │ │ │ ┌───────── day of the week (0 - 6 or SUN-SAT)
1414
- cron: '0 7 * * 1' # Every Monday at 7am UTC
1515

16+
permissions: {}
17+
1618
jobs:
1719
update:
1820
runs-on: ubuntu-latest
1921
permissions:
2022
contents: write
2123
pull-requests: write
22-
strategy:
23-
fail-fast: true
2424
steps:
25-
- uses: actions/checkout@v6
25+
- uses: actions/checkout@v6 # zizmor: ignore[unpinned-uses]
26+
with:
27+
persist-credentials: false
2628

27-
- uses: actions/setup-python@v6
29+
- uses: actions/setup-python@v6 # zizmor: ignore[unpinned-uses]
2830
with:
2931
python-version: "3.14"
3032

@@ -50,8 +52,8 @@ jobs:
5052
id: cruft_update
5153
if: steps.check.outputs.has_changes == '1'
5254
run: |
53-
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
54-
git config --global user.name "${{ github.actor }}"
55+
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
56+
git config --global user.name "${GITHUB_ACTOR}"
5557
5658
cruft_output=$(cruft update --skip-apply-ask --refresh-private-variables)
5759
echo $cruft_output
@@ -77,7 +79,7 @@ jobs:
7779
7880
- name: Create pull request
7981
if: steps.cruft_json.outputs.has_changes == '1'
80-
uses: peter-evans/create-pull-request@v8
82+
uses: peter-evans/create-pull-request@v8 # zizmor: ignore[unpinned-uses]
8183
with:
8284
token: ${{ secrets.GITHUB_TOKEN }}
8385
add-paths: "."
@@ -102,7 +104,7 @@ jobs:
102104
issues: write
103105
steps:
104106
- name: Open an issue if workflow fails
105-
uses: actions/github-script@v7
107+
uses: actions/github-script@v8 # zizmor: ignore[unpinned-uses]
106108
with:
107109
github-token: ${{ github.token }}
108110
# This script is adapted from https://github.com/scientific-python/issue-from-pytest-log-action
@@ -150,7 +152,7 @@ jobs:
150152
repo: variables.name,
151153
body: issue_body,
152154
title: variables.title,
153-
labels: [variables.label],
155+
labels: [variables.label, "pre-commit.ci autofix"],
154156
});
155157
} else {
156158
await github.rest.issues.update({

.pre-commit-config.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
repos:
2+
<<<<<<<
3+
=======
4+
- repo: https://github.com/zizmorcore/zizmor-pre-commit
5+
rev: v1.23.1
6+
hooks:
7+
- id: zizmor
8+
# This should be before any formatting hooks like isort
9+
>>>>>>>
210
- repo: https://github.com/astral-sh/ruff-pre-commit
311
rev: "v0.15.4"
412
hooks:
513
- id: ruff
14+
<<<<<<<
615
args: ["--fix", "--unsafe-fixes"]
716
- repo: https://github.com/PyCQA/isort
817
rev: 8.0.1
@@ -30,6 +39,54 @@ repos:
3039
hooks:
3140
- id: codespell
3241
args: [ "--write-changes" ]
42+
=======
43+
args: ["--fix"]
44+
types: [python]
45+
# Define here once and then reference using YAML anchor
46+
exclude: &exclude_dirs ^sunkit_image/(data|extern)/
47+
- repo: https://github.com/PyCQA/isort
48+
rev: 8.0.1
49+
hooks:
50+
- id: isort
51+
types: [python]
52+
exclude: *exclude_dirs
53+
- repo: https://github.com/pre-commit/pre-commit-hooks
54+
rev: v6.0.0
55+
hooks:
56+
- id: check-ast
57+
types: [python]
58+
exclude: *exclude_dirs
59+
- id: check-case-conflict
60+
types: [python]
61+
exclude: *exclude_dirs
62+
- id: trailing-whitespace
63+
types_or: [python, rst]
64+
- id: check-yaml
65+
types: [yaml]
66+
exclude: *exclude_dirs
67+
- id: check-toml
68+
types: [toml]
69+
exclude: *exclude_dirs
70+
- id: debug-statements
71+
types: [python]
72+
exclude: *exclude_dirs
73+
- id: check-added-large-files
74+
args: ["--enforce-all", "--maxkb=1054"]
75+
- id: end-of-file-fixer
76+
types_or: [python, rst]
77+
- id: mixed-line-ending
78+
types_or: [python, rst]
79+
- repo: https://github.com/codespell-project/codespell
80+
rev: v2.4.1
81+
hooks:
82+
- id: codespell
83+
args: [ "--write-changes" ]
84+
types_or: [python, rst]
85+
exclude: *exclude_dirs
86+
ci:
87+
autofix_prs: false
88+
autoupdate_schedule: "quarterly"
89+
>>>>>>>
3390
- repo: https://github.com/adhtruong/mirrors-typos
3491
rev: v1.38.1
3592
hooks:

README.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,43 @@
1+
<<<<<<<
12
``sunkit-image``
23
================
34

5+
=======
6+
An image processing toolbox for Solar Physics.
7+
==============================================
8+
9+
Usage of Generative AI
10+
----------------------
11+
>>>>>>>
412
|Latest Version| |codecov| |Powered by NumFOCUS| |Powered by Sunpy|
513

614
.. |Powered by Sunpy| image:: http://img.shields.io/badge/powered%20by-SunPy-orange.svg?style=flat
715
:target: https://www.sunpy.org
816
.. |Latest Version| image:: https://img.shields.io/pypi/v/sunkit-image.svg
17+
<<<<<<<
18+
=======
19+
If you use generative AI tools as an aid in developing code or documentation changes, ensure that you fully understand the proposed changes and can explain why they are the correct approach and an improvement to the current state.
20+
For more information see our documentation on fair and appropriate `AI usage <https://docs.sunpy.org/en/latest/dev_guide/contents/ai_usage.html>`__.
21+
22+
Contributing
23+
------------
24+
25+
We love contributions! sunkit-image is open source,
26+
built on open source, and we'd love to have you hang out in our community.
27+
28+
If you would like to get involved, check out the `Developers Guide`_ section of the SunPy docs.
29+
Stop by our chat room `#sunpy:openastronomy.org`_ if you have any questions.
30+
Help is always welcome so let us know what you like to work on, or check out the `issues page`_ for the list of known outstanding items.
31+
32+
For more information on contributing to SunPy, please read our `Newcomers' guide`_.
33+
34+
.. _Developers Guide: https://docs.sunpy.org/en/latest/dev_guide/index.html
35+
.. _`#sunpy:openastronomy.org`: https://app.element.io/#/room/#sunpy:openastronomy.org
36+
.. _issues page: https://github.com/sunpy/sunkit-image/issues
37+
.. _Newcomers' guide: https://docs.sunpy.org/en/latest/dev_guide/contents/newcomers.html
38+
39+
When you are interacting with the SunPy community you are asked at to follow our `code of conduct <https://sunpy.org/coc>`__.
40+
>>>>>>>
941
:target: https://pypi.python.org/pypi/sunkit-image/
1042
.. |codecov| image:: https://codecov.io/gh/sunpy/sunpy/branch/main/graph/badge.svg
1143
:target: https://codecov.io/gh/sunpy/sunkit-image

0 commit comments

Comments
 (0)