Skip to content

Commit

Permalink
Merge branch 'release/v0.4.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
KelSolaar committed Nov 29, 2022
2 parents c3735e5 + 893105f commit 38c7195
Show file tree
Hide file tree
Showing 506 changed files with 31,047 additions and 17,882 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/continuous-integration-documentation.yml
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04]
python-version: [3.8]
python-version: [3.11]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -31,8 +31,7 @@ jobs:
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
curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python3 -
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
shell: bash
- name: Install Package Dependencies
Expand Down
49 changes: 25 additions & 24 deletions .github/workflows/continuous-integration-quality-unit-tests.yml
Expand Up @@ -3,12 +3,15 @@ name: Continuous Integration - Quality & Unit Tests
on: [push, pull_request]

jobs:
continuous-integration-package:
continuous-integration-quality-unit-tests:
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}
strategy:
matrix:
os: [macOS-latest, ubuntu-20.04, windows-latest]
python-version: [3.8, 3.9, '3.10']
os: [macOS-latest, ubuntu-22.04, windows-latest]
python-version: [3.9, '3.10', 3.11]
exclude:
- os: windows-latest
python-version: 3.8
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -18,54 +21,52 @@ 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.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 "CI_OPENIMAGEIO_VERSION=2.4.5.0" >> $GITHUB_ENV
echo "CI_OPENIMAGEIO_ARTIFACT=https://github.com/colour-science/artifacts/releases/download/OpenImageIO-Release-2.4.5.0/OpenImageIO-Release-2.4.5.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 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 (macOS)
if: matrix.os == 'macOS-latest'
run: |
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'
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
run: |
curl -L https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -o get-poetry.py
python get-poetry.py --version 1.1.12
curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python3 -
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
shell: bash
- name: Install Package Dependencies (macOS & Ubuntu)
if: matrix.os == 'macOS-latest' || matrix.os == 'ubuntu-20.04'
- name: Install Package Dependencies (Ubuntu)
if: matrix.os == 'ubuntu-22.04'
run: |
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 (Windows)
if: matrix.os == 'windows-latest'
- 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 run python -c "import imageio;imageio.plugins.freeimage.download()"
shell: bash
- name: Install OpenImageIO (Ubuntu)
if: matrix.os == 'ubuntu-20.04' && matrix.python-version == '3.8'
if: matrix.os == 'ubuntu-22.04' && matrix.python-version == '3.10'
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 cp OpenImageIO-Release-$CI_OPENIMAGEIO_VERSION/bin/* /usr/bin/
sudo cp -r OpenImageIO-Release-$CI_OPENIMAGEIO_VERSION/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/OpenImageIO.so
cp -r OpenImageIO-Release-$CI_OPENIMAGEIO_VERSION/lib/python$CI_PYTHON_VERSION/site-packages/OpenImageIO $(poetry env info -p)/lib/python$CI_PYTHON_VERSION/site-packages/
shell: bash
- name: Pre-Commit (All Files)
run: |
Expand All @@ -77,10 +78,10 @@ jobs:
shell: bash
- name: Test with Pytest
run: |
poetry run python -W ignore -m py.test --disable-warnings --doctest-modules --ignore=$CI_PACKAGE/examples --cov=$CI_PACKAGE $CI_PACKAGE
poetry run python -W ignore -m pytest --disable-warnings --doctest-modules --ignore=$CI_PACKAGE/examples --cov=$CI_PACKAGE $CI_PACKAGE
shell: bash
- name: Upload Coverage to coveralls.io
if: matrix.os == 'ubuntu-20.04' && matrix.python-version == '3.8'
if: matrix.os == 'ubuntu-22.04' && matrix.python-version == '3.10'
run: |
if [ -z "$COVERALLS_REPO_TOKEN" ]; then echo \"COVERALLS_REPO_TOKEN\" secret is undefined!; else poetry run coveralls; fi
shell: bash
17 changes: 10 additions & 7 deletions .github/workflows/continuous-integration-static-type-checking.yml
Expand Up @@ -3,12 +3,12 @@ name: Continuous Integration - Static Type Checking
on: [push, pull_request]

jobs:
continuous-integration-package:
continuous-integration-static-type-checking:
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}
strategy:
matrix:
os: [macOS-latest]
python-version: [3.9]
python-version: [3.11]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -22,11 +22,14 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies (macOS)
if: matrix.os == 'macOS-latest'
run: |
brew install gnu-sed graphviz
ln -s /usr/local/bin/gsed /usr/local/bin/sed
shell: bash
- name: Static Type Checking
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
mypy --install-types --non-interactive --show-error-codes --warn-unused-ignores --warn-redundant-casts -p $CI_PACKAGE
- name: Static Type Checking
run: |
mypy --install-types --non-interactive --show-error-codes --warn-unused-ignores --warn-redundant-casts $CI_PACKAGE
7 changes: 7 additions & 0 deletions .gitignore
Expand Up @@ -4,9 +4,16 @@
.DS_Store
.coverage
.dmypy.json
.fleet
.idea
.ipynb_checkpoints
.mypy_cache
.vs
.vscode
.sandbox

__pycache__

build
dist
docs/_build
Expand Down
18 changes: 12 additions & 6 deletions .pre-commit-config.yaml
@@ -1,20 +1,26 @@
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v2.31.0
rev: v3.2.2
hooks:
- id: pyupgrade
args: [--py38-plus]
args: [--py39-plus]
exclude: ^(colour/hints/__init__.py)
- repo: https://github.com/ikamensh/flynt/
rev: '0.76'
rev: '0.77'
hooks:
- id: flynt
- repo: https://github.com/psf/black
rev: 22.1.0
rev: 22.10.0
hooks:
- id: black
language_version: python3.8
language_version: python3.9
- repo: https://github.com/keewis/blackdoc
rev: v0.3.8
hooks:
- id: blackdoc
language_version: python3.9
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
rev: 6.0.0
hooks:
- id: flake8
- repo: https://github.com/pycqa/pydocstyle
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Expand Up @@ -3,7 +3,7 @@ version: 2
build:
os: ubuntu-20.04
tools:
python: "3.8"
python: "3.11"
apt_packages:
- graphviz
- graphviz-dev
Expand Down

0 comments on commit 38c7195

Please sign in to comment.