Skip to content
This repository was archived by the owner on Nov 22, 2019. It is now read-only.

Commit 33bedbd

Browse files
author
mfe
committed
Merge branch 'feature/addVersions' into develop
2 parents 0f8a251 + 83491ce commit 33bedbd

16 files changed

+144
-3
lines changed

lutLab/ext_1d_lut.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
.. moduleauthor:: `Marie FETIVEAU <github.com/mfe>`_
66
77
"""
8+
__version__ = "0.1"
89
import argparse
910
from utils.ocio_helper import (
1011
OCIO_3D_LUTS_FORMATS, create_ocio_processor, is_3d_lut
@@ -14,6 +15,8 @@
1415

1516
from scipy.interpolate import PchipInterpolator
1617
import numpy
18+
import sys
19+
from utils import debug_helper
1720

1821

1922
class Ext1DLutException(Exception):
@@ -136,6 +139,18 @@ def __get_options():
136139
parser.add_argument("-d", "--display",
137140
help="Display result using matplotlib",
138141
action="store_true")
142+
# version
143+
parser.add_argument('-v', "--version", action='version',
144+
version='{0} - version {1}'.format(description,
145+
__version__))
146+
# full version
147+
versions = debug_helper.get_imported_modules_versions(sys.modules,
148+
globals())
149+
versions = '{0} - version {1}\n\n{2}'.format(description,
150+
__version__,
151+
versions)
152+
parser.add_argument('-V', "--full-versions",
153+
action=debug_helper.make_full_version_action(versions))
139154
return parser.parse_args()
140155

141156
if __name__ == '__main__':

lutLab/lut_to_lut.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
.. moduleauthor:: `Marie FETIVEAU <github.com/mfe>`_
66
77
"""
8+
__version__ = "0.1"
89
import argparse
910
from utils.ocio_helper import OCIO_LUTS_FORMATS, create_ocio_processor
1011
from utils.csp_helper import write_2d_csp_lut
@@ -14,6 +15,8 @@
1415
from PyOpenColorIO.Constants import (
1516
INTERP_LINEAR, INTERP_TETRAHEDRAL
1617
)
18+
from utils import debug_helper
19+
import sys
1720

1821

1922
class LutToLutException(Exception):
@@ -121,6 +124,18 @@ def __get_options():
121124
# inverse
122125
parser.add_argument("-inv", "--inverse", help="Inverse input LUT",
123126
action="store_true")
127+
# version
128+
parser.add_argument('-v', "--version", action='version',
129+
version='{0} - version {1}'.format(description,
130+
__version__))
131+
# full version
132+
versions = debug_helper.get_imported_modules_versions(sys.modules,
133+
globals())
134+
versions = '{0} - version {1}\n\n{2}'.format(description,
135+
__version__,
136+
versions)
137+
parser.add_argument('-V', "--full-versions",
138+
action=debug_helper.make_full_version_action(versions))
124139
return parser.parse_args()
125140

126141
if __name__ == '__main__':

lutLab/rgb_to_xyz_matrix.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1+
#!/usr/bin/python
2+
13
""" Display RGB colorspaces to XYZ conversion matrices and their inverses
24
35
.. moduleauthor:: `Marie FETIVEAU <github.com/mfe>`_
46
57
"""
8+
__version__ = "0.1"
69
from utils.colors_helper import xy_to_XYZ
710
from utils.colorspaces import COLORSPACES
811
from utils.private_colorspaces import PRIVATE_COLORSPACES
912
import numpy
1013
import argparse
14+
import sys
15+
from utils import debug_helper
1116

1217

1318
class RGBToXYZMatrixException(Exception):
@@ -165,6 +170,18 @@ def __get_options():
165170
type=str,
166171
choices=['matrix', 'spimtx', 'simple'],
167172
default='matrix')
173+
# version
174+
parser.add_argument('-v', "--version", action='version',
175+
version='{0} - version {1}'.format(description,
176+
__version__))
177+
# full version
178+
versions = debug_helper.get_imported_modules_versions(sys.modules,
179+
globals())
180+
versions = '{0} - version {1}\n\n{2}'.format(description,
181+
__version__,
182+
versions)
183+
parser.add_argument('-V', "--full-versions",
184+
action=debug_helper.make_full_version_action(versions))
168185
return parser.parse_args()
169186

170187

plotThatLut/plot_that_lut.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
.. moduleauthor:: `Marie FETIVEAU <github.com/mfe>`_
66
77
"""
8-
8+
__version__ = "0.1"
99
## imports
1010
import os
1111
# OpenColorIO

plotThatLut/plot_that_lut_web.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
.. moduleauthor:: `Marie FETIVEAU <github.com/mfe>`_
66
77
"""
8-
8+
__version__ = "Prototype"
99
from os import path
1010
import ntpath
1111
import sys

plotThatLut/ptlut.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@
55
.. moduleauthor:: `Marie FETIVEAU <github.com/mfe>`_
66
77
"""
8+
__version__ = "0.1"
89
import plot_that_lut
910
import argparse
11+
from utils import debug_helper
12+
import sys
1013

1114

1215
def __get_options():
@@ -51,6 +54,18 @@ def __get_options():
5154
"Samples count. Ex : {0} for a curve or {1} for a cube."
5255
).format(plot_that_lut.DEFAULT_SAMPLE, plot_that_lut.DEFAULT_CUBE_SIZE),
5356
default=None, type=int)
57+
# version
58+
parser.add_argument('-v', "--version", action='version',
59+
version='{0} - version {1}'.format(description,
60+
__version__))
61+
# full version
62+
versions = debug_helper.get_imported_modules_versions(sys.modules,
63+
globals())
64+
versions = '{0} - version {1}\n\n{2}'.format(description,
65+
__version__,
66+
versions)
67+
parser.add_argument('-V', "--full-versions",
68+
action=debug_helper.make_full_version_action(versions))
5469
## return args
5570
return parser.parse_args()
5671

utils/clcc_helper.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
.. moduleauthor:: `Marie FETIVEAU <github.com/mfe>`_
44
55
"""
6+
__version__ = "0.1"
67
import datetime
78

89

utils/colors_helper.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
.. moduleauthor:: `Marie FETIVEAU <github.com/mfe>`_
44
55
"""
6+
__version__ = "0.1"
67
import math
78

89

utils/colorspaces.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
.. moduleauthor:: `Marie FETIVEAU <github.com/mfe>`_
44
55
"""
6+
__version__ = "0.1"
67
from utils import colors_helper
78
from abc import ABCMeta, abstractmethod
89
import math

utils/csp_helper.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
.. moduleauthor:: `Marie FETIVEAU <github.com/mfe>`_
44
55
"""
6+
__version__ = "0.1"
67
import itertools
78
from utils.lut_utils import check_arrays_length
89

0 commit comments

Comments
 (0)