Skip to content

Commit

Permalink
Merge branch 'release/v0.1.6'
Browse files Browse the repository at this point in the history
# Conflicts:
#	colour_hdri/resources/colour-hdri-examples-datasets
  • Loading branch information
KelSolaar committed Oct 27, 2019
2 parents 799091d + e59458f commit 452a656
Show file tree
Hide file tree
Showing 134 changed files with 1,317 additions and 1,594 deletions.
5 changes: 5 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
[run]
source = colour_hdri
[report]
exclude_lines =
pragma: no cover
if __name__ == .__main__.:
pass
193 changes: 193 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
name: Continuous Integration

on: [push, pull_request]

jobs:
unix-build:
name: Unix Build
strategy:
matrix:
os: [ubuntu-18.04, macOS-10.14]
python-version: [2.7, 3.6, 3.7]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Environment Variables
run: |
CI_PYTHON_VERSION=${{ matrix.python-version }}
CI_PACKAGE=colour_hdri
CI_SHA=${{ github.sha }}
CI_SLACK_WEBHOOK=${{ secrets.SLACK_WEBHOOK }}
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\"}"
CI_SLACK_FAILURE_NOTIFICATION="${CI_SLACK_SUCCESS_NOTIFICATION/4CAF50/F44336}"
CI_SLACK_FAILURE_NOTIFICATION="${CI_SLACK_FAILURE_NOTIFICATION/succeeded/failed}"
COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}
echo ::set-env name=CI_PYTHON_VERSION::$CI_PYTHON_VERSION
echo ::set-env name=CI_PACKAGE::$CI_PACKAGE
echo ::set-env name=CI_SHA::$CI_SHA
echo ::set-env name=CI_SLACK_WEBHOOK::$CI_SLACK_WEBHOOK
echo ::set-env name=CI_SLACK_SUCCESS_NOTIFICATION::$CI_SLACK_SUCCESS_NOTIFICATION
echo ::set-env name=CI_SLACK_FAILURE_NOTIFICATION::$CI_SLACK_FAILURE_NOTIFICATION
echo ::set-env name=COVERALLS_REPO_TOKEN::$COVERALLS_REPO_TOKEN
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Ubuntu - Update OS & Install APT Dependencies
if: matrix.os == 'ubuntu-18.04'
run: |
sudo apt-get update
sudo apt-get --yes install dcraw libimage-exiftool-perl
- name: macOS - Install Homebrew Dependencies
if: matrix.os == 'macOS-10.14'
run: |
brew install dcraw exiftool
brew cask install adobe-dng-converter
- name: Ubuntu - Set up Matplotlib Backend
if: matrix.os == 'ubuntu-18.04'
run: |
mkdir -p ~/.config/matplotlib
echo "backend: Agg" > ~/.config/matplotlib/matplotlibrc
- name: macOS - Set up Matplotlib Backend
if: matrix.os == 'macOS-10.14'
run: |
mkdir -p ~/.matplotlib
echo "backend: Agg" > ~/.matplotlib/matplotlibrc
- name: Install Poetry
run: |
curl -L https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -o get-poetry.py
python get-poetry.py --preview
PATH=$HOME/.poetry/bin:$PATH
echo ::set-env name=PATH::$PATH
# - "rawpy" raises a "UnicodeEncodeError" exception on Python 2.7 during installation thus skipping the "optional" packages.
# - "pathlib" is missing from "Imageio".
- name: Python 2.7 - Install Package Dependencies
if: matrix.python-version == '2.7'
run: |
poetry install --extras "plotting"
poetry env use $CI_PYTHON_VERSION
source $(poetry env info -p)/bin/activate
pip install pathlib
python -c "import imageio;imageio.plugins.freeimage.download()"
- name: Python 3.x - Install Package Dependencies
if: matrix.python-version != '2.7'
run: |
poetry install --extras "optional plotting"
poetry env use $CI_PYTHON_VERSION
source $(poetry env info -p)/bin/activate
python -c "import imageio;imageio.plugins.freeimage.download()"
- name: Lint with flake8
run: |
source $(poetry env info -p)/bin/activate
flake8 $CI_PACKAGE --count --show-source --statistics
- name: Test with nosetests
run: |
source $(poetry env info -p)/bin/activate
python -W ignore -m nose --nocapture --with-doctest --doctest-options=+ELLIPSIS --with-coverage --cover-package=$CI_PACKAGE $CI_PACKAGE
- name: Upload Coverage to coveralls.io
if: matrix.python-version == '3.6' || matrix.python-version == '3.7'
run: |
source $(poetry env info -p)/bin/activate
if [ -z "$COVERALLS_REPO_TOKEN" ]; then echo \"COVERALLS_REPO_TOKEN\" secret is undefined!; else coveralls; fi
- name: Notify Slack
if: always()
run: |
if [ "${{ job.status }}" == "Success" ]; then CI_SLACK_NOTIFICATION="$CI_SLACK_SUCCESS_NOTIFICATION"; else CI_SLACK_NOTIFICATION="$CI_SLACK_FAILURE_NOTIFICATION"; fi
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
windows-build:
name: Windows Build
strategy:
matrix:
os: [windows-2019]
python-version: [2.7, 3.6, 3.7]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Environment Variables
run: |
set CI_PYTHON_VERSION=${{ matrix.python-version }}
set CI_PACKAGE=colour_hdri
set CI_SHA=${{ github.sha }}
set CI_SLACK_WEBHOOK=${{ secrets.SLACK_WEBHOOK }}
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\"}"
set CI_SLACK_FAILURE_NOTIFICATION=%CI_SLACK_SUCCESS_NOTIFICATION:4CAF50=F44336%
set CI_SLACK_FAILURE_NOTIFICATION=%CI_SLACK_FAILURE_NOTIFICATION:succeeded=failed%
set COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}
echo ::set-env name=CI_PYTHON_VERSION::%CI_PYTHON_VERSION%
echo ::set-env name=CI_PACKAGE::%CI_PACKAGE%
echo ::set-env name=CI_SHA::%CI_SHA%
echo ::set-env name=CI_SLACK_WEBHOOK::%CI_SLACK_WEBHOOK%
echo ::set-env name=CI_SLACK_SUCCESS_NOTIFICATION::%CI_SLACK_SUCCESS_NOTIFICATION%
echo ::set-env name=CI_SLACK_FAILURE_NOTIFICATION::%CI_SLACK_FAILURE_NOTIFICATION%
echo ::set-env name=COVERALLS_REPO_TOKEN::%COVERALLS_REPO_TOKEN%
shell: cmd
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install Command Line Dependencies
run: |
curl -L https://sourceforge.net/projects/exiftool/files/exiftool-11.73.zip/download -o exiftool-11.73.zip
powershell -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('exiftool-11.73.zip', 'exiftool'); }"
copy %CD%\exiftool\"exiftool(-k).exe" %CD%\exiftool\exiftool.exe
dir %CD%\exiftool\
curl -L https://cdn.fastpictureviewer.com/bin/dcraw.zip?v=201605100 -o dcraw.zip
powershell -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('dcraw.zip', 'dcraw'); }"
curl -L https://download.adobe.com/pub/adobe/dng/win/DNGConverter_11_4.exe -o DNGConverter_11_4.exe
DNGConverter_11_4.exe /S
set PATH=%CD%\exiftool;%CD%\dcraw;"C:\Program Files\Adobe\Adobe DNG Converter";%PATH%
echo ::set-env name=PATH::%PATH%
shell: cmd
- name: Install Poetry
run: |
curl -L https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -o get-poetry.py
python get-poetry.py --preview
set PATH=%USERPROFILE%\.poetry\bin;%PATH%
echo ::set-env name=PATH::%PATH%
shell: cmd
# - "pathlib" is missing from "Imageio".
- name: Python 2.7 - Install Package Dependencies
if: matrix.python-version == '2.7'
run: |
call poetry install --extras "optional plotting"
FOR /F %%a IN ('poetry env info -p') DO SET CI_VIRTUAL_ENVIRONMENT=%%a
echo ::set-env name=CI_VIRTUAL_ENVIRONMENT::%CI_VIRTUAL_ENVIRONMENT%
call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
pip install pathlib
python -c "import imageio;imageio.plugins.freeimage.download()"
shell: cmd
- name: Python 3.x - Install Package Dependencies
if: matrix.python-version != '2.7'
run: |
call poetry install --extras "optional plotting"
FOR /F %%a IN ('poetry env info -p') DO SET CI_VIRTUAL_ENVIRONMENT=%%a
echo ::set-env name=CI_VIRTUAL_ENVIRONMENT::%CI_VIRTUAL_ENVIRONMENT%
call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
python -c "import imageio;imageio.plugins.freeimage.download()"
shell: cmd
- name: Lint with flake8
run: |
call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
flake8 %CI_PACKAGE% --count --show-source --statistics
shell: cmd
- name: Test with nosetests
run: |
call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
python -W ignore -m nose --nocapture --with-doctest --doctest-options=+ELLIPSIS --with-coverage --cover-package=%CI_PACKAGE% %CI_PACKAGE%
shell: cmd
- name: Upload Coverage to coveralls.io
if: matrix.python-version == '3.6' || matrix.python-version == '3.7'
run: |
call %CI_VIRTUAL_ENVIRONMENT%\scripts\activate
IF "%COVERALLS_REPO_TOKEN%"=="" (echo "COVERALLS_REPO_TOKEN" secret is undefined!) ELSE (coveralls)
shell: cmd
- name: Notify Slack
if: always()
run: |
IF "${{ job.status }}"=="Success" (set CI_SLACK_NOTIFICATION=%CI_SLACK_SUCCESS_NOTIFICATION%) ELSE (set CI_SLACK_NOTIFICATION=%CI_SLACK_FAILURE_NOTIFICATION%)
IF "%CI_SLACK_WEBHOOK%"=="" (echo "SLACK_WEBHOOK" secret is undefined!) ELSE (curl -k -d %CI_SLACK_NOTIFICATION% -X POST %CI_SLACK_WEBHOOK%)
shell: cmd
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ build
colour_hdri.egg-info
dist
docs/_build
docs/generated
poetry.lock
12 changes: 6 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "colour_hdri/resources/colour-hdri-examples-dataset"]
path = colour_hdri/resources/colour-hdri-examples-dataset
url = https://github.com/colour-science/colour-hdri-examples-dataset.git
[submodule "colour_hdri/resources/colour-hdri-tests-dataset"]
path = colour_hdri/resources/colour-hdri-tests-dataset
url = https://github.com/colour-science/colour-hdri-tests-dataset.git
[submodule "colour_hdri/resources/colour-hdri-examples-datasets"]
path = colour_hdri/resources/colour-hdri-examples-datasets
url = https://github.com/colour-science/colour-hdri-examples-datasets.git
[submodule "colour_hdri/resources/colour-hdri-tests-datasets"]
path = colour_hdri/resources/colour-hdri-tests-datasets
url = https://github.com/colour-science/colour-hdri-tests-datasets.git
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
repos:
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.8
hooks:
- id: flake8
exclude: examples
- repo: https://github.com/pre-commit/mirrors-yapf
rev: v0.23.0
hooks:
- id: yapf
8 changes: 8 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
build:
image: latest

