Skip to content

Commit 1a1b057

Browse files
KelSolaargrische
andauthored
PR: Modernise Development Process (#126)
* Modernise development process. Signed-off-by: Thomas Mansencal <[email protected]> * Use shallow git clone in Dockerfile Signed-off-by: Christian Schmidbauer <[email protected]> --------- Signed-off-by: Thomas Mansencal <[email protected]> Signed-off-by: Christian Schmidbauer <[email protected]> Co-authored-by: Christian Schmidbauer <[email protected]>
1 parent beb43f3 commit 1a1b057

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+718
-930
lines changed

.github/workflows/configuration-artifacts.yml

Lines changed: 81 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -8,87 +8,87 @@ jobs:
88
strategy:
99
matrix:
1010
os: [ubuntu-20.04]
11-
python-version: [3.9]
11+
python-version: [3.11]
1212
fail-fast: false
1313
runs-on: ${{ matrix.os }}
1414
steps:
15-
- uses: actions/checkout@v1
16-
with:
17-
submodules: recursive
18-
- name: Environment Variables
19-
run: |
20-
echo "CI_PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
21-
echo "CI_PACKAGE=opencolorio_config_aces" >> $GITHUB_ENV
22-
echo "CI_SHA=${{ github.sha }}" >> $GITHUB_ENV
23-
shell: bash
24-
- name: Set up Python ${{ matrix.python-version }}
25-
uses: actions/setup-python@v1
26-
with:
27-
python-version: ${{ matrix.python-version }}
28-
- name: Install Dependencies
29-
run: |
30-
sudo apt-get --yes install graphviz graphviz-dev
31-
- name: Install Poetry
32-
run: |
33-
curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python3 -
34-
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
35-
shell: bash
36-
- name: Install Package Dependencies
37-
run: |
38-
poetry run python -m pip install --upgrade pip
39-
poetry install --with graphviz,optional
40-
shell: bash
41-
- name: ACES - Conversion Graph
42-
run: |
43-
poetry run invoke build-aces-conversion-graph
44-
shell: bash
45-
- uses: actions/upload-artifact@v2
46-
with:
47-
name: aces-conversion-graph
48-
path: |
49-
build/aces/graph/
50-
- name: Generation - Config - Common Tests
51-
run: |
52-
poetry run invoke build-config-common-tests
53-
shell: bash
54-
- uses: actions/upload-artifact@v2
55-
with:
56-
name: config-common-tests
57-
path: |
58-
build/config/common/tests/
59-
- name: Generation - Config - ACES Reference (Analytical)
60-
run: |
61-
poetry run invoke build-config-reference-analytical
62-
shell: bash
63-
- uses: actions/upload-artifact@v2
64-
with:
65-
name: config-reference-analytical
66-
path: |
67-
build/config/aces/analytical/
68-
- name: Generation - Config - ACES Reference
69-
run: |
70-
poetry run invoke build-config-reference
71-
shell: bash
72-
- uses: actions/upload-artifact@v2
73-
with:
74-
name: config-reference
75-
path: |
76-
build/config/aces/reference/
77-
- name: Generation - Config - ACES CG
78-
run: |
79-
poetry run invoke build-config-cg
80-
shell: bash
81-
- uses: actions/upload-artifact@v2
82-
with:
83-
name: config-cg
84-
path: |
85-
build/config/aces/cg/
86-
- name: Generation - Config - ACES Studio
87-
run: |
88-
poetry run invoke build-config-studio
89-
shell: bash
90-
- uses: actions/upload-artifact@v2
91-
with:
92-
name: config-studio
93-
path: |
94-
build/config/aces/studio/
15+
- uses: actions/checkout@v4
16+
with:
17+
submodules: recursive
18+
- name: Environment Variables
19+
run: |
20+
echo "CI_PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
21+
echo "CI_PACKAGE=opencolorio_config_aces" >> $GITHUB_ENV
22+
echo "CI_SHA=${{ github.sha }}" >> $GITHUB_ENV
23+
shell: bash
24+
- name: Set up Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@v4
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
- name: Install Dependencies
29+
run: |
30+
sudo apt-get --yes install graphviz graphviz-dev
31+
- name: Install Poetry
32+
run: |
33+
curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python3 -
34+
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
35+
shell: bash
36+
- name: Install Package Dependencies
37+
run: |
38+
poetry run python -m pip install --upgrade pip
39+
poetry install
40+
shell: bash
41+
- name: ACES - Conversion Graph
42+
run: |
43+
poetry run invoke build-aces-conversion-graph
44+
shell: bash
45+
- uses: actions/upload-artifact@v4
46+
with:
47+
name: aces-conversion-graph
48+
path: |
49+
build/aces/graph/
50+
- name: Generation - Config - Common Tests
51+
run: |
52+
poetry run invoke build-config-common-tests
53+
shell: bash
54+
- uses: actions/upload-artifact@v4
55+
with:
56+
name: config-common-tests
57+
path: |
58+
build/config/common/tests/
59+
- name: Generation - Config - ACES Reference (Analytical)
60+
run: |
61+
poetry run invoke build-config-reference-analytical
62+
shell: bash
63+
- uses: actions/upload-artifact@v4
64+
with:
65+
name: config-reference-analytical
66+
path: |
67+
build/config/aces/analytical/
68+
- name: Generation - Config - ACES Reference
69+
run: |
70+
poetry run invoke build-config-reference
71+
shell: bash
72+
- uses: actions/upload-artifact@v4
73+
with:
74+
name: config-reference
75+
path: |
76+
build/config/aces/reference/
77+
- name: Generation - Config - ACES CG
78+
run: |
79+
poetry run invoke build-config-cg
80+
shell: bash
81+
- uses: actions/upload-artifact@v4
82+
with:
83+
name: config-cg
84+
path: |
85+
build/config/aces/cg/
86+
- name: Generation - Config - ACES Studio
87+
run: |
88+
poetry run invoke build-config-studio
89+
shell: bash
90+
- uses: actions/upload-artifact@v4
91+
with:
92+
name: config-studio
93+
path: |
94+
build/config/aces/studio/

.github/workflows/continuous-integration-quality-unit-tests.yml

Lines changed: 42 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -7,53 +7,48 @@ jobs:
77
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}
88
strategy:
99
matrix:
10-
os: [macOS-latest, ubuntu-20.04, windows-latest]
11-
python-version: [3.9, '3.10']
10+
os: [macOS-13, ubuntu-20.04, windows-latest]
11+
python-version: [3.11]
1212
fail-fast: false
1313
runs-on: ${{ matrix.os }}
1414
steps:
15-
- uses: actions/checkout@v1
16-
with:
17-
submodules: recursive
18-
- name: Environment Variables
19-
run: |
20-
echo "CI_PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
21-
echo "CI_PACKAGE=opencolorio_config_aces" >> $GITHUB_ENV
22-
echo "CI_SHA=${{ github.sha }}" >> $GITHUB_ENV
23-
echo "COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}" >> $GITHUB_ENV
24-
shell: bash
25-
- name: Set up Python 3.9 for Pre-Commit
26-
uses: actions/setup-python@v1
27-
with:
28-
python-version: 3.9
29-
- name: Set up Python ${{ matrix.python-version }}
30-
uses: actions/setup-python@v1
31-
with:
32-
python-version: ${{ matrix.python-version }}
33-
- name: Install Poetry
34-
run: |
35-
curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python3 -
36-
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
37-
shell: bash
38-
- name: Install Package Dependencies
39-
run: |
40-
poetry run python -m pip install --upgrade pip
41-
poetry install --without graphviz
42-
shell: bash
43-
- name: Pre-Commit (All Files)
44-
run: |
45-
poetry run pre-commit run --all-files
46-
shell: bash
47-
- name: Test Optimised Python Execution
48-
run: |
49-
poetry run python -OO -c "import $CI_PACKAGE"
50-
shell: bash
51-
- name: Test with Pytest
52-
run: |
53-
poetry run python -W ignore -m pytest --disable-warnings --doctest-modules --ignore=$CI_PACKAGE/config/reference/aces-dev --cov=$CI_PACKAGE $CI_PACKAGE
54-
shell: bash
55-
# - name: Upload Coverage to coveralls.io
56-
# run: |
57-
# if [ -z "$COVERALLS_REPO_TOKEN" ]; then echo \"COVERALLS_REPO_TOKEN\" secret is undefined!; else poetry run coveralls; fi
58-
# shell: bash
59-
15+
- uses: actions/checkout@v4
16+
with:
17+
submodules: recursive
18+
- name: Environment Variables
19+
run: |
20+
echo "CI_PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
21+
echo "CI_PACKAGE=opencolorio_config_aces" >> $GITHUB_ENV
22+
echo "CI_SHA=${{ github.sha }}" >> $GITHUB_ENV
23+
echo "COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}" >> $GITHUB_ENV
24+
shell: bash
25+
- name: Set up Python 3.9 for Pre-Commit
26+
uses: actions/setup-python@v4
27+
with:
28+
python-version: 3.9
29+
- name: Set up Python ${{ matrix.python-version }}
30+
uses: actions/setup-python@v4
31+
with:
32+
python-version: ${{ matrix.python-version }}
33+
- name: Install Poetry
34+
run: |
35+
curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python3 -
36+
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
37+
shell: bash
38+
- name: Install Package Dependencies
39+
run: |
40+
poetry run python -m pip install --upgrade pip
41+
poetry install --without graphviz
42+
shell: bash
43+
- name: Pre-Commit (All Files)
44+
run: |
45+
poetry run pre-commit run --all-files
46+
shell: bash
47+
- name: Test Optimised Python Execution
48+
run: |
49+
poetry run python -OO -c "import $CI_PACKAGE"
50+
shell: bash
51+
- name: Test with Pytest
52+
run: |
53+
poetry run python -W ignore -m pytest --disable-warnings --doctest-modules --ignore=$CI_PACKAGE/config/reference/aces-dev --cov=$CI_PACKAGE $CI_PACKAGE
54+
shell: bash

