Skip to content

Commit ec529c8

Browse files
committed
Merge branch 'feature/v0.1.3' into develop
2 parents 917ee15 + c1f7a6e commit ec529c8

File tree

11 files changed

+192
-136
lines changed

11 files changed

+192
-136
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Install Poetry
3030
run: |
3131
curl -L https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -o get-poetry.py
32-
python get-poetry.py
32+
python get-poetry.py --version 1.1.12
3333
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
3434
shell: bash
3535
- name: Install Package Dependencies

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
.dmypy.json
55
.idea
66
.ipynb_checkpoints/
7+
.mypy_cache
78
__pycache__
89
build
910
colour_checker_detection.egg-info

TODO.rst

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

77
- colour_checker_detection/__init__.py
88

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

1111

1212
- colour_checker_detection/detection/tests/test_segmentation.py
1313

14-
- Line 227 : # TODO: Unit test is only reproducible on "macOs", skipping other OSes.
15-
- Line 517 : # TODO: Unit test is only reproducible on "macOs", skipping other OSes.
14+
- Line 249 : # TODO: Unit test is only reproducible on "macOs", skipping other OSes.
15+
- Line 599 : # TODO: Unit test is only reproducible on "macOs", skipping other OSes.
1616

1717
About
1818
-----

colour_checker_detection/detection/segmentation.py

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -687,11 +687,11 @@ def colour_checkers_coordinates_segmentation(
687687
... 'colour_checker_detection', 'detection',
688688
... 'IMG_1967.png')
689689
>>> image = read_image(path)
690-
>>> colour_checkers_coordinates_segmentation(image)
691-
[array([[ 369, 688],
692-
[ 383, 227],
693-
[1078, 247],
694-
[1065, 707]])]
690+
>>> colour_checkers_coordinates_segmentation(image) # doctest: +ELLIPSIS
691+
(array([[ 369, 688],
692+
[ 382, 226],
693+
[1078, 246],
694+
[1065, 707]]...)
695695
"""
696696

697697
image = as_float_array(image, FLOAT_DTYPE_DEFAULT)[..., :3]
@@ -1044,31 +1044,31 @@ def detect_colour_checkers_segmentation(
10441044
... 'colour_checker_detection', 'detection',
10451045
... 'IMG_1967.png')
10461046
>>> image = read_image(path)
1047-
>>> detect_colour_checkers_segmentation(image) # doctest: +ELLIPSIS
1048-
(array([[ 0.3616269..., 0.2241066..., 0.1187838...],
1049-
[ 0.6280594..., 0.3950882..., 0.2434766...],
1050-
[ 0.3326231..., 0.3156182..., 0.2891038...],
1051-
[ 0.3048413..., 0.2738974..., 0.1069985...],
1047+
>>> detect_colour_checkers_segmentation(image) # doctest: +SKIP
1048+
(array([[ 0.361626... , 0.2241066..., 0.1187837...],
1049+
[ 0.6280594..., 0.3950883..., 0.2434766...],
1050+
[ 0.3326232..., 0.3156182..., 0.2891038...],
1051+
[ 0.3048414..., 0.2738973..., 0.1069985...],
10521052
[ 0.4174869..., 0.3199669..., 0.3081552...],
1053-
[ 0.3478729..., 0.4413193..., 0.2931614...],
1053+
[ 0.347873 ..., 0.4413193..., 0.2931614...],
10541054
[ 0.6816301..., 0.3539050..., 0.0753397...],
1055-
[ 0.2731048..., 0.2528467..., 0.331292 ...],
1056-
[ 0.6192336..., 0.2703833..., 0.1866386...],
1055+
[ 0.2731050..., 0.2528467..., 0.3312920...],
1056+
[ 0.6192335..., 0.2703833..., 0.1866387...],
10571057
[ 0.3068567..., 0.1803366..., 0.1919807...],
1058-
[ 0.4866353..., 0.4594004..., 0.0374185...],
1059-
[ 0.6518524..., 0.4010608..., 0.0171887...],
1060-
[ 0.1941569..., 0.1855801..., 0.2750632...],
1061-
[ 0.2799947..., 0.385461 ..., 0.1241038...],
1058+
[ 0.4866354..., 0.4594004..., 0.0374186...],
1059+
[ 0.6518523..., 0.4010608..., 0.0171886...],
1060+
[ 0.1941571..., 0.1855801..., 0.2750632...],
1061+
[ 0.2799946..., 0.3854609..., 0.1241038...],
10621062
[ 0.5537481..., 0.2139004..., 0.1267332...],
1063-
[ 0.7208043..., 0.5152904..., 0.0061947...],
1064-
[ 0.577836 ..., 0.2578533..., 0.2687992...],
1065-
[ 0.1809449..., 0.3174741..., 0.2959902...],
1066-
[ 0.7427522..., 0.6107554..., 0.439844 ...],
1067-
[ 0.6296108..., 0.5177607..., 0.3728032...],
1068-
[ 0.5139589..., 0.4216308..., 0.2992694...],
1069-
[ 0.3704402..., 0.3033927..., 0.2093090...],
1070-
[ 0.2641854..., 0.2154006..., 0.1441268...],
1071-
[ 0.1650097..., 0.1345238..., 0.0817438...]], dtype=float32),)
1063+
[ 0.7208045..., 0.5152904..., 0.0061946...],
1064+
[ 0.5778360..., 0.2578533..., 0.2687992...],
1065+
[ 0.1809450..., 0.3174742..., 0.2959902...],
1066+
[ 0.7427522..., 0.6107554..., 0.4398439...],
1067+
[ 0.6296108..., 0.5177606..., 0.3728032...],
1068+
[ 0.5139589..., 0.4216307..., 0.2992694...],
1069+
[ 0.3704401..., 0.3033927..., 0.2093089...],
1070+
[ 0.2641854..., 0.2154007..., 0.1441267...],
1071+
[ 0.1650098..., 0.1345239..., 0.0817437...]], dtype=float32),)
10721072
"""
10731073

10741074
image = as_float_array(image, FLOAT_DTYPE_DEFAULT)[..., :3]

colour_checker_detection/detection/tests/test_segmentation.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class TestSwatchMasks(unittest.TestCase):
6767

6868
def test_swatch_masks(self):
6969
"""
70-
Define :func:`colour_checker_detection.detection.segmentation.\
70+
Define :func:`colour_checker_detection.detection.segmentation.\
7171
swatch_masks` definition unit tests methods.
7272
"""
7373

@@ -96,7 +96,7 @@ class TestAs8BitBGRImage(unittest.TestCase):
9696

9797
def test_as_8_bit_BGR_image(self):
9898
"""
99-
Define :func:`colour_checker_detection.detection.segmentation.\
99+
Define :func:`colour_checker_detection.detection.segmentation.\
100100
as_8_bit_BGR_image` definition unit tests methods.
101101
"""
102102

@@ -123,7 +123,7 @@ class TestAdjustImage(unittest.TestCase):
123123

124124
def test_adjust_image(self):
125125
"""
126-
Define :func:`colour_checker_detection.detection.segmentation.\
126+
Define :func:`colour_checker_detection.detection.segmentation.\
127127
adjust_image` definition unit tests methods.
128128
"""
129129

@@ -147,7 +147,7 @@ class TestIsSquare(unittest.TestCase):
147147

148148
def test_is_square(self):
149149
"""
150-
Define :func:`colour_checker_detection.detection.segmentation.\
150+
Define :func:`colour_checker_detection.detection.segmentation.\
151151
is_square` definition unit tests methods.
152152
"""
153153

@@ -167,7 +167,7 @@ class TestContourCentroid(unittest.TestCase):
167167

168168
def test_contour_centroid(self):
169169
"""
170-
Define :func:`colour_checker_detection.detection.segmentation.\
170+
Define :func:`colour_checker_detection.detection.segmentation.\
171171
contour_centroid` definition unit tests methods.
172172
"""
173173

@@ -183,7 +183,7 @@ class TestScaleContour(unittest.TestCase):
183183

184184
def test_scale_contour(self):
185185
"""
186-
Define :func:`colour_checker_detection.detection.segmentation.\
186+
Define :func:`colour_checker_detection.detection.segmentation.\
187187
scale_contour` definition unit tests methods.
188188
"""
189189

@@ -207,7 +207,7 @@ class TestCropAndLevelImageWithRectangle(unittest.TestCase):
207207

208208
def test_crop_and_level_image_with_rectangle(self):
209209
"""
210-
Define :func:`colour_checker_detection.detection.segmentation.\
210+
Define :func:`colour_checker_detection.detection.segmentation.\
211211
crop_and_level_image_with_rectangle` definition unit tests methods.
212212
"""
213213

@@ -237,7 +237,7 @@ class TestColourCheckersCoordinatesSegmentation(unittest.TestCase):
237237

238238
def test_colour_checkers_coordinates_segmentation(self):
239239
"""
240-
Define :func:`colour_checker_detection.detection.segmentation.\
240+
Define :func:`colour_checker_detection.detection.segmentation.\
241241
colour_checkers_coordinates_segmentation` definition unit tests methods.
242242
"""
243243

@@ -550,7 +550,7 @@ class TestExtractColourCheckersSegmentation(unittest.TestCase):
550550

551551
def test_extract_colour_checkers_segmentation(self):
552552
"""
553-
Define :func:`colour_checker_detection.detection.segmentation.\
553+
Define :func:`colour_checker_detection.detection.segmentation.\
554554
extract_colour_checkers_segmentation` definition unit tests methods.
555555
"""
556556

@@ -587,7 +587,7 @@ class TestDetectColourCheckersSegmentation(unittest.TestCase):
587587

588588
def test_detect_colour_checkers_segmentation(self):
589589
"""
590-
Define :func:`colour_checker_detection.detection.segmentation.\
590+
Define :func:`colour_checker_detection.detection.segmentation.\
591591
detect_colour_checkers_segmentation` definition unit tests methods.
592592
"""
593593

pyproject.toml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,14 @@ exclude = [
4545

4646
[tool.poetry.dependencies]
4747
python = ">= 3.8, < 3.11"
48-
colour-science = "^0.3.16"
48+
colour-science = ">= 0.4.0"
49+
imageio = ">= 2, < 3"
50+
numpy = ">= 1.19, < 2"
4951
opencv-python = ">= 4, < 5"
52+
scipy = ">= 1.5, < 2"
53+
typing-extensions = ">= 4, < 5" # Convenience for Google Colab.
54+
55+
matplotlib = { version = ">= 3.2, != 3.5.0, != 3.5.1", optional = true }
5056

5157
biblib-simple = { version = "*", optional = true } # Development dependency.
5258
black = { version = "*", optional = true } # Development dependency.
@@ -56,9 +62,7 @@ flake8 = { version = "*", optional = true } # Development dependency.
5662
flynt = { version = "*", optional = true } # Development dependency.
5763
invoke = { version = "*", optional = true } # Development dependency.
5864
jupyter = { version = "*", optional = true } # Development dependency.
59-
matplotlib = { version = ">= 3.2, != 3.5.0, != 3.5.1", optional = true }
6065
mypy = { version = "*", optional = true } # Development dependency.
61-
numpy = { version = ">= 1.19, < 2", optional = true }
6266
pre-commit = { version = "*", optional = true } # Development dependency.
6367
pydata-sphinx-theme = { version = "*", optional = true } # Development dependency.
6468
pydocstyle = { version = "*", optional = true } # Development dependency.
@@ -147,5 +151,5 @@ convention = "numpy"
147151
add-ignore = "D104,D200,D202,D205,D301,D400"
148152

149153
[build-system]
150-
requires = [ "poetry>=0.12" ]
151-
build-backend = "poetry.masonry.api"
154+
requires = ["poetry_core>=1.0.0"]
155+
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)