Skip to content

ci: pin conda opencv install to <5 to match pyproject.toml - #26

Merged
petercorke merged 2 commits into
mainfrom
ci/pin-opencv-below-5
Jul 29, 2026
Merged

petercorke merged 2 commits into
mainfrom
ci/pin-opencv-below-5

Conversation

@petercorke

Copy link
Copy Markdown
Owner

Summary

  • ci.yml's conda/micromamba install used the bare opencv conda-forge package with no version constraint. conda-forge has since published opencv 5.0.0, so CI silently started testing against opencv5 while pyproject.toml still pins opencv-python<5.0.0 / opencv-contrib-python<5.0.0 — the opencv5 migration isn't finished yet (separate, in-progress branch).
  • This is why the test matrix on fix: use eigh instead of eig for blob orientation/ellipse moments #25 (and any other open PR) is currently red on opencv4→5 API changes unrelated to what those PRs actually touch: cv2.BRISK_create moved, cv2.aruco.estimatePoseSingleMarkers removed/renamed, MSER indexing return shape changed.
  • Pinned both opencv occurrences (test and codecov jobs) to opencv<5, matching the existing pip-level constraint.
  • Logged the full opencv5-migration situation in tech-debt.md so the pin isn't casually removed before the migration branch is actually ready.

Test plan

  • Verified create-args block parses correctly and opencv<5 becomes its own token (not shell-interpreted — setup-micromamba passes create-args directly as CLI args, not through a shell)
  • CI on this PR should go green against opencv4, confirming the pin resolves the matrix failures

ci.yml's micromamba create-args installed the bare `opencv` conda-forge
package with no version constraint. conda-forge recently published
opencv 5.0.0, so CI silently started testing against opencv5 while
pyproject.toml still pins opencv-python/opencv-contrib-python to <5.0.0
(the opencv5 migration isn't finished yet, on a separate branch). Result:
CI now fails across the whole test matrix on opencv4->5 API changes
(cv2.BRISK_create, cv2.aruco.estimatePoseSingleMarkers, MSER indexing
shape) that are unrelated to whatever a given PR actually changes.

Pin both `opencv` occurrences (test and codecov jobs) to opencv<5 to
match the existing pip-level constraint until the opencv5 migration
branch is ready to move both pins together.
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Every sibling toolbox (robotics-toolbox-python, bdsim,
spatialmath-python) uses plain actions/setup-python + pip install .[dev]
for CI. machinevision-toolbox-python's ci.yml is the only one using
mamba-org/setup-micromamba with a hand-maintained create-args package
list -- an outlier, not a deliberate requirement (nothing in this
package's dependencies actually needs conda).

Directly connected to the opencv5 pin fix in this same PR: ci.yml
installs everything via create-args and then runs
`pip install .[dev] --no-deps`, so pyproject.toml's own version pins
never reach pip's resolver at all. That's how CI silently drifted onto
conda-forge's opencv 5.0.0 despite pyproject.toml pinning <5.0.0.
@petercorke
petercorke merged commit 12fc3d1 into main Jul 29, 2026
9 of 15 checks passed
petercorke added a commit that referenced this pull request Jul 29, 2026
Pull in #26's ci.yml fix so this PR's own workflow file (loaded from
this branch's head, not main, for pull_request-triggered runs) actually
tests against opencv4 instead of the unpinned conda-forge opencv5 drift.
petercorke added a commit that referenced this pull request Jul 29, 2026
Pull in #26's ci.yml fix so this PR's own workflow file (loaded from
this branch's head, not main, for pull_request-triggered runs) actually
tests against opencv4 instead of the unpinned conda-forge opencv5 drift.
@petercorke
petercorke deleted the ci/pin-opencv-below-5 branch August 10, 2026 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant