-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # colour_hdri/resources/colour-hdri-examples-datasets
- Loading branch information
Showing
134 changed files
with
1,317 additions
and
1,594 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,5 @@ build | |
colour_hdri.egg-info | ||
dist | ||
docs/_build | ||
docs/generated | ||
poetry.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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* | ||
|
||
|
@@ -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>`__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.