Skip to content

Commit f6c729f

Browse files
authored
Merge pull request #109 from ampas/feature/python3_13_support
Feature/python3 13 support
2 parents 39b87ee + d1b05cd commit f6c729f

File tree

3 files changed

+23
-10
lines changed

3 files changed

+23
-10
lines changed

aces/idt/core/constants.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,9 @@ class RGBDisplayColourspace:
104104
ALL: ClassVar[tuple[str, ...]] = (SRGB, DCI_P3)
105105

106106

107-
class CAT:
108-
"""Constants for the chromatic adaptation transforms."""
109-
110-
DEFAULT: ClassVar[str] = "CAT02"
111-
112-
@classmethod
107+
class CATMeta(type):
113108
@property
114-
def ALL(cls) -> Tuple[str]:
109+
def ALL(cls) -> Tuple[str, ...]:
115110
"""
116111
Return all the available chromatic adaptation transforms.
117112
@@ -120,8 +115,13 @@ def ALL(cls) -> Tuple[str]:
120115
:class:`tuple`
121116
Available chromatic adaptation transforms.
122117
"""
118+
return (*sorted(colour.CHROMATIC_ADAPTATION_TRANSFORMS), "None")
123119

124-
return *sorted(colour.CHROMATIC_ADAPTATION_TRANSFORMS), "None"
120+
121+
class CAT(metaclass=CATMeta):
122+
"""Constants for the chromatic adaptation transforms."""
123+
124+
DEFAULT: ClassVar[str] = "CAT02"
125125

126126

127127
class OptimizationSpace:

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ classifiers = [
4141
]
4242

4343
[tool.poetry.dependencies]
44-
python = ">= 3.11, < 3.13"
44+
python = ">= 3.11, < 3.14"
4545
colour-datasets = ">= 0.2.5"
4646
colour-checker-detection = ">= 0.2.1"
4747
colour_science = ">= 0.4.5"
@@ -51,7 +51,7 @@ dash-renderer = "*"
5151
dash-uploader = "*"
5252
gunicorn = "*"
5353
imageio = ">= 2, < 3"
54-
pandas = ">= 1.4, < 2"
54+
pandas = ">= 1.4, < 2.3"
5555
jsonpickle = ">= 2, < 3"
5656
matplotlib = ">= 3.5, != 3.5.0, != 3.5.1"
5757
networkx = ">= 2.7, < 3"

tests/test_constants.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""
2+
Unit tests for the constants module
3+
"""
4+
from aces.idt.core import constants
5+
from tests.test_utils import TestIDTBase
6+
7+
8+
class Test_IDTConstants(TestIDTBase):
9+
"""Class which holds the unit tests for the constants module"""
10+
11+
def test_class_property_deprecation(self):
12+
"""Test the deprecation of the classmethod and property in python3.11"""
13+
self.assertEqual(len(constants.CAT.ALL), 13)

0 commit comments

Comments
 (0)