.github/workflows/continuous-integration-static-type-checking.yml

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,23 @@ jobs:
77
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}
88
strategy:
99
matrix:
10-
os: [macOS-latest]
10+
os: [macOS-13]
1111
python-version: [3.11]
1212
fail-fast: false
1313
runs-on: ${{ matrix.os }}
1414
steps:
15-
- uses: actions/checkout@v1
16-
- name: Environment Variables
17-
run: |
18-
echo "CI_PACKAGE=opencolorio_config_aces" >> $GITHUB_ENV
19-
shell: bash
20-
- name: Set up Python ${{ matrix.python-version }}
21-
uses: actions/setup-python@v1
22-
with:
23-
python-version: ${{ matrix.python-version }}
24-
- name: Install Dependencies (macOS)
25-
if: matrix.os == 'macOS-latest'
26-
run: |
27-
brew install graphviz
28-
export GRAPHVIZ_DIR="/usr/local/Cellar/graphviz/<VERSION>"
29-
pip install pygraphviz --global-option=build_ext --global-option="-I$GRAPHVIZ_DIR/include" --global-option="-L$GRAPHVIZ_DIR/lib"
30-
- name: Install Package Dependencies
31-
run: |
32-
pip install -r requirements.txt
33-
- name: Static Type Checking
34-
run: |
35-
pyright --skipunannotated
15+
- uses: actions/checkout@v4
16+
- name: Environment Variables
17+
run: |
18+
echo "CI_PACKAGE=opencolorio_config_aces" >> $GITHUB_ENV
19+
shell: bash
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
- name: Install Package Dependencies
25+
run: |
26+
pip install -r requirements.txt
27+
- name: Static Type Checking
28+
run: |
29+
pyright --skipunannotated

