Skip to content

Commit 05ea1be

Browse files
authored
PR: Discovery and graph generation code. (#4)
* Migrate discovery and graph generation code. Migrate and overhaul the "aces-dev" discovery and conversion graph generation code from "https://github.com/colour-science/discover-aces-dev". Signed-off-by: Thomas Mansencal <[email protected]> * Update license author. Signed-off-by: Thomas Mansencal <[email protected]> * Add "Linux Foundation" recommended headers. Signed-off-by: Thomas Mansencal <[email protected]>
1 parent 3b3537c commit 05ea1be

30 files changed

+3539
-0
lines changed

.coveragerc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[run]
2+
source = opencolorio_config_aces
3+
[report]
4+
exclude_lines =
5+
pragma: no cover
6+
if __name__ == .__main__.:
7+
pass
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: Continuous Integration
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
unix-build:
7+
name: Unix Build
8+
strategy:
9+
matrix:
10+
os: [ubuntu-18.04, macOS-latest]
11+
python-version: [3.7, 3.8]
12+
runs-on: ${{ matrix.os }}
13+
steps:
14+
- uses: actions/checkout@v1
15+
with:
16+
submodules: recursive
17+
- name: Environment Variables
18+
run: |
19+
CI_PYTHON_VERSION=${{ matrix.python-version }}
20+
CI_PACKAGE=opencolorio_config_aces
21+
CI_SHA=${{ github.sha }}
22+
CI_FLAKE8_EXCLUDED=aces-dev
23+
COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}
24+
echo ::set-env name=CI_PYTHON_VERSION::$CI_PYTHON_VERSION
25+
echo ::set-env name=CI_PACKAGE::$CI_PACKAGE
26+
echo ::set-env name=CI_SHA::$CI_SHA
27+
echo ::set-env name=COVERALLS_REPO_TOKEN::$COVERALLS_REPO_TOKEN
28+
echo ::set-env name=CI_FLAKE8_EXCLUDED::$CI_FLAKE8_EXCLUDED
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 -L https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -o get-poetry.py
36+
python get-poetry.py --preview --version 1.0.0b3
37+
PATH=$HOME/.poetry/bin:$PATH
38+
echo ::set-env name=PATH::$PATH
39+
- name: Install Package Dependencies
40+
run: |
41+
poetry install
42+
source $(poetry env info -p)/bin/activate
43+
- name: Lint with flake8
44+
run: |
45+
source $(poetry env info -p)/bin/activate
46+
flake8 $CI_PACKAGE --count --show-source --statistics --exclude=$CI_FLAKE8_EXCLUDED
47+
- name: Test with nosetests
48+
run: |
49+
source $(poetry env info -p)/bin/activate
50+
python -W ignore -m nose -q -v --with-doctest --doctest-options=+ELLIPSIS --with-coverage --cover-package=$CI_PACKAGE $CI_PACKAGE
51+
# - name: Upload Coverage to coveralls.io
52+
# run: |
53+
# source $(poetry env info -p)/bin/activate
54+
# if [ -z "$COVERALLS_REPO_TOKEN" ]; then echo \"COVERALLS_REPO_TOKEN\" secret is undefined!; else coveralls; fi
55+
windows-build:
56+
name: Windows Build
57+
strategy:
58+
matrix:
59+
os: [windows-2019]
60+
python-version: [3.7, 3.8]
61+
runs-on: ${{ matrix.os }}
62+
steps:
63+
- uses: actions/checkout@v1
64+
with:
65+
submodules: recursive
66+
- name: Environment Variables
67+
run: |
68+
set CI_PYTHON_VERSION=${{ matrix.python-version }}
69+
set CI_PACKAGE=opencolorio_config_aces
70+
set CI_SHA=${{ github.sha }}
71+
set CI_FLAKE8_EXCLUDED=aces-dev
72+
set COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}
73+
echo ::set-env name=CI_PYTHON_VERSION::%CI_PYTHON_VERSION%
74+
echo ::set-env name=CI_PACKAGE::%CI_PACKAGE%
75+
echo ::set-env name=CI_SHA::%CI_SHA%
76+
echo ::set-env name=COVERALLS_REPO_TOKEN::%COVERALLS_REPO_TOKEN%
77+
echo ::set-env name=CI_FLAKE8_EXCLUDED::%CI_FLAKE8_EXCLUDED%
78+
shell: cmd
79+
- name: Set up Python ${{ matrix.python-version }}
80+
uses: actions/setup-python@v1
81+
with:
82+
python-version: ${{ matrix.python-version }}
83+
- name: Install Poetry
84+
run: |
85+
curl -L https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -o get-poetry.py
86+
python get-poetry.py --preview --version 1.0.0b3
87+
set PATH=%USERPROFILE%\.poetry\bin;%PATH%
88+
echo ::set-env name=PATH::%PATH%
89+
shell: cmd
90+
- name: Install Package Dependencies
91+
run: |
92+
call poetry install
93+
FOR /F %%a IN ('poetry env info -p') DO SET CI_VIRTUAL_ENVIRONMENT=%%a
94+
echo ::set-env name=CI_VIRTUAL_ENVIRONMENT::%CI_VIRTUAL_ENVIRONMENT%
95+
shell: cmd
96+
- name: Lint with flake8
97+
run: |
98+
call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
99+
flake8 %CI_PACKAGE% --count --show-source --statistics --exclude=%CI_FLAKE8_EXCLUDED%
100+
shell: cmd
101+
- name: Test with nosetests
102+
run: |
103+
call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
104+
python -W ignore -m nose -q -v --with-doctest --doctest-options=+ELLIPSIS --with-coverage --cover-package=%CI_PACKAGE% %CI_PACKAGE%
105+
shell: cmd
106+
# - name: Upload Coverage to coveralls.io
107+
# run: |
108+
# call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
109+
# IF "%COVERALLS_REPO_TOKEN%"=="" (echo "COVERALLS_REPO_TOKEN" secret is undefined!) ELSE (coveralls)
110+
# shell: cmd

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
*.egg-info
2+
*.pyc
3+
*.pyo
4+
.DS_Store
5+
.coverage
6+
.idea
7+
__pycache__
8+
build
9+
dist
10+
docs/_build
11+
docs/generated
12+
opencolorio_config_aces/config/reference/discover/aces_conversion_graph.png
13+
poetry.lock

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "opencolorio_config_aces/config/reference/aces-dev"]
2+
path = opencolorio_config_aces/config/reference/aces-dev
3+
url = https://github.com/ampas/aces-dev.git

