Skip to content

Commit b836670

Browse files
committed
Bound the OpenCV major and refresh pinned dependency versions
je_open_cv leaves opencv-python unpinned, so the OpenCV 5.0 release silently changed cv2 return shapes and broke line/text-region detection for every fresh install; an explicit `<6` bound stops the next major from doing the same. Fold in the dependency bumps dependabot proposed against stale bases (pillow 12.3.0, pyobjc 12.2.1, ruff 0.15.22, pytest 9.1.1) and keep the versions the workflows hardcode in sync with dev_requirements.txt. Pinning the CI tooling installs also clears the SonarCloud githubactions:S8541/S8544 findings.
1 parent d5fca0a commit b836670

7 files changed

Lines changed: 1413 additions & 1171 deletions

File tree

.github/workflows/platform-smoke.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
- uses: actions/setup-python@v5
2323
with:
2424
python-version: ${{ matrix.python-version }}
25+
# NOSONAR githubactions:S8544 # reason: installs the checked-out project itself, there is no upstream version to lock
2526
- run: python -m pip install -e .
2627
# The X11 backend connects to a display at import time, so Linux
2728
# runs need a virtual one.

.github/workflows/quality.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ jobs:
3737
cache: "pip"
3838

3939
- name: Install ruff
40-
run: |
41-
python -m pip install --upgrade pip
42-
pip install ruff
40+
run: "pip install --only-binary :all: ruff==0.15.22"
4341

4442
- name: Run ruff
4543
run: ruff check je_auto_control/
@@ -56,9 +54,7 @@ jobs:
5654
cache: "pip"
5755

5856
- name: Install bandit
59-
run: |
60-
python -m pip install --upgrade pip
61-
pip install bandit
57+
run: "pip install --only-binary :all: bandit==1.9.4"
6258

6359
- name: Run bandit (recursive, skip tests + i18n dicts)
6460
run: bandit -r je_auto_control/ -c pyproject.toml
@@ -90,7 +86,7 @@ jobs:
9086
# for any sub-package the snapshot doesn't include
9187
# (admin, usb, remote_desktop, vision, …).
9288
pip install -e .
93-
pip install ruff==0.15.14 bandit==1.9.4 pytest==9.0.3 pytest-timeout==2.4.0 pytest-rerunfailures==15.1 pytest-cov==7.0.0 PySide6==6.11.1
89+
pip install --only-binary :all: ruff==0.15.22 bandit==1.9.4 pytest==9.1.1 pytest-timeout==2.4.0 pytest-rerunfailures==15.1 pytest-cov==7.0.0 PySide6==6.11.1
9490
9591
# Paths come from `testpaths` in pyproject.toml. Do NOT pass an explicit
9692
# path here: an argument overrides testpaths, which previously meant the
@@ -114,5 +110,7 @@ jobs:
114110
- uses: actions/setup-python@v5
115111
with:
116112
python-version: "3.12"
117-
- run: pip install -e . mypy
113+
# NOSONAR githubactions:S8544 # reason: installs the checked-out project itself, there is no upstream version to lock
114+
- run: pip install -e .
115+
- run: "pip install --only-binary :all: mypy==2.3.0"
118116
- run: mypy je_auto_control/api je_auto_control/utils/failure_bundle

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- uses: actions/setup-python@v5
2020
with:
2121
python-version: "3.12"
22-
- run: python -m pip install --upgrade build twine
22+
- run: "python -m pip install --only-binary :all: build==1.5.0 twine==6.2.0"
2323
- name: Verify tag matches package version
2424
env:
2525
RELEASE_TAG: ${{ github.ref_name }}

.github/workflows/stable.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,7 @@ jobs:
135135
python-version: "3.12"
136136

137137
- name: Install build tooling
138-
run: |
139-
python -m pip install --upgrade pip
140-
pip install build twine
138+
run: "pip install --only-binary :all: build==1.5.0 twine==6.2.0"
141139

142140
- name: Bump patch version in pyproject.toml
143141
id: bump

dev_requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ python-docx==1.2.0
1515
python-pptx==1.0.2
1616

1717
# Quality tooling — used by .github/workflows/quality.yml and locally.
18-
ruff==0.15.14
18+
ruff==0.15.22
1919
bandit==1.9.4
20-
pytest==9.0.3
20+
pytest==9.1.1
2121
pytest-timeout==2.4.0
2222
pytest-rerunfailures==15.1
2323
pytest-cov>=6.0

pyproject.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ requires-python = ">=3.10"
1515
license-files = ["LICENSE"]
1616
dependencies = [
1717
"je_open_cv==0.0.22",
18-
"pillow==12.2.0",
19-
"pyobjc-core==12.1;platform_system=='Darwin'",
20-
"pyobjc==12.1;platform_system=='Darwin'",
18+
# je_open_cv leaves opencv-python unpinned; bound the major so a new
19+
# OpenCV release cannot silently change cv2 return shapes under us.
20+
"opencv-python>=4.8,<6",
21+
"pillow==12.3.0",
22+
"pyobjc-core==12.2.1;platform_system=='Darwin'",
23+
"pyobjc==12.2.1;platform_system=='Darwin'",
2124
"python-Xlib==0.33;platform_system=='Linux'",
2225
"mss==10.2.0",
2326
"defusedxml==0.7.1",

0 commit comments

Comments
 (0)