From 3a99f16973319b5e9d04c44a0367099f548b8bea Mon Sep 17 00:00:00 2001 From: iback Date: Tue, 25 Aug 2026 07:33:10 +0000 Subject: [PATCH] fix(ci): constrain vtk on Python 3.9 and run dev deps in PR workflow vtk 9.7.0 (2026-08-15) is the first release without a cp39 wheel, and vtk publishes no requires-python metadata, so Poetry cannot exclude it automatically -- it selects the newest version and then finds all 27 wheels ABI-incompatible. With no committed lockfile, every CI run re-resolves, so the post-merge 3.9 job broke the day that release shipped. Split the vtk constraint by Python version: <9.7 (last cp39 release is 9.6.2) below 3.10, unconstrained from 3.10 on. The PR workflow installed with `pip install -e .`, which skips the dev group where vtk lives, while the push-to-main workflow uses `poetry install`. That is why the PR was green and main failed. Align tests_mr.yml with tests.yml so PRs exercise the dev group too. Verified on Python 3.9: `poetry install` succeeds (vtk 9.6.2) and `poetry run pytest` reports 462 passed, 6 skipped. Python 3.10 still resolves to vtk 9.7.0. Co-Authored-By: Claude Opus 5 --- .github/workflows/tests_mr.yml | 9 ++++++--- pyproject.toml | 7 ++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests_mr.yml b/.github/workflows/tests_mr.yml index ea17b2f2..2a65e925 100644 --- a/.github/workflows/tests_mr.yml +++ b/.github/workflows/tests_mr.yml @@ -22,11 +22,14 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: Install dependencies + - name: Configure python run: | python -m pip install --upgrade pip + python -m pip install poetry python -m pip install flake8 pytest - pip install -e . + - name: Install dependencies + run: | + python -m poetry install - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names @@ -35,4 +38,4 @@ jobs: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | - pytest + python -m poetry run pytest diff --git a/pyproject.toml b/pyproject.toml index 9cbfcde0..9fd2f542 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,12 @@ scikit-image = [ [tool.poetry.group.dev.dependencies] pytest = ">=8.1.1" -vtk = "*" +# vtk 9.7.0 dropped cp39 wheels (and publishes no requires-python metadata, +# so Poetry cannot exclude it automatically). Pin the last cp39 release there. +vtk = [ + { version = ">=9.0,<9.7", python = "<3.10" }, + { version = "*", python = ">=3.10" }, +] pre-commit = "*" pyvista = "^0.43.2" coverage = ">=7.0.1"