Skip to content

Commit dfd5930

Browse files
committed
Merge branch 'feature/v0.2.4' into develop
2 parents 1c7d8bf + 59c5432 commit dfd5930

38 files changed

Lines changed: 160 additions & 362 deletions

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
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
@@ -30,8 +30,6 @@ jobs:
3030
sudo apt-get update
3131
sudo apt-get --yes install latexmk texlive-full
3232
- name: Install Poetry
33-
env:
34-
POETRY_VERSION: 1.4.0
3533
run: |
3634
curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python3 -
3735
echo "$HOME/.poetry/bin" >> $GITHUB_PATH

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
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
@@ -46,8 +46,8 @@ jobs:
4646
- name: Install Dependencies (Windows)
4747
if: matrix.os == 'windows-latest'
4848
run: |
49-
curl -L https://exiftool.org/exiftool-12.51.zip -o exiftool-12.51.zip
50-
unzip -d exiftool exiftool-12.51.zip
49+
curl -L https://exiftool.org/exiftool-12.74.zip -o exiftool-12.74.zip
50+
unzip -d exiftool exiftool-12.74.zip
5151
cp exiftool/exiftool\(-k\).exe exiftool/exiftool.exe
5252
echo "$PWD/exiftool" | sed -e 's/^\///' -e 's/\//\\/g' -e 's/^./\0:/' >> $GITHUB_PATH
5353
curl -L https://cdn.fastpictureviewer.com/bin/dcraw.zip?v=201605100 -o dcraw.zip
@@ -66,8 +66,6 @@ jobs:
6666
echo "C:\Program Files\Adobe\Adobe DNG Converter" >> $GITHUB_PATH
6767
shell: bash
6868
- name: Install Poetry
69-
env:
70-
POETRY_VERSION: 1.4.0
7169
run: |
7270
curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python3 -
7371
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
@@ -91,6 +89,7 @@ jobs:
9189
poetry run python -W ignore -m pytest --doctest-modules --ignore=$CI_PACKAGE/examples --cov=$CI_PACKAGE $CI_PACKAGE
9290
shell: bash
9391
- name: Upload Coverage to coveralls.io
92+
if: matrix.os == 'macOS-latest' && matrix.python-version == '3.12'
9493
run: |
9594
if [ -z "$COVERALLS_REPO_TOKEN" ]; then echo \"COVERALLS_REPO_TOKEN\" secret is undefined!; else poetry run coveralls; fi
9695
shell: bash

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
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

.pre-commit-config.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,14 @@ 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:
@@ -46,7 +42,6 @@ repos:
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:

README.rst

Lines changed: 3 additions & 3 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
@@ -84,8 +84,8 @@ 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

colour_hdri/__init__.py

Lines changed: 3 additions & 9 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"
263261
__change_version__ = "3"
264-
__version__ = ".".join(
265-
(__major_version__, __minor_version__, __change_version__)
266-
)
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/debevec1997.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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:

colour_hdri/calibration/tests/test_absolute_luminance.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,13 @@ def test_upper_hemisphere_illuminance_Lagarde2016(self):
6161
)
6262

6363
np.testing.assert_allclose(
64-
upper_hemisphere_illuminance_Lagarde2016(
65-
np.ones((16, 32, 3)) * 10
66-
),
64+
upper_hemisphere_illuminance_Lagarde2016(np.ones((16, 32, 3)) * 10),
6765
29.344691653426061,
6866
atol=TOLERANCE_ABSOLUTE_TESTS,
6967
)
7068

7169
np.testing.assert_allclose(
72-
upper_hemisphere_illuminance_Lagarde2016(
73-
np.ones((16, 32, 3)) * 0.1
74-
),
70+
upper_hemisphere_illuminance_Lagarde2016(np.ones((16, 32, 3)) * 0.1),
7571
0.293446916534261,
7672
atol=TOLERANCE_ABSOLUTE_TESTS,
7773
)
@@ -170,9 +166,7 @@ def test_absolute_luminance_calibration_Lagarde2016(self):
170166
)
171167

172168
np.testing.assert_allclose(
173-
absolute_luminance_calibration_Lagarde2016(
174-
reference_exr_file, 51000
175-
),
169+
absolute_luminance_calibration_Lagarde2016(reference_exr_file, 51000),
176170
test_exr_file,
177171
rtol=0.0000001,
178172
atol=0.0000001,

colour_hdri/calibration/tests/test_debevec1997.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@
3636
"TestCameraResponseFunctionsDebevec1997",
3737
]
3838

39-
ROOT_RESOURCES_FROBISHER_001: str = os.path.join(
40-
ROOT_RESOURCES_TESTS, "frobisher_001"
41-
)
39+
ROOT_RESOURCES_FROBISHER_001: str = os.path.join(ROOT_RESOURCES_TESTS, "frobisher_001")
4240

4341
ROOT_RESOURCES_CALIBRATION: str = os.path.join(
4442
ROOT_RESOURCES_TESTS, "colour_hdri", "calibration"
@@ -74,9 +72,7 @@ def test_g_solve(self):
7472
np.testing.assert_allclose(
7573
g,
7674
np.load(
77-
os.path.join(
78-
ROOT_RESOURCES_CALIBRATION, f"test_g_solve_g_{i}.npy"
79-
)
75+
os.path.join(ROOT_RESOURCES_CALIBRATION, f"test_g_solve_g_{i}.npy")
8076
),
8177
atol=0.001,
8278
)
@@ -85,9 +81,7 @@ def test_g_solve(self):
8581
np.testing.assert_allclose(
8682
lE,
8783
np.load(
88-
os.path.join(
89-
ROOT_RESOURCES_CALIBRATION, f"test_g_solve_lE_{i}.npy"
90-
)
84+
os.path.join(ROOT_RESOURCES_CALIBRATION, f"test_g_solve_lE_{i}.npy")
9185
),
9286
atol=0.001,
9387
)
@@ -107,9 +101,7 @@ def test_camera_response_function_Debevec1997(self):
107101

108102
# Lower precision for unit tests under *Github Actions*.
109103
np.testing.assert_allclose(
110-
camera_response_functions_Debevec1997(
111-
ImageStack.from_files(IMAGES_JPG)
112-
),
104+
camera_response_functions_Debevec1997(ImageStack.from_files(IMAGES_JPG)),
113105
np.load(
114106
os.path.join(
115107
ROOT_RESOURCES_CALIBRATION,

colour_hdri/distortion/tests/test_vignette.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,7 @@ def test_vignette_principal_point(self):
279279
"""
280280

281281
np.testing.assert_allclose(
282-
vignette_principal_point(
283-
apply_radial_gradient(np.ones([50, 70, 3]))
284-
),
282+
vignette_principal_point(apply_radial_gradient(np.ones([50, 70, 3]))),
285283
np.array([0.49000000, 0.49285714]),
286284
atol=TOLERANCE_ABSOLUTE_TESTS,
287285
)

0 commit comments

Comments
 (0)