Skip to content

Commit 738ba97

Browse files
KelSolaarmichdolan
andauthored
PR: Reduce default verbosity. (#9)
* Implement support for additional data. Signed-off-by: Thomas Mansencal <[email protected]> * Lower verbosity level for many logging statements. Signed-off-by: Thomas Mansencal <[email protected]> * Overhaul CI workflow. Signed-off-by: Thomas Mansencal <[email protected]> Co-authored-by: Michael Dolan <[email protected]>
1 parent 998dbf0 commit 738ba97

File tree

5 files changed

+53
-109
lines changed

5 files changed

+53
-109
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 21 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -3,108 +3,50 @@ name: Continuous Integration
33
on: [push, pull_request]
44

55
jobs:
6-
unix-build:
7-
name: Unix Build
6+
continuous-integration:
7+
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}
88
strategy:
99
matrix:
10-
os: [ubuntu-18.04, macOS-latest]
10+
os: [macOS-latest, ubuntu-18.04, windows-latest]
1111
python-version: [3.7, 3.8]
12+
fail-fast: false
1213
runs-on: ${{ matrix.os }}
1314
steps:
1415
- uses: actions/checkout@v1
1516
with:
1617
submodules: recursive
1718
- name: Environment Variables
1819
run: |
19-
CI_PYTHON_VERSION=${{ matrix.python-version }}
20-
CI_PACKAGE=opencolorio_config_aces
21-
CI_SHA=${{ github.sha }}
22-
CI_FLAKE8_EXCLUDED=aces-dev
23-
COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}
24-
echo ::set-env name=CI_PYTHON_VERSION::$CI_PYTHON_VERSION
25-
echo ::set-env name=CI_PACKAGE::$CI_PACKAGE
26-
echo ::set-env name=CI_SHA::$CI_SHA
27-
echo ::set-env name=COVERALLS_REPO_TOKEN::$COVERALLS_REPO_TOKEN
28-
echo ::set-env name=CI_FLAKE8_EXCLUDED::$CI_FLAKE8_EXCLUDED
20+
echo "CI_PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
21+
echo "CI_PACKAGE=opencolorio_config_aces" >> $GITHUB_ENV
22+
echo "CI_SHA=${{ github.sha }}" >> $GITHUB_ENV
23+
echo "CI_FLAKE8_EXCLUDED=aces-dev" >> $GITHUB_ENV
24+
echo "COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}" >> $GITHUB_ENV
25+
shell: bash
2926
- name: Set up Python ${{ matrix.python-version }}
3027
uses: actions/setup-python@v1
3128
with:
3229
python-version: ${{ matrix.python-version }}
3330
- name: Install Poetry
3431
run: |
3532
curl -L https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -o get-poetry.py
36-
python get-poetry.py --preview --version 1.0.0b3
37-
PATH=$HOME/.poetry/bin:$PATH
38-
echo ::set-env name=PATH::$PATH
33+
python get-poetry.py --version 1.0.10
34+
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
35+
shell: bash
3936
- name: Install Package Dependencies
4037
run: |
4138
poetry install
42-
source $(poetry env info -p)/bin/activate
39+
shell: bash
4340
- name: Lint with flake8
4441
run: |
45-
source $(poetry env info -p)/bin/activate
46-
flake8 $CI_PACKAGE --count --show-source --statistics --exclude=$CI_FLAKE8_EXCLUDED
42+
poetry run flake8 $CI_PACKAGE --count --show-source --statistics --exclude=$CI_FLAKE8_EXCLUDED
43+
shell: bash
4744
- name: Test with nosetests
4845
run: |
49-
source $(poetry env info -p)/bin/activate
50-
python -W ignore -m nose -q -v --with-doctest --doctest-options=+ELLIPSIS --with-coverage --cover-package=$CI_PACKAGE $CI_PACKAGE
46+
poetry run python -W ignore -m nose -q -v --with-doctest --doctest-options=+ELLIPSIS --with-coverage --cover-package=$CI_PACKAGE $CI_PACKAGE
47+
shell: bash
5148
# - name: Upload Coverage to coveralls.io
5249
# run: |
53-
# source $(poetry env info -p)/bin/activate
54-
# if [ -z "$COVERALLS_REPO_TOKEN" ]; then echo \"COVERALLS_REPO_TOKEN\" secret is undefined!; else coveralls; fi
55-
windows-build:
56-
name: Windows Build
57-
strategy:
58-
matrix:
59-
os: [windows-2019]
60-
python-version: [3.7, 3.8]
61-
runs-on: ${{ matrix.os }}
62-
steps:
63-
- uses: actions/checkout@v1
64-
with:
65-
submodules: recursive
66-
- name: Environment Variables
67-
run: |
68-
set CI_PYTHON_VERSION=${{ matrix.python-version }}
69-
set CI_PACKAGE=opencolorio_config_aces
70-
set CI_SHA=${{ github.sha }}
71-
set CI_FLAKE8_EXCLUDED=aces-dev
72-
set COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}
73-
echo ::set-env name=CI_PYTHON_VERSION::%CI_PYTHON_VERSION%
74-
echo ::set-env name=CI_PACKAGE::%CI_PACKAGE%
75-
echo ::set-env name=CI_SHA::%CI_SHA%
76-
echo ::set-env name=COVERALLS_REPO_TOKEN::%COVERALLS_REPO_TOKEN%
77-
echo ::set-env name=CI_FLAKE8_EXCLUDED::%CI_FLAKE8_EXCLUDED%
78-
shell: cmd
79-
- name: Set up Python ${{ matrix.python-version }}
80-
uses: actions/setup-python@v1
81-
with:
82-
python-version: ${{ matrix.python-version }}
83-
- name: Install Poetry
84-
run: |
85-
curl -L https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -o get-poetry.py
86-
python get-poetry.py --preview --version 1.0.0b3
87-
set PATH=%USERPROFILE%\.poetry\bin;%PATH%
88-
echo ::set-env name=PATH::%PATH%
89-
shell: cmd
90-
- name: Install Package Dependencies
91-
run: |
92-
call poetry install
93-
FOR /F %%a IN ('poetry env info -p') DO SET CI_VIRTUAL_ENVIRONMENT=%%a
94-
echo ::set-env name=CI_VIRTUAL_ENVIRONMENT::%CI_VIRTUAL_ENVIRONMENT%
95-
shell: cmd
96-
- name: Lint with flake8
97-
run: |
98-
call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
99-
flake8 %CI_PACKAGE% --count --show-source --statistics --exclude=%CI_FLAKE8_EXCLUDED%
100-
shell: cmd
101-
- name: Test with nosetests
102-
run: |
103-
call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
104-
python -W ignore -m nose -q -v --with-doctest --doctest-options=+ELLIPSIS --with-coverage --cover-package=%CI_PACKAGE% %CI_PACKAGE%
105-
shell: cmd
106-
# - name: Upload Coverage to coveralls.io
107-
# run: |
108-
# call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
109-
# IF "%COVERALLS_REPO_TOKEN%"=="" (echo "COVERALLS_REPO_TOKEN" secret is undefined!) ELSE (coveralls)
110-
# shell: cmd
50+
# if [ -z "$COVERALLS_REPO_TOKEN" ]; then echo \"COVERALLS_REPO_TOKEN\" secret is undefined!; else poetry run coveralls; fi
51+
# shell: bash
52+

