From 673a9a68bb476397f61164ea0f89207d54614386 Mon Sep 17 00:00:00 2001 From: Thomas Mansencal Date: Sun, 27 Aug 2023 11:11:17 +1200 Subject: [PATCH 1/5] Update various urls. --- README.rst | 24 +++++++++---------- SPONSORS.rst | 2 +- colour/__init__.py | 4 ++-- colour/characterisation/aces_it.py | 2 +- colour/characterisation/tests/test_aces_it.py | 4 ++-- colour/graph/conversion.py | 2 +- colour/plotting/graph.py | 2 +- docs/advanced.rst | 6 ++--- docs/basics.rst | 8 +++---- docs/index.rst | 14 +++++------ docs/tutorial.rst | 2 +- 11 files changed, 35 insertions(+), 35 deletions(-) diff --git a/README.rst b/README.rst index ab37dd02fe..30dd3f2cb9 100644 --- a/README.rst +++ b/README.rst @@ -28,13 +28,13 @@ .. end-badges `Colour `__ is an open-source -`Python `__ package providing a comprehensive number +`Python `__ package providing a comprehensive number of algorithms and datasets for colour science. It is freely available under the `BSD-3-Clause `__ terms. -**Colour** is an affiliated project of `NumFOCUS `__, a +**Colour** is an affiliated project of `NumFOCUS `__, a 501(c)(3) nonprofit in the United States. .. contents:: **Table of Contents** @@ -1688,7 +1688,7 @@ Installation ~~~~~~~~~~~~ **Colour** and its primary dependencies can be easily installed from the -`Python Package Index `__ +`Python Package Index `__ by issuing this command in a shell: .. code-block:: bash @@ -1696,10 +1696,10 @@ by issuing this command in a shell: $ pip install --user colour-science The detailed installation procedure for the secondary dependencies is -described in the `Installation Guide `__. +described in the `Installation Guide `__. **Colour** is also available for `Anaconda `__ -from *Continuum Analytics* via `conda-forge `__: +from *Continuum Analytics* via `conda-forge `__: .. code-block:: bash @@ -1723,7 +1723,7 @@ Contributing ~~~~~~~~~~~~ If you would like to contribute to **Colour**, please refer to the following -`Contributing `__ guide. +`Contributing `__ guide. Changes ~~~~~~~ @@ -1733,7 +1733,7 @@ The changes are viewable on the `Releases `__ page. +The bibliography is available on the `Bibliography `__ page. It is also viewable directly from the repository in `BibTeX `__ @@ -1756,12 +1756,12 @@ Software **Python** - `ColorPy `__ by Kness, M. -- `Colorspacious `__ by Smith, N. J., et al. -- `python-colormath `__ by Taylor, G., et al. +- `Colorspacious `__ by Smith, N. J., et al. +- `python-colormath `__ by Taylor, G., et al. **Go** -- `go-colorful `__ by Beyer, L., et al. +- `go-colorful `__ by Beyer, L., et al. **.NET** @@ -1774,14 +1774,14 @@ Software **Matlab & Octave** - `COLORLAB `__ by Malo, J., et al. -- `Psychtoolbox `__ by Brainard, D., et al. +- `Psychtoolbox `__ by Brainard, D., et al. - `The Munsell and Kubelka-Munk Toolbox `__ by Centore, P. Code of Conduct --------------- The *Code of Conduct*, adapted from the `Contributor Covenant 1.4 `__, -is available on the `Code of Conduct `__ page. +is available on the `Code of Conduct `__ page. .. begin-trim-long-description diff --git a/SPONSORS.rst b/SPONSORS.rst index 5c2a415369..4f10955dc2 100644 --- a/SPONSORS.rst +++ b/SPONSORS.rst @@ -4,7 +4,7 @@ `Colour `__ is an independent `BSD-3-Clause `__ Open Source -affiliated project of `NumFOCUS `__, a 501(c)(3) +affiliated project of `NumFOCUS `__, a 501(c)(3) nonprofit in the United States. We are grateful 💖 for the support of our diff --git a/colour/__init__.py b/colour/__init__.py index e31a5c1bd2..047c34db40 100644 --- a/colour/__init__.py +++ b/colour/__init__.py @@ -3,14 +3,14 @@ ====== `Colour `__ is an open-source -`Python `__ package providing a comprehensive number +`Python `__ package providing a comprehensive number of algorithms and datasets for colour science. It is freely available under the `BSD-3-Clause `__ terms. `Colour `__ is an affiliated project -of `NumFOCUS `__, a 501(c)(3) nonprofit in the United +of `NumFOCUS `__, a 501(c)(3) nonprofit in the United States. Sub-packages diff --git a/colour/characterisation/aces_it.py b/colour/characterisation/aces_it.py index a8c4582353..e268424ae7 100644 --- a/colour/characterisation/aces_it.py +++ b/colour/characterisation/aces_it.py @@ -1104,7 +1104,7 @@ def matrix_idt( array([ 2.3414154..., 1. , 1.5163375...]) The *RAW to ACES* v1 matrix for the same camera and optimized by - `Ceres Solver `__ is as follows:: + `Ceres Solver `__ is as follows:: 0.864994 -0.026302 0.161308 0.056527 1.122997 -0.179524 diff --git a/colour/characterisation/tests/test_aces_it.py b/colour/characterisation/tests/test_aces_it.py index 98d9469014..ed3eb16d14 100644 --- a/colour/characterisation/tests/test_aces_it.py +++ b/colour/characterisation/tests/test_aces_it.py @@ -988,7 +988,7 @@ def test_matrix_idt(self): """ # The *RAW to ACES* v1 matrix for the same camera and optimized by - # `Ceres Solver `__ is as follows: + # `Ceres Solver `__ is as follows: # # 0.864994 -0.026302 0.161308 # 0.056527 1.122997 -0.179524 @@ -1007,7 +1007,7 @@ def test_matrix_idt(self): ) # The *RAW to ACES* v1 matrix for the same camera and optimized by - # `Ceres Solver `__ is as follows: + # `Ceres Solver `__ is as follows: # # 0.888492 -0.077505 0.189014 # 0.021805 1.066614 -0.088418 diff --git a/colour/graph/conversion.py b/colour/graph/conversion.py index caac96fe61..b3019d11a3 100644 --- a/colour/graph/conversion.py +++ b/colour/graph/conversion.py @@ -1220,7 +1220,7 @@ def convert(a: Any, source: str, target: str, **kwargs: Any) -> Any: colour representation using the automatic colour conversion graph. The conversion is performed by finding the shortest path in a - `NetworkX `__ :class:`DiGraph` class instance. + `NetworkX `__ :class:`DiGraph` class instance. The conversion path adopts the **'1'** domain-range scale and the object :math:`a` is expected to be *soft* normalised accordingly. For example, diff --git a/colour/plotting/graph.py b/colour/plotting/graph.py index 5a7e57dab2..0f2af41ec2 100644 --- a/colour/plotting/graph.py +++ b/colour/plotting/graph.py @@ -39,7 +39,7 @@ def plot_automatic_colour_conversion_graph( ) -> AGraph: # pyright: ignore # noqa: F821 """ Plot *Colour* automatic colour conversion graph using - `Graphviz `__ and + `Graphviz `__ and `pyraphviz `__. Parameters diff --git a/docs/advanced.rst b/docs/advanced.rst index 8c046cefa3..801467d410 100644 --- a/docs/advanced.rst +++ b/docs/advanced.rst @@ -60,13 +60,13 @@ Using Colour without Scipy -------------------------- With the release of `Colour 0.3.8 `__, -`SciPy `__ became a requirement. +`SciPy `__ became a requirement. **Scipy** is notoriously hard to compile, especially -`on Windows `__. +`on Windows `__. Some Digital Content Creation (DCC) applications are shipping Python interpreters compiled with versions of -`Visual Studio `__ such as 2011 or 2015. +`Visual Studio `__ such as 2011 or 2015. Those are incompatible with the Python Wheels commonly built with `Visual Studio 2008 (Python 2.7) or Visual Studio 2017 (Python 3.6) `__. diff --git a/docs/basics.rst b/docs/basics.rst index 9372e10fdf..b6d923da19 100644 --- a/docs/basics.rst +++ b/docs/basics.rst @@ -10,7 +10,7 @@ Object Name Categorisation The API tries to bundle the objects by categories by naming them with common prefixes which makes introspection and auto-completion easier. -For example, in `IPython `__ or `Jupyter Notebook `__, +For example, in `IPython `__ or `Jupyter Notebook `__, most of the definitions pertaining to the spectral distribution handling can be found as follows: @@ -47,7 +47,7 @@ Similarly, all the RGB colourspaces can be individually accessed from the Abbreviations ------------- -The following abbreviations are in use in `Colour `__: +The following abbreviations are in use in `Colour `__: - **CAM** : Colour Appearance Model - **CCS** : Chromaticity Coordinates @@ -69,7 +69,7 @@ N-Dimensional Array Support --------------------------- Most of **Colour** definitions are fully vectorised and support n-dimensional -array by leveraging `Numpy `__. +array by leveraging `Numpy `__. While it is recommended to use `ndarray `__ @@ -171,7 +171,7 @@ to support floating point wavelengths. Wavelengths should not have to be defined as integer values and it is effectively common to get data from instruments whose domain is returned as floating point values. -For example, the data from an `Ocean Insight (Optics) STS-VIS `__ +For example, the data from an `Ocean Insight (Optics) STS-VIS `__ spectrometer is typically saved with 3 digits decimal precision: .. code-block:: text diff --git a/docs/index.rst b/docs/index.rst index 35ab67e48f..d2aa3be11a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -3,13 +3,13 @@ | `Colour `__ is an open-source -`Python `__ package providing a comprehensive number +`Python `__ package providing a comprehensive number of algorithms and datasets for colour science. It is freely available under the `BSD-3-Clause `__ terms. -**Colour** is an affiliated project of `NumFOCUS `__, a +**Colour** is an affiliated project of `NumFOCUS `__, a 501(c)(3) nonprofit in the United States. .. sectnum:: @@ -1487,12 +1487,12 @@ Software **Python** - `ColorPy `__ by Kness, M. -- `Colorspacious `__ by Smith, N. J., et al. -- `python-colormath `__ by Taylor, G., et al. +- `Colorspacious `__ by Smith, N. J., et al. +- `python-colormath `__ by Taylor, G., et al. **Go** -- `go-colorful `__ by Beyer, L., et al. +- `go-colorful `__ by Beyer, L., et al. **.NET** @@ -1505,14 +1505,14 @@ Software **Matlab & Octave** - `COLORLAB `__ by Malo, J., et al. -- `Psychtoolbox `__ by Brainard, D., et al. +- `Psychtoolbox `__ by Brainard, D., et al. - `The Munsell and Kubelka-Munk Toolbox `__ by Centore, P. Code of Conduct --------------- The *Code of Conduct*, adapted from the `Contributor Covenant 1.4 `__, -is available on the `Code of Conduct `__ page. +is available on the `Code of Conduct `__ page. Contact & Social ---------------- diff --git a/docs/tutorial.rst b/docs/tutorial.rst index d81eeaab6d..2a9a044a92 100644 --- a/docs/tutorial.rst +++ b/docs/tutorial.rst @@ -6,7 +6,7 @@ Tutorial An interactive version of the tutorial is available via `Google Colab `__. -`Colour `__ spreads over +`Colour `__ spreads over various domains of Colour Science, from colour models to optical phenomena, this tutorial does not give a complete overview of the API but is a good introduction to the main concepts. From 03f4118d964fe4e3e429b7f82faf528bcf10a6ea Mon Sep 17 00:00:00 2001 From: Thomas Mansencal Date: Sun, 27 Aug 2023 11:47:20 +1200 Subject: [PATCH 2/5] Update "pyproject.toml" file. --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index fcaa74c3de..a8568f1b2a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -218,7 +218,6 @@ convention = "numpy" [tool.ruff.per-file-ignores] "colour/examples/*" = ["INP", "T201", "T203"] "docs/*" = ["INP"] -"setup.py" = ["INP"] "tasks.py" = ["INP"] "utilities/*" = ["EXE001", "INP"] "utilities/unicode_to_ascii.py" = ["RUF001"] From 595c8f1eb504eca8f0132d93ab9b4edcb9cf6258 Mon Sep 17 00:00:00 2001 From: Thomas Mansencal Date: Sun, 27 Aug 2023 12:41:42 +1200 Subject: [PATCH 3/5] Update "tasks.py" file. --- tasks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks.py b/tasks.py index aee325c382..5ee923bf9d 100644 --- a/tasks.py +++ b/tasks.py @@ -334,7 +334,7 @@ def requirements(ctx: Context): ctx.run( "poetry export -f requirements.txt " "--without-hashes " - "--with dev,optional,graphviz,meshing,docs " + "--with dev,docs,graphviz,meshing,optional " "--output requirements.txt" ) @@ -342,7 +342,7 @@ def requirements(ctx: Context): ctx.run( "poetry export -f requirements.txt " "--without-hashes " - "--with optional,graphviz,meshing,docs " + "--with docs,graphviz,meshing,optional " "--output docs/requirements.txt" ) @@ -437,7 +437,7 @@ def tag(ctx: Context): message_box("Tagging...") result = ctx.run("git rev-parse --abbrev-ref HEAD", hide="both") - if result.stdout.strip() == "develop": # pyright: ignore + if result.stdout.strip() != "develop": # pyright: ignore raise RuntimeError("Are you still on a feature or master branch?") with open(os.path.join(PYTHON_PACKAGE_NAME, "__init__.py")) as file_handle: From 4eeaa66430ffa86a3955e718a982a2b9fdd6a6a9 Mon Sep 17 00:00:00 2001 From: Thomas Mansencal Date: Sun, 27 Aug 2023 12:30:42 +1200 Subject: [PATCH 4/5] Update "conf.py" file. --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 83d362e8cd..56a2bcc912 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -6,9 +6,9 @@ import os import re import setuptools.archive_util +import sys import urllib.parse import urllib.request -import sys from pathlib import Path sys.path.append(str(Path(__file__).parent.parent)) From e3152a35fd5209b66484b48f83e151791c86ef18 Mon Sep 17 00:00:00 2001 From: Thomas Mansencal Date: Mon, 28 Aug 2023 21:16:56 +1200 Subject: [PATCH 5/5] Add `colour.hints.ClassVar` type. --- colour/hints/__init__.py | 2 ++ docs/colour.hints.rst | 1 + 2 files changed, 3 insertions(+) diff --git a/colour/hints/__init__.py b/colour/hints/__init__.py index 392dbab947..fcb42f509c 100644 --- a/colour/hints/__init__.py +++ b/colour/hints/__init__.py @@ -16,6 +16,7 @@ from typing import ( # noqa: UP035 Any, Callable, + ClassVar, Dict, List, Literal, @@ -50,6 +51,7 @@ "ModuleType", "Any", "Callable", + "ClassVar", "Dict", "Generator", "Iterable", diff --git a/docs/colour.hints.rst b/docs/colour.hints.rst index a1eb5064ba..e8aeaebec2 100644 --- a/docs/colour.hints.rst +++ b/docs/colour.hints.rst @@ -13,6 +13,7 @@ Annotation Type Hints ModuleType Any Callable + ClassVar Dict Generator Iterable