Skip to content

Commit

Permalink
Merge branch 'feature/v0.1.6' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
KelSolaar committed Nov 15, 2023
2 parents 39612a9 + ae473fa commit d266494
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 27 deletions.
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ repos:
rev: '1.0.1'
hooks:
- id: flynt
- repo: https://github.com/PyCQA/isort
rev: '5.12.0'
hooks:
- id: isort
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.285'
hooks:
Expand Down
1 change: 0 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ Colour - Checker Detection

.. end-badges
A `Python <https://www.python.org>`__ package implementing various colour
checker detection algorithms and related utilities.

Expand Down
6 changes: 3 additions & 3 deletions colour_checker_detection/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@
from __future__ import annotations

import contextlib
import cv2
import numpy as np
import os
import subprocess

import colour
import cv2
import numpy as np

from .detection import (
SETTINGS_SEGMENTATION_COLORCHECKER_CLASSIC,
SETTINGS_SEGMENTATION_COLORCHECKER_SG,
colour_checkers_coordinates_segmentation,
extract_colour_checkers_segmentation,
detect_colour_checkers_segmentation,
extract_colour_checkers_segmentation,
)

__author__ = "Colour Developers"
Expand Down
6 changes: 3 additions & 3 deletions colour_checker_detection/detection/segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@

from __future__ import annotations

import cv2
import numpy as np
from dataclasses import dataclass

import cv2
import numpy as np
from colour.hints import (
Any,
ArrayLike,
Expand Down Expand Up @@ -548,7 +548,7 @@ class DataColourCheckersCoordinatesSegmentation(MixinDataclassIterable):
Parameters
----------
colour_checkers
Colour checker bounding boxes, i.e., the. clusters that have the
Colour checker bounding boxes, i.e., the clusters that have the
relevant count of swatches.
clusters
Detected swatches clusters.
Expand Down
20 changes: 10 additions & 10 deletions colour_checker_detection/detection/tests/test_segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,29 @@
"""

import glob
import numpy as np
import os
import platform
import unittest

import numpy as np
from colour import read_image
from colour.models import cctf_encoding

from colour_checker_detection import ROOT_RESOURCES_TESTS
from colour_checker_detection.detection import (
colour_checkers_coordinates_segmentation,
detect_colour_checkers_segmentation,
extract_colour_checkers_segmentation,
)
from colour_checker_detection.detection.segmentation import (
SETTINGS_SEGMENTATION_COLORCHECKER_CLASSIC,
swatch_masks,
as_8_bit_BGR_image,
adjust_image,
is_square,
as_8_bit_BGR_image,
contour_centroid,
scale_contour,
crop_and_level_image_with_rectangle,
)
from colour_checker_detection.detection import (
colour_checkers_coordinates_segmentation,
extract_colour_checkers_segmentation,
detect_colour_checkers_segmentation,
is_square,
scale_contour,
swatch_masks,
)

__author__ = "Colour Developers"
Expand Down
7 changes: 4 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@
]

intersphinx_mapping = {
"python": ("https://docs.python.org/3.11", None),
"python": ("https://docs.python.org/3/", None),
"colour-science": ("https://colour.readthedocs.io/en/stable/", None),
"matplotlib": ("https://matplotlib.org/stable", None),
"numpy": ("https://numpy.org/doc/stable", None),
"pandas": ("https://pandas.pydata.org/pandas-docs/dev", None),
"scipy": ("https://docs.scipy.org/doc/scipy-1.8.0/", None),
"pandas": ("https://pandas.pydata.org/pandas-docs/stable", None),
"scipy": ("https://docs.scipy.org/doc/scipy/", None),
}

autodoc_member_order = "bysource"
Expand Down
16 changes: 13 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ exclude = [

[tool.poetry.dependencies]
python = ">= 3.9, < 3.12"
colour-science = ">= 0.4.2"
colour-science = ">= 0.4.3"
imageio = ">= 2, < 3"
numpy = ">= 1.22, < 2"
opencv-python = ">= 4, < 5"
Expand All @@ -63,7 +63,7 @@ coveralls = "*"
flynt = "*"
invoke = "*"
jupyter = "*"
pre-commit = "*"
pre-commit = ">= 3.5"
pyright = "*"
pytest = "*"
pytest-cov = "*"
Expand All @@ -76,7 +76,7 @@ twine = "*"
biblib-simple = "*"
pydata-sphinx-theme = "*"
restructuredtext-lint = "*"
sphinx = ">= 4, < 5"
sphinx = "*"
sphinxcontrib-bibtex = "*"

[tool.black]
Expand All @@ -92,6 +92,16 @@ exclude = '''
[tool.flynt]
line_length=999

[tool.isort]
ensure_newline_before_comments = true
force_grid_wrap = 0
include_trailing_comma = true
line_length = 88
multi_line_output = 3
skip_glob = ["colour_checker_detection/**/__init__.py"]
split_on_trailing_comma = true
use_parentheses = true

[tool.pyright]
reportMissingImports = false
reportMissingModuleSource = false
Expand Down
8 changes: 4 additions & 4 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@

from __future__ import annotations

import biblib.bib
import contextlib
import fnmatch
import inspect
import os
import re
import uuid

import colour_checker_detection
import biblib.bib
from colour.utilities import message_box

import inspect
import colour_checker_detection

if not hasattr(inspect, "getargspec"):
inspect.getargspec = inspect.getfullargspec # pyright: ignore

from invoke.tasks import task
from invoke.context import Context
from invoke.tasks import task

__author__ = "Colour Developers"
__copyright__ = "Copyright 2018 Colour Developers"
Expand Down

0 comments on commit d266494

Please sign in to comment.