[project] name = "learning-munsell" version = "0.1.0" description = "Learning Munsell: ML-based CIE xyY to Munsell specification conversion" readme = "README.md" requires-python = ">=3.11,<3.15" authors = [ { name = "Colour Developers", email = "colour-developers@colour-science.org" }, ] license = { text = "BSD-3-Clause" } dependencies = [ "click>=8.0.0", "numpy>=2.0.0,<3", "onnxruntime>=1.16.0", "torch>=2.0.0", "scikit-learn>=1.3.0", "onnx>=1.15.0", "matplotlib>=3.9", "tqdm>=4.66.0", "mlflow>=2.10.0", "colour-science>=0.4.7", "onnxscript>=0.5.6", "optuna>=3.0.0", "jax>=0.4.20", "jaxlib>=0.4.20", "flax>=0.10.7", "optax>=0.2.6", "scipy>=1.12.0,<2", "tensorboard>=2.20.0", "netron>=8.7.7", ] [dependency-groups] dev = [ "pre-commit", "pyright", "pytest", "ruff", ] [tool.codespell] ignore-words-list = "colour" [tool.isort] ensure_newline_before_comments = true force_grid_wrap = 0 include_trailing_comma = true line_length = 88 multi_line_output = 3 split_on_trailing_comma = true use_parentheses = true [tool.pyright] reportMissingImports = false reportMissingModuleSource = false reportUnboundVariable = false reportUnnecessaryCast = true reportUnnecessaryTypeIgnoreComment = true reportUnsupportedDunderAll = false reportUnusedExpression = false [tool.ruff] target-version = "py311" line-length = 88 [tool.ruff.lint] select = ["ALL"] ignore = [ "C", # Pylint - Convention "C90", # mccabe "COM", # flake8-commas "ERA", # eradicate "FBT", # flake8-boolean-trap "FIX", # flake8-fixme "PT", # flake8-pytest-style "PTH", # flake8-use-pathlib [Enable] "TD", # flake8-todos "ANN401", # Dynamically typed expressions (typing.Any) are disallowed in `**kwargs` "D200", # One-line docstring should fit on one line "D202", # No blank lines allowed after function docstring "D205", # 1 blank line required between summary line and description "D301", # Use `r"""` if any backslashes in a docstring "D400", # First line should end with a period "I001", # Import block is un-sorted or un-formatted "N801", # Class name `.*` should use CapWords convention "N802", # Function name `.*` should be lowercase "N803", # Argument name `.*` should be lowercase "N806", # Variable `.*` in function should be lowercase "N813", # Camelcase `.*` imported as lowercase `.*` "N815", # Variable `.*` in class scope should not be mixedCase "N816", # Variable `.*` in global scope should not be mixedCase "NPY002", # Replace legacy `np.random.random` call with `np.random.Generator` "PGH003", # Use specific rule codes when ignoring type issues "PLR0912", # Too many branches "PLR0913", # Too many arguments in function definition "PLR0915", # Too many statements "PLR2004", # Magic value used in comparison, consider replacing `.*` with a constant variable "PYI036", # Star-args in `.*` should be annotated with `object` "PYI051", # `Literal[".*"]` is redundant in a union with `str` "PYI056", # Calling `.append()` on `__all__` may not be supported by all type checkers (use `+=` instead) "RUF022", # [*] `__all__` is not sorted "TRY003", # Avoid specifying long messages outside the exception class "UP038", # Use `X | Y` in `isinstance` call instead of `(X, Y)` "N999", # Invalid module name (for from_xyY, to_xyY directories) "DTZ005", # datetime.now() without tz argument (timestamps for logging) ] [tool.ruff.lint.pydocstyle] convention = "numpy" [tool.ruff.lint.per-file-ignores] "__init__.py" = ["D104"] "learning_munsell/training/*" = ["INP001", "T201"] "learning_munsell/comparison/*" = ["INP001", "T201"] # HTML templates in compare_all_models.py files have long lines "learning_munsell/comparison/*/compare_all_models.py" = ["E501"] "learning_munsell/data_generation/*" = ["INP001", "T201"] "learning_munsell/interpolation/*" = ["INP001", "T201"] [tool.ruff.format] docstring-code-format = true