Skip to content

Commit

Permalink
Merge branch 'release/v0.4.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
KelSolaar committed Dec 17, 2023
2 parents 41f611f + 5ba92c3 commit 649a3fd
Show file tree
Hide file tree
Showing 461 changed files with 16,858 additions and 12,626 deletions.
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
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ is available to guide the process: https://www.colour-science.org/contributing/.
- [ ] Unit tests have been implemented and passed.
- [ ] Pyright static checking has been run and passed.
- [ ] Pre-commit hooks have been run and passed.
- [ ] New transformations have been added to the *Automatic Colour Conversion Graph*.
- [ ] New transformations have been added to the _Automatic Colour Conversion Graph_.
- [ ] New transformations have been exported to the relevant namespaces, e.g. `colour`, `colour.models`.

<!-- The unit tests can be invoked with `poetry run invoke tests` -->
Expand Down
84 changes: 42 additions & 42 deletions .github/workflows/continuous-integration-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,45 +12,45 @@ jobs:
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" >> $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: |
sudo apt-get update
sudo apt-get --yes install graphviz graphviz-dev latexmk texlive-full
- 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
shell: bash
- uses: actions/upload-artifact@v2
with:
name: ${{ env.CI_PACKAGE }}-plots
path: |
docs/_static/Basics_*.png
docs/_static/Examples_*.png
docs/_static/Plotting_*.png
docs/_static/Tutorial_*.png
- uses: actions/checkout@v1
- name: Environment Variables
run: |
echo "CI_PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
echo "CI_PACKAGE=colour" >> $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@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get --yes install graphviz graphviz-dev latexmk texlive-full
- 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
shell: bash
- uses: actions/upload-artifact@v2
with:
name: ${{ env.CI_PACKAGE }}-plots
path: |
docs/_static/Basics_*.png
docs/_static/Examples_*.png
docs/_static/Plotting_*.png
docs/_static/Tutorial_*.png
136 changes: 68 additions & 68 deletions .github/workflows/continuous-integration-quality-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,74 +8,74 @@ jobs:
strategy:
matrix:
os: [macOS-latest, ubuntu-22.04, windows-latest]
python-version: [3.9, '3.10', 3.11]
python-version: [3.9, "3.10", 3.11, 3.12]
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" >> $GITHUB_ENV
echo "CI_SHA=${{ github.sha }}" >> $GITHUB_ENV
echo "COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}" >> $GITHUB_ENV
echo "MPLBACKEND=AGG" >> $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 Dependencies (Ubuntu)
if: matrix.os == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get --yes install graphviz graphviz-dev libboost-all-dev libilmbase-dev libopenexr-dev libpng-dev libtiff5-dev
- 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 (Ubuntu)
if: matrix.os == 'ubuntu-22.04'
run: |
poetry run python -m pip install --upgrade pip
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 --without graphviz
poetry run python -c "import imageio;imageio.plugins.freeimage.download()"
shell: bash
- name: Install OpenImageIO (macOs)
if: matrix.os == 'macOS-latest' && matrix.python-version == '3.11'
run: |
brew install openimageio
ls /usr/local/Cellar/openimageio/*/lib/python*/site-packages/OpenImageIO/
ln -s /usr/local/Cellar/openimageio/*/lib/python*/site-packages/OpenImageIO/OpenImageIO*.so /Library/Frameworks/Python.framework/Versions/${{ matrix.python-version }}/lib/python${{ matrix.python-version }}/site-packages/OpenImageIO.so
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@v1
- name: Environment Variables
run: |
echo "CI_PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
echo "CI_PACKAGE=colour" >> $GITHUB_ENV
echo "CI_SHA=${{ github.sha }}" >> $GITHUB_ENV
echo "COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}" >> $GITHUB_ENV
echo "MPLBACKEND=AGG" >> $GITHUB_ENV
shell: bash
- name: Set up Python 3.9 for Pre-Commit
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies (Ubuntu)
if: matrix.os == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get --yes install graphviz graphviz-dev libboost-all-dev libilmbase-dev libopenexr-dev libpng-dev libtiff5-dev
- 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 (Ubuntu)
if: matrix.os == 'ubuntu-22.04'
run: |
poetry run python -m pip install --upgrade pip
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 --without graphviz
poetry run python -c "import imageio;imageio.plugins.freeimage.download()"
shell: bash
- name: Install OpenImageIO (macOs)
if: matrix.os == 'macOS-latest' && matrix.python-version == '3.11'
run: |
brew install openimageio
ls /usr/local/Cellar/openimageio/*/lib/python*/site-packages/OpenImageIO/
ln -s /usr/local/Cellar/openimageio/*/lib/python*/site-packages/OpenImageIO/OpenImageIO*.so /Library/Frameworks/Python.framework/Versions/${{ matrix.python-version }}/lib/python${{ matrix.python-version }}/site-packages/OpenImageIO.so
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
42 changes: 21 additions & 21 deletions .github/workflows/continuous-integration-static-type-checking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@ jobs:
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- name: Environment Variables
run: |
echo "CI_PACKAGE=colour" >> $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 (macOS)
if: matrix.os == 'macOS-latest'
run: |
brew install graphviz
export GRAPHVIZ_DIR="/usr/local/Cellar/graphviz/<VERSION>"
pip install pygraphviz --global-option=build_ext --global-option="-I$GRAPHVIZ_DIR/include" --global-option="-L$GRAPHVIZ_DIR/lib"
- name: Install Package Dependencies
run: |
pip install -r requirements.txt
- name: Static Type Checking
run: |
pyright --skipunannotated
- uses: actions/checkout@v1
- name: Environment Variables
run: |
echo "CI_PACKAGE=colour" >> $GITHUB_ENV
shell: bash
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies (macOS)
if: matrix.os == 'macOS-latest'
run: |
brew install graphviz
export GRAPHVIZ_DIR="/usr/local/Cellar/graphviz/<VERSION>"
pip install pygraphviz --global-option=build_ext --global-option="-I$GRAPHVIZ_DIR/include" --global-option="-L$GRAPHVIZ_DIR/lib"
- name: Install Package Dependencies
run: |
pip install -r requirements.txt
- name: Static Type Checking
run: |
pyright --skipunannotated
66 changes: 52 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,57 @@
repos:
- repo: https://github.com/ikamensh/flynt/
rev: '1.0.1'
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.5.0"
hooks:
- id: flynt
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.285'
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
exclude: config-aces-reference.ocio.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.2.6
hooks:
- id: ruff
- repo: https://github.com/psf/black
rev: 23.7.0
- id: codespell
args: ["--ignore-words-list=co-ordinates,exitance,fro,hart,ist"]
exclude: "BIBLIOGRAPHY.bib|CONTRIBUTORS.rst"
- repo: https://github.com/ikamensh/flynt
rev: "1.0.1"
hooks:
- id: black
language_version: python3.9
- repo: https://github.com/keewis/blackdoc
rev: v0.3.8
- id: flynt
args: [--verbose]
- repo: https://github.com/PyCQA/isort
rev: "5.12.0"
hooks:
- id: blackdoc
language_version: python3.9
- id: isort
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.1.6"
hooks:
- id: ruff
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.11.0
hooks:
- id: black
language_version: python3.9
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.16.0
hooks:
- id: blacken-docs
language_version: python3.9
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.1.0"
hooks:
- id: prettier
exclude: config-aces-reference.ocio.yaml
- 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
Loading

0 comments on commit 649a3fd

Please sign in to comment.