Skip to content

Commit

Permalink
Merge branch 'release/v0.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
KelSolaar committed Feb 20, 2022
2 parents 4494cb4 + 22dd196 commit 07d10da
Show file tree
Hide file tree
Showing 720 changed files with 119,605 additions and 79,799 deletions.
3 changes: 3 additions & 0 deletions .flake8
@@ -0,0 +1,3 @@
[flake8]
max-line-length = 88
extend-ignore = E203
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
@@ -0,0 +1,43 @@
name: Bug Report
description: Report an issue or a bug.
title: "[BUG]: << Please use a comprehensive title... >>"
labels: [ Defect ]

body:
- type: markdown
attributes:
value: >
Thank you for taking the time to file a bug report. Before continuing, please take some time to check the existing [issues](https://github.com/colour-science/colour/issues) and also the [draft release notes](https://gist.github.com/KelSolaar/4a6ebe9ec3d389f0934b154fec8df51d).
The issue could already be fixed in the [develop](https://github.com/colour-science/colour) branch. If you have an installation problem, the [installation guide](https://www.colour-science.org/installation-guide/) describes the recommended process.
- type: textarea
attributes:
label: "Description"
description: >
Please describe the issue in a few short sentences.
validations:
required: true

- type: textarea
attributes:
label: "Code for Reproduction"
description: >
If possible, please provide a minimum self-contained example reproducing the issue.
placeholder: |
<< Your code here... >>
render: python

- type: textarea
attributes:
label: "Exception Message"
description: >
If any, please paste the *full* exception message.
placeholder: |
<< Full traceback starting from `Traceback (most recent call last):`... >>
render: shell

- type: textarea
attributes:
label: "Environment Information"
description: If possible, please paste the output from `import colour; colour.utilities.describe_environment()`.
render: shell
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation-improvement.yml
@@ -0,0 +1,40 @@
name: Documentation Improvement
description: Report a documentation improvement.
title: "[DOCUMENTATION]: << Please use a comprehensive title... >>"
labels: [ Documentation ]

body:
- type: markdown
attributes:
value: >
Thank you for taking the time to file a documentation improvement report. Before continuing, please take some time to check the existing [issues](https://github.com/colour-science/colour/issues).
- type: input
attributes:
label: Documentation Link
description: >
Please link to any documentation or examples that you are referencing. Suggested improvements should be based on the [development version of the documentation](https://colour.readthedocs.io/en/develop/).
placeholder: >
<< https://colour.readthedocs.io/en/develop/... >>
validations:
required: true

- type: textarea
attributes:
label: Description
description: >
Please describe what is missing, unclear or incorrect.
validations:
required: true

- type: textarea
attributes:
label: Suggested Improvement
description: >
Please describe how the documentation could be improved.
- type: textarea
attributes:
label: "Environment Information"
description: If possible, please paste the output from `import colour; colour.utilities.describe_environment()`.
render: shell
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
@@ -0,0 +1,18 @@
name: Feature Request
description: Suggest a new feature to implement.
title: "[FEATURE]: << Please use a comprehensive title... >>"
labels: [ Feature ]

body:
- type: markdown
attributes:
value: >
Thank you for taking the time to file a feature request. Before continuing, please take some time to check the existing [issues](https://github.com/colour-science/colour/issues) and also the [draft release notes](https://gist.github.com/KelSolaar/4a6ebe9ec3d389f0934b154fec8df51d).
- type: textarea
attributes:
label: "Description"
description: >
Please describe the new feature in a few short sentences.
validations:
required: true
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/question.yml
@@ -0,0 +1,17 @@
name: Question
description: Ask a question.
title: "[DISCUSSION]: << Please use a comprehensive title... >>"
labels: [ Discussion ]

body:
- type: markdown
attributes:
value: Thank you for taking the time to ask a question or discuss. Before continuing, we would be glad if you were to start this discussion in the dedicated [discussions](https://github.com/colour-science/colour/discussions) area.

- type: textarea
attributes:
label: "Question"
description: >
If you are still here, please consider using the dedicated [discussions](https://github.com/colour-science/colour/discussions) area.
placeholder: >
<< The discussions area is this way: https://github.com/colour-science/colour/discussions... >>
33 changes: 33 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,33 @@
<!--
Thank you for taking the time to create this pull request. If it is the first
time you are contributing to a colour-science repository, a contributing guide
is available to guide the process: https://www.colour-science.org/contributing/.
-->

# Summary

<!-- Please write a summary describing the changes that this PR implements. -->

# Preflight

<!-- Please mark any checkboxes that do not apply to this pull request as [N/A]. -->

**Code Style and Quality**

- [ ] Unit tests have been implemented and passed.
- [ ] Mypy 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 exported to the relevant namespaces, e.g. `colour`, `colour.models`.

<!-- The unit tests can be invoked with `poetry run invoke tests` -->
<!-- Mypy can be started with `dmypy run -- --show-error-codes --warn-unused-ignores --warn-redundant-casts --install-types --non-interactive -p colour` -->

**Documentation**

- [ ] New features are documented along with examples if relevant.
- [ ] The documentation is [Sphinx](https://www.sphinx-doc.org/en/master/) and [numpydoc](https://numpydoc.readthedocs.io/en/latest/format.html) compliant.

<!--
Thank you again!
-->
55 changes: 55 additions & 0 deletions .github/workflows/continuous-integration-documentation.yml
@@ -0,0 +1,55 @@
name: Continuous Integration - Documentation

on: [push, pull_request]

jobs:
continuous-integration-documentation:
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}
strategy:
matrix:
os: [ubuntu-20.04]
python-version: [3.8]
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
run: |
curl -L https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -o get-poetry.py
python get-poetry.py
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
shell: bash
- name: Install Package Dependencies
run: |
poetry run python -m pip install --upgrade pip
poetry install --extras "read-the-docs"
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
@@ -1,14 +1,14 @@
name: Continuous Integration
name: Continuous Integration - Quality & Unit Tests

on: [push, pull_request]

jobs:
continuous-integration:
continuous-integration-package:
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}
strategy:
matrix:
os: [macOS-latest, ubuntu-18.04, windows-latest]
python-version: [2.7, 3.6, 3.7, 3.8]
os: [macOS-latest, ubuntu-20.04, windows-latest]
python-version: [3.8, 3.9, '3.10']
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -18,72 +18,69 @@ jobs:
echo "CI_PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
echo "CI_PACKAGE=colour" >> $GITHUB_ENV
echo "CI_SHA=${{ github.sha }}" >> $GITHUB_ENV
echo "CI_OPENIMAGEIO_VERSION=2.1.10.1" >> $GITHUB_ENV
echo "CI_OPENIMAGEIO_ARTIFACT=https://github.com/colour-science/artifacts/releases/download/OpenImageIO-Release-2.1.10.1/OpenImageIO-Release-2.1.10.1.zip" >> $GITHUB_ENV
echo "CI_OPENIMAGEIO_VERSION=2.2.18.0" >> $GITHUB_ENV
echo "CI_OPENIMAGEIO_ARTIFACT=https://github.com/colour-science/artifacts/releases/download/OpenImageIO-Release-2.2.18.0/OpenImageIO-Release-2.2.18.0.zip" >> $GITHUB_ENV
echo "COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}" >> $GITHUB_ENV
echo "MPLBACKEND=AGG" >> $GITHUB_ENV
shell: bash
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Update OS & Install APT Dependencies (Ubuntu)
if: matrix.os == 'ubuntu-18.04'
run: |
sudo apt-get --yes install libboost-all-dev libilmbase-dev libopenexr-dev libpng-dev libtiff5-dev
- name: Update OS & Install APT Dependencies (macOs)
- name: Install Dependencies (macOS)
if: matrix.os == 'macOS-latest'
run: |
brew install gnu-sed
brew install gnu-sed graphviz
ln -s /usr/local/bin/gsed /usr/local/bin/sed
shell: bash
- name: Install Dependencies (Ubuntu)
if: matrix.os == 'ubuntu-20.04'
run: |
sudo apt-get --yes install graphviz graphviz-dev libboost-all-dev libilmbase-dev libopenexr-dev libpng-dev libtiff5-dev
- name: Install Poetry
run: |
curl -L https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -o get-poetry.py
python get-poetry.py --version 1.0.10
python get-poetry.py --version 1.1.12
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
shell: bash
- name: Update pyproject.toml file (Python 2.7)
if: matrix.python-version == '2.7'
- name: Install Package Dependencies (macOS & Ubuntu)
if: matrix.os == 'macOS-latest' || matrix.os == 'ubuntu-20.04'
run: |
sed -i.bak 's/python = "~2.7 || ^3.6"/python = "~2.7"/g' pyproject.toml
sed -i.bak '/scipy = "\^1\.1\.0"/ a qtconsole = "4.7.7"' pyproject.toml
shell: bash
- name: Update pyproject.toml file (Windows, Python 2.7)
if: matrix.os == 'windows-latest' && matrix.python-version == '2.7'
run: |
sed -i.bak '/scipy = "\^1\.1\.0"/ a pywin32 = "228"' pyproject.toml
shell: bash
- name: Update pyproject.toml file (Python 3.x)
if: matrix.python-version != '2.7'
run: |
sed -i.bak 's/python = "~2.7 || ^3.6"/python = "^3.6"/g' pyproject.toml
poetry run python -m pip install --upgrade pip
poetry install --extras "graphviz meshing optional plotting"
poetry run python -c "import imageio;imageio.plugins.freeimage.download()"
shell: bash
- name: Install Package Dependencies
- name: Install Package Dependencies (Windows)
if: matrix.os == 'windows-latest'
run: |
poetry install --extras "optional plotting"
poetry run python -m pip install --upgrade pip
poetry install --extras "meshing optional plotting"
poetry run python -c "import imageio;imageio.plugins.freeimage.download()"
shell: bash
- name: Install OpenImageIO (Ubuntu)
if: matrix.os == 'ubuntu-18.04' && matrix.python-version == '3.6'
if: matrix.os == 'ubuntu-20.04' && matrix.python-version == '3.8'
run: |
curl -L $CI_OPENIMAGEIO_ARTIFACT -o OpenImageIO-Release-$CI_OPENIMAGEIO_VERSION.zip
unzip OpenImageIO-Release-$CI_OPENIMAGEIO_VERSION.zip -d OpenImageIO-Release-$CI_OPENIMAGEIO_VERSION
sudo cp OpenImageIO-Release-$CI_OPENIMAGEIO_VERSION/linux64/bin/* /usr/bin/
sudo cp -r OpenImageIO-Release-$CI_OPENIMAGEIO_VERSION/linux64/lib/* /usr/lib/
sudo rm -rf /usr/lib/python$CI_PYTHON_VERSION
cp OpenImageIO-Release-$CI_OPENIMAGEIO_VERSION/linux64/lib/python$CI_PYTHON_VERSION/site-packages/OpenImageIO.so $(poetry env info -p)/lib/python$CI_PYTHON_VERSION/site-packages/
cp OpenImageIO-Release-$CI_OPENIMAGEIO_VERSION/linux64/lib/python$CI_PYTHON_VERSION/site-packages/OpenImageIO.*.so $(poetry env info -p)/lib/python$CI_PYTHON_VERSION/site-packages/OpenImageIO.so
shell: bash
- name: Pre-Commit (All Files)
run: |
poetry run pre-commit run --all-files
shell: bash
- name: Lint with flake8
- name: Test Optimised Python Execution
run: |
poetry run flake8 $CI_PACKAGE --count --show-source --statistics
poetry run python -OO -c "import $CI_PACKAGE"
shell: bash
- name: Test with nosetests
- name: Test with Pytest
run: |
poetry run python -W ignore -m nose -q -v --with-doctest --doctest-options=+ELLIPSIS --with-coverage --cover-package=$CI_PACKAGE $CI_PACKAGE
poetry run python -W ignore -m py.test --disable-warnings --doctest-modules --ignore=$CI_PACKAGE/examples --cov=$CI_PACKAGE $CI_PACKAGE
shell: bash
- name: Upload Coverage to coveralls.io
if: matrix.python-version == '3.6' || matrix.python-version == '3.7' || matrix.python-version == '3.8'
if: matrix.os == 'ubuntu-20.04' && matrix.python-version == '3.8'
run: |
if [ -z "$COVERALLS_REPO_TOKEN" ]; then echo \"COVERALLS_REPO_TOKEN\" secret is undefined!; else poetry run coveralls; fi
shell: bash
32 changes: 32 additions & 0 deletions .github/workflows/continuous-integration-static-type-checking.yml
@@ -0,0 +1,32 @@
name: Continuous Integration - Static Type Checking

on: [push, pull_request]

jobs:
continuous-integration-package:
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}
strategy:
matrix:
os: [macOS-latest]
python-version: [3.9]
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)
run: |
brew install gnu-sed graphviz
ln -s /usr/local/bin/gsed /usr/local/bin/sed
shell: bash
- name: Static Type Checking
run: |
pip install -r requirements.txt
mypy --install-types --non-interactive --show-error-codes --warn-unused-ignores --warn-redundant-casts -p $CI_PACKAGE
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -3,7 +3,9 @@
*.pyo
.DS_Store
.coverage
.dmypy.json
.idea
.mypy_cache
__pycache__
build
dist
Expand Down

0 comments on commit 07d10da

Please sign in to comment.