opencolorio_config_aces/config/generation/common.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -536,11 +536,11 @@ def generate_config(data, config_name=None, validate=True):
536536
config.setDescription(data.description)
537537

538538
for colorspace, role in data.roles.items():
539-
logging.info(f'Adding "{colorspace}" colorspace as "{role}" role.')
539+
logging.debug(f'Adding "{colorspace}" colorspace as "{role}" role.')
540540
config.setRole(role, colorspace)
541541

542542
for colorspace in data.colorspaces:
543-
logging.info(f'Adding colorspace "{colorspace.getName()}".')
543+
logging.debug(f'Adding colorspace "{colorspace.getName()}".')
544544
config.addColorSpace(colorspace)
545545

546546
for view in data.views:
@@ -552,14 +552,14 @@ def generate_config(data, config_name=None, validate=True):
552552
rule = view.get('rule')
553553
description = view.get('rule')
554554
if colorspace:
555-
logging.info(f'Adding "{view_name}" view to "{display}" display '
556-
f'using "{colorspace}" colorspace.')
555+
logging.debug(f'Adding "{view_name}" view to "{display}" display '
556+
f'using "{colorspace}" colorspace.')
557557

558558
config.addDisplayView(display, view_name, colorspace, looks)
559559
else:
560-
logging.info(f'Adding "{view_name}" view to "{display}" display '
561-
f'using "{view_transform}" view_transform, '
562-
f'"{rule}" rule and "{description}" description.')
560+
logging.debug(f'Adding "{view_name}" view to "{display}" display '
561+
f'using "{view_transform}" view_transform, '
562+
f'"{rule}" rule and "{description}" description.')
563563

