Skip to content

Commit b7abc03

Browse files
committed
Merge branch 'release/v0.4.5'
2 parents 649a3fd + 9e893a8 commit b7abc03

File tree

637 files changed

+18458
-16110
lines changed

Some content is hidden

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

637 files changed

+18458
-16110
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ is available to guide the process: https://www.colour-science.org/contributing/.
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

23-
<!-- The unit tests can be invoked with `poetry run invoke tests` -->
24-
<!-- Pyright can be started with `pyright --skipunannotated` -->
23+
<!-- The unit tests can be invoked with `uv run invoke tests` -->
24+
<!-- Pyright can be started with `uv run pyright --threads --skipunannotated` -->
2525

2626
**Documentation**
2727

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

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ jobs:
77
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}
88
strategy:
99
matrix:
10-
os: [ubuntu-22.04]
10+
os: [ubuntu-latest]
1111
python-version: [3.11]
1212
fail-fast: false
1313
runs-on: ${{ matrix.os }}
1414
steps:
15-
- uses: actions/checkout@v1
15+
- uses: actions/checkout@v4
1616
- name: Environment Variables
1717
run: |
1818
echo "CI_PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
@@ -22,31 +22,27 @@ jobs:
2222
echo "COLOUR_SCIENCE__DOCUMENTATION_BUILD=True" >> $GITHUB_ENV
2323
shell: bash
2424
- name: Set up Python ${{ matrix.python-version }}
25-
uses: actions/setup-python@v4
25+
uses: actions/setup-python@v5
2626
with:
2727
python-version: ${{ matrix.python-version }}
2828
- name: Install Dependencies
2929
run: |
3030
sudo apt-get update
3131
sudo apt-get --yes install graphviz graphviz-dev latexmk texlive-full
32-
- name: Install Poetry
33-
env:
34-
POETRY_VERSION: 1.4.0
32+
- name: Install uv
3533
run: |
36-
curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python3 -
37-
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
34+
pip install uv
3835
shell: bash
3936
- name: Install Package Dependencies
4037
run: |
41-
poetry run python -m pip install --upgrade pip
42-
poetry install
43-
poetry run python -c "import imageio;imageio.plugins.freeimage.download()"
38+
uv sync --all-extras --no-dev
39+
uv run python -c "import imageio;imageio.plugins.freeimage.download()"
4440
shell: bash
4541
- name: Build Documentation
4642
run: |
47-
poetry run invoke docs
43+
uv run invoke docs
4844
shell: bash
49-
- uses: actions/upload-artifact@v2
45+
- uses: actions/upload-artifact@v4
5046
with:
5147
name: ${{ env.CI_PACKAGE }}-plots
5248
path: |

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

