Skip to content

Commit 102dda5

Browse files
committed
Merge branch 'feature/v0.1.2' into develop
2 parents 639e7c5 + e4db69b commit 102dda5

File tree

11 files changed

+235
-242
lines changed

11 files changed

+235
-242
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 21 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -3,109 +3,49 @@ name: Continuous Integration
33
on: [push, pull_request]
44

55
jobs:
6-
unix-build:
7-
name: Unix Build
6+
continuous-integration:
7+
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}
88
strategy:
99
matrix:
10-
os: [ubuntu-18.04, macOS-latest]
11-
python-version: [3.6, 3.7]
10+
os: [macOS-latest, ubuntu-18.04, windows-2019]
11+
python-version: [3.6, 3.7, 3.8]
12+
fail-fast: false
1213
runs-on: ${{ matrix.os }}
1314
steps:
1415
- uses: actions/checkout@v1
1516
with:
1617
submodules: true
1718
- name: Environment Variables
1819
run: |
19-
CI_PYTHON_VERSION=${{ matrix.python-version }}
20-
CI_PACKAGE=colour_checker_detection
21-
CI_SHA=${{ github.sha }}
22-
COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}
23-
echo ::set-env name=CI_PYTHON_VERSION::$CI_PYTHON_VERSION
24-
echo ::set-env name=CI_PACKAGE::$CI_PACKAGE
25-
echo ::set-env name=CI_SHA::$CI_SHA
26-
echo ::set-env name=COVERALLS_REPO_TOKEN::$COVERALLS_REPO_TOKEN
20+
echo "CI_PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
21+
echo "CI_PACKAGE=colour_checker_detection" >> $GITHUB_ENV
22+
echo "CI_SHA=${{ github.sha }}" >> $GITHUB_ENV
23+
echo "COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}" >> $GITHUB_ENV
24+
shell: bash
2725
- name: Set up Python ${{ matrix.python-version }}
2826
uses: actions/setup-python@v1
2927
with:
3028
python-version: ${{ matrix.python-version }}
3129
- name: Install Poetry
3230
run: |
3331
curl -L https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -o get-poetry.py
34-
python get-poetry.py
35-
PATH=$HOME/.poetry/bin:$PATH
36-
echo ::set-env name=PATH::$PATH
32+
python get-poetry.py --version 1.0.10
33+
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
34+
shell: bash
3735
- name: Install Package Dependencies
3836
run: |
3937
poetry install
40-
source $(poetry env info -p)/bin/activate
41-
python -c "import imageio;imageio.plugins.freeimage.download()"
38+
poetry run python -c "import imageio;imageio.plugins.freeimage.download()"
39+
shell: bash
4240
- name: Lint with flake8
4341
run: |
44-
source $(poetry env info -p)/bin/activate
45-
flake8 $CI_PACKAGE --count --show-source --statistics
42+
poetry run flake8 $CI_PACKAGE --count --show-source --statistics
43+
shell: bash
4644
- name: Test with nosetests
4745
run: |
48-
source $(poetry env info -p)/bin/activate
49-
python -W ignore -m nose -q -v --with-doctest --doctest-options=+ELLIPSIS --with-coverage --cover-package=$CI_PACKAGE $CI_PACKAGE
46+
poetry run python -W ignore -m nose -q -v --with-doctest --doctest-options=+ELLIPSIS --with-coverage --cover-package=$CI_PACKAGE $CI_PACKAGE
47+
shell: bash
5048
- name: Upload Coverage to coveralls.io
51-
if: matrix.python-version == '3.6' || matrix.python-version == '3.7'
5249
run: |
53-
source $(poetry env info -p)/bin/activate
54-
if [ -z "$COVERALLS_REPO_TOKEN" ]; then echo \"COVERALLS_REPO_TOKEN\" secret is undefined!; else coveralls; fi
55-
windows-build:
56-
name: Windows Build
57-
strategy:
58-
matrix:
59-
os: [windows-2019]
60-
python-version: [3.6, 3.7]
61-
runs-on: ${{ matrix.os }}
62-
steps:
63-
- uses: actions/checkout@v1
64-
with:
65-
submodules: true
66-
- name: Environment Variables
67-
run: |
68-
set CI_PYTHON_VERSION=${{ matrix.python-version }}
69-
set CI_PACKAGE=colour_checker_detection
70-
set CI_SHA=${{ github.sha }}
71-
set COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}
72-
echo ::set-env name=CI_PYTHON_VERSION::%CI_PYTHON_VERSION%
73-
echo ::set-env name=CI_PACKAGE::%CI_PACKAGE%
74-
echo ::set-env name=CI_SHA::%CI_SHA%
75-
echo ::set-env name=COVERALLS_REPO_TOKEN::%COVERALLS_REPO_TOKEN%
76-
shell: cmd
77-
- name: Set up Python ${{ matrix.python-version }}
78-
uses: actions/setup-python@v1
79-
with:
80-
python-version: ${{ matrix.python-version }}
81-
- name: Install Poetry
82-
run: |
83-
curl -L https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -o get-poetry.py
84-
python get-poetry.py
85-
set PATH=%USERPROFILE%\.poetry\bin;%PATH%
86-
echo ::set-env name=PATH::%PATH%
87-
shell: cmd
88-
- name: Install Package Dependencies
89-
run: |
90-
call poetry install
91-
FOR /F %%a IN ('poetry env info -p') DO SET CI_VIRTUAL_ENVIRONMENT=%%a
92-
echo ::set-env name=CI_VIRTUAL_ENVIRONMENT::%CI_VIRTUAL_ENVIRONMENT%
93-
call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
94-
python -c "import imageio;imageio.plugins.freeimage.download()"
95-
shell: cmd
96-
- name: Lint with flake8
97-
run: |
98-
call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
99-
flake8 %CI_PACKAGE% --count --show-source --statistics
100-
shell: cmd
101-
- name: Test with nosetests
102-
run: |
103-
call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
104-
python -W ignore -m nose -q -v --with-doctest --doctest-options=+ELLIPSIS --with-coverage --cover-package=%CI_PACKAGE% %CI_PACKAGE%
105-
shell: cmd
106-
- name: Upload Coverage to coveralls.io
107-
if: matrix.python-version == '3.6' || matrix.python-version == '3.7'
108-
run: |
109-
call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
110-
IF "%COVERALLS_REPO_TOKEN%"=="" (echo "COVERALLS_REPO_TOKEN" secret is undefined!) ELSE (coveralls)
111-
shell: cmd
50+
if [ -z "$COVERALLS_REPO_TOKEN" ]; then echo \"COVERALLS_REPO_TOKEN\" secret is undefined!; else poetry run coveralls; fi
51+
shell: bash

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ This Code of Conduct applies within all project spaces, and it also applies when
3636
## Enforcement
3737

