Skip to content

Commit e6c8616

Browse files
authored
Merge branch 'master' into hotfix/node_uniqueness
2 parents 9340bf6 + d0268d9 commit e6c8616

File tree

12 files changed

+588
-31
lines changed

12 files changed

+588
-31
lines changed

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,4 @@ build
99
dist
1010
docs/_build
1111
docs/generated
12-
opencolorio_config_aces/config/generation/config-v1.ocio
13-
opencolorio_config_aces/config/generation/config-v2.ocio
14-
opencolorio_config_aces/config/reference/discover/aces_conversion_graph.png
15-
opencolorio_config_aces/config/reference/generate/config-aces-v2.ocio
1612
poetry.lock

Dockerfile

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# SPDX-License-Identifier: BSD-3-Clause
2+
# Copyright Contributors to the OpenColorIO Project.
3+
4+
# https://hub.docker.com/r/aswf/ci-ocio/tags
5+
FROM aswf/ci-ocio:2021
6+
7+
# Base Plotting and Docs Building Dependencies.
8+
RUN yum install --setopt=tsflags=nodocs -y \
9+
graphviz-devel \
10+
perl-Digest-MD5
11+
12+
# OpenColorIO Build
13+
WORKDIR /tmp
14+
ARG OCIO_INSTALL_DIRECTORY=/usr/local
15+
RUN git clone https://github.com/AcademySoftwareFoundation/OpenColorIO \
16+
&& cd OpenColorIO \
17+
&& mkdir build \
18+
&& mkdir -p ${OCIO_INSTALL_DIRECTORY} \
19+
&& cd build \
20+
&& cmake -DOCIO_INSTALL_EXT_PACKAGES=ALL -DCMAKE_INSTALL_PREFIX=${OCIO_INSTALL_DIRECTORY} ../ \
21+
&& make -j8 \
22+
&& make install \
23+
&& cd /tmp \
24+
&& rm -rf OpenColorIO
25+
26+
# LaTeX Dependencies for Sphinx Generated PDF
27+
WORKDIR /tmp
28+
COPY ./utilities/resources/texlive.profile .
29+
RUN wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz \
30+
&& tar -xvf install-tl-unx.tar.gz \
31+
&& cd install-tl-* \
32+
&& perl install-tl --profile ../texlive.profile \
33+
&& tlmgr install \
34+
capt-of \
35+
collection-fontsrecommended \
36+
fncychap \
37+
fontaxes \
38+
framed \
39+
inconsolata \
40+
latexmk \
41+
lato \
42+
needspace \
43+
tabulary \
44+
titlesec \
45+
varwidth \
46+
wrapfig \
47+
&& tlmgr path add \
48+
&& cd /tmp \
49+
&& rm -rf install-tl* \
50+
&& rm texlive.profile
51+
52+
# Python Requirements
53+
WORKDIR /tmp
54+
COPY ./requirements.txt /tmp
55+
RUN pip install -r requirements.txt \
56+
&& rm /tmp/requirements.txt
57+
58+
# Environment Variables & Working Directory
59+
ARG WORKING_DIRECTORY=/home/aswf/OpenColorIO-Config-ACES
60+
ENV PYTHONPATH=${WORKING_DIRECTORY}:${PYTHONPATH}
61+
WORKDIR ${WORKING_DIRECTORY}

