Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #2

Open
wants to merge 53 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
c5559d5
Update `generate_plots.py` utility.
KelSolaar Oct 23, 2023
4572df2
Add "VisualAxes" class.
KelSolaar Oct 24, 2023
6787559
Add `colour_visuals.common.unlatexify` definition.
KelSolaar Oct 25, 2023
31a2fe3
Implement support for `RGB` colourspace model and keywords argument p…
KelSolaar Oct 25, 2023
eaf8e98
Add various pattern generators.
KelSolaar Oct 27, 2023
95b9c78
Add `conftest.py` file.
KelSolaar Oct 27, 2023
d0a2db1
Remove `conftest.py` file, skip `Matplotlib` doctests.
KelSolaar Oct 27, 2023
34b6b8e
Overhaul all the visual classes.
KelSolaar Oct 29, 2023
0d8be2a
Implement various fixes post visual classes overhaul.
KelSolaar Oct 29, 2023
814a71d
Update `README.rst` file.
KelSolaar Oct 29, 2023
56ec9ec
Drop `Matplotlib` requirement.
KelSolaar Oct 29, 2023
a17ac58
Add `colour_visuals.VisualDaylightLocus` and `colour_visuals.VisualPl…
KelSolaar Nov 3, 2023
3e056db
Update `README.rst` file.
KelSolaar Nov 3, 2023
f7477c6
Fix incorrectly moved `colour_visuals.visual.Visual.update` abstract …
KelSolaar Nov 3, 2023
424985d
Remove unused comments.
KelSolaar Nov 3, 2023
b2d1f0e
Update font management.
KelSolaar Nov 3, 2023
80381a0
Update `requirements.txt` file.
KelSolaar Nov 3, 2023
f710168
Update `pyproject.toml` file.
KelSolaar Nov 13, 2023
53f8647
Update `requirements.txt` file.
KelSolaar Nov 13, 2023
832f7b5
Update `actions/setup-python` to `v4`.
KelSolaar Dec 16, 2023
3313e25
Update various docstrings.
KelSolaar Jan 13, 2024
81fc853
Implement support for *Python* 3.12.
KelSolaar Jan 13, 2024
960306e
Update `.pre-commit-config.yaml` file.
KelSolaar Jan 13, 2024
4b85f0a
Update `pyproject.toml` file.
KelSolaar Jan 15, 2024
ef53a41
Update `.pre-commit-config.yaml` file.
KelSolaar Jan 15, 2024
bce5eda
Unpin *Poetry* version from 1.4.0.
KelSolaar Jan 20, 2024
c268247
Pin `coverage` to version `>= 6, < 7`.
KelSolaar Jan 24, 2024
1de55d9
Ensure that *coveralls.io* upload uses `Python` 3.12.
KelSolaar Jan 24, 2024
7ac9710
Fix broken links in `README.rst` file.
KelSolaar Jan 27, 2024
51b59f3
Use `Ruff` format.
KelSolaar Jan 30, 2024
ff50542
Use `actions/checkout@v4`.
KelSolaar Jan 29, 2024
01dbb9f
Drop `black` settings in `pyproject.toml` file.
KelSolaar Jan 30, 2024
cb54580
Use `np.reshape` function instead of `.reshape` method.
KelSolaar Feb 10, 2024
d9ca329
Initialise various properties in `colour_visuals.VisualGrid` class.
KelSolaar Feb 15, 2024
b2632a9
Implement support for centred `colour_visuals.VisualGrid` class.
KelSolaar Feb 15, 2024
b79e8a4
Implement support for disabling colour model normalisation.
KelSolaar Feb 16, 2024
737d92d
Update various docstrings.
KelSolaar Feb 17, 2024
ce9f6f9
Fix `__all__` attribute in `colour_visuals.__init__` module.
KelSolaar Feb 17, 2024
eeb9923
Add for `colour_visuals.VisualRGBColourspace3D.size` property for HDR…
KelSolaar Feb 17, 2024
8e7afb7
Add `EPSILON` to primaries in `colour_visuals.VisualRGBColourspace2D`…
KelSolaar Apr 22, 2024
6bf5a85
Implement support for *pygfx* 0.2.0.
KelSolaar May 5, 2024
f1b7143
Merge branch 'develop' of https://github.com/colour-science/colour-vi…
KelSolaar May 5, 2024
b0d076d
Remove verbosity in `colour_visuals.common.XYZ_to_colourspace_model` …
KelSolaar May 11, 2024
9a99a48
Handle singularities in `colour_visuals.VisualRGBColourspace2D` class.
KelSolaar May 18, 2024
56cfc30
Update various docstrings.
KelSolaar Jun 9, 2024
a1d440f
Update `.pre-commit-config.yaml` file.
KelSolaar Jul 27, 2024
f73d3b4
Update various docstrings.
KelSolaar Oct 10, 2024
23e4e14
Update affiliation.
KelSolaar Oct 10, 2024
7b118a3
Update `actions/setup-python` to v5.
KelSolaar Oct 10, 2024
0855859
Use *uv* and *hatch* and enable *Python* 3.13.
KelSolaar Oct 13, 2024
803c8a7
Update various social links.
KelSolaar Nov 24, 2024
9308e20
Ignore *RUF022*.
KelSolaar Dec 1, 2024
a552d2a
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Dec 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Bug Report
description: Report an issue or a bug.
title: "[BUG]: << Please use a comprehensive title... >>"
labels: [ Defect ]
labels: [Defect]

body:
- type: markdown
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/documentation-improvement.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Documentation Improvement
description: Report a documentation improvement.
title: "[DOCUMENTATION]: << Please use a comprehensive title... >>"
labels: [ Documentation ]
labels: [Documentation]

body:
- type: markdown
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Feature Request
description: Suggest a new feature to implement.
title: "[FEATURE]: << Please use a comprehensive title... >>"
labels: [ Feature ]
labels: [Feature]

body:
- type: markdown
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/question.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Question
description: Ask a question.
title: "[DISCUSSION]: << Please use a comprehensive title... >>"
labels: [ Discussion ]
labels: [Discussion]

body:
- type: markdown
Expand Down
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ is available to guide the process: https://www.colour-science.org/contributing/.
- [ ] Pyright static checking has been run and passed.
- [ ] Pre-commit hooks have been run and passed.

<!-- The unit tests can be invoked with `poetry run invoke tests` -->
<!-- Pyright can be started with `pyright --skipunannotated` -->
<!-- The unit tests can be invoked with `uv run invoke tests` -->
<!-- Pyright can be started with `pyright --threads --skipunannotated` -->

**Documentation**

Expand Down
72 changes: 34 additions & 38 deletions .github/workflows/continuous-integration-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,40 @@ jobs:
strategy:
matrix:
os: [macOS-latest]
python-version: [3.11]
python-version: [3.13]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- name: Environment Variables
run: |
echo "CI_PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
echo "CI_PACKAGE=colour_visuals" >> $GITHUB_ENV
echo "CI_SHA=${{ github.sha }}" >> $GITHUB_ENV
echo "MPLBACKEND=AGG" >> $GITHUB_ENV
echo "COLOUR_SCIENCE__DOCUMENTATION_BUILD=True" >> $GITHUB_ENV
shell: bash
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
brew install --cask mactex
echo "/Library/TeX/texbin" >> $GITHUB_PATH
export PATH=/Library/TeX/texbin:$PATH
sudo tlmgr update --self
sudo tlmgr install latexmk
- name: Install Poetry
env:
POETRY_VERSION: 1.4.0
run: |
curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python3 -
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
shell: bash
- name: Install Package Dependencies
run: |
poetry run python -m pip install --upgrade pip
poetry install
poetry run python -c "import imageio;imageio.plugins.freeimage.download()"
shell: bash
- name: Build Documentation
run: |
poetry run invoke docs --no-plots
shell: bash
- uses: actions/checkout@v4
- name: Environment Variables
run: |
echo "CI_PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
echo "CI_PACKAGE=colour_visuals" >> $GITHUB_ENV
echo "CI_SHA=${{ github.sha }}" >> $GITHUB_ENV
echo "MPLBACKEND=AGG" >> $GITHUB_ENV
echo "COLOUR_SCIENCE__DOCUMENTATION_BUILD=True" >> $GITHUB_ENV
shell: bash
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
brew install --cask mactex
echo "/Library/TeX/texbin" >> $GITHUB_PATH
export PATH=/Library/TeX/texbin:$PATH
sudo tlmgr update --self
sudo tlmgr install latexmk
- name: Install uv
run: |
pip install uv
shell: bash
- name: Install Package Dependencies
run: |
uv sync --all-extras --no-dev
uv run python -c "import imageio;imageio.plugins.freeimage.download()"
shell: bash
- name: Build Documentation
run: |
uv run invoke docs
shell: bash
100 changes: 51 additions & 49 deletions .github/workflows/continuous-integration-quality-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,55 +8,57 @@ jobs:
strategy:
matrix:
os: [macOS-latest, windows-latest]
python-version: [3.9, '3.10', 3.11]
python-version: ["3.10", 3.11, 3.12, 3.13]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Environment Variables
run: |
echo "CI_PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
echo "CI_PACKAGE=colour_visuals" >> $GITHUB_ENV
echo "CI_SHA=${{ github.sha }}" >> $GITHUB_ENV
echo "COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}" >> $GITHUB_ENV
shell: bash
- name: Set up Python 3.9 for Pre-Commit
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
env:
POETRY_VERSION: 1.4.0
run: |
curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python3 -
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
shell: bash
- name: Install Package Dependencies
run: |
poetry run python -m pip install --upgrade pip
poetry install
poetry run python -c "import imageio;imageio.plugins.freeimage.download()"
shell: bash
- name: Pre-Commit (All Files)
run: |
poetry run pre-commit run --all-files
shell: bash
# - name: Test Optimised Python Execution
# run: |
# poetry run python -OO -c "import $CI_PACKAGE"
# shell: bash
- name: Test with Pytest
run: |
poetry run python -W ignore -m pytest --doctest-modules --ignore=$CI_PACKAGE/examples --cov=$CI_PACKAGE $CI_PACKAGE
shell: bash
- name: Upload Coverage to coveralls.io
if: matrix.os == 'macOS-latest' && matrix.python-version == '3.11'
run: |
if [ -z "$COVERALLS_REPO_TOKEN" ]; then echo \"COVERALLS_REPO_TOKEN\" secret is undefined!; else poetry run coveralls; fi
shell: bash
- uses: actions/checkout@v4
with:
submodules: true
- name: Environment Variables
run: |
echo "CI_PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
echo "CI_PACKAGE=colour_visuals" >> $GITHUB_ENV
echo "CI_SHA=${{ github.sha }}" >> $GITHUB_ENV
echo "COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}" >> $GITHUB_ENV
shell: bash
- name: Set up Python 3.10 for Pre-Commit
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies (macOS)
if: matrix.os == 'macOS-latest'
run: |
brew install freeimage
# TODO: Drop when https://github.com/imageio/imageio/issues/628 is addressed
echo "IMAGEIO_FREEIMAGE_LIB=/opt/homebrew/Cellar/freeimage/3.18.0/lib/libfreeimage.3.18.0.dylib" >> $GITHUB_ENV
- name: Install uv
run: |
pip install uv
shell: bash
- name: Install Package Dependencies
run: |
uv sync --all-extras --no-dev
uv run python -c "import imageio;imageio.plugins.freeimage.download()"
shell: bash
- name: Pre-Commit (All Files)
run: |
uv run pre-commit run --all-files
shell: bash
- name: Test Optimised Python Execution
run: |
uv run python -OO -c "import $CI_PACKAGE"
shell: bash
- name: Test with Pytest
run: |
uv run python -W ignore -m pytest --doctest-modules --ignore=$CI_PACKAGE/examples --cov=$CI_PACKAGE $CI_PACKAGE
shell: bash
- name: Upload Coverage to coveralls.io
if: matrix.os == 'macOS-latest' && matrix.python-version == '3.12'
run: |
if [ -z "$COVERALLS_REPO_TOKEN" ]; then echo \"COVERALLS_REPO_TOKEN\" secret is undefined!; else uv run coveralls; fi
shell: bash
30 changes: 15 additions & 15 deletions .github/workflows/continuous-integration-static-type-checking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ jobs:
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- name: Environment Variables
run: |
echo "CI_PACKAGE=colour_visuals" >> $GITHUB_ENV
shell: bash
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install Package Dependencies
run: |
pip install -r requirements.txt
- name: Static Type Checking
run: |
pyright --skipunannotated
- uses: actions/checkout@v4
- name: Environment Variables
run: |
echo "CI_PACKAGE=colour_visuals" >> $GITHUB_ENV
shell: bash
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Package Dependencies
run: |
cat requirements.txt | grep -Eo '(^[^#]+)' | xargs -n 1 pip install || true
- name: Static Type Checking
run: |
pyright --threads --skipunannotated
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
.fleet
.idea
.ipynb_checkpoints
.python-version
.sandbox
.vs
.vscode
Expand All @@ -17,4 +18,4 @@ colour_visuals.egg-info
dist
docs/_build
docs/generated
poetry.lock
uv.lock
6 changes: 0 additions & 6 deletions .gitmodules

This file was deleted.

61 changes: 44 additions & 17 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,50 @@
repos:
- repo: https://github.com/ikamensh/flynt/
rev: '1.0.1'
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v5.0.0"
hooks:
- id: flynt
- repo: https://github.com/PyCQA/isort
rev: '5.12.0'
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: name-tests-test
args: ["--pytest-test-first"]
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: isort
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.285'
- id: codespell
exclude: "BIBLIOGRAPHY.bib|CONTRIBUTORS.rst"
- repo: https://github.com/ikamensh/flynt
rev: "1.0.1"
hooks:
- id: ruff
- repo: https://github.com/psf/black
rev: 23.7.0
- id: flynt
args: [--verbose]
- repo: https://github.com/PyCQA/isort
rev: "5.13.2"
hooks:
- id: black
language_version: python3.9
- repo: https://github.com/keewis/blackdoc
rev: v0.3.8
- id: isort
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.8.2"
hooks:
- id: blackdoc
language_version: python3.9
- id: ruff-format
- id: ruff
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.19.1
hooks:
- id: blacken-docs
language_version: python3.10
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v4.0.0-alpha.8"
hooks:
- id: prettier
- repo: https://github.com/pre-commit/pygrep-hooks
rev: "v1.10.0"
hooks:
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ build:
python: "3.11"

sphinx:
configuration: docs/conf.py
configuration: docs/conf.py

formats:
- htmlzip
- pdf

python:
install:
- requirements: docs/requirements.txt
- requirements: docs/requirements.txt
Loading
Loading