Utilities#

Common#

opencolorio_config_aces.utilities

ROOT_BUILD_DEFAULT

Path subclass for non-Windows systems.

DocstringDict

A dict sub-class that allows settings a docstring to dict instances.

first_item(iterable[, default])

Return the first item of given iterable.

common_ancestor(*args)

Return the common ancestor of given iterables.

paths_common_ancestor(*args)

Return the common ancestor path from given paths.

vivification()

Implement supports for vivification of the underlying dict like data-structure, magical!

vivified_to_dict(vivified)

Convert given vivified data-structure to dictionary.

message_box(message[, width, padding, ...])

Print a message inside a box.

is_colour_installed([raise_exception])

Return if Colour is installed and available.

is_jsonpickle_installed([raise_exception])

Return if jsonpickle is installed and available.

is_networkx_installed([raise_exception])

Return if NetworkX is installed and available.

REQUIREMENTS_TO_CALLABLE

Mapping of requirements to their respective callables.

required(*requirements)

Decorate a function to check whether various ancillary package requirements are satisfied.

is_string(a)

Return if given \(a\) variable is a string like variable.

is_iterable(a)

Return if given \(a\) variable is iterable.

git_describe()

Describe the current OpenColorIO Configuration for ACES git version.

matrix_3x3_to_4x4(M)

Convert given 3x3 matrix \(M\) to a raveled 4x4 matrix.

multi_replace(name, patterns)

Update given name by applying in succession the given patterns and substitutions.

regularise_version(version[, add_v_prefix])

Regularise given version name by either adding or removing a v affixe.

validate_method(method, valid_methods[, message])

Validate whether given method exists in the given valid methods and returns the method lower cased.

google_sheet_title(url)

Return the title from given Google Sheet url.

slugify(object_[, allow_unicode])

Generate a SEO friendly and human-readable slug from given object.