README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.rst

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
..
2+
SPDX-License-Identifier: CC-BY-4.0
3+
Copyright Contributors to the OpenColorIO Project.
4+
5+
OpenColorIO Configuration for ACES
6+
==================================
7+
8+
.. image:: https://via.placeholder.com/720x320.png?text=WARNING: This+repository+is+under+construction!
9+
10+
The `OpenColorIO Configuration for ACES <https://github.com/AcademySoftwareFoundation/OpenColorIO-Config-ACES/>`__
11+
is an open-source `Python <https://www.python.org/>`__ package implementing
12+
support for the generation of the *OCIO* configurations for the
13+
`Academy Color Encoding System <https://www.oscars.org/science-technology/sci-tech-projects/aces>`__
14+
(ACES).
15+
16+
It is freely available under the
17+
`New BSD License <https://opensource.org/licenses/BSD-3-Clause>`__ terms.
18+
19+
.. contents:: **Table of Contents**
20+
:backlinks: none
21+
:depth: 3
22+
23+
.. sectnum::
24+
25+
Features
26+
--------
27+
28+
The following features are available:
29+
30+
- Automatic *OCIO* **Reference** configuration generation for *aces-dev*
31+
*CTL* reference implementation.
32+
- Configurable generator producing the *OCIO* **Studio** configuration.
33+
34+
Installation
35+
------------
36+
37+
Docker
38+
^^^^^^
39+
40+
Installing the dependencies for the `previous config generator <https://github.com/imageworks/OpenColorIO-Configs>`__
41+
was not a trivial task. For ease of use an `aswf-docker <https://github.com/AcademySoftwareFoundation/aswf-docker>`__
42+
based container is now available.
43+
44+
Creating the container from the `Dockerfile <https://docs.docker.com/engine/reference/builder/>`__
45+
is done as follows::
46+
47+
docker build -t aswf/opencolorio-config-aces:latest .
48+
49+
or alternatively, if the dependencies described in the next section are
50+
satisfied::
51+
52+
invoke docker build
53+
54+
Then, to run *bash* in the container::
55+
56+
docker run -it -v ${PWD}:/home/aswf/OpenColorIO-Config-ACES aswf/opencolorio-config-aces:latest /bin/bash
57+
58+
59+
Pypi
60+
^^^^
61+
62+
The **OpenColorIO Configuration for ACES** package requires various
63+
dependencies in order to run and be able to generate the *OCIO* configurations:
64+
65+
Primary Dependencies
66+
********************
67+
68+
- `python>=3.7 <https://www.python.org/download/releases/>`__
69+
- `networkx <https://pypi.org/project/networkx/>`__
70+
- `OpenColorIO <https://opencolorio.org/>`__
71+
72+
Plotting Dependencies
73+
*********************
74+
75+
- `graphviz <https://www.graphviz.org/>`__
76+
- `pygraphviz <https://pypi.org/project/pygraphviz/>`__
77+
78+
Development Dependencies
79+
************************
80+
81+
- `coverage <https://pypi.org/project/coverage/>`__
82+
- `coveralls <https://pypi.org/project/coveralls/>`__
83+
- `flake8 <https://pypi.org/project/flake8/>`__
84+
- `invoke <https://pypi.org/project/invoke/>`__
85+
- `nose <https://pypi.org/project/nose/>`__
86+
- `pre-commit <https://pypi.org/project/pre-commit/>`__
87+
- `pytest <https://pypi.org/project/pytest/>`__
88+
- `restructuredtext-lint <https://pypi.org/project/restructuredtext-lint/>`__
89+
- `sphinx <https://pypi.org/project/Sphinx/>`__
90+
- `sphinx-rtd-theme <https://pypi.org/project/sphinx-rtd-theme/>`__
91+
- `twine <https://pypi.org/project/twine/>`__
92+
- `yapf==0.23.0 <https://pypi.org/project/yapf/>`__
93+
94+
Once the dependencies are satisfied, the **OpenColorIO Configuration for ACES**
95+
package can be installed from the `Python Package Index <http://pypi.python.org/pypi/opencolorio-config-aces>`__
96+
by issuing this command in a shell::
97+
98+
pip install --user opencolorio-config-aces
99+
100+
Usage
101+
-----
102+
103+
Tasks
104+
^^^^^
105+
106+
Various tasks are currently exposed via `invoke <https://pypi.org/project/invoke/>`__.
107+
108+
This is currently the recommended way to build the configuration until a
109+
dedicated CLI is provided.
110+
111+
Listing the tasks is done as follows::
112+
113+
invoke --list
114+
115+
Assuming the dependencies are satisfied, the task to build the reference
116+
configuration is::
117+
118+
invoke build-reference-config
119+
120+
Alternatively, with the docker container built::
121+
122+
invoke docker-run-build-reference-config
123+
124+
API
125+
^^^
126+
127+
The main reference for `OpenColorIO Configuration for ACES <https://github.com/AcademySoftwareFoundation/OpenColorIO-Config-ACES>`__
128+
is the `manual <https://opencolorio-config-aces.readthedocs.io/>`__.
129+
130+
.. {MANUAL-URL}
131+
132+
About
133+
-----
134+
135+
| **OpenColorIO Configuration for ACES** by OpenColorIO Contributors
136+
| Copyright Contributors to the OpenColorIO Project – `[email protected] <[email protected]>`__
137+
| This software is released under terms of New BSD License: https://opensource.org/licenses/BSD-3-Clause
138+
| `https://github.com/AcademySoftwareFoundation/OpenColorIO-Config-ACES <https://github.com/AcademySoftwareFoundation/OpenColorIO-Config-ACES>`__

