diff --git a/.cruft.json b/.cruft.json index 3e1f70069..994b79d1c 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/sunpy/package-template", - "commit": "4ba8b7c6a6bf4f51f7154978ae8d2f3710ef89e5", + "commit": "2a6434a5c749ecde69d00b937a3fef27ecbad656", "checkout": null, "context": { "cookiecutter": { @@ -26,15 +26,17 @@ "use_extended_ruff_linting": "y", "matrix_room_id": "!TWSJXVpyflnZOzmSQz:matrix.org", "extra_ci_jobs": "cron", + "use_sunpy_pr_template": "y", "_sphinx_theme": "sunpy", "_parent_project": "", "_install_requires": "", "_copy_without_render": [ "docs/_templates", - "docs/_static" + "docs/_static", + ".github/workflows/zizmor.yml" ], "_template": "https://github.com/sunpy/package-template", - "_commit": "4ba8b7c6a6bf4f51f7154978ae8d2f3710ef89e5" + "_commit": "2a6434a5c749ecde69d00b937a3fef27ecbad656" } }, "directory": null diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..79183a10f --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,49 @@ +# Thank you for contributing to SunPy + +## 🚨 IMPORTANT 🚨 + +We know that working on code and submitting pull requests takes effort, and we appreciate your time. +Thank you. + +[Please be aware that everyone has to follow our code of conduct](https://sunpy.org/coc) + +[Furthermore, you might need to check with your work place if you are allowed to contribute code](https://docs.sunpy.org/en/latest/dev_guide/contents/newcomers.html) + +- Please try to create an issue _before_ creating a Pull Request. +- Please use the following Git commit message style + - Use the future tense ("Adds feature" not "Added feature") + - Limit the first line to 72 characters or less +- **Do not post the output from Large Language Models or similar generative AI as code or comments on GitHub or any other platform.** + 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. + See our documentation on fair and appropriate [AI usage](https://docs.sunpy.org/en/latest/dev_guide/contents/ai_usage.html). + +We have several automatic features that run when a pull request is open. +They can appear daunting but do not worry about them! +[This a brief explanation of them.](https://docs.sunpy.org/en/latest/dev_guide/contents/pr_review_procedure.html#continuous-integration) + +## ↑👆 DELETE above _before_ submitting 👆↑ + +## PR Description + + + +## AI Assistance Disclosure + + + +AI tools were used for: +- [ ] Code generation (e.g., when writing an implementation or fixing a bug) +- [ ] Test/benchmark generation +- [ ] Documentation (including examples) +- [ ] Research and understanding +- [ ] No AI tools were used + +> Regardless of AI use, the human contributor remains fully responsible for correctness, design choices, licensing compatibility, and long-term maintainability. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 606bce804..b92d40ae3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,14 +25,14 @@ permissions: {} jobs: core: uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@8c8bb6c6c962542921f993d47d26df38dccd50b1 # v3.0.2 + permissions: + id-token: write with: submodules: false - coverage: codecov + coverage: codecov-oidc toxdeps: tox-pypi-filter envs: | - linux: py313-minimal - secrets: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} sdist_verify: runs-on: ubuntu-latest @@ -51,9 +51,11 @@ jobs: test: needs: [core, sdist_verify] uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@8c8bb6c6c962542921f993d47d26df38dccd50b1 # v3.0.2 + permissions: + id-token: write with: submodules: false - coverage: codecov + coverage: codecov-oidc toxdeps: tox-pypi-filter posargs: -n auto envs: | @@ -62,8 +64,6 @@ jobs: - macos: py312 - linux: py311-oldestdeps - linux: asdf_schemas - secrets: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} docs: needs: [core] @@ -93,14 +93,14 @@ jobs: ) needs: [core] uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@8c8bb6c6c962542921f993d47d26df38dccd50b1 # v3.0.2 + permissions: + id-token: write with: submodules: false toxdeps: tox-pypi-filter - coverage: codecov + coverage: codecov-oidc envs: | - linux: py314-devdeps - secrets: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} build_dists: # Build wheels on PRs only when labelled. Releases will only be published if tagged ^v.* diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml new file mode 100644 index 000000000..777801f3c --- /dev/null +++ b/.github/workflows/zizmor.yml @@ -0,0 +1,24 @@ +name: GitHub Actions Security Analysis with zizmor + +on: + push: + branches: ["main"] + pull_request: + branches: ["**"] + +permissions: {} + +jobs: + zizmor: + runs-on: ubuntu-latest + permissions: + security-events: write + + steps: + - name: Checkout repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Run zizmor 🌈 + uses: zizmorcore/zizmor-action@3dc1ecc9bcb9e94e9b2c709687979e1298497054 # v0.6.2 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 67b3b8962..94e63d63a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,8 +1,4 @@ repos: - - repo: https://github.com/zizmorcore/zizmor-pre-commit - 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.16.1"