From a4393619ad5bba197052d1a226703dd68c389058 Mon Sep 17 00:00:00 2001 From: Carlos Uribe Date: Sat, 14 Nov 2026 15:24:23 -0700 Subject: [PATCH 1/3] ci: move the GitHub Actions to their Node 24 majors Every run was warning that checkout, setup-python, upload-artifact and download-artifact still target Node.js 20, which the runners now force onto Node 24 and will stop supporting. The pins move to the current majors, each of which declares `using: node24`: actions/checkout v4 -> v7 actions/setup-python v5 -> v7 actions/upload-artifact v4 -> v7 actions/download-artifact v4 -> v8 Nothing we pass to them changed. The only behavioural differences that reach us are improvements: download-artifact now fails on a digest mismatch rather than warning, and upload-artifact gained direct unzipped uploads, which we do not use. All three workflows carried the same stale pins, so all three move together rather than leaving CI warning on every push. --- .github/workflows/ci.yml | 4 ++-- .github/workflows/no-medical-images.yml | 4 ++-- .github/workflows/release.yml | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e4a2ecd..a1c576f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,10 +12,10 @@ jobs: python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v7 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/no-medical-images.yml b/.github/workflows/no-medical-images.yml index 945ee3e..4264a0f 100644 --- a/.github/workflows/no-medical-images.yml +++ b/.github/workflows/no-medical-images.yml @@ -14,14 +14,14 @@ jobs: no-medical-images: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: # Keep LFS files as pointers; the check flags those by path anyway # and we must not pull patient data onto the runner. lfs: false - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v7 with: python-version: "3.12" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 04d019b..bcfc88e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,12 +33,12 @@ jobs: name: Build distributions runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: lfs: false - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v7 with: python-version: "3.12" @@ -81,7 +81,7 @@ jobs: - name: Confirm no medical image data was packaged run: python scripts/check_no_medical_images.py --all - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 with: name: dist path: dist/ @@ -98,7 +98,7 @@ jobs: permissions: id-token: write steps: - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v8 with: name: dist path: dist/ @@ -119,7 +119,7 @@ jobs: permissions: id-token: write steps: - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v8 with: name: dist path: dist/ From ff1101ad15dcca1823a0962634a07a5aebce5992 Mon Sep 17 00:00:00 2001 From: Carlos Uribe Date: Sat, 14 Nov 2026 15:25:09 -0700 Subject: [PATCH 2/3] docs: date the 0.3.0 changelog entry The section was still headed "unreleased". That text ships in the wheel metadata and renders on the published changelog page, so it needs a real date before the release is cut. --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 2240bad..f67c30c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [0.3.0] - unreleased +## [0.3.0] - 2026-11-14 This is the first release since 0.1 and covers roughly 350 commits, so the notes below are grouped by theme rather than listing every change. From c0882019f016786260b20d110b313e86f845b60c Mon Sep 17 00:00:00 2001 From: Carlos Uribe Date: Sat, 14 Nov 2026 15:32:49 -0700 Subject: [PATCH 3/3] ci: cache dependencies and stop running lint five times A PR run took around eight minutes of wall clock. The five matrix jobs run in parallel, so the count was never the cost; the slowest job was, and two thirds of it was dependency installation with no cache at all. Three changes: Dependency caching. setup-python now caches the pip downloads. There is no requirements.txt in this repository, so cache-dependency-path has to point at pyproject.toml explicitly or the action fails looking for one. Lint moves into its own job. Black, isort, flake8 and pydocstyle give the same answer on every interpreter, so running the hooks five times bought nothing. They now run once on 3.12, and the hook environments are cached too: the pytest-smoke hook builds a virtualenv with numpy, SimpleITK and scikit-image in it, which was most of that step's time. Superseded runs are cancelled. A fixup push used to leave six jobs grinding away on code nobody would merge. The test matrix keeps all five interpreters. The package declares support for 3.10 through 3.14, they cost no wall clock running in parallel, and they are free on a public repository. --- .github/workflows/ci.yml | 46 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a1c576f..c9391da 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,8 +3,47 @@ name: CI on: pull_request: +# A fixup push makes the run already in flight irrelevant. Cancel it rather +# than paying for six jobs to finish grading superseded code. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: - lint-and-test: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + + - name: Set up Python + uses: actions/setup-python@v7 + with: + python-version: "3.12" + cache: pip + # There is no requirements.txt, so the cache key has to be told + # where the dependency declarations actually live. + cache-dependency-path: pyproject.toml + + # The hooks build their own virtualenvs, and the pytest-smoke hook pulls + # in numpy, SimpleITK and scikit-image to do it. Uncached, that is the + # bulk of this job. + - name: Cache the pre-commit hook environments + uses: actions/cache@v6 + with: + path: ~/.cache/pre-commit + key: pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }} + + - name: Install pre-commit + run: python -m pip install pre-commit + + # Formatting and style do not vary by interpreter, so this runs once + # here rather than once per entry in the test matrix. + - name: Run the hooks + run: pre-commit run --all-files + + test: + name: Test runs-on: ubuntu-latest strategy: fail-fast: false @@ -18,14 +57,13 @@ jobs: uses: actions/setup-python@v7 with: python-version: ${{ matrix.python-version }} + cache: pip + cache-dependency-path: pyproject.toml - name: Install dependencies run: | python -m pip install --upgrade pip pip install -e ".[dev,test]" - - name: Run pre-commit - run: pre-commit run --all-files - - name: Run pytest run: pytest -rs