3838

39-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting Thomas Mansencal and Michael Mauderer via email at thomas.mansencal@gmail.com and michael@mauderer.me respectively. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
39+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting Thomas Mansencal and Michael Mauderer via email at thomas@colour-science.org and michael@colour-science.org respectively. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
4040

4141
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project’s leadership.
4242

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Primary Dependencies
6464
Pypi
6565
^^^^
6666

67-
Once the dependencies satisfied, **Colour - Checker Detection** can be installed from
67+
Once the dependencies are satisfied, **Colour - Checker Detection** can be installed from
6868
the `Python Package Index <http://pypi.python.org/pypi/colour-checker-detection>`__ by
6969
issuing this command in a shell::
7070

colour_checker_detection/detection/segmentation.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,15 @@ def swatch_masks(width, height, swatches_h, swatches_v, samples):
155155
Examples
156156
--------
157157
>>> from pprint import pprint
158-
>>> pprint(swatch_masks(16, 8, 4, 2, 1))
159-
[array([2, 2, 2, 2]),
160-
array([2, 2, 6, 6]),
161-
array([ 2, 2, 10, 10]),
162-
array([ 2, 2, 14, 14]),
163-
array([6, 6, 2, 2]),
164-
array([6, 6, 6, 6]),
165-
array([ 6, 6, 10, 10]),
166-
array([ 6, 6, 14, 14])]
158+
>>> pprint(swatch_masks(16, 8, 4, 2, 1)) # doctest: +ELLIPSIS
159+
[array([2, 2, 2, 2]...),
160+
array([2, 2, 6, 6]...),
161+
array([ 2, 2, 10, 10]...),
162+
array([ 2, 2, 14, 14]...),
163+
array([6, 6, 2, 2]...),
164+
array([6, 6, 6, 6]...),
165+
array([ 6, 6, 10, 10]...),
166+
array([ 6, 6, 14, 14]...)]
167167
"""
168168

169169
samples = as_int(samples / 2)
@@ -520,11 +520,11 @@ def colour_checkers_coordinates_segmentation(image, additional_data=False):
520520
... 'colour_checker_detection', 'detection',
521521
... 'IMG_1967.png')
522522
>>> image = read_image(path)
523-
>>> colour_checkers_coordinates_segmentation(image)
523+
>>> colour_checkers_coordinates_segmentation(image) # doctest: +ELLIPSIS
524524
[array([[1065, 707],
525525
[ 369, 688],
526526
[ 382, 226],
527-
[1078, 246]])]
527+
[1078, 246]]...)]
528528
"""
529529

