Skip to content

Commit 452a656

Browse files
committed
Merge branch 'release/v0.1.6'
# Conflicts: # colour_hdri/resources/colour-hdri-examples-datasets
2 parents 799091d + e59458f commit 452a656

File tree

134 files changed

+1317
-1594
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+1317
-1594
lines changed

.coveragerc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
[run]
22
source = colour_hdri
3+
[report]
4+
exclude_lines =
5+
pragma: no cover
6+
if __name__ == .__main__.:
7+
pass
Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
name: Continuous Integration
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
unix-build:
7+
name: Unix Build
8+
strategy:
9+
matrix:
10+
os: [ubuntu-18.04, macOS-10.14]
11+
python-version: [2.7, 3.6, 3.7]
12+
runs-on: ${{ matrix.os }}
13+
steps:
14+
- uses: actions/checkout@v1
15+
with:
16+
submodules: true
17+
- name: Environment Variables
18+
run: |
19+
CI_PYTHON_VERSION=${{ matrix.python-version }}
20+
CI_PACKAGE=colour_hdri
21+
CI_SHA=${{ github.sha }}
22+
CI_SLACK_WEBHOOK=${{ secrets.SLACK_WEBHOOK }}
23+
CI_SLACK_SUCCESS_NOTIFICATION="payload={\"attachments\": [{\"color\": \"#4CAF50\", \"author_name\": \"Python ${{ matrix.python-version }} build on ${{ matrix.os }}\", \"text\": \"Build for commit *${CI_SHA:0:7}* succeeded!\", \"title\": \"${{ github.repository }}@${{ github.ref }}\", \"title_link\": \"https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks\", \"footer\": \"Triggered by ${{ github.actor }}\"}], \"username\":\"Github Actions @ ${{ github.repository }}\", \"channel\":\"#continuous-integration\", \"icon_url\":\"https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png\"}"
24+
CI_SLACK_FAILURE_NOTIFICATION="${CI_SLACK_SUCCESS_NOTIFICATION/4CAF50/F44336}"
25+
CI_SLACK_FAILURE_NOTIFICATION="${CI_SLACK_FAILURE_NOTIFICATION/succeeded/failed}"
26+
COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}
27+
echo ::set-env name=CI_PYTHON_VERSION::$CI_PYTHON_VERSION
28+
echo ::set-env name=CI_PACKAGE::$CI_PACKAGE
29+
echo ::set-env name=CI_SHA::$CI_SHA
30+
echo ::set-env name=CI_SLACK_WEBHOOK::$CI_SLACK_WEBHOOK
31+
echo ::set-env name=CI_SLACK_SUCCESS_NOTIFICATION::$CI_SLACK_SUCCESS_NOTIFICATION
32+
echo ::set-env name=CI_SLACK_FAILURE_NOTIFICATION::$CI_SLACK_FAILURE_NOTIFICATION
33+
echo ::set-env name=COVERALLS_REPO_TOKEN::$COVERALLS_REPO_TOKEN
34+
- name: Set up Python ${{ matrix.python-version }}
35+
uses: actions/setup-python@v1
36+
with:
37+
python-version: ${{ matrix.python-version }}
38+
- name: Ubuntu - Update OS & Install APT Dependencies
39+
if: matrix.os == 'ubuntu-18.04'
40+
run: |
41+
sudo apt-get update
42+
sudo apt-get --yes install dcraw libimage-exiftool-perl
43+
- name: macOS - Install Homebrew Dependencies
44+
if: matrix.os == 'macOS-10.14'
45+
run: |
46+
brew install dcraw exiftool
47+
brew cask install adobe-dng-converter
48+
- name: Ubuntu - Set up Matplotlib Backend
49+
if: matrix.os == 'ubuntu-18.04'
50+
run: |
51+
mkdir -p ~/.config/matplotlib
52+
echo "backend: Agg" > ~/.config/matplotlib/matplotlibrc
53+
- name: macOS - Set up Matplotlib Backend
54+
if: matrix.os == 'macOS-10.14'
55+
run: |
56+
mkdir -p ~/.matplotlib
57+
echo "backend: Agg" > ~/.matplotlib/matplotlibrc
58+
- name: Install Poetry
59+
run: |
60+
curl -L https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -o get-poetry.py
61+
python get-poetry.py --preview
62+
PATH=$HOME/.poetry/bin:$PATH
63+
echo ::set-env name=PATH::$PATH
64+
# - "rawpy" raises a "UnicodeEncodeError" exception on Python 2.7 during installation thus skipping the "optional" packages.
65+
# - "pathlib" is missing from "Imageio".
66+
- name: Python 2.7 - Install Package Dependencies
67+
if: matrix.python-version == '2.7'
68+
run: |
69+
poetry install --extras "plotting"
70+
poetry env use $CI_PYTHON_VERSION
71+
source $(poetry env info -p)/bin/activate
72+
pip install pathlib
73+
python -c "import imageio;imageio.plugins.freeimage.download()"
74+
- name: Python 3.x - Install Package Dependencies
75+
if: matrix.python-version != '2.7'
76+
run: |
77+
poetry install --extras "optional plotting"
78+
poetry env use $CI_PYTHON_VERSION
79+
source $(poetry env info -p)/bin/activate
80+
python -c "import imageio;imageio.plugins.freeimage.download()"
81+
- name: Lint with flake8
82+
run: |
83+
source $(poetry env info -p)/bin/activate
84+
flake8 $CI_PACKAGE --count --show-source --statistics
85+
- name: Test with nosetests
86+
run: |
87+
source $(poetry env info -p)/bin/activate
88+
python -W ignore -m nose --nocapture --with-doctest --doctest-options=+ELLIPSIS --with-coverage --cover-package=$CI_PACKAGE $CI_PACKAGE
89+
- name: Upload Coverage to coveralls.io
90+
if: matrix.python-version == '3.6' || matrix.python-version == '3.7'
91+
run: |
92+
source $(poetry env info -p)/bin/activate
93+
if [ -z "$COVERALLS_REPO_TOKEN" ]; then echo \"COVERALLS_REPO_TOKEN\" secret is undefined!; else coveralls; fi
94+
- name: Notify Slack
95+
if: always()
96+
run: |
97+
if [ "${{ job.status }}" == "Success" ]; then CI_SLACK_NOTIFICATION="$CI_SLACK_SUCCESS_NOTIFICATION"; else CI_SLACK_NOTIFICATION="$CI_SLACK_FAILURE_NOTIFICATION"; fi
98+
if [ -z "$CI_SLACK_WEBHOOK" ]; then echo \"SLACK_WEBHOOK\" secret is undefined!; else curl -k -d "$CI_SLACK_NOTIFICATION" -X POST $CI_SLACK_WEBHOOK; fi
99+
windows-build:
100+
name: Windows Build
101+
strategy:
102+
matrix:
103+
os: [windows-2019]
104+
python-version: [2.7, 3.6, 3.7]
105+
runs-on: ${{ matrix.os }}
106+
steps:
107+
- uses: actions/checkout@v1
108+
with:
109+
submodules: true
110+
- name: Environment Variables
111+
run: |
112+
set CI_PYTHON_VERSION=${{ matrix.python-version }}
113+
set CI_PACKAGE=colour_hdri
114+
set CI_SHA=${{ github.sha }}
115+
set CI_SLACK_WEBHOOK=${{ secrets.SLACK_WEBHOOK }}
116+
set CI_SLACK_SUCCESS_NOTIFICATION="payload={\"attachments\": [{\"color\": \"#4CAF50\", \"author_name\": \"Python ${{ matrix.python-version }} build on ${{ matrix.os }}\", \"text\": \"Build for commit *"%CI_SHA:~0,7%"* succeeded!\", \"title\": \"${{ github.repository }}@${{ github.ref }}\", \"title_link\": \"https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks\", \"footer\": \"Triggered by ${{ github.actor }}\"}], \"username\":\"Github Actions @ ${{ github.repository }}\", \"channel\":\"#continuous-integration\", \"icon_url\":\"https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png\"}"
117+
set CI_SLACK_FAILURE_NOTIFICATION=%CI_SLACK_SUCCESS_NOTIFICATION:4CAF50=F44336%
118+
set CI_SLACK_FAILURE_NOTIFICATION=%CI_SLACK_FAILURE_NOTIFICATION:succeeded=failed%
119+
set COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}
120+
echo ::set-env name=CI_PYTHON_VERSION::%CI_PYTHON_VERSION%
121+
echo ::set-env name=CI_PACKAGE::%CI_PACKAGE%
122+
echo ::set-env name=CI_SHA::%CI_SHA%
123+
echo ::set-env name=CI_SLACK_WEBHOOK::%CI_SLACK_WEBHOOK%
124+
echo ::set-env name=CI_SLACK_SUCCESS_NOTIFICATION::%CI_SLACK_SUCCESS_NOTIFICATION%
125+
echo ::set-env name=CI_SLACK_FAILURE_NOTIFICATION::%CI_SLACK_FAILURE_NOTIFICATION%
126+
echo ::set-env name=COVERALLS_REPO_TOKEN::%COVERALLS_REPO_TOKEN%
127+
shell: cmd
128+
- name: Set up Python ${{ matrix.python-version }}
129+
uses: actions/setup-python@v1
130+
with:
131+
python-version: ${{ matrix.python-version }}
132+
- name: Install Command Line Dependencies
133+
run: |
134+
curl -L https://sourceforge.net/projects/exiftool/files/exiftool-11.73.zip/download -o exiftool-11.73.zip
135+
powershell -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('exiftool-11.73.zip', 'exiftool'); }"
136+
copy %CD%\exiftool\"exiftool(-k).exe" %CD%\exiftool\exiftool.exe
137+
dir %CD%\exiftool\
138+
curl -L https://cdn.fastpictureviewer.com/bin/dcraw.zip?v=201605100 -o dcraw.zip
139+
powershell -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('dcraw.zip', 'dcraw'); }"
140+
curl -L https://download.adobe.com/pub/adobe/dng/win/DNGConverter_11_4.exe -o DNGConverter_11_4.exe
141+
DNGConverter_11_4.exe /S
142+
set PATH=%CD%\exiftool;%CD%\dcraw;"C:\Program Files\Adobe\Adobe DNG Converter";%PATH%
143+
echo ::set-env name=PATH::%PATH%
144+
shell: cmd
145+
- name: Install Poetry
146+
run: |
147+
curl -L https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -o get-poetry.py
148+
python get-poetry.py --preview
149+
set PATH=%USERPROFILE%\.poetry\bin;%PATH%
150+
echo ::set-env name=PATH::%PATH%
151+
shell: cmd
152+
# - "pathlib" is missing from "Imageio".
153+
- name: Python 2.7 - Install Package Dependencies
154+
if: matrix.python-version == '2.7'
155+
run: |
156+
call poetry install --extras "optional plotting"
157+
FOR /F %%a IN ('poetry env info -p') DO SET CI_VIRTUAL_ENVIRONMENT=%%a
158+
echo ::set-env name=CI_VIRTUAL_ENVIRONMENT::%CI_VIRTUAL_ENVIRONMENT%
159+
call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
160+
pip install pathlib
161+
python -c "import imageio;imageio.plugins.freeimage.download()"
162+
shell: cmd
163+
- name: Python 3.x - Install Package Dependencies
164+
if: matrix.python-version != '2.7'
165+
run: |
166+
call poetry install --extras "optional plotting"
167+
FOR /F %%a IN ('poetry env info -p') DO SET CI_VIRTUAL_ENVIRONMENT=%%a
168+
echo ::set-env name=CI_VIRTUAL_ENVIRONMENT::%CI_VIRTUAL_ENVIRONMENT%
169+
call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
170+
python -c "import imageio;imageio.plugins.freeimage.download()"
171+
shell: cmd
172+
- name: Lint with flake8
173+
run: |
174+
call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
175+
flake8 %CI_PACKAGE% --count --show-source --statistics
176+
shell: cmd
177+
- name: Test with nosetests
178+
run: |
179+
call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
180+
python -W ignore -m nose --nocapture --with-doctest --doctest-options=+ELLIPSIS --with-coverage --cover-package=%CI_PACKAGE% %CI_PACKAGE%
181+
shell: cmd
182+
- name: Upload Coverage to coveralls.io
183+
if: matrix.python-version == '3.6' || matrix.python-version == '3.7'
184+
run: |
185+
call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
186+
IF "%COVERALLS_REPO_TOKEN%"=="" (echo "COVERALLS_REPO_TOKEN" secret is undefined!) ELSE (coveralls)
187+
shell: cmd
188+
- name: Notify Slack
189+
if: always()
190+
run: |
191+
IF "${{ job.status }}"=="Success" (set CI_SLACK_NOTIFICATION=%CI_SLACK_SUCCESS_NOTIFICATION%) ELSE (set CI_SLACK_NOTIFICATION=%CI_SLACK_FAILURE_NOTIFICATION%)
192+
IF "%CI_SLACK_WEBHOOK%"=="" (echo "SLACK_WEBHOOK" secret is undefined!) ELSE (curl -k -d %CI_SLACK_NOTIFICATION% -X POST %CI_SLACK_WEBHOOK%)
193+
shell: cmd

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ build
88
colour_hdri.egg-info
99
dist
1010
docs/_build
11+
docs/generated
12+
poetry.lock

