Skip to content

Commit

Permalink
Overhaul "Poetry" dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
KelSolaar committed Aug 1, 2023
1 parent 4768f98 commit afb9f42
Show file tree
Hide file tree
Showing 8 changed files with 315 additions and 290 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration-documentation.yml
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Install Package Dependencies
run: |
poetry run python -m pip install --upgrade pip
poetry install --extras "read-the-docs"
poetry install
poetry run python -c "import imageio;imageio.plugins.freeimage.download()"
shell: bash
- name: Build Documentation
Expand Down
Expand Up @@ -45,14 +45,14 @@ jobs:
if: matrix.os == 'ubuntu-22.04'
run: |
poetry run python -m pip install --upgrade pip
poetry install --extras "graphviz meshing optional plotting"
poetry install
poetry run python -c "import imageio;imageio.plugins.freeimage.download()"
shell: bash
- name: Install Package Dependencies (macOS & Windows)
if: matrix.os == 'macOS-latest' || matrix.os == 'windows-latest'
run: |
poetry run python -m pip install --upgrade pip
poetry install --extras "meshing optional plotting"
poetry install --without graphviz
poetry run python -c "import imageio;imageio.plugins.freeimage.download()"
shell: bash
- name: Install OpenImageIO (macOs)
Expand Down
7 changes: 2 additions & 5 deletions .readthedocs.yaml
Expand Up @@ -16,8 +16,5 @@ formats:
- pdf

python:
install:
- method: pip
path: .
extra_requirements:
- read-the-docs
install:
- requirements: docs/requirements.txt
6 changes: 5 additions & 1 deletion docs/conf.py
Expand Up @@ -8,8 +8,12 @@
import setuptools.archive_util
import urllib.parse
import urllib.request
import sys
from pathlib import Path

import colour as package
sys.path.append(str(Path(__file__).parent.parent))

import colour as package # noqa: E402

