Skip to content

Commit 2ec69fe

Browse files
petercorkeclaude
andcommitted
feat: relax opencv pin to support both 4.x and 5.x, add CI matrix axis
pyproject.toml's opencv-python/opencv-contrib-python pin was capped at <5.0.0 since 2026-06-16, defensively, before the codebase actually supported OpenCV 5. PR #61 landed real OpenCV 5 compatibility fixes (aruco, HoughLinesP, BRISK/AKAZE, MSER) and release 2.2.0's changelog already headlined "works under both OpenCV 4 and 5" -- but the pin itself was never relaxed, so pip install could never actually resolve opencv5, and CI never exercised it either. Relax the pin to >=4.5,<6.0.0 per issue #44's plan, and add an opencv-version axis (4, 5) to ci.yml's test matrix so both are actually exercised on every push/PR, not just verified manually once. Verified locally in isolated venvs (not the ambient dev environment): full suite green against real opencv-contrib-python 4.14.0.94 (785 passed, 94 skipped) and 5.0.0.93 (784 passed, 95 skipped). Fixes #44 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 1a7ccdc commit 2ec69fe

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
matrix:
1616
os: [ubuntu-latest, macos-15, windows-latest]
1717
python-version: ["3.10", "3.11", "3.12", "3.13"]
18+
opencv-version: ["4", "5"]
1819

1920
steps:
2021
- uses: actions/checkout@v7
@@ -30,6 +31,7 @@ jobs:
3031
- name: Install package
3132
run: |
3233
pip install .[dev,tool]
34+
pip install "opencv-python==${{ matrix.opencv-version }}.*" "opencv-contrib-python==${{ matrix.opencv-version }}.*"
3335
cd packages/mvtb-data && pip install .
3436
3537
- name: Run tests

‎pyproject.toml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ dependencies = [
3939
"scipy",
4040
"matplotlib",
4141
"pillow",
42-
"opencv-python<5.0.0",
43-
"opencv-contrib-python<5.0.0",
42+
"opencv-python>=4.5,<6.0.0",
43+
"opencv-contrib-python>=4.5,<6.0.0",
4444
"spatialmath-python",
4545
"pgraph-python",
4646
"ansitable",

0 commit comments

Comments
 (0)