.gitmodules

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
[submodule "colour_hdri/resources/colour-hdri-examples-dataset"]
2-
path = colour_hdri/resources/colour-hdri-examples-dataset
3-
url = https://github.com/colour-science/colour-hdri-examples-dataset.git
4-
[submodule "colour_hdri/resources/colour-hdri-tests-dataset"]
5-
path = colour_hdri/resources/colour-hdri-tests-dataset
6-
url = https://github.com/colour-science/colour-hdri-tests-dataset.git
1+
[submodule "colour_hdri/resources/colour-hdri-examples-datasets"]
2+
path = colour_hdri/resources/colour-hdri-examples-datasets
3+
url = https://github.com/colour-science/colour-hdri-examples-datasets.git
4+
[submodule "colour_hdri/resources/colour-hdri-tests-datasets"]
5+
path = colour_hdri/resources/colour-hdri-tests-datasets
6+
url = https://github.com/colour-science/colour-hdri-tests-datasets.git

.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

.readthedocs.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
build:
2+
image: latest
3+
4+
python:
5+
version: 3.6
6+
pip_install: true
7+
extra_requirements:
8+
- read-the-docs

.travis.yml

Lines changed: 0 additions & 57 deletions
This file was deleted.

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: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Contributors
22
============
33

4-
Colour - HDRI
5-
-------------
4+
Development & Technical Support
5+
-------------------------------
66

77
- **Thomas Mansencal**, *Visual Effects Artist @ Weta Digital*
88

@@ -12,6 +12,6 @@ About
1212
-----
1313

1414
| **Colour - HDRI** by Colour Developers
15-
| Copyright © 2015-2019 – 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-hdri <http://github.com/colour-science/colour-hdri>`_
15+
| Copyright © 2015-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-hdri <https://github.com/colour-science/colour-hdri>`__

LICENSE

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2015, Colour Developers
1+
Copyright (c) 2015-2019, Colour Developers
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without
@@ -22,7 +22,3 @@ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
2222
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2323
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2424
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25-
26-
Copyright for portions of project Adobe DNG Software Development Kit (SDK) are
27-
held by Adobe Systems, 2015 as part of project Adobe DNG SDK and are provided
28-
under the DNG SDK License Agreement.

MANIFEST.in

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)