Skip to content

Commit aaa4a88

Browse files
committed
Merge branch 'feature/v0.2.1' into develop
2 parents 2599def + 5bb2e68 commit aaa4a88

Some content is hidden

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

44 files changed

+269
-238
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ jobs:
77
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}
88
strategy:
99
matrix:
10-
os: [ubuntu-20.04]
11-
python-version: [3.8]
10+
os: [ubuntu-22.04]
11+
python-version: [3.11]
1212
fail-fast: false
1313
runs-on: ${{ matrix.os }}
1414
steps:
1515
- uses: actions/checkout@v1
1616
- name: Environment Variables
1717
run: |
1818
echo "CI_PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
19-
echo "CI_PACKAGE=colour" >> $GITHUB_ENV
19+
echo "CI_PACKAGE=colour_datasets" >> $GITHUB_ENV
2020
echo "CI_SHA=${{ github.sha }}" >> $GITHUB_ENV
2121
echo "MPLBACKEND=AGG" >> $GITHUB_ENV
2222
echo "COLOUR_SCIENCE__DOCUMENTATION_BUILD=True" >> $GITHUB_ENV
@@ -31,8 +31,7 @@ jobs:
3131
sudo apt-get --yes install latexmk texlive-full
3232
- name: Install Poetry
3333
run: |
34-
curl -L https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -o get-poetry.py
35-
python get-poetry.py
34+
curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python3 -
3635
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
3736
shell: bash
3837
- name: Install Package Dependencies

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ jobs:
77
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}
88
strategy:
99
matrix:
10-
os: [ubuntu-20.04]
11-
python-version: [3.8]
10+
os: [ubuntu-22.04]
11+
python-version: [3.11]
1212
fail-fast: false
1313
runs-on: ${{ matrix.os }}
1414
steps:
@@ -20,14 +20,17 @@ jobs:
2020
echo "CI_SHA=${{ github.sha }}" >> $GITHUB_ENV
2121
echo "COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}" >> $GITHUB_ENV
2222
shell: bash
23+
- name: Set up Python 3.9 for Pre-Commit
24+
uses: actions/setup-python@v1
25+
with:
26+
python-version: 3.9
2327
- name: Set up Python ${{ matrix.python-version }}
2428
uses: actions/setup-python@v1
2529
with:
2630
python-version: ${{ matrix.python-version }}
2731
- name: Install Poetry
2832
run: |
29-
curl -L https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -o get-poetry.py
30-
python get-poetry.py --version 1.1.12
33+
curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python3 -
3134
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
3235
shell: bash
3336
- name: Install Package Dependencies

.github/workflows/continuous-integration-static-type-checking.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,22 @@ jobs:
88
strategy:
99
matrix:
1010
os: [macOS-latest]
11-
python-version: [3.9]
11+
python-version: [3.11]
1212
fail-fast: false
1313
runs-on: ${{ matrix.os }}
1414
steps:
1515
- uses: actions/checkout@v1
1616
- name: Environment Variables
1717
run: |
18-
echo "CI_PACKAGE=colour" >> $GITHUB_ENV
18+
echo "CI_PACKAGE=colour_datasets" >> $GITHUB_ENV
1919
shell: bash
2020
- name: Set up Python ${{ matrix.python-version }}
2121
uses: actions/setup-python@v1
2222
with:
2323
python-version: ${{ matrix.python-version }}
24-
- name: Static Type Checking
24+
- name: Install Package Dependencies
2525
run: |
2626
pip install -r requirements.txt
27-
mypy --install-types --non-interactive --show-error-codes --warn-unused-ignores --warn-redundant-casts -p $CI_PACKAGE
27+
- name: Static Type Checking
28+
run: |
29+
mypy --install-types --non-interactive --show-error-codes --warn-unused-ignores --warn-redundant-casts $CI_PACKAGE

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@
44
.DS_Store
55
.coverage
66
.dmypy.json
7+
.fleet
78
.idea
9+
.ipynb_checkpoints
810
.mypy_cache
9-
.vscode
1011
.sandbox
12+
.vs
13+
.vscode
1114