docs/index.rst

Lines changed: 62 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ OpenColorIO Configuration for ACES
99

1010
The `OpenColorIO Configuration for ACES <https://github.com/AcademySoftwareFoundation/OpenColorIO-Config-ACES/>`__
1111
is an open-source `Python <https://www.python.org/>`__ package implementing
12-
support for the generation of the *OCIO* configuration for the
13-
*Academy Color Encoding System* (ACES).
12+
support for the generation of the *OCIO* configurations for the
13+
`Academy Color Encoding System <https://www.oscars.org/science-technology/sci-tech-projects/aces>`__
14+
(ACES).
1415

1516
It is freely available under the
1617
`New BSD License <https://opensource.org/licenses/BSD-3-Clause>`__ terms.
@@ -33,19 +34,49 @@ The following features are available:
3334
Installation
3435
------------
3536

37+
Docker
38+
^^^^^^
39+
40+
Installing the dependencies for the `previous config generator <https://github.com/imageworks/OpenColorIO-Configs>`__
41+
was not a trivial task. For ease of use an `aswf-docker <https://github.com/AcademySoftwareFoundation/aswf-docker>`__
42+
based container is now available.
43+
44+
Creating the container from the `Dockerfile <https://docs.docker.com/engine/reference/builder/>`__
45+
is done as follows::
46+
47+
docker build -t aswf/opencolorio-config-aces:latest .
48+
49+
or alternatively, if the dependencies described in the next section are
50+
satisfied::
51+
52+
invoke docker build
53+
54+
Then, to run *bash* in the container::
55+
56+
docker run -it -v ${PWD}:/home/aswf/OpenColorIO-Config-ACES aswf/opencolorio-config-aces:latest /bin/bash
57+
58+
59+
Pypi
60+
^^^^
61+
62+
The **OpenColorIO Configuration for ACES** package requires various
63+
dependencies in order to run and be able to generate the *OCIO* configurations:
64+
3665
Primary Dependencies
37-
^^^^^^^^^^^^^^^^^^^^
66+
********************
3867

3968
- `python>=3.7 <https://www.python.org/download/releases/>`__
4069
- `networkx <https://pypi.org/project/networkx/>`__
70+
- `OpenColorIO <https://opencolorio.org/>`__
4171

4272
Plotting Dependencies
43-
^^^^^^^^^^^^^^^^^^^^^
73+
*********************
4474

4575
- `graphviz <https://www.graphviz.org/>`__
76+
- `pygraphviz <https://pypi.org/project/pygraphviz/>`__
4677

4778
Development Dependencies
48-
^^^^^^^^^^^^^^^^^^^^^^^^^
79+
************************
4980

5081
- `coverage <https://pypi.org/project/coverage/>`__
5182
- `coveralls <https://pypi.org/project/coveralls/>`__
@@ -60,26 +91,44 @@ Development Dependencies
6091
- `twine <https://pypi.org/project/twine/>`__
6192
- `yapf==0.23.0 <https://pypi.org/project/yapf/>`__
6293

