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

Commit ac77a9c

Browse files
committed
Merge branch 'release/v0.1.6'
2 parents 99a4006 + 62201b4 commit ac77a9c

30 files changed

+1321
-1199
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@
44
.idea
55
.vscode
66
__pycache__
7-
node_modules
7+
colour_analysis.egg-info
8+
node_modules
9+
poetry.lock

.pre-commit-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
repos:
2+
- repo: https://gitlab.com/pycqa/flake8
3+
rev: 3.7.8
4+
hooks:
5+
- id: flake8
6+
- repo: https://github.com/pre-commit/mirrors-yapf
7+
rev: v0.23.0
8+
hooks:
9+
- 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 thomas.mansencal@gmail.com and michael@mauderer.me 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 - Analysis** by Colour Developers
15-
| Copyright © 2018 – Colour Developers – `colour-science@googlegroups.com <colour-science@googlegroups.com>`_
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-analysis-three.js <http://github.com/colour-science/colour-analysis-three.js>`_
15+
| Copyright © 2018-2019 – Colour Developers – `colour-science@googlegroups.com <colour-science@googlegroups.com>`__
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-analysis-three.js <https://github.com/colour-science/colour-analysis-three.js>`__

Dockerfile

Lines changed: 4 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,11 @@
1-
FROM continuumio/miniconda
1+
FROM python:3.6
22

