-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate to cirrus-ci and support mpl 3.4.1
- Loading branch information
Showing
41 changed files
with
221 additions
and
70 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 |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Reference: | ||
# - https://cirrus-ci.org/guide/writing-tasks/ | ||
# - https://cirrus-ci.org/guide/linux/ | ||
# - https://cirrus-ci.org/guide/macOS/ | ||
# - https://cirrus-ci.org/guide/windows/ | ||
# - https://hub.docker.com/_/gcc/ | ||
# - https://hub.docker.com/_/python/ | ||
|
||
# | ||
# Global defaults. | ||
# | ||
container: | ||
image: python:3.8 | ||
|
||
env: | ||
# Maximum cache period (in weeks) before forcing a new cache upload. | ||
CACHE_PERIOD: "2" | ||
# Increment the build number to force new mambaforge cache upload. | ||
MAMBA_CACHE_BUILD: "0" | ||
# Increment the build number to force new phash cache upload. | ||
PHASH_CACHE_BUILD: "0" | ||
# Base environment conda packages to be installed | ||
MAMBA_CACHE_PACKAGES: "conda-lock" | ||
|
||
# | ||
# Testing (Linux) | ||
# | ||
linux_task: | ||
auto_cancellation: true | ||
container: | ||
image: gcc:latest | ||
env: | ||
PATH: ${HOME}/mambaforge/bin:${PATH} | ||
ENV_NAME: phash | ||
YAML_FILE: ${CIRRUS_WORKING_DIR}/requirements.yml | ||
mamba_cache: | ||
folder: ${HOME}/mambaforge | ||
fingerprint_script: | ||
- wget --quiet https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh -O mambaforge.sh | ||
- echo "${CIRRUS_OS} $(sha256sum mambaforge.sh)" | ||
- echo "${MAMBA_CACHE_PACKAGES}" | ||
- echo "$(date +%Y).$(expr $(date +%U) / ${CACHE_PERIOD}):${MAMBA_CACHE_BUILD}" | ||
- uname -r | ||
populate_script: | ||
- export CONDA_OVERRIDE_LINUX="$(uname -r | cut -d'+' -f1)" | ||
- bash mambaforge.sh -b -p ${HOME}/mambaforge | ||
- conda config --set always_yes yes --set changeps1 no | ||
- conda config --set show_channel_urls True | ||
- conda config --add channels conda-forge | ||
- conda install --quiet --name base ${MAMBA_CACHE_PACKAGES} | ||
check_script: | ||
- conda info --all | ||
- conda list --name base | ||
phash_cache: | ||
folder: ${CIRRUS_WORKING_DIR}/mambaforge/envs/${ENV_NAME} | ||
fingerprint_script: | ||
- echo "${CIRRUS_OS} ${ENV_NAME} tests" | ||
- echo "$(date +%Y).$(expr $(date +%U) / ${CACHE_PERIOD}):${PHASH_CACHE_BUILD}" | ||
- cat ${YAML_FILE} | ||
- uname -r | ||
populate_script: | ||
- export CONDA_OVERRIDE_LINUX="$(uname -r | cut -d'+' -f1)" | ||
- conda-lock --mamba --platform linux-64 --file ${YAML_FILE} | ||
- mamba create --name ${ENV_NAME} --quiet --file conda-linux-64.lock | ||
- conda info --envs | ||
test_script: | ||
- source activate ${ENV_NAME} | ||
- python run_test.py |
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,25 @@ | ||
[flake8] | ||
# References: | ||
# https://flake8.readthedocs.io/en/latest/user/configuration.html | ||
# https://flake8.readthedocs.io/en/latest/user/error-codes.html | ||
# https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes | ||
|
||
max-line-length = 80 | ||
select = C,E,F,W,B,B950 | ||
ignore = | ||
# E203: whitespace before ':' | ||
E203, | ||
# E226: missing whitespace around arithmetic operator | ||
E226, | ||
# E231: missing whitespace after ',', ';', or ':' | ||
E231, | ||
# E402: module level imports on one line | ||
E402, | ||
# E501: line too long | ||
E501, | ||
# E731: do not assign a lambda expression, use a def | ||
E731, | ||
# W503: line break before binary operator | ||
W503, | ||
# W504: line break after binary operator | ||
W504, |
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,31 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: 'v3.4.0' | ||
hooks: | ||
# Prevent giant files from being committed. | ||
- id: check-added-large-files | ||
# Check whether files parse as valid Python. | ||
- id: check-ast | ||
# Check for file name conflicts on case-insensitive filesytems. | ||
- id: check-case-conflict | ||
# Check for files that contain merge conflict strings. | ||
- id: check-merge-conflict | ||
# Check for debugger imports and py37+ `breakpoint()` calls in Python source. | ||
- id: debug-statements | ||
# Don't commit to master branch. | ||
- id: no-commit-to-branch | ||
- repo: https://github.com/psf/black | ||
rev: '20.8b1' | ||
hooks: | ||
- id: black | ||
# Force black to run on whole repo, using settings from pyproject.toml | ||
pass_filenames: false | ||
args: [--config=./pyproject.toml, .] | ||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: '3.9.0' | ||
hooks: | ||
# Run flake8. | ||
- id: flake8 | ||
args: [--config=./.flake8] |
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 |
---|---|---|
@@ -1,15 +1,19 @@ | ||
Test Iris ImageHash | ||
=================== | ||
|
||
|Travis|_ | ||
|CirrusCI|_ |PreCommit|_ |Black|_ | ||
|
||
\(C) British Crown Copyright 2015 - 2020, Met Office | ||
\(C) British Crown Copyright 2015 - 2021, Met Office | ||
|
||
A perceptual hash image store for graphical testing of `SciTools iris <https://github.com/SciTools/iris>`_. | ||
|
||
Images shall not be removed from this repository, it is to be added to only. | ||
|
||
All files in the images folder shall be named with the perceptual image hash of the file (plus a suitable suffix). | ||
|
||
.. |Travis| image:: https://travis-ci.org/SciTools/test-iris-imagehash.svg?branch=gh-pages | ||
.. _Travis: https://travis-ci.org/SciTools/test-iris-imagehash | ||
.. |CirrusCI| image:: https://api.cirrus-ci.com/github/SciTools/test-iris-imagehash.svg?branch=gh-pages | ||
.. _CirrusCI: https://cirrus-ci.com/github/SciTools/iris | ||
.. |PreCommit| image:: https://results.pre-commit.ci/badge/github/SciTools/test-iris-imagehash/gh-pages.svg | ||
.. _PreCommit: https://results.pre-commit.ci/latest/github/SciTools/test-iris-imagehash/gh-pages | ||
.. |Black| image:: https://img.shields.io/badge/code%20style-black-000000.svg | ||
.. _Black: https://github.com/psf/black |
This file was deleted.
Oops, something went wrong.
Binary file added
BIN
+51.3 KB
images/v4/a3fd95ea6a11258c3217c966e4019a56c96f3c859b62492584fe7a699db46adb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+99.4 KB
images/v4/a6fa1e967f00950eb00f9d0f914fcdc2d560c9f3c1fb3a9084266e34daa52f6c.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+66.8 KB
images/v4/aad73e0cf710952c840195acd528c1e2d1ecc9f3c1ec49f3c1ec6a536a1737f3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+89.3 KB
images/v4/aff21eb6bd04952cbc0f950f914fedc1c0f961f3e1f9329084266e345a850f6c.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+45.1 KB
images/v4/be8137e0954ac05fc0ff3e81c07fc97a6d0094af3fa0c17f36a53244d97e2da0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+31.3 KB
images/v4/be816a85957a955ac0ff1e8bc07f7f806e01c07f3f80c07f3fa23f80c07f3d00.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+34.4 KB
images/v4/be816ab5907ae508c17e955ac07f3fa0945ac07f3f80c07f3aa32f81c0ff3f80.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+32.9 KB
images/v4/be816ab5907ee508c17e975ac07f3fa09459c07f3f80c07f3a812f81c0ff3f80.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+38 KB
images/v4/bf802e85c07fc17fc07eb42ac17f3f829161c06e3f81c07f7ba02e85c07f3e81.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+66 KB
images/v4/e665326d999acc9b3319b3246666cce69b496cccccc966996719333666669986.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.93 KB
images/v4/ea57396995a8c6d691ea3e25664569d96b16c63684e9958b91ea4a559431793b.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+46.9 KB
images/v4/ea853a85957a857a957a857a957ac05ac56b3ac46ae16b817a816f647a853af4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+47 KB
images/v4/ea853f10957a85e1957a854e957a203e955e6aa76ae17aa16a856a8f6ab1de12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+39 KB
images/v4/ea856a85954a957ac17e954ac17a9d22956ac0fe3e81c07f3e857aa5c27d3f80.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+54.9 KB
images/v4/ea856a95955a954ac17f950ac07e3f44951ac07e3f81c0ff3ea16aa1c0ff3e81.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+42.4 KB
images/v4/ea856a95955a954ac17f954ac07e3f44951ac07e3e81c07f7ea16aa1c0ff3e81.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.21 KB
images/v4/ea858782957a703f957a3878957a7a65957a6b806ae56f846ad50fd46a859c50.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+12.8 KB
images/v4/ea953f83954ac2bc956ac07e956a3509c0de61796ab57a916a856a916ab590fb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+65.5 KB
images/v4/eaa9b5299d56854e9156856ed05625fdc0292bfdc0a90afd85b97e00857e6ad6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+75.7 KB
images/v4/eaa9b529f756850ea0169566d1568d6dd86909ed88290afd9ded7e008d666ad6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+56.6 KB
images/v4/eaf73e0c9402952c950195acd528c1fac1ecc1f3c1ec63f3c0ec6a536a179ff2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+92.6 KB
images/v4/eaf9a6c9f728943032168d66d4cb8d2e9567497b81304aedc9e51e2d9d186ada.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+82.9 KB
images/v4/eafd86c9f8219430fe96a56684c3852e95656b7b85b86acdc0e5162da5186eda.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+26.5 KB
images/v4/eea16abfc05ab500956e974ac13f3da0925ac07f3fa1c07e3fa12da1c25e3f80.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.81 KB
images/v4/fa1585e885ea7a1785fa7a157a177a017a1585e817a885ea85e86a1785fa7a17.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.9 KB
images/v4/fa813e81857e857a857e7a81857e6a85817b0aa63e993e857e81c17e7a81956e.png
Oops, something went wrong.
Binary file added
BIN
+15.9 KB
images/v4/fa81857e857a7e01857e7a81857e7a81a0577a816a8585fa7a85857e7a85857e.png
Oops, something went wrong.
Binary file added
BIN
+19.8 KB
images/v4/fa81c17a857e1ea5857e734a7a81cd257e8484da857e3b29817a68f47a81c799.png
Oops, something went wrong.
Binary file added
BIN
+56 KB
images/v4/fa856a85957a957ac17e954ac17e0da2954bc07e3e81c07f3a806a85c1ff3f81.png
Oops, something went wrong.
Binary file added
BIN
+29.9 KB
images/v4/fb966ba6846194dbd01f3665c0e4399a3f1bc2653f90c99e2f613e64c01e3f81.png
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,22 @@ | ||
[tool.black] | ||
line-length = 79 | ||
target-version = ['py38'] | ||
include = '\.pyi?$' | ||
exclude = ''' | ||
( | ||
/( | ||
\.eggs # exclude a few common directories in the | ||
| \.git # root of the project | ||
| \.hg | ||
| \.mypy_cache | ||
| \.tox | ||
| \.venv | ||
| _build | ||
| buck-out | ||
| build | ||
| dist | ||
| etc | ||
)/ | ||
) | ||
''' |
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 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,11 @@ | ||
name: phash-dev | ||
|
||
channels: | ||
- conda-forge | ||
|
||
dependencies: | ||
- black=20.8b1 | ||
- flake8 | ||
- imagehash>=4.0 | ||
- pillow<7 | ||
- pre-commit |
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
Oops, something went wrong.