Skip to content

Commit 7a9b0b2

Browse files
committed
Rename various attributes.
1 parent b821690 commit 7a9b0b2

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

colour_checker_detection/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@
4141
"detect_colour_checkers_segmentation",
4242
]
4343

44-
RESOURCES_DIRECTORY: str = os.path.join(os.path.dirname(__file__), "resources")
45-
EXAMPLES_RESOURCES_DIRECTORY: str = os.path.join(
46-
RESOURCES_DIRECTORY, "colour-checker-detection-examples-datasets"
44+
ROOT_RESOURCES: str = os.path.join(os.path.dirname(__file__), "resources")
45+
ROOT_RESOURCES_EXAMPLES: str = os.path.join(
46+
ROOT_RESOURCES, "colour-checker-detection-examples-datasets"
4747
)
48-
TESTS_RESOURCES_DIRECTORY: str = os.path.join(
49-
RESOURCES_DIRECTORY, "colour-checker-detection-tests-datasets"
48+
ROOT_RESOURCES_TESTS: str = os.path.join(
49+
ROOT_RESOURCES, "colour-checker-detection-tests-datasets"
5050
)
5151

5252
__application_name__ = "Colour - Checker Detection"

colour_checker_detection/detection/segmentation.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -499,9 +499,9 @@ def crop_and_level_image_with_rectangle(
499499
--------
500500
>>> import os
501501
>>> from colour import read_image
502-
>>> from colour_checker_detection import TESTS_RESOURCES_DIRECTORY
502+
>>> from colour_checker_detection import ROOT_RESOURCES_TESTS
503503
>>> path = os.path.join(
504-
... TESTS_RESOURCES_DIRECTORY,
504+
... ROOT_RESOURCES_TESTS,
505505
... "colour_checker_detection",
506506
... "detection",
507507
... "IMG_1967.png",
@@ -664,9 +664,9 @@ def colour_checkers_coordinates_segmentation(
664664
--------
665665
>>> import os
666666
>>> from colour import read_image
667-
>>> from colour_checker_detection import TESTS_RESOURCES_DIRECTORY
667+
>>> from colour_checker_detection import ROOT_RESOURCES_TESTS
668668
>>> path = os.path.join(
669-
... TESTS_RESOURCES_DIRECTORY,
669+
... ROOT_RESOURCES_TESTS,
670670
... "colour_checker_detection",
671671
... "detection",
672672
... "IMG_1967.png",
@@ -862,9 +862,9 @@ def extract_colour_checkers_segmentation(
862862
--------
863863
>>> import os
864864
>>> from colour import read_image
865-
>>> from colour_checker_detection import TESTS_RESOURCES_DIRECTORY
865+
>>> from colour_checker_detection import ROOT_RESOURCES_TESTS
866866
>>> path = os.path.join(
867-
... TESTS_RESOURCES_DIRECTORY,
867+
... ROOT_RESOURCES_TESTS,
868868
... "colour_checker_detection",
869869
... "detection",
870870
... "IMG_1967.png",
@@ -1051,9 +1051,9 @@ def detect_colour_checkers_segmentation(
10511051
--------
10521052
>>> import os
10531053
>>> from colour import read_image
1054-
>>> from colour_checker_detection import TESTS_RESOURCES_DIRECTORY
1054+
>>> from colour_checker_detection import ROOT_RESOURCES_TESTS
10551055
>>> path = os.path.join(
1056-
... TESTS_RESOURCES_DIRECTORY,
1056+
... ROOT_RESOURCES_TESTS,
10571057
... "colour_checker_detection",
10581058
... "detection",
10591059
... "IMG_1967.png",

colour_checker_detection/detection/tests/test_segmentation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from colour import read_image
1414
from colour.models import cctf_encoding
1515

16-
from colour_checker_detection import TESTS_RESOURCES_DIRECTORY
16+
from colour_checker_detection import ROOT_RESOURCES_TESTS
1717
from colour_checker_detection.detection.segmentation import (
1818
SETTINGS_SEGMENTATION_COLORCHECKER_CLASSIC,
1919
swatch_masks,
@@ -53,7 +53,7 @@
5353
]
5454

5555
DETECTION_DIRECTORY = os.path.join(
56-
TESTS_RESOURCES_DIRECTORY, "colour_checker_detection", "detection"
56+
ROOT_RESOURCES_TESTS, "colour_checker_detection", "detection"
5757
)
5858

5959
PNG_FILES = glob.glob(os.path.join(DETECTION_DIRECTORY, "*.png"))

colour_checker_detection/examples/examples_detection.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"import colour\n",
6060
"\n",
6161
"from colour_checker_detection import (\n",
62-
" EXAMPLES_RESOURCES_DIRECTORY,\n",
62+
" ROOT_RESOURCES_EXAMPLES,\n",
6363
" SETTINGS_SEGMENTATION_COLORCHECKER_CLASSIC,\n",
6464
" colour_checkers_coordinates_segmentation,\n",
6565
" detect_colour_checkers_segmentation)\n",
@@ -120,7 +120,7 @@
120120
],
121121
"source": [
122122
"COLOUR_CHECKER_IMAGE_PATHS = glob.glob(\n",
123-
" os.path.join(EXAMPLES_RESOURCES_DIRECTORY, 'detection', '*.png'))\n",
123+
" os.path.join(ROOT_RESOURCES_EXAMPLES, 'detection', '*.png'))\n",
124124
"\n",
125125
"COLOUR_CHECKER_IMAGES = [\n",
126126
" colour.cctf_decoding(colour.io.read_image(path))\n",

0 commit comments

Comments
 (0)