.pre-commit-config.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
repos:
2+
- repo: https://gitlab.com/pycqa/flake8
3+
rev: 3.7.8
4+
hooks:
5+
- id: flake8
6+
exclude: aces-dev
7+
- repo: https://github.com/pre-commit/mirrors-yapf
8+
rev: v0.23.0
9+
hooks:
10+
- id: yapf
11+
exclude: aces/config/reference/aces-dev

.readthedocs.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
build:
2+
image: latest
3+
4+
python:
5+
version: 3.7
6+
pip_install: true
7+
extra_requirements:
8+
- read-the-docs

docs/Makefile

Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
# SPDX-License-Identifier: BSD-3-Clause
2+
# Copyright Contributors to the OpenColorIO Project.
3+
4+
# Makefile for Sphinx documentation
5+
#
6+
7+
# You can set these variables from the command line.
8+
SPHINXOPTS =
9+
SPHINXBUILD = sphinx-build
10+
PAPER =
11+
BUILDDIR = _build
12+
13+
# User-friendly check for sphinx-build
14+
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
15+
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
16+
endif
17+
18+
# Internal variables.
19+
PAPEROPT_a4 = -D latex_paper_size=a4
20+
PAPEROPT_letter = -D latex_paper_size=letter
21+
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
22+
# the i18n builder cannot share the environment and doctrees with the others
23+
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
24+
25+
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
26+
27+
help:
28+
@echo "Please use \`make <target>' where <target> is one of"
29+
@echo " html to make standalone HTML files"
30+
@echo " dirhtml to make HTML files named index.html in directories"
31+
@echo " singlehtml to make a single large HTML file"
32+
@echo " pickle to make pickle files"
33+
@echo " json to make JSON files"
34+
@echo " htmlhelp to make HTML files and a HTML help project"
35+
@echo " qthelp to make HTML files and a qthelp project"
36+
@echo " devhelp to make HTML files and a Devhelp project"
37+
@echo " epub to make an epub"
38+
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
39+
@echo " latexpdf to make LaTeX files and run them through pdflatex"
40+
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
41+
@echo " text to make text files"
42+
@echo " man to make manual pages"
43+
@echo " texinfo to make Texinfo files"
44+
@echo " info to make Texinfo files and run them through makeinfo"
45+
@echo " gettext to make PO message catalogs"
46+
@echo " changes to make an overview of all changed/added/deprecated items"
47+
@echo " xml to make Docutils-native XML files"
48+
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
49+
@echo " linkcheck to check all external links for integrity"
50+
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
51+
52+
clean:
53+
rm -rf $(BUILDDIR)/*
54+
55+
html:
56+
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
57+
@echo
58+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
59+
60+
dirhtml:
61+
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
62+
@echo
63+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
64+
65+
singlehtml:
66+
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
67+
@echo
68+
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
69+
70+
pickle:
71+
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
72+
@echo
73+
@echo "Build finished; now you can process the pickle files."
74+
75+
json:
76+
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
77+
@echo
78+
@echo "Build finished; now you can process the JSON files."
79+
80+
htmlhelp:
81+
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
82+
@echo
83+
@echo "Build finished; now you can run HTML Help Workshop with the" \
84+
".hhp project file in $(BUILDDIR)/htmlhelp."
85+
86+
qthelp:
87+
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
88+
@echo
89+
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
90+
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
91+
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/colour_demosaicing.qhcp"
92+
@echo "To view the help file:"
93+
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/colour_demosaicing.qhc"
94+
95+
devhelp:
96+
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
97+
@echo
98+
@echo "Build finished."
99+
@echo "To view the help file:"
100+
@echo "# mkdir -p $$HOME/.local/share/devhelp/colour_demosaicing"
101+
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/colour_demosaicing"
102+
@echo "# devhelp"
103+
104+
epub:
105+
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
106+
@echo
107+
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
108+
109+
latex:
110+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
111+
@echo
112+
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
113+
@echo "Run \`make' in that directory to run these through (pdf)latex" \
114+
"(use \`make latexpdf' here to do that automatically)."
115+
116+
latexpdf:
117+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
118+
@echo "Running LaTeX files through pdflatex..."
119+
$(MAKE) -C $(BUILDDIR)/latex all-pdf
120+
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
121+
122+
latexpdfja:
123+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
124+
@echo "Running LaTeX files through platex and dvipdfmx..."
125+
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
126+
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
127+
128+
text:
129+
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
130+
@echo
131+
@echo "Build finished. The text files are in $(BUILDDIR)/text."
132+
133+
man:
134+
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
135+
@echo
136+
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
137+
138+
texinfo:
139+
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
140+
@echo
141+
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
142+
@echo "Run \`make' in that directory to run these through makeinfo" \
143+
"(use \`make info' here to do that automatically)."
144+
145+
info:
146+
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
147+
@echo "Running Texinfo files through makeinfo..."
148+
make -C $(BUILDDIR)/texinfo info
149+
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
150+
151+
gettext:
152+
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
153+
@echo
154+
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
155+
156+
changes:
157+
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
158+
@echo
159+
@echo "The overview file is in $(BUILDDIR)/changes."
160+
161+
linkcheck:
162+
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
163+
@echo
164+
@echo "Link check complete; look for any errors in the above output " \
165+
"or in $(BUILDDIR)/linkcheck/output.txt."
166+
167+
doctest:
168+
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
169+
@echo "Testing of doctests in the sources finished, look at the " \
170+
"results in $(BUILDDIR)/doctest/output.txt."
171+
172+
xml:
173+
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
174+
@echo
175+
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
176+
177+
pseudoxml:
178+
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
179+
@echo
180+
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."

docs/_static/Logo_Medium_001.png

32.4 KB
Loading

docs/_static/Logo_Small_001.png

6.65 KB
Loading

docs/_static/custom.css

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/* SPDX-License-Identifier: BSD-3-Clause */
2+
/* Copyright Contributors to the OpenColorIO Project. */
3+
4+
p {
5+
margin-bottom: 8px !important;
6+
}
7+
8+
.wy-table-responsive table td {
9+
background-color: rgb(252, 252, 252) !important;
10+
border: 0 !important;
11+
padding: 2px 4px 2px 0px !important;
12+
vertical-align: top !important;
13+
white-space: normal !important;
14+
}
15+
16+
.wy-table-responsive {
17+
overflow: visible !important;
18+
}
19+
20+
.wy-table-bordered-all, .rst-content table.docutils {
21+
border: 0 !important;
22+
}
23+
24+
div.highlight-text {
25+
background-color: rgb(252, 252, 252) !important;
26+
border: 0 !important;
27+
font-family: monospace;
28+
margin: -24px 0 24px 0;
29+
}

0 commit comments

Comments
 (0)