.pre-commit-config.yaml

Lines changed: 48 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,52 @@
11
repos:
2-
- repo: https://github.com/ikamensh/flynt/
3-
rev: '0.76'
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: "v4.5.0"
44
hooks:
5-
- id: flynt
6-
- repo: https://github.com/charliermarsh/ruff-pre-commit
7-
rev: 'v0.0.272'
5+
- id: check-added-large-files
6+
- id: check-case-conflict
7+
- id: check-merge-conflict
8+
- id: check-symlinks
9+
- id: check-yaml
10+
- id: debug-statements
11+
- id: end-of-file-fixer
12+
- id: mixed-line-ending
13+
- id: name-tests-test
14+
args: ["--pytest-test-first"]
15+
- id: requirements-txt-fixer
16+
- id: trailing-whitespace
17+
- repo: https://github.com/codespell-project/codespell
18+
rev: v2.2.6
819
hooks:
9-
- id: ruff
10-
- repo: https://github.com/psf/black
11-
rev: 22.3.0
20+
- id: codespell
21+
args: ["--ignore-words-list=co-ordinates,exitance,fro,hart,ist"]
22+
- repo: https://github.com/ikamensh/flynt
23+
rev: "1.0.1"
1224
hooks:
13-
- id: black
14-
language_version: python3.9
25+
- id: flynt
26+
args: [--verbose]
27+
- repo: https://github.com/PyCQA/isort
28+
rev: "5.13.2"
29+
hooks:
30+
- id: isort
31+
- repo: https://github.com/astral-sh/ruff-pre-commit
32+
rev: "v0.1.14"
33+
hooks:
34+
- id: ruff-format
35+
- id: ruff
36+
- repo: https://github.com/adamchainz/blacken-docs
37+
rev: 1.16.0
38+
hooks:
39+
- id: blacken-docs
40+
language_version: python3.9
41+
- repo: https://github.com/pre-commit/mirrors-prettier
42+
rev: "v3.1.0"
43+
hooks:
44+
- id: prettier
45+
exclude: config-aces-reference.ocio.yaml
46+
- repo: https://github.com/pre-commit/pygrep-hooks
47+
rev: "v1.10.0"
48+
hooks:
49+
- id: rst-backticks
50+
- id: rst-directive-colons
51+
- id: rst-inline-touching-normal
52+
exclude: aces-dev

.readthedocs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ build:
99
- graphviz-dev
1010

1111
sphinx:
12-
configuration: docs/conf.py
12+
configuration: docs/conf.py
1313

1414
formats:
1515
- htmlzip
1616
- pdf
1717

1818
python:
1919
install:
20-
- requirements: docs/requirements.txt
20+
- requirements: docs/requirements.txt

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RUN yum install --setopt=tsflags=nodocs -y \
1212
# OpenColorIO Build
1313
WORKDIR /tmp
1414
ARG OCIO_INSTALL_DIRECTORY=/usr/local
15-
RUN git clone https://github.com/AcademySoftwareFoundation/OpenColorIO \
15+
RUN git clone --depth 1 https://github.com/AcademySoftwareFoundation/OpenColorIO \
1616
&& cd OpenColorIO \
1717
&& mkdir build \
1818
&& mkdir -p ${OCIO_INSTALL_DIRECTORY} \

0 commit comments

Comments
 (0)