Skip to content

Commit 41f611f

Browse files
committed
Merge branch 'release/v0.4.3'
2 parents 38c7195 + 1fdf3b3 commit 41f611f

File tree

574 files changed

+21427
-16481
lines changed

Some content is hidden

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

574 files changed

+21427
-16481
lines changed

.coveragerc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
[run]
22
source = colour
3+
concurrency = multiprocessing
4+
sigterm = True
35
[report]
46
exclude_lines =
57
pragma: no cover

.flake8

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

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ is available to guide the process: https://www.colour-science.org/contributing/.
1515
**Code Style and Quality**
1616

1717
- [ ] Unit tests have been implemented and passed.
18-
- [ ] Mypy static checking has been run and passed.
18+
- [ ] Pyright static checking has been run and passed.
1919
- [ ] Pre-commit hooks have been run and passed.
2020
- [ ] New transformations have been added to the *Automatic Colour Conversion Graph*.
2121
- [ ] New transformations have been exported to the relevant namespaces, e.g. `colour`, `colour.models`.
2222

2323
<!-- The unit tests can be invoked with `poetry run invoke tests` -->
24-
<!-- Mypy can be started with `dmypy run -- --show-error-codes --warn-unused-ignores --warn-redundant-casts --install-types --non-interactive -p colour` -->
24+
<!-- Pyright can be started with `pyright --skipunannotated` -->
2525

2626
**Documentation**
2727

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}
88
strategy:
99
matrix:
10-
os: [ubuntu-20.04]
10+
os: [ubuntu-22.04]
1111
python-version: [3.11]
1212
fail-fast: false
1313
runs-on: ${{ matrix.os }}
@@ -30,14 +30,16 @@ jobs:
3030
sudo apt-get update
3131
sudo apt-get --yes install graphviz graphviz-dev latexmk texlive-full
3232
- name: Install Poetry
33+
env:
34+
POETRY_VERSION: 1.4.0
3335
run: |
3436
curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python3 -
3537
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
3638
shell: bash
3739
- name: Install Package Dependencies
3840
run: |
3941
poetry run python -m pip install --upgrade pip
40-
poetry install --extras "read-the-docs"
42+
poetry install
4143
poetry run python -c "import imageio;imageio.plugins.freeimage.download()"
4244
shell: bash
4345
- name: Build Documentation

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

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ jobs:
99
matrix:
1010
os: [macOS-latest, ubuntu-22.04, windows-latest]
1111
python-version: [3.9, '3.10', 3.11]
12-
exclude:
13-
- os: windows-latest
14-
python-version: 3.8
1512
fail-fast: false
1613
runs-on: ${{ matrix.os }}
1714
steps:
@@ -21,8 +18,6 @@ jobs:
2118
echo "CI_PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
2219
echo "CI_PACKAGE=colour" >> $GITHUB_ENV
2320
echo "CI_SHA=${{ github.sha }}" >> $GITHUB_ENV
24-
echo "CI_OPENIMAGEIO_VERSION=2.4.5.0" >> $GITHUB_ENV
25-
echo "CI_OPENIMAGEIO_ARTIFACT=https://github.com/colour-science/artifacts/releases/download/OpenImageIO-Release-2.4.5.0/OpenImageIO-Release-2.4.5.0.zip" >> $GITHUB_ENV
2621
echo "COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}" >> $GITHUB_ENV
2722
echo "MPLBACKEND=AGG" >> $GITHUB_ENV
2823
shell: bash
@@ -40,6 +35,8 @@ jobs:
4035
sudo apt-get update
4136
sudo apt-get --yes install graphviz graphviz-dev libboost-all-dev libilmbase-dev libopenexr-dev libpng-dev libtiff5-dev
4237
- name: Install Poetry
38+
env:
39+
POETRY_VERSION: 1.4.0
4340
run: |
4441
curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python3 -
4542
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
@@ -48,25 +45,22 @@ jobs:
4845
if: matrix.os == 'ubuntu-22.04'
4946
run: |
5047
poetry run python -m pip install --upgrade pip
51-
poetry install --extras "graphviz meshing optional plotting"
48+
poetry install
5249
poetry run python -c "import imageio;imageio.plugins.freeimage.download()"
5350
shell: bash
5451
- name: Install Package Dependencies (macOS & Windows)
5552
if: matrix.os == 'macOS-latest' || matrix.os == 'windows-latest'
5653
run: |
5754
poetry run python -m pip install --upgrade pip
58-
poetry install --extras "meshing optional plotting"
55+
poetry install --without graphviz
5956
poetry run python -c "import imageio;imageio.plugins.freeimage.download()"
6057
shell: bash
61-
- name: Install OpenImageIO (Ubuntu)
62-
if: matrix.os == 'ubuntu-22.04' && matrix.python-version == '3.10'
58+
- name: Install OpenImageIO (macOs)
59+
if: matrix.os == 'macOS-latest' && matrix.python-version == '3.11'
6360
run: |
64-
curl -L $CI_OPENIMAGEIO_ARTIFACT -o OpenImageIO-Release-$CI_OPENIMAGEIO_VERSION.zip
65-
unzip OpenImageIO-Release-$CI_OPENIMAGEIO_VERSION.zip -d OpenImageIO-Release-$CI_OPENIMAGEIO_VERSION
66-
sudo cp OpenImageIO-Release-$CI_OPENIMAGEIO_VERSION/bin/* /usr/bin/
67-
sudo cp -r OpenImageIO-Release-$CI_OPENIMAGEIO_VERSION/lib/* /usr/lib/
68-
sudo rm -rf /usr/lib/python$CI_PYTHON_VERSION
69-
cp -r OpenImageIO-Release-$CI_OPENIMAGEIO_VERSION/lib/python$CI_PYTHON_VERSION/site-packages/OpenImageIO $(poetry env info -p)/lib/python$CI_PYTHON_VERSION/site-packages/
61+
brew install openimageio
62+
ls /usr/local/Cellar/openimageio/*/lib/python*/site-packages/OpenImageIO/
63+
ln -s /usr/local/Cellar/openimageio/*/lib/python*/site-packages/OpenImageIO/OpenImageIO*.so /Library/Frameworks/Python.framework/Versions/${{ matrix.python-version }}/lib/python${{ matrix.python-version }}/site-packages/OpenImageIO.so
7064
shell: bash
7165
- name: Pre-Commit (All Files)
7266
run: |
@@ -78,10 +72,10 @@ jobs:
7872
shell: bash
7973
- name: Test with Pytest
8074
run: |
81-
poetry run python -W ignore -m pytest --disable-warnings --doctest-modules --ignore=$CI_PACKAGE/examples --cov=$CI_PACKAGE $CI_PACKAGE
75+
poetry run python -W ignore -m pytest --doctest-modules --ignore=$CI_PACKAGE/examples --cov=$CI_PACKAGE $CI_PACKAGE
8276
shell: bash
8377
- name: Upload Coverage to coveralls.io
84-
if: matrix.os == 'ubuntu-22.04' && matrix.python-version == '3.10'
78+
if: matrix.os == 'macOS-latest' && matrix.python-version == '3.11'
8579
run: |
8680
if [ -z "$COVERALLS_REPO_TOKEN" ]; then echo \"COVERALLS_REPO_TOKEN\" secret is undefined!; else poetry run coveralls; fi
8781
shell: bash

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ jobs:
3232
pip install -r requirements.txt
3333
- name: Static Type Checking
3434
run: |
35-
mypy --install-types --non-interactive --show-error-codes --warn-unused-ignores --warn-redundant-casts $CI_PACKAGE
35+
pyright --skipunannotated

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
*.pyc
33
*.pyo
44
.DS_Store
5-
.coverage
6-
.dmypy.json
5+
.coverage*
76
.fleet
87
.idea
98
.ipynb_checkpoints
10-
.mypy_cache
119
.vs
1210
.vscode
1311
.sandbox