python:
version: 3.6
pip_install: true
extra_requirements:
- read-the-docs
57 changes: 0 additions & 57 deletions .travis.yml

This file was deleted.

51 changes: 51 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Code of Conduct

## Our Pledge

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.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others’ private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities


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.

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.

## Scope

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.

## Enforcement


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.

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.

## Attribution

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].

For answers to common questions about this code of conduct, see [https://www.contributor-covenant.org/faq][faq].


[homepage]: https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[faq]: https://www.contributor-covenant.org/faq
10 changes: 5 additions & 5 deletions CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Contributors
============

Colour - HDRI
-------------
Development & Technical Support
-------------------------------

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

Expand All @@ -12,6 +12,6 @@ About
-----

| **Colour - HDRI** by Colour Developers
| Copyright © 2015-2019 – Colour Developers – `[email protected] <[email protected]>`_
| This software is released under terms of New BSD License: http://opensource.org/licenses/BSD-3-Clause
| `http://github.com/colour-science/colour-hdri <http://github.com/colour-science/colour-hdri>`_
| Copyright © 2015-2019 – Colour Developers – `[email protected] <[email protected]>`__
| This software is released under terms of New BSD License: https://opensource.org/licenses/BSD-3-Clause
| `https://github.com/colour-science/colour-hdri <https://github.com/colour-science/colour-hdri>`__
6 changes: 1 addition & 5 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2015, Colour Developers
Copyright (c) 2015-2019, Colour Developers
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand All @@ -22,7 +22,3 @@ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Copyright for portions of project Adobe DNG Software Development Kit (SDK) are
held by Adobe Systems, 2015 as part of project Adobe DNG SDK and are provided
under the DNG SDK License Agreement.
9 changes: 0 additions & 9 deletions MANIFEST.in

This file was deleted.

Loading

0 comments on commit 452a656

Please sign in to comment.