basename = re.sub(
"_(\\w)", lambda x: x.group(1).upper(), package.__name__.title()
Expand Down
56 changes: 56 additions & 0 deletions docs/requirements.txt
@@ -0,0 +1,56 @@
accessible-pygments==0.0.4 ; python_version >= "3.9" and python_version < "3.12"
alabaster==0.7.13 ; python_version >= "3.9" and python_version < "3.12"
babel==2.12.1 ; python_version >= "3.9" and python_version < "3.12"
beautifulsoup4==4.12.2 ; python_version >= "3.9" and python_version < "3.12"
biblib-simple==0.1.2 ; python_version >= "3.9" and python_version < "3.12"
certifi==2023.7.22 ; python_version >= "3.9" and python_version < "3.12"
charset-normalizer==3.2.0 ; python_version >= "3.9" and python_version < "3.12"
colorama==0.4.6 ; python_version >= "3.9" and python_version < "3.12" and (platform_system == "Windows" or sys_platform == "win32")
contourpy==1.1.0 ; python_version >= "3.9" and python_version < "3.12"
cycler==0.11.0 ; python_version >= "3.9" and python_version < "3.12"
docutils==0.17.1 ; python_version >= "3.9" and python_version < "3.12"
fonttools==4.41.1 ; python_version >= "3.9" and python_version < "3.12"
idna==3.4 ; python_version >= "3.9" and python_version < "3.12"
imageio==2.31.1 ; python_version >= "3.9" and python_version < "3.12"
imagesize==1.4.1 ; python_version >= "3.9" and python_version < "3.12"
importlib-metadata==6.8.0 ; python_version >= "3.9" and python_version < "3.10"
importlib-resources==6.0.0 ; python_version >= "3.9" and python_version < "3.10"
jinja2==3.1.2 ; python_version >= "3.9" and python_version < "3.12"
kiwisolver==1.4.4 ; python_version >= "3.9" and python_version < "3.12"
latexcodec==2.0.1 ; python_version >= "3.9" and python_version < "3.12"
markupsafe==2.1.3 ; python_version >= "3.9" and python_version < "3.12"
matplotlib==3.7.2 ; python_version >= "3.9" and python_version < "3.12"
networkx==2.8.8 ; python_version >= "3.9" and python_version < "3.12"
numpy==1.25.2 ; python_version >= "3.9" and python_version < "3.12"
packaging==23.1 ; python_version >= "3.9" and python_version < "3.12"
pandas==1.5.3 ; python_version >= "3.9" and python_version < "3.12"
pillow==10.0.0 ; python_version >= "3.9" and python_version < "3.12"
pybtex-docutils==1.0.2 ; python_version >= "3.9" and python_version < "3.12"
pybtex==0.24.0 ; python_version >= "3.9" and python_version < "3.12"
pydata-sphinx-theme==0.13.3 ; python_version >= "3.9" and python_version < "3.12"
pygments==2.15.1 ; python_version >= "3.9" and python_version < "3.12"
pygraphviz==1.11 ; python_version >= "3.9" and python_version < "3.12"
pyparsing==3.0.9 ; python_version >= "3.9" and python_version < "3.12"
python-dateutil==2.8.2 ; python_version >= "3.9" and python_version < "3.12"
pytz==2023.3 ; python_version >= "3.9" and python_version < "3.12"
pyyaml==6.0.1 ; python_version >= "3.9" and python_version < "3.12"
requests==2.31.0 ; python_version >= "3.9" and python_version < "3.12"
restructuredtext-lint==1.4.0 ; python_version >= "3.9" and python_version < "3.12"
scipy==1.11.1 ; python_version >= "3.9" and python_version < "3.12"
six==1.16.0 ; python_version >= "3.9" and python_version < "3.12"
snowballstemmer==2.2.0 ; python_version >= "3.9" and python_version < "3.12"
soupsieve==2.4.1 ; python_version >= "3.9" and python_version < "3.12"
sphinx==4.5.0 ; python_version >= "3.9" and python_version < "3.12"
sphinxcontrib-applehelp==1.0.4 ; python_version >= "3.9" and python_version < "3.12"
sphinxcontrib-bibtex==2.5.0 ; python_version >= "3.9" and python_version < "3.12"
sphinxcontrib-devhelp==1.0.2 ; python_version >= "3.9" and python_version < "3.12"
sphinxcontrib-htmlhelp==2.0.1 ; python_version >= "3.9" and python_version < "3.12"
sphinxcontrib-jsmath==1.0.1 ; python_version >= "3.9" and python_version < "3.12"
sphinxcontrib-qthelp==1.0.3 ; python_version >= "3.9" and python_version < "3.12"
sphinxcontrib-serializinghtml==1.1.5 ; python_version >= "3.9" and python_version < "3.12"
tqdm==4.65.0 ; python_version >= "3.9" and python_version < "3.12"
trimesh==3.22.5 ; python_version >= "3.9" and python_version < "3.12"
typing-extensions==4.7.1 ; python_version >= "3.9" and python_version < "3.12"
urllib3==2.0.4 ; python_version >= "3.9" and python_version < "3.12"
xxhash==3.3.0 ; python_version >= "3.9" and python_version < "3.12"
zipp==3.16.2 ; python_version >= "3.9" and python_version < "3.10"
152 changes: 51 additions & 101 deletions pyproject.toml
Expand Up @@ -3,8 +3,8 @@ name = "colour"
version = "0.4.2"
description = "Colour Science for Python"
license = "BSD-3-Clause"
authors = [ "Colour Developers <colour-developers@colour-science.org>" ]
maintainers = [ "Colour Developers <colour-developers@colour-science.org>" ]
authors = ["Colour Developers <colour-developers@colour-science.org>"]
maintainers = ["Colour Developers <colour-developers@colour-science.org>"]
readme = 'README.rst'
repository = "https://github.com/colour-science/colour"
homepage = "https://www.colour-science.org/"
Expand Down Expand Up @@ -49,37 +49,20 @@ numpy = ">= 1.21, < 2"
scipy = ">= 1.7, < 2"
typing-extensions = ">= 4, < 5"

matplotlib = { version = ">= 3.5, != 3.5.0, != 3.5.1", optional = true }
networkx = { version = ">= 2.6, < 3", optional = true }
pandas = { version = ">= 1.3, < 2", optional = true }
pygraphviz = { version = ">= 1, < 2", optional = true }
tqdm = { version = ">= 4, < 5", optional = true }
trimesh = { version = ">= 3, < 4", optional = true }
xxhash = { version = ">= 3.2, < 4", optional = true }
[tool.poetry.group.optional.dependencies]
matplotlib = ">= 3.5, != 3.5.0, != 3.5.1"
networkx = ">= 2.6, < 3"
pandas = ">= 1.3, < 2"
tqdm = ">= 4, < 5"
xxhash = ">= 3.2, < 4"

biblib-simple = { version = "*", optional = true } # Development dependency.
black = { version = "*", optional = true } # Development dependency.
blackdoc = { version = "*", optional = true } # Development dependency.
coverage = { version = "!= 6.3", optional = true } # Development dependency.
coveralls = { version = "*", optional = true } # Development dependency.
flynt = { version = "*", optional = true } # Development dependency.
invoke = { version = "*", optional = true } # Development dependency.
jupyter = { version = "*", optional = true } # Development dependency.
pre-commit = { version = "*", optional = true } # Development dependency.
pydata-sphinx-theme = { version = "*", optional = true } # Development dependency.
pyright = { version = "*", optional = true } # Development dependency.
pytest = { version = "*", optional = true } # Development dependency.
pytest-cov = { version = "*", optional = true } # Development dependency.
pytest-xdist = { version = "*", optional = true} # Development dependency
restructuredtext-lint = { version = "*", optional = true } # Development dependency.
ruff = { version = "*", optional = true } # Development dependency.
sphinx = { version = ">= 4, < 5", optional = true } # Development dependency.
sphinxcontrib-bibtex = { version = "*", optional = true } # Development dependency.
toml = { version = "*", optional = true } # Development dependency.
twine = { version = "*", optional = true } # Development dependency.
[tool.poetry.group.graphviz.dependencies]
pygraphviz = ">= 1, < 2"

[tool.poetry.dev-dependencies]
biblib-simple = "*"
[tool.poetry.group.meshing.dependencies]
trimesh = ">= 3, < 4"

[tool.poetry.group.dev.dependencies]
black = "*"
blackdoc = "*"
coverage = "!= 6.3"
Expand All @@ -88,53 +71,20 @@ flynt = "*"
invoke = "*"
jupyter = "*"
pre-commit = "*"
pydata-sphinx-theme = "*"
pyright = "*"
pytest = "*"
pytest-cov = "*"
pytest-xdist = "*"
restructuredtext-lint = "*"
ruff = "*"
sphinx = ">= 4, < 5"
sphinxcontrib-bibtex = "*"
toml = "*"
twine = "*"

[tool.poetry.extras]
development = [
"biblib-simple",
"black",
"blackdoc",
"coverage",
"coveralls",
"flynt",
"invoke",
"jupyter",
"pre-commit",
"pydata-sphinx-theme",
"pyright",
"pytest",
"pytest-cov",
"pytest-xdist",
"restructuredtext-lint",
"ruff",
"sphinx",
"sphinxcontrib-bibtex",
"toml",
"twine",
]
graphviz = [ "pygraphviz" ]
meshing = [ "trimesh" ]
optional = [ "networkx", "pandas", "scikit-learn", "tqdm", "xxhash" ]
plotting = [ "matplotlib" ]
read-the-docs = [
"matplotlib",
"networkx",
"pydata-sphinx-theme",
"pygraphviz",
"sphinxcontrib-bibtex",
"trimesh"
]
[tool.poetry.group.docs.dependencies]
biblib-simple = "*"
pydata-sphinx-theme = "*"
restructuredtext-lint = "*"
sphinx = ">= 4, < 5"
sphinxcontrib-bibtex = "*"

[tool.black]
line-length = 79
Expand All @@ -147,7 +97,7 @@ exclude = '''
'''

[tool.flynt]
line_length=999
line_length = 999

[tool.pyright]
reportMissingImports = false
Expand Down Expand Up @@ -182,46 +132,46 @@ filterwarnings = [
target-version = "py39"
line-length = 88
select = [
"A", # flake8-builtins
"ARG", # flake8-unused-arguments
"A", # flake8-builtins
"ARG", # flake8-unused-arguments
# "ANN", # flake8-annotations
"B", # flake8-bugbear
"B", # flake8-bugbear
# "BLE", # flake8-blind-except
"C4", # flake8-comprehensions
"C4", # flake8-comprehensions
# "C90", # mccabe
# "COM", # flake8-commas
"DTZ", # flake8-datetimez
"D", # pydocstyle
"E", # pydocstyle
"DTZ", # flake8-datetimez
"D", # pydocstyle
"E", # pydocstyle
# "ERA", # eradicate
# "EM", # flake8-errmsg
"EXE", # flake8-executable
"F", # flake8
"EXE", # flake8-executable
"F", # flake8
# "FBT", # flake8-boolean-trap
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"INP", # flake8-no-pep420
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"INP", # flake8-no-pep420
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
# "PD", # pandas-vet
"PIE", # flake8-pie
"PGH", # pygrep-hooks
"PL", # pylint
"PIE", # flake8-pie
"PGH", # pygrep-hooks
"PL", # pylint
# "PT", # flake8-pytest-style
# "PTH", # flake8-use-pathlib [Enable]
"Q", # flake8-quotes
"RET", # flake8-return
"RUF", # Ruff
"S", # flake8-bandit
"SIM", # flake8-simplify
"T10", # flake8-debugger
"T20", # flake8-print
"Q", # flake8-quotes
"RET", # flake8-return
"RUF", # Ruff
"S", # flake8-bandit
"SIM", # flake8-simplify
"T10", # flake8-debugger
"T20", # flake8-print
# "TCH", # flake8-type-checking
"TID", # flake8-tidy-imports
"TRY", # tryceratops
"UP", # pyupgrade
"W", # pydocstyle
"TID", # flake8-tidy-imports
"TRY", # tryceratops
"UP", # pyupgrade
"W", # pydocstyle
"YTT" # flake8-2020
]
ignore = [
Expand Down Expand Up @@ -272,5 +222,5 @@ convention = "numpy"
"utilities/unicode_to_ascii.py" = ["RUF001"]

[build-system]
requires = [ "poetry_core>=1.0.0" ]
requires = ["poetry_core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

0 comments on commit afb9f42

Please sign in to comment.