opencolorio_config_aces.version_config_mapping_file#

opencolorio_config_aces.version_config_mapping_file(path=PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/opencolorio-config-aces/envs/latest/lib/python3.9/site-packages/opencolorio_config_aces/config/reference/generate/resources/OpenColorIO-Config-ACES Reference Transforms - v1.0.0 - Reference Config - Mapping.csv'))[source]#

Return the current version of given CSV mapping file.

No parsing of the file content is perform, a simple regex is used to extract the version of the file name.

Parameters:

path (Path or str, optional) – Path to the CSV mapping file.

Returns:

CSV mapping file version.

Return type:

str

Examples

>>> path = (
...     "/tmp/OpenColorIO-Config-ACES Reference Transforms - v0.1.0 - "
...     "Reference Config - Mapping.csv"
... )
>>> version_config_mapping_file(path)
'v0.1.0'
>>> path = (
...     "/tmp/OpenColorIO-Config-ACES Reference Transforms - "
...     "Reference Config - Mapping.csv"
... )
>>> version_config_mapping_file(path)
''