Lines changed: 30 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,75 +7,71 @@ jobs:
77
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}
88
strategy:
99
matrix:
10-
os: [macOS-latest, ubuntu-22.04, windows-latest]
11-
python-version: [3.9, "3.10", 3.11, 3.12]
10+
os: [macOS-latest, ubuntu-latest, windows-latest]
11+
python-version: ["3.10", 3.11, 3.12, 3.13]
1212
fail-fast: false
1313
runs-on: ${{ matrix.os }}
1414
steps:
15-
- uses: actions/checkout@v1
15+
- uses: actions/checkout@v4
1616
- name: Environment Variables
1717
run: |
1818
echo "CI_PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
1919
echo "CI_PACKAGE=colour" >> $GITHUB_ENV
2020
echo "CI_SHA=${{ github.sha }}" >> $GITHUB_ENV
2121
echo "COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}" >> $GITHUB_ENV
2222
echo "MPLBACKEND=AGG" >> $GITHUB_ENV
23+
# https://github.com/scipy/scipy/issues/20613
24+
echo "OMP_NUM_THREADS=1" >> $GITHUB_ENV
2325
shell: bash
24-
- name: Set up Python 3.9 for Pre-Commit
25-
uses: actions/setup-python@v4
26+
- name: Set up Python 3.10 for Pre-Commit
27+
uses: actions/setup-python@v5
2628
with:
27-
python-version: 3.9
29+
python-version: "3.10"
2830
- name: Set up Python ${{ matrix.python-version }}
29-
uses: actions/setup-python@v4
31+
uses: actions/setup-python@v5
3032
with:
3133
python-version: ${{ matrix.python-version }}
34+
- name: Install Dependencies (macOS)
35+
if: matrix.os == 'macOS-latest'
36+
run: |
37+
brew install freeimage
38+
# TODO: Drop when https://github.com/imageio/imageio/issues/628 is addressed
39+
echo "IMAGEIO_FREEIMAGE_LIB=/opt/homebrew/Cellar/freeimage/3.18.0/lib/libfreeimage.3.18.0.dylib" >> $GITHUB_ENV
3240
- name: Install Dependencies (Ubuntu)
33-
if: matrix.os == 'ubuntu-22.04'
41+
if: matrix.os == 'ubuntu-latest'
3442
run: |
3543
sudo apt-get update
36-
sudo apt-get --yes install graphviz graphviz-dev libboost-all-dev libilmbase-dev libopenexr-dev libpng-dev libtiff5-dev
37-
- name: Install Poetry
38-
env:
39-
POETRY_VERSION: 1.4.0
40-
run: |
41-
curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python3 -
42-
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
43-
shell: bash
44-
- name: Install Package Dependencies (Ubuntu)
45-
if: matrix.os == 'ubuntu-22.04'
44+
sudo apt-get --yes install graphviz graphviz-dev
45+
- name: Install uv
4646
run: |
47-
poetry run python -m pip install --upgrade pip
48-
poetry install
49-
poetry run python -c "import imageio;imageio.plugins.freeimage.download()"
47+
pip install uv
5048
shell: bash
51-
- name: Install Package Dependencies (macOS & Windows)
52-
if: matrix.os == 'macOS-latest' || matrix.os == 'windows-latest'
49+
- name: Install Package Dependencies
5350
run: |
54-
poetry run python -m pip install --upgrade pip
55-
poetry install --without graphviz
56-
poetry run python -c "import imageio;imageio.plugins.freeimage.download()"
51+
uv sync --all-extras --no-dev
52+
uv run python -c "import imageio;imageio.plugins.freeimage.download()"
5753
shell: bash
5854
- name: Install OpenImageIO (macOs)
59-
if: matrix.os == 'macOS-latest' && matrix.python-version == '3.11'
55+
if: matrix.os == 'macOS-latest' && matrix.python-version == '3.12'
6056
run: |
6157
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
58+
ln -s /opt/homebrew/Cellar/openimageio/*/lib/python*/site-packages/OpenImageIO/OpenImageIO*.so ./.venv/lib/python3.12/site-packages/OpenImageIO.so
59+
uv run python -c "import OpenImageIO;print(OpenImageIO.__version__)"
6460
shell: bash
6561
- name: Pre-Commit (All Files)
6662
run: |
67-
poetry run pre-commit run --all-files
63+
uv run pre-commit run --all-files
6864
shell: bash
6965
- name: Test Optimised Python Execution
7066
run: |
71-
poetry run python -OO -c "import $CI_PACKAGE"
67+
uv run python -OO -c "import $CI_PACKAGE"
7268
shell: bash
7369
- name: Test with Pytest
7470
run: |
75-
poetry run python -W ignore -m pytest --doctest-modules --ignore=$CI_PACKAGE/examples --cov=$CI_PACKAGE $CI_PACKAGE
71+
uv run python -W ignore -m pytest --doctest-modules --ignore=$CI_PACKAGE/examples --cov=$CI_PACKAGE $CI_PACKAGE
7672
shell: bash
7773
- name: Upload Coverage to coveralls.io
78-
if: matrix.os == 'macOS-latest' && matrix.python-version == '3.11'
74+
if: matrix.os == 'macOS-latest' && matrix.python-version == '3.12'
7975
run: |
80-
if [ -z "$COVERALLS_REPO_TOKEN" ]; then echo \"COVERALLS_REPO_TOKEN\" secret is undefined!; else poetry run coveralls; fi
76+
if [ -z "$COVERALLS_REPO_TOKEN" ]; then echo \"COVERALLS_REPO_TOKEN\" secret is undefined!; else uv run coveralls; fi
8177
shell: bash

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

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,29 @@ jobs:
88
strategy:
99
matrix:
1010
os: [macOS-latest]
11-
python-version: [3.11]
11+
python-version: [3.13]
1212
fail-fast: false
1313
runs-on: ${{ matrix.os }}
1414
steps:
15-
- uses: actions/checkout@v1
15+
- uses: actions/checkout@v4
1616
- name: Environment Variables
1717
run: |
1818
echo "CI_PACKAGE=colour" >> $GITHUB_ENV
1919
shell: bash
2020
- name: Set up Python ${{ matrix.python-version }}
21-
uses: actions/setup-python@v4
21+
uses: actions/setup-python@v5
2222
with:
2323
python-version: ${{ matrix.python-version }}
2424
- name: Install Dependencies (macOS)
2525
if: matrix.os == 'macOS-latest'
2626
run: |
27-
brew install graphviz
28-
export GRAPHVIZ_DIR="/usr/local/Cellar/graphviz/<VERSION>"
29-
pip install pygraphviz --global-option=build_ext --global-option="-I$GRAPHVIZ_DIR/include" --global-option="-L$GRAPHVIZ_DIR/lib"
27+
brew install freeimage graphviz
28+
pip install --no-cache-dir --config-settings="--global-option=build_ext" --config-settings="--global-option=-I$(brew --prefix graphviz)/include/" --config-settings="--global-option=-L$(brew --prefix graphviz)/lib/" pygraphviz
29+
# TODO: Drop when https://github.com/imageio/imageio/issues/628 is addressed
30+
echo "IMAGEIO_FREEIMAGE_LIB=/opt/homebrew/Cellar/freeimage/3.18.0/lib/libfreeimage.3.18.0.dylib" >> $GITHUB_ENV
3031
- name: Install Package Dependencies
3132
run: |
32-
pip install -r requirements.txt
33+
cat requirements.txt | grep -Eo '(^[^#]+)' | xargs -n 1 pip install || true
3334
- name: Static Type Checking
3435
run: |
35-
pyright --skipunannotated
36+
pyright --threads --skipunannotated

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
.fleet
77
.idea
88
.ipynb_checkpoints
9+
.python-version
910
.vs
1011
.vscode
1112
.sandbox
@@ -20,5 +21,5 @@ docs/_static/Examples_*.png
2021
docs/_static/Plotting_*.png
2122
docs/_static/Tutorial_*.png
2223
docs/generated
23-
poetry.lock
2424
references
25+
uv.lock

.pre-commit-config.yaml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,19 @@ repos:
2727
- id: flynt
2828
args: [--verbose]
2929
- repo: https://github.com/PyCQA/isort
30-
rev: "5.12.0"
30+
rev: "5.13.2"
3131
hooks:
3232
- id: isort
3333
- repo: https://github.com/astral-sh/ruff-pre-commit
34-
rev: "v0.1.6"
34+
rev: "v0.1.14"
3535
hooks:
36+
- id: ruff-format
3637
- id: ruff
37-
- repo: https://github.com/psf/black-pre-commit-mirror
38-
rev: 23.11.0
39-
hooks:
40-
- id: black
41-
language_version: python3.9
4238
- repo: https://github.com/adamchainz/blacken-docs
4339
rev: 1.16.0
4440
hooks:
4541
- id: blacken-docs
46-
language_version: python3.9
42+
language_version: python3.10
4743
- repo: https://github.com/pre-commit/mirrors-prettier
4844
rev: "v3.1.0"
4945
hooks:

0 commit comments

Comments
 (0)