From 44daac0adb06d7bae5d980d164d860c0e4a90b3a Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 10 Jul 2026 22:09:51 +0000 Subject: [PATCH 1/2] Extend CI matrix to test 3.10 off Linux; dedupe job setup into a composite action (#449) requires-python advertises 3.10-3.13 but Windows and macOS only ever ran Python 3.13; the minimum supported version was never validated off Linux. The matrix now runs 3.10 and 3.13 on all three operating systems and 3.11/3.12 on ubuntu only (8 jobs instead of the full 12-job product). Codecov still uploads once, from ubuntu + 3.13, and the free-threaded exclusion note (issue #43) is preserved. The install-uv + uv sync --dev --all-extras sequence was copy-pasted across five jobs in run-tests.yml and docs.yml; it now lives once in .github/actions/setup-env. Behavior-preserving: same setup-uv version, same sync flags. In the test job the build/import-check steps now run after the sync instead of before it, which they do not depend on (the import check runs with --isolated). Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01CynhA39u8mQeFWR3Ccf2UJ --- .github/actions/setup-env/action.yml | 21 +++++++++++++++++ .github/workflows/docs.yml | 6 ++--- .github/workflows/run-tests.yml | 35 +++++++++++----------------- 3 files changed, 36 insertions(+), 26 deletions(-) create mode 100644 .github/actions/setup-env/action.yml diff --git a/.github/actions/setup-env/action.yml b/.github/actions/setup-env/action.yml new file mode 100644 index 0000000..f7022ad --- /dev/null +++ b/.github/actions/setup-env/action.yml @@ -0,0 +1,21 @@ +name: Set up project environment +description: >- + Install uv, pin the requested Python version, and sync the project's dev + environment with all extras. Shared by the CI jobs in run-tests.yml and + docs.yml so the setup sequence is defined once. + +inputs: + python-version: + description: Python version to install and pin for uv + required: true + +runs: + using: composite + steps: + - name: Install uv and set the python version + uses: astral-sh/setup-uv@v7 + with: + python-version: ${{ inputs.python-version }} + - name: Install the project (editable, dev deps, all extras) + run: uv sync --dev --all-extras + shell: bash diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 6a09c66..3d098b6 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -21,12 +21,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - name: Install uv - uses: astral-sh/setup-uv@v7 + - name: Set up project environment + uses: ./.github/actions/setup-env with: python-version: "3.11" - - name: Install dependencies - run: uv sync --dev --all-extras - name: Install pandoc (required by nbsphinx) run: sudo apt-get update && sudo apt-get install -y pandoc - name: Configure GitHub Pages diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 42873ab..3d20948 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -27,12 +27,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - name: Install uv and set the python version - uses: astral-sh/setup-uv@v7 + - name: Set up project environment + uses: ./.github/actions/setup-env with: python-version: "3.13" - - name: Install the project (editable) - run: uv sync --dev --all-extras - name: Lint with ruff run: uv run ruff check . @@ -45,12 +43,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - name: Install uv and set the python version - uses: astral-sh/setup-uv@v7 + - name: Set up project environment + uses: ./.github/actions/setup-env with: python-version: "3.13" - - name: Install the project (editable) - run: uv sync --dev --all-extras - name: Type-check with mypy run: uv run mypy src/process_improve @@ -58,14 +54,14 @@ jobs: strategy: fail-fast: false matrix: - # Adjust for min and max supported Python versions - python-version: ["3.13"] + # The min (3.10) and max (3.13) supported Python versions run on all + # three operating systems; the versions in between run on ubuntu only. + # This keeps 8 jobs instead of the full 12-job product while still + # validating both Python extremes off Linux. + python-version: ["3.10", "3.13"] os: [ubuntu-latest, windows-latest, macos-latest] experimental: [false] include: - - python-version: "3.10" - os: ubuntu-latest - experimental: false - python-version: "3.11" os: ubuntu-latest experimental: false @@ -91,8 +87,8 @@ jobs: - uses: actions/checkout@v7 with: fetch-depth: 0 - - name: Install uv and set the python version - uses: astral-sh/setup-uv@v7 + - name: Set up project environment + uses: ./.github/actions/setup-env with: python-version: ${{ matrix.python-version }} # Test building & distribution @@ -100,9 +96,6 @@ jobs: run: uv build - name: Check if the built package can be installed and imported run: uv run --isolated --with . --no-project -- python -c "import process_improve" - # Editable install for testing - - name: Install the project (editable) - run: uv sync --dev --all-extras # This is where the actual unit and integration tests start - name: Test with pytest run: uv run pytest --cov-report=xml @@ -122,12 +115,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - name: Install uv and set the python version - uses: astral-sh/setup-uv@v7 + - name: Set up project environment + uses: ./.github/actions/setup-env with: python-version: "3.13" - - name: Install the project (editable) - run: uv sync --dev --all-extras - name: Test with pytest under python -O # Strip the default --cov / --pdb / -n auto / --exitfirst options; # for -O detection we want the full failure surface, not the first one. From e803b395d3f8d3f0429fcfecd88e8ae4efd5e8ce Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 10 Jul 2026 22:10:04 +0000 Subject: [PATCH 2/2] Bump version to 1.52.4 (#449) PATCH bump for the CI matrix and composite-action work; CITATION.cff synced in the same commit. Assumes WP1 (PR #451) merges first as 1.52.3; if merge order differs the number still moves forward. No changelog entry: owner classed this batch as internal-only. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01CynhA39u8mQeFWR3Ccf2UJ --- CITATION.cff | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index 60d6cd8..eaac0df 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -12,8 +12,8 @@ authors: repository-code: "https://github.com/kgdunn/process-improve" url: "https://kgdunn.github.io/process-improve/" license: MIT -version: 1.52.3 -date-released: "2026-07-10" +version: 1.52.4 +date-released: "2026-07-11" keywords: - chemometrics - multivariate analysis diff --git a/pyproject.toml b/pyproject.toml index 86a0516..c4fa3bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "process-improve" -version = "1.52.3" +version = "1.52.4" description = 'Designed Experiments; Latent Variables (PCA, PLS, multivariate methods with missing data); Process Monitoring; Batch data analysis.' readme = "README.md" license = "MIT"