Skip to content

Commit

Permalink
* updated setuptools, docutils, jinja, pigments, sphinx
Browse files Browse the repository at this point in the history
* added includehidden arg to toctree() in olio theme
* some doc string updates
  • Loading branch information
malcolmhumphreys committed Oct 8, 2013
1 parent 7b6f5ec commit 2b12063
Show file tree
Hide file tree
Showing 18 changed files with 65 additions and 67 deletions.
29 changes: 17 additions & 12 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@
###############################################################################
### External Doc Apps ###

# distribute
set(DISTRIBUTE_VERSION 0.6.36)
ExternalProject_Add(distribute
URL ${CMAKE_SOURCE_DIR}/ext/distribute-${DISTRIBUTE_VERSION}.tar.gz
# setuptools
# https://pypi.python.org/pypi/setuptools
set(SETUPTOOLS_VERSION 1.1.6)
ExternalProject_Add(setuptools
URL ${CMAKE_SOURCE_DIR}/ext/setuptools-${SETUPTOOLS_VERSION}.tar.gz
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory ${EXTDIST_PYTHONPATH}
BUILD_COMMAND PYTHONPATH=${PYTHONPATH} ${PYTHON} setup.py build
INSTALL_COMMAND PYTHONPATH=${PYTHONPATH} ${PYTHON} setup.py install --prefix=${EXTDIST_ROOT}
)

# docutils
set(DOCUTILS_VERSION 0.10)
# https://pypi.python.org/pypi/docutils
set(DOCUTILS_VERSION 0.11)
ExternalProject_Add(docutils
DEPENDS distribute
DEPENDS setuptools
URL ${CMAKE_SOURCE_DIR}/ext/docutils-${DOCUTILS_VERSION}.tar.gz
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory ${EXTDIST_PYTHONPATH}
Expand All @@ -24,9 +26,10 @@ ExternalProject_Add(docutils
)

# jinja2
set(JINJA2_VERSION 2.5.5)
# https://pypi.python.org/pypi/Jinja2
set(JINJA2_VERSION 2.7.1)
ExternalProject_Add(Jinja2
DEPENDS distribute
DEPENDS setuptools
URL ${CMAKE_SOURCE_DIR}/ext/Jinja2-${JINJA2_VERSION}.tar.gz
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory ${EXTDIST_PYTHONPATH}
Expand All @@ -35,9 +38,10 @@ ExternalProject_Add(Jinja2
)

# Pygments
set(PYGMENTS_VERSION 1.3.1)
# https://pypi.python.org/pypi/Pygments
set(PYGMENTS_VERSION 1.6)
ExternalProject_Add(Pygments
DEPENDS distribute
DEPENDS setuptools
URL ${CMAKE_SOURCE_DIR}/ext/Pygments-${PYGMENTS_VERSION}.tar.gz
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory ${EXTDIST_PYTHONPATH}
Expand All @@ -46,9 +50,10 @@ ExternalProject_Add(Pygments
)

# sphinx
set(SPHINX_VERSION 1.2b1)
# https://pypi.python.org/pypi/Sphinx
set(SPHINX_VERSION 1.2b3)
ExternalProject_Add(Sphinx
DEPENDS distribute docutils Jinja2 Pygments
DEPENDS setuptools docutils Jinja2 Pygments
URL ${CMAKE_SOURCE_DIR}/ext/Sphinx-${SPHINX_VERSION}.tar.gz
PATCH_COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/ext/Sphinx-${SPHINX_VERSION}.patch
BUILD_IN_SOURCE 1
Expand Down
6 changes: 3 additions & 3 deletions docs/developers/bindings/PythonAPI.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ Python API
Description
***********

A color configuration (:py:class:`Config`) defines all the color spaces to be
A color configuration (:py:class:`PyOpenColorIO.Config`) defines all the color spaces to be
available at runtime.

(:py:class:`Config`) is the main object for interacting with this library.
(:py:class:`PyOpenColorIO.Config`) is the main object for interacting with this library.
It encapsulates all the information necessary to use customized
:py:class:`PyOpenColorIO.ColorSpaceTransform` and
:py:class:`PyOpenColorIO.DisplayTransform` operations.
Expand Down Expand Up @@ -38,7 +38,7 @@ environment variable to point at the root of that configuration.
in a multi-app ecosystem, as it allows all applications to be consistently configured.

.. note::
Paths to LUTs can be relative. The search paths are defined in :py:class:`Config`.
Paths to LUTs can be relative. The search paths are defined in :py:class:`PyOpenColorIO.Config`.

See :ref:`developers-usageexamples`

Expand Down
2 changes: 1 addition & 1 deletion docs/developers/bindings/PythonTransforms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ LogTransform
import PyOpenColorIO as OCIO
:py:class:`LogTransform` is used to define a log transform. The direction of
:py:class:`PyOpenColorIO.LogTransform` is used to define a log transform. The direction of
the transform and its numerical base can be specified.

.. autoclass:: PyOpenColorIO.LogTransform
Expand Down
42 changes: 18 additions & 24 deletions docs/developers/internal_architecture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Internal Architecture Overview
External API
************


Configs
+++++++

Expand All @@ -17,9 +16,9 @@ dependent manner.

Example Configs:

* ACES (Acacdemy's standard color workflow)
* spi-vfx (Used on some Imageworks VFX shows such as spiderman, etc).
* and others
* ACES (Acacdemy's standard color workflow)
* spi-vfx (Used on some Imageworks VFX shows such as spiderman, etc).
* and others


ColorSpaces
Expand All @@ -38,7 +37,6 @@ Example ColorSpaces (from ACES configuration):
* rrt_p3dci (baked in display transform, suitable for dcip3 display)



Transforms
++++++++++

Expand All @@ -55,6 +53,7 @@ Examples of OCIO::Transforms are:
* The 'meta' GroupTransform, which contains itself an ordered lists of transforms
* The 'meta' LookTransform, which contains an ordered lists of transforms


For example, the adx10 ColorSpace (in one particular ACES configuration)
-Transform FROM adx, to our reference ColorSpace:

Expand All @@ -64,6 +63,7 @@ For example, the adx10 ColorSpace (in one particular ACES configuration)
#. Apply LogTransform base 10 (inverse)
#. Apply FileTransform adx_exp_to_aces.spimtx


If we have an image in the reference ColorSpace (unnamed), we can convert TO
adx by applying each in the inverse direction:

Expand All @@ -73,11 +73,11 @@ adx by applying each in the inverse direction:
#. Apply FileTransform adx_cdd_to_cid.spimtx (inverse)
#. Apply FileTransform adx_adx10_to_cdd.spimtx (inverse)


Note that this isn't possible in all cases (what if a lut or matrix is not
invertible?), but conceptually it's a simple way to think about the design.



Summary
+++++++

Expand All @@ -89,8 +89,6 @@ NOT visible to the client applications. Client apps need only concern themselves
with Configs and Processors.




OCIO::Processors
++++++++++++++++

Expand Down Expand Up @@ -140,7 +138,6 @@ and then makes the appropriate calls to the newly defined function.
See `src/apps/ociodisplay` for an example.



Internal API
************

Expand All @@ -161,7 +158,6 @@ create to do the dirty work as needed.

All image processing operations (ops) are a class that present the same
interface, and it's rather simple:
(src/core/Op.h)

.. code-block:: cpp
Expand Down Expand Up @@ -205,16 +201,14 @@ Before the ops are run, they are optimized. (Collapsed with appropriate neighbor
An Example
++++++++++

Let us consider the internal steps when getProcessor() is called to
convert from ColorSpace 'adx10' to ColorSpace 'aces'.

* The first step is to turn this ColorSpace conversion into an
ordered list of transforms. We do this by creating a single of the
conversions from 'adx10' to reference, and then adding the
transforms required to go from reference to 'aces'.
* The Transform list is then converted into a list of ops. It is
during this stage luts, are loaded, etc.
Let us consider the internal steps when getProcessor() is called to convert from ColorSpace
'adx10' to ColorSpace 'aces':

* The first step is to turn this ColorSpace conversion into an ordered list of transforms.
We do this by creating a single of the conversions from 'adx10' to reference, and then
adding the transforms required to go from reference to 'aces'.
* The Transform list is then converted into a list of ops. It is during this stage luts,
are loaded, etc.


CPU CODE PATH
Expand All @@ -226,6 +220,7 @@ The master list of ops is then optimized, and stored internally in the processor
FinalizeOpVec(m_cpuOps);
During Processor::apply(...), a subunit of pixels in the image are formatted into a sequential rgba block. (Block size is optimized for computational (SSE) simplicity and performance, and is typically similar in size to an image scanline)

.. code-block:: cpp
Expand All @@ -236,14 +231,16 @@ During Processor::apply(...), a subunit of pixels in the image are formatted int
scanlineHelper.prepRGBAScanline(&rgbaBuffer, &numPixels);
...
Then for each op, op->apply is called in-place.

.. code-block:: cpp
for(OpRcPtrVec::size_type i=0, size = m_cpuOps.size(); i<size; ++i)
{
m_cpuOps[i]->apply(rgbaBuffer, numPixels);
}
}
After all ops have been applied, the results are copied back to the source

Expand All @@ -252,7 +249,6 @@ After all ops have been applied, the results are copied back to the source
scanlineHelper.finishRGBAScanline();
GPU CODE PATH
+++++++++++++

Expand All @@ -265,6 +261,7 @@ GPU CODE PATH
- The left-over ops in the middle that cannot support shader text, and thus
will be baked into a 3dlut. (called gpu-lattice)


#. Between the first an the second lists (gpu-preops, and gpu-latticeops), we
anaylze the op-stream metadata and determine the appropriate allocation to use.
(to minimize clamping, quantization, etc). This is accounted for here by
Expand All @@ -281,6 +278,3 @@ The shader text is computed by calculating the shader for the gpu-preops, adding
a sampling function of the 3d lut, and then calculating the shader for the gpu
post ops.




2 changes: 1 addition & 1 deletion docs/ociotheme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ <h3>Table Of Contents</h3>
<tr>
<td width="200">
<div class="sidebar2">
{{toctree()}}
{{ toctree(includehidden=1) }}
{%- include "searchbox.html" %}
</div>
</td>
Expand Down
4 changes: 2 additions & 2 deletions docs/userguide/config_syntax.rst
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ device. Examples of common views are:
* "Raw" when assigned a colorspace with ``raw: yes`` set will show the
unaltered image, useful for tech-checking images

An example of the ``displays`` section from the :ref:`config-spi-vfx` config:
An example of the ``displays`` section from the :ref:`config-spivfx` config:

.. code-block:: yaml
Expand Down Expand Up @@ -443,7 +443,7 @@ applications.
---------------------------------------

Here is a example of a very simple ``colorspaces`` section, modified
from the :ref:`config-spi-vfx` example config:
from the :ref:`config-spivfx` example config:

.. code-block:: yaml
Expand Down
Binary file removed ext/Jinja2-2.5.5.tar.gz
Binary file not shown.
Binary file added ext/Jinja2-2.7.1.tar.gz
Binary file not shown.
Binary file removed ext/Pygments-1.3.1.tar.gz
Binary file not shown.
Binary file added ext/Pygments-1.6.tar.gz
Binary file not shown.
Binary file removed ext/Sphinx-1.2b1.tar.gz
Binary file not shown.
29 changes: 14 additions & 15 deletions ext/Sphinx-1.2b1.patch → ext/Sphinx-1.2b3.patch
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
diff -Naur Sphinx-1.2b1/sphinx/domains/cpp.py Sphinx-ocio/sphinx/domains/cpp.py
--- Sphinx-1.2b1/sphinx/domains/cpp.py 2013-03-29 14:41:07.000000000 -0300
+++ Sphinx-ocio/sphinx/domains/cpp.py 2013-04-05 23:31:25.531194999 -0300
diff -Naur Sphinx-1.2b3/sphinx/domains/cpp.py Sphinx-1.2b3-ocio/sphinx/domains/cpp.py
--- Sphinx-1.2b3/sphinx/domains/cpp.py 2013-09-16 07:24:36.000000000 +0100
+++ Sphinx-1.2b3-ocio/sphinx/domains/cpp.py 2013-10-08 21:36:30.000000000 +0100
@@ -447,11 +447,13 @@

class FuncDefExpr(NamedDefExpr):

- def __init__(self, name, visibility, static, explicit, constexpr, rv,
+ def __init__(self, name, visibility, static, extern, virtual, explicit, constexpr, rv,
signature, const, noexcept, pure_virtual):
signature, **kwargs):
NamedDefExpr.__init__(self, name, visibility, static)
self.rv = rv
self.signature = signature
+ self.extern = extern
+ self.virtual = virtual
self.explicit = explicit
self.constexpr = constexpr
self.const = const
@@ -469,6 +471,10 @@
self.const = kwargs.get('const', False)
@@ -475,6 +477,10 @@

def __unicode__(self):
buf = self.get_modifiers()
Expand All @@ -27,7 +27,7 @@ diff -Naur Sphinx-1.2b1/sphinx/domains/cpp.py Sphinx-ocio/sphinx/domains/cpp.py
if self.explicit:
buf.append(u'explicit')
if self.constexpr:
@@ -888,6 +894,8 @@
@@ -932,6 +938,8 @@

def parse_function(self):
visibility, static = self._parse_visibility_static()
Expand All @@ -36,28 +36,27 @@ diff -Naur Sphinx-1.2b1/sphinx/domains/cpp.py Sphinx-ocio/sphinx/domains/cpp.py
explicit = self.skip_word_and_ws('explicit')
constexpr = self.skip_word_and_ws('constexpr')

@@ -899,7 +907,7 @@
@@ -943,7 +951,7 @@
rv = None
else:
name = self._parse_type()
- return FuncDefExpr(name, visibility, static, explicit, constexpr, rv,
+ return FuncDefExpr(name, visibility, static, extern, virtual, explicit, constexpr, rv,
*self._parse_signature())
**self._parse_signature())

def parse_class(self):
diff -Naur Sphinx-1.2b1/tests/test_cpp_domain.py Sphinx-ocio/tests/test_cpp_domain.py
--- Sphinx-1.2b1/tests/test_cpp_domain.py 2013-03-29 14:41:07.000000000 -0300
+++ Sphinx-ocio/tests/test_cpp_domain.py 2013-04-05 23:36:22.167196897 -0300
@@ -100,6 +100,12 @@
diff -Naur Sphinx-1.2b3/tests/test_cpp_domain.py Sphinx-1.2b3-ocio/tests/test_cpp_domain.py
--- Sphinx-1.2b3/tests/test_cpp_domain.py 2013-09-16 07:24:36.000000000 +0100
+++ Sphinx-1.2b3-ocio/tests/test_cpp_domain.py 2013-10-08 21:34:22.000000000 +0100
@@ -124,6 +124,11 @@
x = 'int foo(D d=x(a'
raises(DefinitionError, parse, 'function', x)

+ x = 'virtual void myclass::foo(Bar& wee) const = 0'
+ assert unicode(parse('function', x)) == x
+
+
+ x = 'extern void somefunc(const aPointer& thing)'
+ assert unicode(parse('function', x)) == x
+

def test_bases():
x = 'A'
Binary file added ext/Sphinx-1.2b3.tar.gz
Binary file not shown.
Binary file removed ext/docutils-0.10.tar.gz
Binary file not shown.
Binary file added ext/docutils-0.11.tar.gz
Binary file not shown.
Binary file added ext/setuptools-1.1.6.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion src/pyglue/DocStrings/CDLTransform.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def getSatLumaCoefs(self):
"""
getSatLumaCoefs(pyData)
Returns the SAT (saturation) and luma coefficients in :py:class:`CDLTransform`.
Returns the SAT (saturation) and luma coefficients in :py:class:`PyOpenColorIO.CDLTransform`.
:return: saturation and luma coefficients
:rtype: list of floats
Expand Down
Loading

0 comments on commit 2b12063

Please sign in to comment.