Skip to content

Commit 2eb0a13

Browse files
committed
Merge branch 'release/v0.2.4'
2 parents 743f8ba + 0c08dd1 commit 2eb0a13

Some content is hidden

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

53 files changed

+846
-1142
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ is available to guide the process: https://www.colour-science.org/contributing/.
1818
- [ ] Pyright static checking has been run and passed.
1919
- [ ] Pre-commit hooks have been run and passed.
2020

21-
<!-- The unit tests can be invoked with `poetry run invoke tests` -->
22-
<!-- Pyright can be started with `pyright --skipunannotated` -->
21+
<!-- The unit tests can be invoked with `uv run invoke tests` -->
22+
<!-- Pyright can be started with `pyright --threads --skipunannotated` -->
2323

2424
**Documentation**
2525

.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]
11-
python-version: [3.12]
10+
os: [ubuntu-latest]
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_PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
@@ -22,27 +22,23 @@ 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 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

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

Lines changed: 24 additions & 26 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: [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
with:
1717
submodules: true
1818
- name: Environment Variables
@@ -23,33 +23,34 @@ jobs:
2323
echo "COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}" >> $GITHUB_ENV
2424
echo "MPLBACKEND=AGG" >> $GITHUB_ENV
2525
shell: bash
26-
- name: Set up Python 3.9 for Pre-Commit
27-
uses: actions/setup-python@v4
26+
- name: Set up Python 3.10 for Pre-Commit
27+
uses: actions/setup-python@v5
2828
with:
29-
python-version: 3.9
29+
python-version: "3.10"
3030
- name: Set up Python ${{ matrix.python-version }}
31-
uses: actions/setup-python@v4
31+
uses: actions/setup-python@v5
3232
with:
3333
python-version: ${{ matrix.python-version }}
3434
- name: Install Dependencies (macOS)
3535
if: matrix.os == 'macOS-latest'
3636
run: |
3737
brew install dcraw exiftool
3838
brew install --cask adobe-dng-converter
39-
shell: bash
39+
brew install freeimage
40+
# TODO: Drop when https://github.com/imageio/imageio/issues/628 is addressed
41+
echo "IMAGEIO_FREEIMAGE_LIB=/opt/homebrew/Cellar/freeimage/3.18.0/lib/libfreeimage.3.18.0.dylib" >> $GITHUB_ENV
4042
- name: Install Dependencies (Ubuntu)
41-
if: matrix.os == 'ubuntu-22.04'
43+
if: matrix.os == 'ubuntu-latest'
4244
run: |
4345
sudo apt-get update
4446
sudo apt-get --yes install dcraw exiftool
45-
shell: bash
4647
- name: Install Dependencies (Windows)
4748
if: matrix.os == 'windows-latest'
4849
run: |
49-
curl -L https://exiftool.org/exiftool-12.51.zip -o exiftool-12.51.zip
50-
unzip -d exiftool exiftool-12.51.zip
51-
cp exiftool/exiftool\(-k\).exe exiftool/exiftool.exe
52-
echo "$PWD/exiftool" | sed -e 's/^\///' -e 's/\//\\/g' -e 's/^./\0:/' >> $GITHUB_PATH
50+
curl -L https://exiftool.org/exiftool-12.98_64.zip -o exiftool-12.98_64.zip
51+
unzip -d exiftool exiftool-12.98_64.zip
52+
cp exiftool/exiftool-12.98_64/exiftool\(-k\).exe exiftool/exiftool-12.98_64/exiftool.exe
53+
echo "$PWD/exiftool/exiftool-12.98_64" | sed -e 's/^\///' -e 's/\//\\/g' -e 's/^./\0:/' >> $GITHUB_PATH
5354
curl -L https://cdn.fastpictureviewer.com/bin/dcraw.zip?v=201605100 -o dcraw.zip
5455
unzip -d dcraw dcraw.zip
5556
echo "$PWD/dcraw" | sed -e 's/^\///' -e 's/\//\\/g' -e 's/^./\0:/' >> $GITHUB_PATH
@@ -65,32 +66,29 @@ jobs:
6566
run: |
6667
echo "C:\Program Files\Adobe\Adobe DNG Converter" >> $GITHUB_PATH
6768
shell: bash
68-
- name: Install Poetry
69-
env:
70-
POETRY_VERSION: 1.4.0
69+
- name: Install uv
7170
run: |
72-
curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python3 -
73-
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
71+
pip install uv
7472
shell: bash
7573
- name: Install Package Dependencies
7674
run: |
77-
poetry run python -m pip install --upgrade pip
78-
poetry install
79-
poetry run python -c "import imageio;imageio.plugins.freeimage.download()"
75+
uv sync --all-extras --no-dev
76+
uv run python -c "import imageio;imageio.plugins.freeimage.download()"
8077
shell: bash
8178
- name: Pre-Commit (All Files)
8279
run: |
83-
poetry run pre-commit run --all-files
80+
uv run pre-commit run --all-files
8481
shell: bash
8582
- name: Test Optimised Python Execution
8683
run: |
87-
poetry run python -OO -c "import $CI_PACKAGE"
84+
uv run python -OO -c "import $CI_PACKAGE"
8885
shell: bash
8986
- name: Test with Pytest
9087
run: |
91-
poetry run python -W ignore -m pytest --doctest-modules --ignore=$CI_PACKAGE/examples --cov=$CI_PACKAGE $CI_PACKAGE
88+
uv run python -W ignore -m pytest --doctest-modules --ignore=$CI_PACKAGE/examples --cov=$CI_PACKAGE $CI_PACKAGE
9289
shell: bash
9390
- name: Upload Coverage to coveralls.io
91+
if: matrix.os == 'macOS-latest' && matrix.python-version == '3.12'
9492
run: |
95-
if [ -z "$COVERALLS_REPO_TOKEN" ]; then echo \"COVERALLS_REPO_TOKEN\" secret is undefined!; else poetry run coveralls; fi
93+
if [ -z "$COVERALLS_REPO_TOKEN" ]; then echo \"COVERALLS_REPO_TOKEN\" secret is undefined!; else uv run coveralls; fi
9694
shell: bash

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ jobs:
88
strategy:
99
matrix:
1010
os: [macOS-latest]
11-
python-version: [3.12]
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_hdri" >> $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 Package Dependencies
2525
run: |
26-
pip install -r requirements.txt
26+
cat requirements.txt | grep -Eo '(^[^#]+)' | xargs -n 1 pip install || true
2727
- name: Static Type Checking
2828
run: |
29-
pyright --skipunannotated
29+
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
.sandbox
1011
.vs
1112
.vscode
@@ -17,4 +18,4 @@ colour_hdri.egg-info
1718
dist
1819
docs/_build
1920
docs/generated
20-
poetry.lock
21+
uv.lock

.pre-commit-config.yaml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,28 +25,23 @@ repos:
2525
- id: flynt
2626
args: [--verbose]
2727
- repo: https://github.com/PyCQA/isort
28-
rev: "5.12.0"
28+
rev: "5.13.2"
2929
hooks:
3030
- id: isort
3131
- repo: https://github.com/astral-sh/ruff-pre-commit
32-
rev: "v0.1.6"
32+
rev: "v0.1.14"
3333
hooks:
34+
- id: ruff-format
3435
- id: ruff
35-
- repo: https://github.com/psf/black-pre-commit-mirror
36-
rev: 23.11.0
37-
hooks:
38-
- id: black
39-
language_version: python3.9
4036
- repo: https://github.com/adamchainz/blacken-docs
4137
rev: 1.16.0
4238
hooks:
4339
- id: blacken-docs
44-
language_version: python3.9
40+
language_version: python3.10
4541
- repo: https://github.com/pre-commit/mirrors-prettier
4642
rev: "v3.1.0"
4743
hooks:
4844
- id: prettier
49-
exclude: config-aces-reference.ocio.yaml
5045
- repo: https://github.com/pre-commit/pygrep-hooks
5146
rev: "v1.10.0"
5247
hooks:

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**, *Technology Supervisor @ Wētā FX*
7+
- **Thomas Mansencal**, *Principal Pipeline Programmer @ Epic Games*
88

99
Project coordination, overall development.
1010

README.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Colour - HDRI
1212
:target: https://coveralls.io/r/colour-science/colour-hdri
1313
:alt: Coverage Status
1414
.. |codacy| image:: https://img.shields.io/codacy/grade/f422dc0703dd4653b2b766217c745813/develop.svg?style=flat-square
15-
:target: https://www.codacy.com/app/colour-science/colour-hdri
15+
:target: https://app.codacy.com/gh/colour-science/colour-hdri
1616
:alt: Code Grade
1717
.. |version| image:: https://img.shields.io/pypi/v/colour-hdri.svg?style=flat-square
1818
:target: https://pypi.org/project/colour-hdri
@@ -74,18 +74,18 @@ Primary Dependencies
7474

7575
**Colour - HDRI** requires various dependencies in order to run:
7676

77-
- `python >= 3.9, < 4 <https://www.python.org/download/releases>`__
78-
- `colour-science >= 4.3 <https://pypi.org/project/colour-science>`__
77+
- `python >= 3.10, < 3.14 <https://www.python.org/download/releases>`__
78+
- `colour-science >= 4.4 <https://pypi.org/project/colour-science>`__
7979
- `imageio >= 2, < 3 <https://imageio.github.io>`__
80-
- `numpy >= 1.22, < 2 <https://pypi.org/project/numpy>`__
81-
- `scipy >= 1.8, < 2 <https://pypi.org/project/scipy>`__
80+
- `numpy >= 1.24, < 3 <https://pypi.org/project/numpy>`__
81+
- `scipy >= 1.10, < 2 <https://pypi.org/project/scipy>`__
8282

8383
Optional Features Dependencies
8484
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8585

8686
- `colour-demosaicing <https://pypi.org/project/colour-demosaicing>`__
87-
- `Adobe DNG Converter <https://www.adobe.com/support/downloads/product.jsp?product=106&platform=Mac>`__
88-
- `dcraw <https://www.cybercom.net/~dcoffin/dcraw>`__
87+
- `Adobe DNG Converter <https://helpx.adobe.com/nz/camera-raw/using/adobe-dng-converter.html>`__
88+
- `dcraw <https://dechifro.org/dcraw/>`__
8989
- `ExifTool <http://www.sno.phy.queensu.ca/~phil/exiftool>`__
9090
- `rawpy <https://pypi.org/project/rawpy>`__
9191

TODO.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ TODO
66

77
- colour_hdri/__init__.py
88

9-
- Line 287 : # TODO: Remove legacy printing support when deemed appropriate.
9+
- Line 281 : # TODO: Remove legacy printing support when deemed appropriate.
1010

1111

1212
- colour_hdri/tonemapping/global_operators/operators.py
1313

14-
- Line 584 : # TODO: Implement automatic *p* and *non-uniform* computations support.
14+
- Line 582 : # TODO: Implement automatic *p* and *non-uniform* computations support.
1515

1616

1717
- colour_hdri/utilities/exif.py
1818

19-
- Line 318 : # TODO: Find a better name.
19+
- Line 317 : # TODO: Find a better name.
2020

2121

2222
- colour_hdri/utilities/image.py
2323

24-
- Line 443 : # TODO: Revise then "MixinDataclassArray" is improved.
24+
- Line 438 : # TODO: Revise then "MixinDataclassArray" is improved.
2525

2626
About
2727
-----

colour_hdri/__init__.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -252,18 +252,14 @@ def __getattr__(self, attribute) -> Any:
252252
ROOT_RESOURCES_EXAMPLES: str = os.path.join(
253253
ROOT_RESOURCES, "colour-hdri-examples-datasets"
254254
)
255-
ROOT_RESOURCES_TESTS: str = os.path.join(
256-
ROOT_RESOURCES, "colour-hdri-tests-datasets"
257-
)
255+
ROOT_RESOURCES_TESTS: str = os.path.join(ROOT_RESOURCES, "colour-hdri-tests-datasets")
258256

259257
__application_name__ = "Colour - HDRI"
260258

261259
__major_version__ = "0"
262260
__minor_version__ = "2"
263-
__change_version__ = "3"
264-
__version__ = ".".join(
265-
(__major_version__, __minor_version__, __change_version__)
266-
)
261+
__change_version__ = "4"
262+
__version__ = ".".join((__major_version__, __minor_version__, __change_version__))
267263

268264
try:
269265
_version: str = (
@@ -278,9 +274,7 @@ def __getattr__(self, attribute) -> Any:
278274
except Exception:
279275
_version: str = __version__
280276

281-
colour.utilities.ANCILLARY_COLOUR_SCIENCE_PACKAGES[ # pyright: ignore
282-
"colour-hdri"
283-
] = _version
277+
colour.utilities.ANCILLARY_COLOUR_SCIENCE_PACKAGES["colour-hdri"] = _version # pyright: ignore
284278

285279
del _version
286280

colour_hdri/calibration/absolute_luminance.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Absolute Luminance Calibration - Lagarde (2016)
33
===============================================
44
5-
Defines the *Lagarde (2016)* panoramic images absolute *Luminance* calibration
5+
Define the *Lagarde (2016)* panoramic images absolute *Luminance* calibration
66
objects:
77
88
- :func:`colour_hdri.absolute_luminance_calibration_Lagarde2016`
@@ -91,7 +91,7 @@ def upper_hemisphere_illuminance_weights_Lagarde2016(
9191
) -> NDArrayFloat:
9292
"""
9393
Compute upper hemisphere illuminance weights for use with applications
94-
unable to perform the computation directly, i.e. *Adobe Photoshop*.
94+
unable to perform the computation directly, i.e., *Adobe Photoshop*.
9595
9696
Parameters
9797
----------

colour_hdri/calibration/debevec1997.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Debevec (1997) Camera Response Function Computation
33
===================================================
44
5-
Defines the *Debevec (1997)* camera responses computation objects:
5+
Define the *Debevec (1997)* camera responses computation objects:
66
77
- :func:`colour_hdri.g_solve`
88
- :func:`colour_hdri.camera_response_functions_Debevec1997`
@@ -139,7 +139,7 @@ def extrapolating_function_polynomial(
139139
given camera response functions.
140140
141141
The extrapolation occurs where the weighting function masks fully the
142-
camera response functions, e.g. at both ends for *Debevec (1997)*.
142+
camera response functions, e.g., at both ends for *Debevec (1997)*.
143143
144144
Parameters
145145
----------
@@ -246,9 +246,7 @@ def camera_response_functions_Debevec1997(
246246

247247
w = partial(weighting_function, **weighting_function_kwargs)
248248

249-
g_c = [
250-
g_solve(s_o[..., x], L_l, l_s, w, n)[0] for x in range(s_o.shape[-1])
251-
]
249+
g_c = [g_solve(s_o[..., x], L_l, l_s, w, n)[0] for x in range(s_o.shape[-1])]
252250
crfs = np.exp(tstack(np.array(g_c)))
253251

254252
if extrapolating_function is not None:

0 commit comments

Comments
 (0)