From e908fe1a120ffba36a61374999300eca218205ad Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Tue, 10 Sep 2024 14:24:17 +0100 Subject: [PATCH] Updates from package template (#165) * Update cruft with batchpr * Update ci.yml * Update pyproject.toml --- .cruft.json | 2 +- .github/workflows/ci.yml | 16 ++++++++-------- .pre-commit-config.yaml | 2 +- .readthedocs.yaml | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.cruft.json b/.cruft.json index 1d41efd..fe4300c 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/sunpy/package-template", - "commit": "2fbaccff08fdfbb1bc1eec2bc7b980fe44a718e6", + "commit": "67ea3b3815de57668e92dbe1fa2c3d033758d8f0", "checkout": null, "context": { "cookiecutter": { diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bbc2743..28015fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,7 +52,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: '3.12' - run: python -m pip install -U --user build - run: python -m build . --sdist - run: python -m pip install -U --user twine @@ -76,7 +76,7 @@ jobs: needs: [core] uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main with: - default_python: '3.10' + default_python: '3.12' submodules: false pytest: false toxdeps: tox-pypi-filter @@ -97,7 +97,7 @@ jobs: ) uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main with: - default_python: '3.10' + default_python: '3.12' submodules: false coverage: codecov toxdeps: tox-pypi-filter @@ -107,15 +107,15 @@ jobs: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} publish: - # Build wheels when on a branch or when label is set - # publish.yml will only publish if tagged ^v.* + needs: [test, docs] + # Build wheels on PRs only when labelled. Releases will only be published if tagged ^v.* + # see https://github-actions-workflows.openastronomy.org/en/latest/publish.html#upload-to-pypi if: | - github.event_name != 'pull_request' - || ( + github.event_name != 'pull_request' || + ( github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'Run publish') ) - needs: [test, docs] uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish.yml@main with: sdist: true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 95f5f66..3b825d2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: # This should be before any formatting hooks like isort - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.5.4" + rev: "v0.6.3" hooks: - id: ruff args: ["--fix"] diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 790abab..3d9312d 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -1,9 +1,9 @@ version: 2 build: - os: ubuntu-22.04 + os: ubuntu-lts-latest tools: - python: "mambaforge-4.10" + python: "mambaforge-latest" jobs: post_checkout: - git fetch --unshallow || true