1215
__pycache__
1316

.pre-commit-config.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
11
repos:
22
- repo: https://github.com/asottile/pyupgrade
3-
rev: v2.37.3
3+
rev: v3.2.2
44
hooks:
55
- id: pyupgrade
6-
args: [--py38-plus]
6+
args: [--py39-plus]
77
- repo: https://github.com/ikamensh/flynt/
8-
rev: '0.76'
8+
rev: '0.77'
99
hooks:
1010
- id: flynt
1111
- repo: https://github.com/psf/black
12-
rev: 22.6.0
12+
rev: 22.10.0
1313
hooks:
1414
- id: black
15-
language_version: python3.8
15+
language_version: python3.9
16+
- repo: https://github.com/keewis/blackdoc
17+
rev: v0.3.8
18+
hooks:
19+
- id: blackdoc
20+
language_version: python3.9
1621
- repo: https://github.com/PyCQA/flake8
17-
rev: 5.0.3
22+
rev: 6.0.0
1823
hooks:
1924
- id: flake8
2025
- repo: https://github.com/pycqa/pydocstyle

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2
33
build:
44
os: ubuntu-20.04
55
tools:
6-
python: "3.8"
6+
python: "3.11"
77

88
sphinx:
99
configuration: docs/conf.py

CONTRIBUTORS.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Contributors
44
Development & Technical Support
55
-------------------------------
66

7-
- **Thomas Mansencal**, *Lead Pipeline Developer @ WetaFX*
7+
- **Thomas Mansencal**, *Technology Supervisor @ Wētā FX*
88

99
Project coordination, overall development.
1010

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ A dataset is loaded by using its unique number: *3245895*:
121121

122122
.. code-block:: python
123123
124-
>>> print(colour_datasets.load('3245895').keys())
124+
>>> print(colour_datasets.load("3245895").keys())
125125
126126
::
127127

@@ -142,7 +142,7 @@ Alternatively, a dataset can be loaded by using its full title:
142142

143143
.. code-block:: python
144144
145-
>>> print(colour_datasets.load('3245895').keys())
145+
>>> print(colour_datasets.load("3245895").keys())
146146
odict_keys(['ColorChecker24 - After November 2014', 'ColorChecker24 - Before November 2014', 'ColorCheckerSG - After November 2014', 'ColorCheckerSG - Before November 2014'])
147147
148148
User Guide

colour_datasets/__init__.py

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

5353
__major_version__ = "0"
5454
__minor_version__ = "2"
55-
__change_version__ = "0"
55+
__change_version__ = "1"
5656
__version__ = ".".join(
5757
(__major_version__, __minor_version__, __change_version__)
5858
)

colour_datasets/loaders/__init__.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import sys
44

55
from colour.hints import Any, Boolean, Integer, Union
6-
from colour.utilities import CaseInsensitiveMapping, warning
6+
from colour.utilities import CanonicalMapping, warning
77

88
from colour_datasets.records import datasets
99

@@ -83,7 +83,7 @@
8383
"build_Zhao2009",
8484
]
8585

86-
DATASET_LOADERS: CaseInsensitiveMapping = CaseInsensitiveMapping(
86+
DATASET_LOADERS: CanonicalMapping = CanonicalMapping(
8787
{
8888
DatasetLoader_Asano2015.ID: build_Asano2015,
8989
DatasetLoader_Brendel2020.ID: build_Brendel2020,
@@ -150,11 +150,13 @@ def load(dataset: Union[Integer, str]) -> Any:
150150
151151
Examples
152152
--------
153-
>>> len(load('3245883').keys()) # doctest: +SKIP
153+
>>> len(load("3245883").keys()) # doctest: +SKIP
154154
28
155-
>>> len(load(
156-
... 'Camera Spectral Sensitivity Database - '
157-
... 'Jiang et al. (2013)').keys())
155+
>>> len(
156+
... load(
157+
... "Camera Spectral Sensitivity Database - " "Jiang et al. (2013)"
158+
... ).keys()
159+
... )
158160
... # doctest: +SKIP
159161
28
160162
"""

0 commit comments

Comments
 (0)