564564
config.addDisplayView(display, view_name, view_transform, looks,
565565
rule, description)
@@ -576,19 +576,19 @@ def generate_config(data, config_name=None, validate=True):
576576
pattern = file_rule.get('pattern')
577577
extension = file_rule.get('extension')
578578
if name == 'Default':
579-
logging.info(f'Setting "{name}" file rule with '
580-
f'"{colorspace}" colorspace.')
579+
logging.debug(f'Setting "{name}" file rule with '
580+
f'"{colorspace}" colorspace.')
581581
file_rules.setDefaultRuleColorSpace(colorspace)
582582
elif regex:
583-
logging.info(f'Adding "{name}" file rule with '
584-
f'"{regex}" regex pattern for '
585-
f'"{colorspace}" colorspace.')
583+
logging.debug(f'Adding "{name}" file rule with '
584+
f'"{regex}" regex pattern for '
585+
f'"{colorspace}" colorspace.')
586586
file_rules.insertRule(rule_index, name, colorspace, regex)
587587
rule_index += 1
588588
else:
589-
logging.info(f'Adding "{name}" file rule with '
590-
f'"{pattern}" pattern and "{extension}" extension '
591-
f'for "{colorspace}" colorspace.')
589+
logging.debug(f'Adding "{name}" file rule with '
590+
f'"{pattern}" pattern and "{extension}" extension '
591+
f'for "{colorspace}" colorspace.')
592592
file_rules.insertRule(rule_index, name, colorspace, pattern,
593593
extension)
594594
rule_index += 1

opencolorio_config_aces/config/reference/discover/classify.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,8 +1217,8 @@ def discover_aces_ctl_transforms(root_directory=ACES_CTL_TRANSFORMS_ROOT):
12171217

12181218
ctl_transform = os.path.join(directory, filename)
12191219

1220-
logging.info(f'"{ctl_transform_relative_path(ctl_transform)}" '
1221-
f'CTL transform was found!')
1220+
logging.debug(f'"{ctl_transform_relative_path(ctl_transform)}" '
1221+
f'CTL transform was found!')
12221222

12231223
ctl_transforms[directory].append(ctl_transform)
12241224

@@ -1292,7 +1292,8 @@ def classify_aces_ctl_transforms(unclassified_ctl_transforms):
12921292
ctl_transform = CTLTransform(
12931293
list(pairs.values())[0], family, genus)
12941294

1295-
logging.info(f'Classifying "{ctl_transform}" under "{genus}".')
1295+
logging.debug(
1296+
f'Classifying "{ctl_transform}" under "{genus}".')
12961297

12971298
classified_ctl_transforms[family][genus][basename] = (
12981299
ctl_transform)
@@ -1306,7 +1307,8 @@ def classify_aces_ctl_transforms(unclassified_ctl_transforms):
13061307
ctl_transform = CTLTransformPair(forward_ctl_transform,
13071308
inverse_ctl_transform)
13081309

1309-
logging.info(f'Classifying "{ctl_transform}" under "{genus}".')
1310+
logging.debug(
1311+
f'Classifying "{ctl_transform}" under "{genus}".')
13101312

13111313
classified_ctl_transforms[family][genus][basename] = (
13121314
ctl_transform)

opencolorio_config_aces/config/reference/discover/graph.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ def build_aces_conversion_graph(ctl_transforms):
9696
# a "OCES" target.
9797
if family in ('csc', 'input_transform', 'lmt'):
9898
if source == 'ACES2065-1':
99-
logging.info(f'"{ctl_transform}" ctl transform from the '
100-
f'"{family}" family uses "{source}" as source, '
101-
f'skipping!')
99+
logging.debug(f'"{ctl_transform}" ctl transform from the '
100+
f'"{family}" family uses "{source}" as source, '
101+
f'skipping!')
102102
continue
103103
elif family == 'output_transform':
104104
if target in ('ACES2065-1', 'OCES'):
105-
logging.info(f'"{ctl_transform}" ctl transform from the '
106-
f'"{family}" family uses "{target}" as target, '
107-
f'skipping!')
105+
logging.debug(f'"{ctl_transform}" ctl transform from the '
106+
f'"{family}" family uses "{target}" as target, '
107+
f'skipping!')
108108
continue
109109

110110
source = (source if source in ('ACES2065-1', 'OCES') else
@@ -120,10 +120,10 @@ def build_aces_conversion_graph(ctl_transforms):
120120
if node not in graph.nodes():
121121
graph.add_node(node, data=ctl_transform, serialized=serialized)
122122
else:
123-
logging.info(f'"{node}" node was already added to '
124-
f'the "aces-dev" conversion graph '
125-
f'by the "{node_to_ctl_transform(graph, node)}" '
126-
f'"CTL" transform, skipping!')
123+
logging.debug(f'"{node}" node was already added to '
124+
f'the "aces-dev" conversion graph '
125+
f'by the "{node_to_ctl_transform(graph, node)}" '
126+
f'"CTL" transform, skipping!')
127127

128128
graph.add_edge(source, target)
129129

opencolorio_config_aces/config/reference/generate/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ def create_builtin_transform(style):
450450

451451
verbose_path = " --> ".join(
452452
dict.fromkeys(itertools.chain.from_iterable(path)))
453-
logging.info(f'Creating "BuiltinTransform" with {verbose_path} path.')
453+
logging.debug(f'Creating "BuiltinTransform" with {verbose_path} path.')
454454

455455
for edge in path:
456456
source, target = edge

0 commit comments

Comments
 (0)