Skip to content

Commit 8445b54

Browse files
committed
Merge branch 'feature/v0.1.10' into develop
2 parents 7c2bfee + 6da94a9 commit 8445b54

13 files changed

+203
-34
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
.coverage
66
.idea
77
__pycache__
8+
poetry.lock

.pre-commit-config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
repos:
2+
- repo: https://gitlab.com/pycqa/flake8
3+
rev: 3.7.8
4+
hooks:
5+
- id: flake8
6+
exclude: examples
7+
- repo: https://github.com/pre-commit/mirrors-yapf
8+
rev: v0.23.0
9+
hooks:
10+
- id: yapf

CODE_OF_CONDUCT.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
## Our Standards
8+
9+
Examples of behavior that contributes to creating a positive environment include:
10+
11+
* Using welcoming and inclusive language
12+
* Being respectful of differing viewpoints and experiences
13+
* Gracefully accepting constructive criticism
14+
* Focusing on what is best for the community
15+
* Showing empathy towards other community members
16+
17+
Examples of unacceptable behavior by participants include:
18+
19+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
* Trolling, insulting/derogatory comments, and personal or political attacks
21+
* Public or private harassment
22+
* Publishing others’ private information, such as a physical or electronic address, without explicit permission
23+
* Other conduct which could reasonably be considered inappropriate in a professional setting
24+
25+
## Our Responsibilities
26+
27+
28+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
29+
30+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
31+
32+
## Scope
33+
34+
This Code of Conduct applies within all project spaces, and it also applies when an individual is representing the project or its community in public spaces. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
35+
36+
## Enforcement
37+
38+
39+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting Thomas Mansencal and Michael Mauderer via email at [email protected] and [email protected] respectively. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
40+
41+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project’s leadership.
42+
43+
## Attribution
44+
45+
This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct.html][homepage].
46+
47+
For answers to common questions about this code of conduct, see [https://www.contributor-covenant.org/faq][faq].
48+
49+
50+
[homepage]: https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
51+
[faq]: https://www.contributor-covenant.org/faq

CONTRIBUTORS.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ About
1212
-----
1313

1414
| **Colour - Dash** by Colour Developers
15-
| Copyright © 2018 – Colour Developers – `[email protected] <[email protected]>`_
16-
| This software is released under terms of New BSD License: http://opensource.org/licenses/BSD-3-Clause
17-
| `http://github.com/colour-science/colour-dash <http://github.com/colour-science/colour-dash>`_
15+
| Copyright © 2018-2019 – Colour Developers – `[email protected] <[email protected]>`__
16+
| This software is released under terms of New BSD License: https://opensource.org/licenses/BSD-3-Clause
17+
| `https://github.com/colour-science/colour-dash <https://github.com/colour-science/colour-dash>`__

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ WORKDIR /home/dash/colour-dash
1616
COPY . /home/dash/colour-dash
1717

1818
CMD sh -c 'if [ -z "${SSL_CERTIFICATE}" ]; then \
19-
gunicorn -b 0.0.0.0:8000 index:SERVER; else \
20-
gunicorn --certfile "${SSL_CERTIFICATE}" --keyfile "${SSL_KEY}" -b 0.0.0.0:8000 index:SERVER; fi'
19+
gunicorn --log-level debug -b 0.0.0.0:8000 index:SERVER; else \
20+
gunicorn --certfile "${SSL_CERTIFICATE}" --keyfile "${SSL_KEY}" --log-level debug -b 0.0.0.0:8000 index:SERVER; fi'

README.rst

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Colour - Dash
66
Introduction
77
------------
88

9-
Various colour science `Dash <https://dash.plot.ly/>`_ apps built on top of
10-
`Colour <https://github.com/colour-science/colour>`_.
9+
Various colour science `Dash <https://dash.plot.ly/>`__ apps built on top of
10+
`Colour <https://github.com/colour-science/colour>`__.
1111

1212
Installation
1313
------------
@@ -43,10 +43,16 @@ Development
4343
$ pip install dash dash-core-components dash-html-components dash-renderer plotly
4444
$ python index.py
4545
46+
Code of Conduct
47+
---------------
48+
49+
The *Code of Conduct*, adapted from the `Contributor Covenant 1.4 <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>`__,
50+
is available on the `Code of Conduct <https://www.colour-science.org/code-of-conduct/>`__ page.
51+
4652
About
4753
-----
4854

4955
| **Colour - Dash** by Colour Developers
50-
| Copyright © 2018 – Colour Developers – `[email protected] <[email protected]>`_
51-
| This software is released under terms of New BSD License: http://opensource.org/licenses/BSD-3-Clause
52-
| `http://github.com/colour-science/colour-dash <http://github.com/colour-science/colour-dash>`_
56+
| Copyright © 2018-2019 – Colour Developers – `[email protected] <[email protected]>`__
57+
| This software is released under terms of New BSD License: https://opensource.org/licenses/BSD-3-Clause
58+
| `https://github.com/colour-science/colour-dash <https://github.com/colour-science/colour-dash>`__

app.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
from flask import Flask
1212

1313
__author__ = 'Colour Developers'
14-
__copyright__ = 'Copyright (C) 2018 - Colour Developers'
15-
__license__ = 'New BSD License - http://opensource.org/licenses/BSD-3-Clause'
14+
__copyright__ = 'Copyright (C) 2018-2019 - Colour Developers'
15+
__license__ = 'New BSD License - https://opensource.org/licenses/BSD-3-Clause'
1616
__maintainer__ = 'Colour Developers'
1717
__email__ = '[email protected]'
1818
__status__ = 'Production'
@@ -21,7 +21,7 @@
2121

2222
__major_version__ = '0'
2323
__minor_version__ = '1'
24-
__change_version__ = '9'
24+
__change_version__ = '10'
2525
__version__ = '.'.join(
2626
(__major_version__,
2727
__minor_version__,
@@ -33,21 +33,21 @@
3333
"""
3434
*Flask* server hosting the *Dash* app.
3535
36-
SERVER : Flask
36+
SERVER : Flask
3737
"""
3838

3939
SERVER_URL = os.environ.get('COLOUR_DASH_SERVER')
4040
"""
4141
Server url used to construct permanent links for the individual apps.
4242
43-
SERVER_URL : unicode
43+
SERVER_URL : unicode
4444
"""
4545

4646
APP = dash.Dash(__application_name__, server=SERVER)
4747
"""
4848
*Dash* app.
4949
50-
APP : Dash
50+
APP : Dash
5151
"""
5252

5353
APP.config['suppress_callback_exceptions'] = True

apps/common.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
import colour
1010

1111
__author__ = 'Colour Developers'
12-
__copyright__ = 'Copyright (C) 2018 - Colour Developers'
13-
__license__ = 'New BSD License - http://opensource.org/licenses/BSD-3-Clause'
12+
__copyright__ = 'Copyright (C) 2018-2019 - Colour Developers'
13+
__license__ = 'New BSD License - https://opensource.org/licenses/BSD-3-Clause'
1414
__maintainer__ = 'Colour Developers'
1515
__email__ = '[email protected]'
1616
__status__ = 'Production'
@@ -28,7 +28,7 @@
2828
"""
2929
*RGB* colourspace options for a :class:`Dropdown` class instance.
3030
31-
RGB_COLOURSPACES_OPTIONS : list
31+
RGB_COLOURSPACES_OPTIONS : list
3232
"""
3333

3434
CHROMATIC_ADAPTATION_TRANSFORM_OPTIONS = [{
@@ -39,7 +39,7 @@
3939
*Chromatic adaptation transform* options for a :class:`Dropdown` class
4040
instance.
4141
42-
CHROMATIC_ADAPTATION_TRANSFORM_OPTIONS : list
42+
CHROMATIC_ADAPTATION_TRANSFORM_OPTIONS : list
4343
"""
4444

4545
ILLUMINANTS_OPTIONS = [{
@@ -51,7 +51,7 @@
5151
*CIE 1931 2 Degree Standard Observer* illuminant options for a
5252
:class:`Dropdown`class instance.
5353
54-
ILLUMINANTS_OPTIONS : list
54+
ILLUMINANTS_OPTIONS : list
5555
"""
5656

5757
NUKE_COLORMATRIX_NODE_TEMPLATE = """
@@ -90,7 +90,12 @@ def nuke_format_matrix(M, decimals=10):
9090
*The Foundry Nuke* formatted matrix.
9191
"""
9292

93-
pretty = lambda x: ' '.join(map('{{: 0.{0}f}}'.format(decimals).format, x))
93+
def pretty(x):
94+
"""
95+
Prettify given number.
96+
"""
97+
98+
return ' '.join(map('{{: 0.{0}f}}'.format(decimals).format, x))
9499

95100
tcl = '{{{0}}}\n'.format(pretty(M[0]))
96101
tcl += ' {{{0}}}\n'.format(pretty(M[1]))

apps/rgb_colourspace_models_chromatically_adapted_primaries.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import numpy as np
1010
import urlparse
1111
from dash.dependencies import Input, Output
12-
from dash_core_components import Dropdown, Link, Markdown, Slider, Textarea
12+
from dash_core_components import Dropdown, Link, Markdown, Slider
1313
from dash_html_components import A, Code, Div, H3, H5, Li, Pre, Ul
1414

1515
import colour
@@ -19,8 +19,8 @@
1919
ILLUMINANTS_OPTIONS, RGB_COLOURSPACES_OPTIONS)
2020

2121
__author__ = 'Colour Developers'
22-
__copyright__ = 'Copyright (C) 2018 - Colour Developers'
23-
__license__ = 'New BSD License - http://opensource.org/licenses/BSD-3-Clause'
22+
__copyright__ = 'Copyright (C) 2018-2019 - Colour Developers'
23+
__license__ = 'New BSD License - https://opensource.org/licenses/BSD-3-Clause'
2424
__maintainer__ = 'Colour Developers'
2525
__email__ = '[email protected]'
2626
__status__ = 'Production'

apps/rgb_colourspace_models_transformation_matrix.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import numpy as np
1010
import urlparse
1111
from dash.dependencies import Input, Output
12-
from dash_core_components import Dropdown, Link, Markdown, Slider, Textarea
12+
from dash_core_components import Dropdown, Link, Markdown, Slider
1313
from dash_html_components import A, Code, Div, H3, H5, Li, Pre, Ul
1414

1515
import colour
@@ -20,8 +20,8 @@
2020
RGB_COLOURSPACES_OPTIONS, nuke_format_matrix)
2121

2222
__author__ = 'Colour Developers'
23-
__copyright__ = 'Copyright (C) 2018 - Colour Developers'
24-
__license__ = 'New BSD License - http://opensource.org/licenses/BSD-3-Clause'
23+
__copyright__ = 'Copyright (C) 2018-2019 - Colour Developers'
24+
__license__ = 'New BSD License - https://opensource.org/licenses/BSD-3-Clause'
2525
__maintainer__ = 'Colour Developers'
2626
__email__ = '[email protected]'
2727
__status__ = 'Production'

0 commit comments

Comments
 (0)