Skip to content

Commit 0a77148

Browse files
committed
Merge branch 'feature/v0.2.2' into develop
2 parents 3e85b11 + a2b5ca8 commit 0a77148

File tree

10 files changed

+282
-308
lines changed

10 files changed

+282
-308
lines changed

.github/workflows/continuous-integration-documentation.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,19 @@ jobs:
2525
uses: actions/setup-python@v5
2626
with:
2727
python-version: ${{ matrix.python-version }}
28+
- name: Clean Up Disk Space
29+
run: |
30+
df -h /
31+
32+
sudo rm -rf /usr/lib/jvm
33+
sudo rm -rf /usr/local/.ghcup
34+
sudo rm -rf /usr/local/lib/android
35+
sudo rm -rf /usr/local/share/powershell
36+
sudo rm -rf /usr/share/dotnet
37+
sudo rm -rf /usr/share/swift
38+
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
39+
40+
df -h /
2841
- name: Install Dependencies
2942
run: |
3043
sudo apt-get update

.github/workflows/continuous-integration-quality-unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
matrix:
1010
os: [macOS-latest, ubuntu-latest, windows-latest]
11-
python-version: ["3.10", 3.11, 3.12, 3.13]
11+
python-version: [3.11, 3.12, 3.13, 3.14]
1212
fail-fast: false
1313
runs-on: ${{ matrix.os }}
1414
steps:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ repos:
3434
rev: 1.19.1
3535
hooks:
3636
- id: blacken-docs
37-
language_version: python3.10
37+
language_version: python3.11
3838
- repo: https://github.com/pre-commit/mirrors-prettier
3939
rev: "v4.0.0-alpha.8"
4040
hooks:

TODO.rst

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,13 @@ TODO
66

77
- colour_checker_detection/__init__.py
88

9-
- Line 90 : # TODO: Remove legacy printing support when deemed appropriate.
9+
- Line 110 : # TODO: Remove legacy printing support when deemed appropriate.
1010

1111

1212
- colour_checker_detection/detection/common.py
1313

14-
- Line 126 : # TODO: Update when "Colour" 0.4.5 is released.
15-
- Line 1120 : # TODO: Update when "Colour" 0.4.5 is released.
16-
17-
18-
- colour_checker_detection/detection/tests/test_inference.py
19-
20-
- Line 58 : # TODO: Unit test is only reproducible on "macOs", skipping other OSes.
21-
- Line 62 : # TODO: Enable when "torch" is available on Python 3.12.
22-
- Line 97 : # TODO: Unit test is only reproducible on "macOs", skipping other OSes.
23-
- Line 101 : # TODO: Enable when "torch" is available on Python 3.13.
24-
25-
26-
- colour_checker_detection/detection/tests/test_segmentation.py
27-
28-
- Line 57 : # TODO: Unit test is only reproducible on "macOs", skipping other OSes.
29-
- Line 147 : # TODO: Unit test is only reproducible on "macOs", skipping other OSes.
14+
- Line 131 : # TODO: Update when "Colour" 0.4.5 is released.
15+
- Line 1321 : # TODO: Update when "Colour" 0.4.5 is released.
3016

3117
About
3218
-----

colour_checker_detection/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484

8585
__major_version__ = "0"
8686
__minor_version__ = "2"
87-
__change_version__ = "1"
87+
__change_version__ = "2"
8888
__version__ = f"{__major_version__}.{__minor_version__}.{__change_version__}"
8989

9090
try:

colour_checker_detection/detection/tests/test_inference.py

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import glob
99
import os
1010
import platform
11+
import sys
1112

1213
import numpy as np
1314
import pytest
@@ -49,8 +50,9 @@ class TestInferencerDefault:
4950
"""
5051

5152
@pytest.mark.skipif(
52-
platform.system() in ("Windows", "Microsoft", "Linux"),
53-
reason="Unit test is only reproducible on macOS",
53+
platform.system() in ("Windows", "Microsoft", "Linux")
54+
or sys.version_info >= (3, 14),
55+
reason="Unit test is only reproducible on macOS and requires Python < 3.14",
5456
)
5557
def test_inferencer_default(self) -> None:
5658
"""
@@ -81,8 +83,9 @@ class TestExtractorInference:
8183
"""Define :func:`extractor_inference` definition unit tests methods."""
8284