.pre-commit-config.yaml

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
repos:
2-
- repo: https://github.com/asottile/pyupgrade
3-
rev: v3.2.2
4-
hooks:
5-
- id: pyupgrade
6-
args: [--py39-plus]
7-
exclude: ^(colour/hints/__init__.py)
82
- repo: https://github.com/ikamensh/flynt/
9-
rev: '0.77'
3+
rev: '1.0.1'
104
hooks:
115
- id: flynt
6+
- repo: https://github.com/charliermarsh/ruff-pre-commit
7+
rev: 'v0.0.285'
8+
hooks:
9+
- id: ruff
1210
- repo: https://github.com/psf/black
13-
rev: 22.10.0
11+
rev: 23.7.0
1412
hooks:
1513
- id: black
1614
language_version: python3.9
@@ -19,14 +17,3 @@ repos:
1917
hooks:
2018
- id: blackdoc
2119
language_version: python3.9
22-
- repo: https://github.com/PyCQA/flake8
23-
rev: 6.0.0
24-
hooks:
25-
- id: flake8
26-
- repo: https://github.com/pycqa/pydocstyle
27-
rev: 6.1.1
28-
hooks:
29-
- id: pydocstyle
30-
args:
31-
- --convention=numpy
32-
- --add-ignore=D104,D200,D202,D205,D301,D400

.readthedocs.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,5 @@ formats:
1616
- pdf
1717

1818
python:
19-
install:
20-
- method: pip
21-
path: .
22-
extra_requirements:
23-
- read-the-docs
19+
install:
20+
- requirements: docs/requirements.txt

0 commit comments

Comments
 (0)