Skip to content

Commit 9dcbdfd

Browse files
committed
Merge branch 'release/v0.1.3'
2 parents 751c549 + 63e168b commit 9dcbdfd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2696
-2071
lines changed

.flake8

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[flake8]
2+
max-line-length = 88
3+
extend-ignore = E203

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Bug Report
2+
description: Report an issue or a bug.
3+
title: "[BUG]: << Please use a comprehensive title... >>"
4+
labels: [ Defect ]
5+
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: >
10+
Thank you for taking the time to file a bug report. Before continuing, please take some time to check the existing [issues](https://github.com/colour-science/colour-checker-detection/issues).
11+
The issue could already be fixed in the [develop](https://github.com/colour-science/colour-checker-detection) branch. If you have an installation problem, the [installation guide](https://www.colour-science.org/installation-guide/) describes the recommended process.
12+
13+
- type: textarea
14+
attributes:
15+
label: "Description"
16+
description: >
17+
Please describe the issue in a few short sentences.
18+
validations:
19+
required: true
20+
21+
- type: textarea
22+
attributes:
23+
label: "Code for Reproduction"
24+
description: >
25+
If possible, please provide a minimum self-contained example reproducing the issue.
26+
placeholder: |
27+
<< Your code here... >>
28+
render: python
29+
30+
- type: textarea
31+
attributes:
32+
label: "Exception Message"
33+
description: >
34+
If any, please paste the *full* exception message.
35+
placeholder: |
36+
<< Full traceback starting from `Traceback (most recent call last):`... >>
37+
render: shell
38+
39+
- type: textarea
40+
attributes:
41+
label: "Environment Information"
42+
description: If possible, please paste the output from `import colour; colour.utilities.describe_environment()`.
43+
render: shell
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Documentation Improvement
2+
description: Report a documentation improvement.
3+
title: "[DOCUMENTATION]: << Please use a comprehensive title... >>"
4+
labels: [ Documentation ]
5+
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: >
10+
Thank you for taking the time to file a documentation improvement report. Before continuing, please take some time to check the existing [issues](https://github.com/colour-science/colour-checker-detection/issues).
11+
12+
- type: input
13+
attributes:
14+
label: Documentation Link
15+
description: >
16+
Please link to any documentation or examples that you are referencing. Suggested improvements should be based on the [development version of the documentation](http://colour-checker-detection.readthedocs.io/en/develop/).
17+
placeholder: >
18+
<< http://colour-checker-detection.readthedocs.io/en/develop/... >>
19+
validations:
20+
required: true
21+
22+
- type: textarea
23+
attributes:
24+
label: Description
25+
description: >
26+
Please describe what is missing, unclear or incorrect.
27+
validations:
28+
required: true
29+
30+
- type: textarea
31+
attributes:
32+
label: Suggested Improvement
33+
description: >
34+
Please describe how the documentation could be improved.
35+
36+
- type: textarea
37+
attributes:
38+
label: "Environment Information"
39+
description: If possible, please paste the output from `import colour; colour.utilities.describe_environment()`.
40+
render: shell
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Feature Request
2+
description: Suggest a new feature to implement.
3+
title: "[FEATURE]: << Please use a comprehensive title... >>"
4+
labels: [ Feature ]
5+
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: >
10+
Thank you for taking the time to file a feature request. Before continuing, please take some time to check the existing [issues](https://github.com/colour-science/colour-checker-detection/issues) and also the [draft release notes](https://gist.github.com/KelSolaar/4a6ebe9ec3d389f0934b154fec8df51d).
11+
12+
- type: textarea
13+
attributes:
14+
label: "Description"
15+
description: >
16+
Please describe the new feature in a few short sentences.
17+
validations:
18+
required: true

.github/ISSUE_TEMPLATE/question.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Question
2+
description: Ask a question.
3+
title: "[DISCUSSION]: << Please use a comprehensive title... >>"
4+
labels: [ Discussion ]
5+
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: Thank you for taking the time to ask a question or discuss. Before continuing, we would be glad if you were to start this discussion in the dedicated [discussions](https://github.com/colour-science/colour-checker-detection/discussions) area.
10+
11+
- type: textarea
12+
attributes:
13+
label: "Question"
14+
description: >
15+
If you are still here, please consider using the dedicated [discussions](https://github.com/colour-science/colour-checker-detection/discussions) area.
16+
placeholder: >
17+
<< The discussions area is this way: https://github.com/colour-science/colour-checker-detection/discussions... >>

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!--
2+
Thank you for taking the time to create this pull request. If it is the first
3+
time you are contributing to a colour-science repository, a contributing guide
4+
is available to guide the process: https://www.colour-science.org/contributing/.
5+
-->
6+
7+
# Summary
8+
9+
<!-- Please write a summary describing the changes that this PR implements. -->
10+
11+
# Preflight
12+
13+
<!-- Please mark any checkboxes that do not apply to this pull request as [N/A]. -->
14+
15+
**Code Style and Quality**
16+
17+
- [ ] Unit tests have been implemented and passed.
18+
- [ ] Mypy static checking has been run and passed.
19+
- [ ] Pre-commit hooks have been run and passed.
20+
21+
<!-- The unit tests can be invoked with `poetry run invoke tests` -->
22+
<!-- Mypy can be started with `dmypy run -- --show-error-codes --warn-unused-ignores --warn-redundant-casts --install-types --non-interactive -p colour-checker-detection` -->
23+
24+
**Documentation**
25+
26+
- [ ] New features are documented along with examples if relevant.
27+
- [ ] The documentation is [Sphinx](https://www.sphinx-doc.org/en/master/) and [numpydoc](https://numpydoc.readthedocs.io/en/latest/format.html) compliant.
28+
29+
<!--
30+
Thank you again!
31+
-->

.github/funding.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# These are supported funding model platforms
2+
3+
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: colour-science # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Continuous Integration - Documentation
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
continuous-integration-documentation:
7+
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}
8+
strategy:
9+
matrix:
10+
os: [ubuntu-20.04]
11+
python-version: [3.8]
12+
fail-fast: false
13+
runs-on: ${{ matrix.os }}
14+
steps:
15+
- uses: actions/checkout@v1
16+
- name: Environment Variables
17+
run: |
18+
echo "CI_PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
19+
echo "CI_PACKAGE=colour" >> $GITHUB_ENV
20+
echo "CI_SHA=${{ github.sha }}" >> $GITHUB_ENV
21+
echo "MPLBACKEND=AGG" >> $GITHUB_ENV
22+
echo "COLOUR_SCIENCE__DOCUMENTATION_BUILD=True" >> $GITHUB_ENV
23+
shell: bash
24+
- name: Set up Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@v1
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
- name: Install Dependencies
29+
run: |
30+
sudo apt-get update
31+
sudo apt-get --yes install latexmk texlive-full
32+
- name: Install Poetry
33+
run: |
34+
curl -L https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -o get-poetry.py
35+
python get-poetry.py
36+
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
37+
shell: bash
38+
- name: Install Package Dependencies
39+
run: |
40+
poetry run python -m pip install --upgrade pip
41+
poetry install --extras "read-the-docs"
42+
poetry run python -c "import imageio;imageio.plugins.freeimage.download()"
43+
shell: bash
44+
- name: Build Documentation
45+
run: |
46+
poetry run invoke docs
47+
shell: bash

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

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
name: Continuous Integration
1+
name: Continuous Integration - Quality & Unit Tests
22

33
on: [push, pull_request]
44

55
jobs:
6-
continuous-integration:
6+
continuous-integration-package:
77
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}
88
strategy:
99
matrix:
10-
os: [macOS-latest, ubuntu-18.04, windows-2019]
11-
python-version: [3.6, 3.7, 3.8]
10+
os: [macOS-latest, ubuntu-20.04, windows-2019]
11+
python-version: [3.8, 3.9, '3.10']
1212
fail-fast: false
1313
runs-on: ${{ matrix.os }}
1414
steps:
@@ -29,21 +29,26 @@ 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 --version 1.0.10
32+
python get-poetry.py --version 1.1.12
3333
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
3434
shell: bash
3535
- name: Install Package Dependencies
3636
run: |
37+
poetry run python -m pip install --upgrade pip
3738
poetry install
3839
poetry run python -c "import imageio;imageio.plugins.freeimage.download()"
3940
shell: bash
40-
- name: Lint with flake8
41+
- name: Pre-Commit (All Files)
4142
run: |
42-
poetry run flake8 $CI_PACKAGE --count --show-source --statistics
43+
poetry run pre-commit run --all-files
4344
shell: bash
44-
- name: Test with nosetests
45+
- name: Test Optimised Python Execution
4546
run: |
46-
poetry run python -W ignore -m nose -q -v --with-doctest --doctest-options=+ELLIPSIS --with-coverage --cover-package=$CI_PACKAGE $CI_PACKAGE
47+
poetry run python -OO -c "import $CI_PACKAGE"
48+
shell: bash
49+
- name: Test with Pytest
50+
run: |
51+
poetry run python -W ignore -m py.test --disable-warnings --doctest-modules --ignore=$CI_PACKAGE/examples --cov=$CI_PACKAGE $CI_PACKAGE
4752
shell: bash
4853
- name: Upload Coverage to coveralls.io
4954
run: |
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Continuous Integration - Static Type Checking
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
continuous-integration-package:
7+
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}
8+
strategy:
9+
matrix:
10+
os: [macOS-latest]
11+
python-version: [3.9]
12+
fail-fast: false
13+
runs-on: ${{ matrix.os }}
14+
steps:
15+
- uses: actions/checkout@v1
16+
- name: Environment Variables
17+
run: |
18+
echo "CI_PACKAGE=colour" >> $GITHUB_ENV
19+
shell: bash
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v1
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
- name: Install Dependencies (macOS)
25+
run: |
26+
brew install gnu-sed graphviz
27+
ln -s /usr/local/bin/gsed /usr/local/bin/sed
28+
shell: bash
29+
- name: Static Type Checking
30+
run: |
31+
pip install -r requirements.txt
32+
mypy --install-types --non-interactive --show-error-codes --warn-unused-ignores --warn-redundant-casts -p $CI_PACKAGE

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
*.pyc
22
.DS_Store
33
.coverage
4+
.dmypy.json
45
.idea
56
.ipynb_checkpoints/
7+
.mypy_cache
68
__pycache__
79
build
810
colour_checker_detection.egg-info

.pre-commit-config.yaml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
11
repos:
2-
- repo: https://gitlab.com/pycqa/flake8
3-
rev: 3.7.8
2+
- repo: https://github.com/asottile/pyupgrade
3+
rev: v2.31.0
4+
hooks:
5+
- id: pyupgrade
6+
args: [--py38-plus]
7+
- repo: https://github.com/ikamensh/flynt/
8+
rev: '0.76'
9+
hooks:
10+
- id: flynt
11+
- repo: https://github.com/psf/black
12+
rev: 22.1.0
13+
hooks:
14+
- id: black
15+
language_version: python3.8
16+
- repo: https://github.com/PyCQA/flake8
17+
rev: 4.0.1
418
hooks:
519
- id: flake8
6-
exclude: examples|setup\.py
7-
- repo: https://github.com/pre-commit/mirrors-yapf
8-
rev: v0.23.0
20+
- repo: https://github.com/pycqa/pydocstyle
21+
rev: 6.1.1
922
hooks:
10-
- id: yapf
11-
exclude: setup\.py
23+
- id: pydocstyle
24+
args:
25+
- --convention=numpy
26+
- --add-ignore=D104,D200,D202,D205,D301,D400

.readthedocs.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: 2
2+
3+
build:
4+
os: ubuntu-20.04
5+
tools:
6+
python: "3.8"
7+
8+
sphinx:
9+
configuration: docs/conf.py
10+
11+
formats:
12+
- htmlzip
13+
- pdf
14+
15+
python:
16+
install:
17+
- method: pip
18+
path: .
19+
extra_requirements:
20+
- read-the-docs

.readthedocs.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)