Skip to content

Commit

Permalink
Merge branch 'release/v0.3.15'
Browse files Browse the repository at this point in the history
  • Loading branch information
KelSolaar committed Jan 25, 2020
2 parents 50d5639 + 6de4c33 commit 6067936
Show file tree
Hide file tree
Showing 424 changed files with 5,539 additions and 1,914 deletions.
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: colour-science # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
42 changes: 28 additions & 14 deletions .github/workflows/continuous-integration.yml
Expand Up @@ -7,8 +7,8 @@ jobs:
name: Unix Build
strategy:
matrix:
os: [ubuntu-18.04, macOS-10.14]
python-version: [2.7, 3.6, 3.7]
os: [ubuntu-18.04, macOS-latest]
python-version: [2.7, 3.5, 3.6, 3.7, 3.8]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
Expand All @@ -21,6 +21,8 @@ jobs:
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}"
CI_OPENIMAGEIO_ARTIFACT=https://github.com/colour-science/artifacts/suites/407105362/artifacts/1192372
CI_OPENIMAGEIO_VERSION=2.1.10.1
COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}
MPLBACKEND=AGG
echo ::set-env name=CI_PYTHON_VERSION::$CI_PYTHON_VERSION
Expand All @@ -30,6 +32,8 @@ jobs:
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
echo ::set-env name=CI_OPENIMAGEIO_ARTIFACT::$CI_OPENIMAGEIO_ARTIFACT
echo ::set-env name=CI_OPENIMAGEIO_VERSION::$CI_OPENIMAGEIO_VERSION
echo ::set-env name=MPLBACKEND::$MPLBACKEND
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
Expand All @@ -38,29 +42,32 @@ jobs:
- name: Ubuntu - Update OS & Install APT Dependencies
if: matrix.os == 'ubuntu-18.04'
run: |
sudo apt-get update
sudo apt-get --yes install libboost-all-dev libilmbase-dev libopenexr-dev libpng-dev libtiff5-dev
- 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
python get-poetry.py --preview --version 1.0.0b3
PATH=$HOME/.poetry/bin:$PATH
echo ::set-env name=PATH::$PATH
- name: Python 3.8 - Matplotlib
if: matrix.python-version == '3.8'
run: |
sed -i.bak 's/python = "~2.7 || ^3.5"/python = "^3.6"/g' pyproject.toml
sed -i.bak 's/matplotlib = { version = "\*"/matplotlib = { version = "^3.1"/g' pyproject.toml
- name: Install Package Dependencies
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: Ubuntu - Install OpenImageIO
if: matrix.os == 'ubuntu-18.04' && matrix.python-version == '3.6'
run: |
curl -L https://github.com/colour-science/artifacts/suites/233020849/artifacts/44967 -o OpenImageIO-Release-2.0.10.zip
unzip OpenImageIO-Release-2.0.10.zip
sudo cp OpenImageIO-Release-2.0.10/linux64/bin/* /usr/bin/
sudo cp -r OpenImageIO-Release-2.0.10/linux64/lib/* /usr/lib/
sudo rm -rf /usr/lib/python3.6
cp OpenImageIO-Release-2.0.10/linux64/lib/python3.6/site-packages/OpenImageIO.so $(poetry env info -p)/lib/python3.6/site-packages/
curl -L $CI_OPENIMAGEIO_ARTIFACT -o OpenImageIO-Release-$CI_OPENIMAGEIO_VERSION.zip
unzip OpenImageIO-Release-$CI_OPENIMAGEIO_VERSION.zip -d OpenImageIO-Release-$CI_OPENIMAGEIO_VERSION
sudo cp OpenImageIO-Release-$CI_OPENIMAGEIO_VERSION/linux64/bin/* /usr/bin/
sudo cp -r OpenImageIO-Release-$CI_OPENIMAGEIO_VERSION/linux64/lib/* /usr/lib/
sudo rm -rf /usr/lib/python$CI_PYTHON_VERSION
cp OpenImageIO-Release-$CI_OPENIMAGEIO_VERSION/linux64/lib/python$CI_PYTHON_VERSION/site-packages/OpenImageIO.so $(poetry env info -p)/lib/python$CI_PYTHON_VERSION/site-packages/
- name: Lint with flake8
run: |
source $(poetry env info -p)/bin/activate
Expand All @@ -70,7 +77,7 @@ jobs:
source $(poetry env info -p)/bin/activate
python -W ignore -m nose -v --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'
if: matrix.python-version == '3.6' || matrix.python-version == '3.7' || matrix.python-version == '3.8'
run: |
source $(poetry env info -p)/bin/activate
if [ -z "$COVERALLS_REPO_TOKEN" ]; then echo \"COVERALLS_REPO_TOKEN\" secret is undefined!; else coveralls; fi
Expand All @@ -84,7 +91,7 @@ jobs:
strategy:
matrix:
os: [windows-2019]
python-version: [2.7, 3.6, 3.7]
python-version: [2.7, 3.5, 3.6, 3.7]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
Expand All @@ -107,38 +114,45 @@ jobs:
echo ::set-env name=CI_SLACK_FAILURE_NOTIFICATION::%CI_SLACK_FAILURE_NOTIFICATION%
echo ::set-env name=COVERALLS_REPO_TOKEN::%COVERALLS_REPO_TOKEN%
echo ::set-env name=MPLBACKEND::%MPLBACKEND%
shell: cmd
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- 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
python get-poetry.py --preview --version 1.0.0b3
set PATH=%USERPROFILE%\.poetry\bin;%PATH%
echo ::set-env name=PATH::%PATH%
shell: cmd
- name: Install Package Dependencies
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 -v --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
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Expand Up @@ -3,8 +3,9 @@ repos:
rev: 3.7.8
hooks:
- id: flake8
exclude: examples
exclude: examples|setup\.py
- repo: https://github.com/pre-commit/mirrors-yapf
rev: v0.23.0
hooks:
- id: yapf
exclude: setup\.py

0 comments on commit 6067936

Please sign in to comment.