530530
image = as_8_bit_BGR_image(adjust_image(image, WORKING_WIDTH))

colour_checker_detection/examples/examples_detection.ipynb

Lines changed: 85 additions & 53 deletions
Large diffs are not rendered by default.

docs/conf.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,20 @@
210210
# Additional stuff for the LaTeX preamble.
211211
'preamble':
212212
"""
213-
\\usepackage{charter}
214-
\\usepackage[defaultsans]{lato}
215-
\\usepackage{inconsolata}
213+
\\usepackage{charter}
214+
\\usepackage[defaultsans]{lato}
215+
\\usepackage{inconsolata}
216+
217+
% Ignoring unicode errors.
218+
\\makeatletter
219+
\\def\\UTFviii@defined#1{%
220+
\\ifx#1\\relax
221+
?%
222+
\\else\\expandafter
223+
#1%
224+
\\fi
225+
}
226+
\\makeatother
216227
""",
217228
}
218229

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Primary Dependencies
4444
Pypi
4545
^^^^
4646

47-
Once the dependencies satisfied, **Colour - Checker Detection** can be installed from
47+
Once the dependencies are satisfied, **Colour - Checker Detection** can be installed from
4848
the `Python Package Index <http://pypi.python.org/pypi/colour-checker-detection>`__ by
4949
issuing this command in a shell::
5050

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ exclude = [
4545
]
4646

4747
[tool.poetry.dependencies]
48-
python = "^3.5"
49-
colour-science = "^0.3.14"
48+
python = "^3.6"
49+
colour-science = "^0.3.16"
5050
opencv-python = "^4"
5151

5252
biblib-simple = { version = "*", optional = true } # Development dependency.
@@ -62,7 +62,7 @@ numpy = { version = "*", optional = true }
6262
pre-commit = { version = "*", optional = true } # Development dependency.
6363
pytest = { version = "*", optional = true } # Development dependency.
6464
restructuredtext-lint = { version = "*", optional = true } # Development dependency.
65-
sphinx = { version = "*", optional = true } # Development dependency.
65+
sphinx = { version = "<=3.1.2", optional = true } # Development dependency.
6666
sphinx_rtd_theme = { version = "*", optional = true } # Development dependency.
6767
sphinxcontrib-bibtex = { version = "*", optional = true } # Development dependency.
6868
toml = { version = "*", optional = true } # Development dependency.
@@ -82,7 +82,7 @@ nose = "*"
8282
pre-commit = "*"
8383
pytest = "*"
8484
restructuredtext-lint = "*"
85-
sphinx = "*"
85+
sphinx = "<=3.1.2"
8686
sphinx_rtd_theme = "*"
8787
sphinxcontrib-bibtex = "*"
8888
toml = "*"

0 commit comments

Comments
 (0)