3-
RUN apt-get update && \
4-
apt install -y \
5-
build-essential \
6-
cmake \
7-
libboost-all-dev \
8-
libbz2-dev \
9-
libgif-dev \
10-
libgl1-mesa-glx \
11-
libfreetype6-dev \
12-
libilmbase-dev \
13-
libjpeg-dev \
14-
libopenexr-dev \
15-
libpng-dev \
16-
libraw-dev \
17-
libtiff5-dev \
18-
libwebp-dev \
19-
qtbase5-dev && \
20-
apt-get clean
21-
22-
RUN cd /tmp && \
23-
wget https://github.com/OpenImageIO/oiio/archive/Release-1.8.13.tar.gz -O OpenImageIO-1.8.13.tar.gz && \
24-
tar -xvf OpenImageIO-1.8.13.tar.gz && \
25-
cd oiio-Release-1.8.13 && \
26-
make && \
27-
cp -r /tmp/oiio-Release-1.8.13/dist/linux64/bin/* /usr/local/bin/ && \
28-
cp -r /tmp/oiio-Release-1.8.13/dist/linux64/lib/* /usr/local/lib/ && \
29-
cp /tmp/oiio-Release-1.8.13/dist/linux64/lib/python2.7/site-packages/OpenImageIO.so /opt/conda/lib/python2.7/site-packages/
30-
31-
RUN /opt/conda/bin/conda install -y \
32-
flask \
33-
numpy \
34-
matplotlib \
35-
scipy \
36-
six
3+
WORKDIR /tmp
4+
COPY ./requirements.txt /tmp
5+
RUN pip install -r requirements.txt
376

387
ARG CACHE_DATE
398

40-
RUN pip install \
41-
gunicorn \
42-
Flask-Caching \
43-
git+git://github.com/colour-science/colour@develop \
44-
git+git://github.com/colour-science/flask-compress@feature/cache
45-
469
RUN mkdir -p /home/colour-analysis
4710
WORKDIR /home/colour-analysis
4811
COPY . /home/colour-analysis

README.rst

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Colour - Analysis
66
Introduction
77
------------
88

9-
Image analysis tools based on `Colour <https://github.com/colour-science/colour>`_
10-
and `Three.js <https://github.com/mrdoob/three.js/>`_.
9+
Image analysis tools based on `Colour <https://github.com/colour-science/colour>`__
10+
and `Three.js <https://github.com/mrdoob/three.js/>`__.
1111

1212
Installation
1313
------------
@@ -37,18 +37,19 @@ Development
3737

3838
.. code-block:: bash
3939
40-
$ conda create -y -n python-colour-analysis
41-
$ source activate python-colour-analysis
42-
$ conda install -y -c conda-forge colour-science
43-
$ conda install flask invoke matplotlib
44-
$ pip install git+git://github.com/colour-science/flask-compress@feature/cache
45-
$ npm run build
46-
$ python app.py
40+
$ poetry install
41+
$ poetry run invoke docker-run
42+
43+
Code of Conduct
44+
---------------
45+
46+
The *Code of Conduct*, adapted from the `Contributor Covenant 1.4 <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>`__,
47+
is available on the `Code of Conduct <https://www.colour-science.org/code-of-conduct/>`__ page.
4748

4849
About
4950
-----
5051

5152
| **Colour - Analysis** by Colour Developers
52-
| Copyright © 2018 – Colour Developers – `colour-science@googlegroups.com <colour-science@googlegroups.com>`_
53-
| This software is released under terms of New BSD License: http://opensource.org/licenses/BSD-3-Clause
54-
| `http://github.com/colour-science/colour-analysis-three.js <http://github.com/colour-science/colour-analysis-three.js>`_
53+
| Copyright © 2018-2019 – Colour Developers – `colour-science@googlegroups.com <colour-science@googlegroups.com>`__
54+
| This software is released under terms of New BSD License: https://opensource.org/licenses/BSD-3-Clause
55+
| `https://github.com/colour-science/colour-analysis-three.js <https://github.com/colour-science/colour-analysis-three.js>`__

app.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
COLOURSPACE_MODEL, IMAGE_COLOURSPACE, IMAGE_DECODING_CCTF,
2020
PRIMARY_COLOURSPACE, RGB_colourspaces, RGB_colourspace_volume_visual,
2121
RGB_image_scatter_visual, SECONDARY_COLOURSPACE, colourspace_models,
22-
decoding_cctfs, image_data, pointer_gamut_visual, spectral_locus_visual,
22+
cctf_decodings, image_data, pointer_gamut_visual, spectral_locus_visual,
2323
visible_spectrum_visual)
2424

2525
__author__ = 'Colour Developers'
26-
__copyright__ = 'Copyright (C) 2018 - Colour Developers'
27-
__license__ = 'New BSD License - http://opensource.org/licenses/BSD-3-Clause'
26+
__copyright__ = 'Copyright (C) 2018-2019 - Colour Developers'
27+
__license__ = 'New BSD License - https://opensource.org/licenses/BSD-3-Clause'
2828
__maintainer__ = 'Colour Developers'
2929
__email__ = 'colour-science@googlegroups.com'
3030
__status__ = 'Production'
@@ -33,7 +33,7 @@
3333

3434
__major_version__ = '0'
3535
__minor_version__ = '1'
36-
__change_version__ = '5'
36+
__change_version__ = '6'
3737
__version__ = '.'.join(
3838
(__major_version__,
3939
__minor_version__,
@@ -42,7 +42,7 @@
4242

4343
__all__ = [
4444
'APP', 'CACHE', 'CACHE_DEFAULT_TIMEOUT', 'IMAGES_DIRECTORY',
45-
'images_response', 'decoding_cctfs_response',
45+
'images_response', 'cctf_decodings_response',
4646
'colourspace_models_response', 'RGB_colourspaces_response',
4747
'image_data_response', 'RGB_colourspace_volume_visual_response',
4848
'RGB_image_scatter_visual_response', 'spectral_locus_visual_response',
@@ -75,7 +75,7 @@
7575
APP.config.update(
7676
COMPRESS_LEVEL=3,
7777
COMPRESS_CACHE_KEY=lambda x: x.full_path,
78-
COMPRESS_CACHE_BACKEND=lambda: SimpleCache(default_timeout=
78+
COMPRESS_CACHE_BACKEND=lambda: SimpleCache(default_timeout= # noqa
7979
CACHE_DEFAULT_TIMEOUT),
8080
)
8181

@@ -157,7 +157,7 @@ def images_response():
157157

158158
@APP.route('/decoding-cctfs')
159159
@CACHE.cached(timeout=CACHE_DEFAULT_TIMEOUT, query_string=True)
160-
def decoding_cctfs_response():
160+
def cctf_decodings_response():
161161
"""
162162
Returns the decoding colour component transfer functions response.
163163
@@ -167,7 +167,7 @@ def decoding_cctfs_response():
167167
Decoding colour component transfer functions response.
168168
"""
169169

170-
json_data = decoding_cctfs()
170+
json_data = cctf_decodings()
171171

172172
response = Response(json_data, status=200, mimetype='application/json')
173173
response.headers['X-Content-Length'] = len(json_data)

0 commit comments

Comments
 (0)