63-
Pypi
64-
^^^^
65-
66-
Once the dependencies satisfied, the **OpenColorIO Configuration for ACES** can
67-
be installed from the `Python Package Index <http://pypi.python.org/pypi/opencolorio-config-aces>`__
94+
Once the dependencies are satisfied, the **OpenColorIO Configuration for ACES**
95+
package can be installed from the `Python Package Index <http://pypi.python.org/pypi/opencolorio-config-aces>`__
6896
by issuing this command in a shell::
6997

70-
pip install opencolorio-config-aces
98+
pip install --user opencolorio-config-aces
7199

72100
Usage
73101
-----
74102

103+
Tasks
104+
^^^^^
105+
106+
Various tasks are currently exposed via `invoke <https://pypi.org/project/invoke/>`__.
107+
108+
This is currently the recommended way to build the configuration until a
109+
dedicated CLI is provided.
110+
111+
Listing the tasks is done as follows::
112+
113+
invoke --list
114+
115+
Assuming the dependencies are satisfied, the task to build the reference
116+
configuration is::
117+
118+
invoke build-reference-config
119+
120+
Alternatively, with the docker container built::
121+
122+
invoke docker-run-build-reference-config
123+
75124
API
76125
^^^
77126

78127
The main reference for `OpenColorIO Configuration for ACES <https://github.com/AcademySoftwareFoundation/OpenColorIO-Config-ACES>`__
79-
is the manual:
128+
is the `manual <https://opencolorio-config-aces.readthedocs.io/>`__.
80129

81130
.. toctree::
82-
:maxdepth: 4
131+
:maxdepth: 3
83132

84133
manual
85134

opencolorio_config_aces/config/generation/common.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,8 +613,16 @@ def generate_config(data, config_name=None, validate=True):
613613
if __name__ == '__main__':
614614
required('OpenColorIO')(lambda: None)()
615615

616+
import os
617+
import opencolorio_config_aces
616618
import PyOpenColorIO as ocio
617619

620+
build_directory = os.path.join(opencolorio_config_aces.__path__[0], '..',
621+
'build')
622+
623+
if not os.path.exists(build_directory):
624+
os.makedirs(build_directory)
625+
618626
logging.basicConfig()
619627
logging.getLogger().setLevel(logging.INFO)
620628

@@ -661,7 +669,7 @@ def generate_config(data, config_name=None, validate=True):
661669
active_views=['sRGB - sRGB'],
662670
)
663671

664-
generate_config(data, 'config-v1.ocio')
672+
generate_config(data, os.path.join(build_directory, 'config-v1.ocio'))
665673

666674
# "OpenColorIO 2" configuration.
667675
data.profile_version = 2
@@ -703,4 +711,4 @@ def generate_config(data, config_name=None, validate=True):
703711
]
704712
data.viewing_rules = []
705713

706-
generate_config(data, 'config-v2.ocio')
714+
generate_config(data, os.path.join(build_directory, 'config-v2.ocio'))

opencolorio_config_aces/config/reference/discover/graph.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,13 +349,20 @@ def plot_aces_conversion_graph(graph, filename, prog='dot', args=''):
349349
if __name__ == '__main__':
350350
import os
351351
import subprocess
352+
import opencolorio_config_aces
352353
from pprint import pprint
353354
from opencolorio_config_aces.utilities import message_box
354355

355356
logging.basicConfig()
356357
logging.getLogger().setLevel(logging.INFO)
357358

358-
filename = 'aces_conversion_graph.png'
359+
build_directory = os.path.join(opencolorio_config_aces.__path__[0], '..',
360+
'build')
361+
362+
if not os.path.exists(build_directory):
363+
os.makedirs(build_directory)
364+
365+
filename = os.path.join(build_directory, 'aces_conversion_graph.png')
359366

360367
ctl_transforms = discover_aces_ctl_transforms()
361368
classified_ctl_transforms = classify_aces_ctl_transforms(ctl_transforms)

0 commit comments

Comments
 (0)