8385
@pytest.mark.skipif(
84-
platform.system() in ("Windows", "Microsoft", "Linux"),
85-
reason="Unit test is only reproducible on macOS",
86+
platform.system() in ("Windows", "Microsoft", "Linux")
87+
or sys.version_info >= (3, 14),
88+
reason="Unit test is only reproducible on macOS and requires Python < 3.14",
8689
)
8790
def test_extractor_inference(self) -> None:
8891
"""Test :func:`extractor_inference` definition."""
@@ -134,8 +137,9 @@ class TestDetectColourCheckersInference:
134137
"""
135138

136139
@pytest.mark.skipif(
137-
platform.system() in ("Windows", "Microsoft", "Linux"),
138-
reason="Unit test is only reproducible on macOS",
140+
platform.system() in ("Windows", "Microsoft", "Linux")
141+
or sys.version_info >= (3, 14),
142+
reason="Unit test is only reproducible on macOS and requires Python < 3.14",
139143
)
140144
def test_detect_colour_checkers_inference(self) -> None:
141145
"""
@@ -153,30 +157,30 @@ def test_detect_colour_checkers_inference(self) -> None:
153157
(
154158
np.array(
155159
[
156-
[0.24867499, 0.15330502, 0.08164288],
157-
[0.41613602, 0.25717810, 0.15542191],
158-
[0.21558925, 0.19957373, 0.18079756],
159-
[0.19679485, 0.17270973, 0.06542107],
160-
[0.27353886, 0.20367795, 0.19482557],
161-
[0.23354954, 0.28888842, 0.19005811],
162-
[0.45829877, 0.23313290, 0.04977580],
163-
[0.18111429, 0.16065562, 0.20710111],
164-
[0.39512363, 0.16722846, 0.11299202],
165-
[0.19604993, 0.11015564, 0.11477494],
166-
[0.31544134, 0.29128322, 0.02166587],
167-
[0.43199968, 0.25869599, 0.00824983],
168-
[0.13822055, 0.12490844, 0.17794068],
169-
[0.18937516, 0.24567719, 0.07760347],
170-
[0.35584736, 0.13182278, 0.07427428],
171-
[0.46339110, 0.32318470, 0.00223334],
172-
[0.37146100, 0.15859614, 0.16342331],
173-
[0.12267984, 0.20146658, 0.18591304],
174-
[0.50486773, 0.41277468, 0.29183933],
175-
[0.41462421, 0.33589253, 0.23704799],
176-
[0.32868931, 0.26556620, 0.18510209],
177-
[0.23908001, 0.18781137, 0.12658580],
178-
[0.16659373, 0.13050708, 0.08609813],
179-
[0.11020049, 0.07912453, 0.04847530],
160+
[0.24863878, 0.15329053, 0.08158918],
161+
[0.41507748, 0.25731990, 0.15481426],
162+
[0.21601081, 0.19963661, 0.18040785],
163+
[0.19686793, 0.17291754, 0.06548586],
164+
[0.27357155, 0.20301168, 0.19400775],
165+
[0.23356010, 0.28720620, 0.18817304],
166+
[0.45823488, 0.23316798, 0.04992789],
167+
[0.18078160, 0.16045800, 0.20766605],
168+
[0.39627394, 0.16691503, 0.11309760],
169+
[0.19422898, 0.11006075, 0.11565600],
170+
[0.31493783, 0.29084757, 0.02219770],
171+
[0.43131799, 0.25828508, 0.00795346],
172+
[0.13812497, 0.12478630, 0.17762889],
173+
[0.18720838, 0.24592778, 0.07732303],
174+
[0.35516253, 0.13156214, 0.07454837],
175+
[0.46337095, 0.32273552, 0.00165196],
176+
[0.37116164, 0.15837687, 0.16341914],
177+
[0.12098821, 0.20031747, 0.18507589],
178+
[0.50464547, 0.41264072, 0.29166794],
179+
[0.41424599, 0.33581433, 0.23724470],
180+
[0.32868224, 0.26551095, 0.18507436],
181+
[0.23896469, 0.18752976, 0.12675764],
182+
[0.16701609, 0.13087222, 0.08458477],
183+
[0.10941069, 0.07924574, 0.04898232],
180184
]
181185
),
182186
),

colour_checker_detection/scripts/inference.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def inference(
124124
(
125125
data_boxes[i, 4].cpu().numpy(),
126126
data_boxes[i, 5].cpu().numpy(),
127-
data_masks[i].data.cpu().numpy(),
127+
data_masks[i].data.cpu().float().numpy(),
128128
)
129129
)
130130

@@ -203,7 +203,7 @@ def segmentation(
203203
Inference results.
204204
"""
205205

206-
from ultralytics import YOLO # noqa: PLC0415
206+
from ultralytics import YOLO # noqa: PLC0415 # pyright: ignore
207207
from ultralytics.utils.downloads import download # noqa: PLC0415
208208

209209
time_start = perf_counter()

0 commit comments

Comments
 (0)