diff --git a/.cirrus.yml b/.cirrus.yml
index e70cc33813..11e257af30 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -38,10 +38,12 @@ env:
NOX_CACHE_BUILD: "0"
# Increment the build number to force new pip cache upload.
PIP_CACHE_BUILD: "0"
- # Pip package to be upgraded/installed.
+ # Pip packages to be upgraded/installed.
PIP_CACHE_PACKAGES: "pip setuptools wheel nox"
+ # Conda packages to be installed.
+ CONDA_CACHE_PACKAGES: "nox pip"
# Git commit hash for iris test data.
- IRIS_TEST_DATA_REF: "v2.2"
+ IRIS_TEST_DATA_VERSION: "2.2"
# Base directory for the iris-test-data.
IRIS_TEST_DATA_DIR: ${HOME}/iris-test-data
@@ -52,7 +54,6 @@ env:
linux_task_template: &LINUX_TASK_TEMPLATE
auto_cancellation: true
env:
- IRIS_REPO_DIR: ${CIRRUS_WORKING_DIR}
PATH: ${HOME}/miniconda/bin:${PATH}
SITE_CFG: ${CIRRUS_WORKING_DIR}/lib/iris/etc/site.cfg
conda_cache:
@@ -60,14 +61,17 @@ linux_task_template: &LINUX_TASK_TEMPLATE
fingerprint_script:
- wget --quiet https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- echo "${CIRRUS_OS} $(sha256sum miniconda.sh)"
+ - echo "${CONDA_CACHE_PACKAGES}"
- echo "$(date +%Y).$(expr $(date +%U) / ${CACHE_PERIOD}):${CONDA_CACHE_BUILD}"
+ - uname -r
populate_script:
+ - export CONDA_OVERRIDE_LINUX="$(uname -r | cut -d'+' -f1)"
- bash miniconda.sh -b -p ${HOME}/miniconda
- conda config --set always_yes yes --set changeps1 no
- conda config --set show_channel_urls True
- conda config --add channels conda-forge
- conda update --quiet --name base conda
- - conda install --quiet --name base nox pip
+ - conda install --quiet --name base ${CONDA_CACHE_PACKAGES}
cartopy_cache:
folder: ${HOME}/.local/share/cartopy
fingerprint_script:
@@ -82,24 +86,39 @@ linux_task_template: &LINUX_TASK_TEMPLATE
#
-# YAML alias for compute credits
+# YAML alias for compute credits.
#
compute_credits_template: &CREDITS_TEMPLATE
# Only use credits for non-DRAFT pull-requests to SciTools/iris master branch by collaborators
- use_compute_credits: $CIRRUS_REPO_FULL_NAME == 'SciTools/iris' && $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR_DRAFT == 'false' && $CIRRUS_BASE_BRANCH == 'master' && $CIRRUS_PR != ''
+ use_compute_credits: ${CIRRUS_REPO_FULL_NAME} == "SciTools/iris" && ${CIRRUS_USER_COLLABORATOR} == "true" && ${CIRRUS_PR_DRAFT} == "false" && ${CIRRUS_PR} != ""
+
+
+#
+# YAML alias for the iris-test-data cache.
+#
+iris_test_data_template: &IRIS_TEST_DATA_TEMPLATE
+ data_cache:
+ folder: ${IRIS_TEST_DATA_DIR}
+ fingerprint_script:
+ - echo "iris-test-data v${IRIS_TEST_DATA_VERSION}"
+ populate_script:
+ - wget --quiet https://github.com/SciTools/iris-test-data/archive/v${IRIS_TEST_DATA_VERSION}.zip -O iris-test-data.zip
+ - unzip -q iris-test-data.zip
+ - mv iris-test-data-${IRIS_TEST_DATA_VERSION} ${IRIS_TEST_DATA_DIR}
+
#
# Linting
#
lint_task:
- only_if: $SKIP_LINT_TASK == ""
+ only_if: ${SKIP_LINT_TASK} == ""
<< : *CREDITS_TEMPLATE
auto_cancellation: true
name: "${CIRRUS_OS}: flake8 and black"
pip_cache:
folder: ~/.cache/pip
fingerprint_script:
- - echo "${CIRRUS_TASK_NAME}"
+ - echo "${CIRRUS_TASK_NAME} py${PYTHON_VERSION}"
- echo "$(date +%Y).$(expr $(date +%U) / ${CACHE_PERIOD}):${PIP_CACHE_BUILD} ${PIP_CACHE_PACKAGES}"
lint_script:
- pip list
@@ -113,7 +132,7 @@ lint_task:
# Testing Minimal (Linux)
#
test_minimal_task:
- only_if: $SKIP_TEST_MINIMAL_TASK == "" && $SKIP_ALL_TEST_TASKS == ""
+ only_if: ${SKIP_TEST_MINIMAL_TASK} == "" && ${SKIP_ALL_TEST_TASKS} == ""
<< : *CREDITS_TEMPLATE
matrix:
env:
@@ -129,6 +148,7 @@ test_minimal_task:
memory: 4G
<< : *LINUX_TASK_TEMPLATE
tests_script:
+ - export CONDA_OVERRIDE_LINUX="$(uname -r | cut -d'+' -f1)"
- echo "[Resources]" > ${SITE_CFG}
- echo "doc_dir = ${CIRRUS_WORKING_DIR}/docs" >> ${SITE_CFG}
- nox --session tests -- --verbose
@@ -138,7 +158,7 @@ test_minimal_task:
# Testing Full (Linux)
#
test_full_task:
- only_if: $SKIP_TEST_FULL_TASK == "" && $SKIP_ALL_TEST_TASKS == ""
+ only_if: ${SKIP_TEST_FULL_TASK} == "" && ${SKIP_ALL_TEST_TASKS} == ""
<< : *CREDITS_TEMPLATE
matrix:
env:
@@ -152,16 +172,10 @@ test_full_task:
image: gcc:latest
cpu: 6
memory: 8G
- data_cache:
- folder: ${IRIS_TEST_DATA_DIR}
- fingerprint_script:
- - echo "${IRIS_TEST_DATA_REF}"
- populate_script:
- - wget --quiet https://github.com/SciTools/iris-test-data/archive/${IRIS_TEST_DATA_REF}.zip -O iris-test-data.zip
- - unzip -q iris-test-data.zip
- - mv iris-test-data-$(echo "${IRIS_TEST_DATA_REF}" | sed "s/^v//") ${IRIS_TEST_DATA_DIR}
+ << : *IRIS_TEST_DATA_TEMPLATE
<< : *LINUX_TASK_TEMPLATE
tests_script:
+ - export CONDA_OVERRIDE_LINUX="$(uname -r | cut -d'+' -f1)"
- echo "[Resources]" > ${SITE_CFG}
- echo "test_data_dir = ${IRIS_TEST_DATA_DIR}/test_data" >> ${SITE_CFG}
- echo "doc_dir = ${CIRRUS_WORKING_DIR}/docs" >> ${SITE_CFG}
@@ -172,7 +186,7 @@ test_full_task:
# Testing Documentation Gallery (Linux)
#
gallery_task:
- only_if: $SKIP_GALLERY_TASK == "" && $SKIP_ALL_DOC_TASKS == ""
+ only_if: ${SKIP_GALLERY_TASK} == "" && ${SKIP_ALL_DOC_TASKS} == ""
<< : *CREDITS_TEMPLATE
matrix:
env:
@@ -182,16 +196,10 @@ gallery_task:
image: gcc:latest
cpu: 2
memory: 4G
- data_cache:
- folder: ${IRIS_TEST_DATA_DIR}
- fingerprint_script:
- - echo "${IRIS_TEST_DATA_REF}"
- populate_script:
- - wget --quiet https://github.com/SciTools/iris-test-data/archive/${IRIS_TEST_DATA_REF}.zip -O iris-test-data.zip
- - unzip -q iris-test-data.zip
- - mv iris-test-data-$(echo "${IRIS_TEST_DATA_REF}" | sed "s/^v//") ${IRIS_TEST_DATA_DIR}
+ << : *IRIS_TEST_DATA_TEMPLATE
<< : *LINUX_TASK_TEMPLATE
tests_script:
+ - export CONDA_OVERRIDE_LINUX="$(uname -r | cut -d'+' -f1)"
- echo "[Resources]" > ${SITE_CFG}
- echo "test_data_dir = ${IRIS_TEST_DATA_DIR}/test_data" >> ${SITE_CFG}
- echo "doc_dir = ${CIRRUS_WORKING_DIR}/docs" >> ${SITE_CFG}
@@ -202,7 +210,7 @@ gallery_task:
# Testing Documentation (Linux)
#
doctest_task:
- only_if: $SKIP_DOCTEST_TASK == "" && $SKIP_ALL_DOC_TASKS == ""
+ only_if: ${SKIP_DOCTEST_TASK} == "" && ${SKIP_ALL_DOC_TASKS} == ""
<< : *CREDITS_TEMPLATE
matrix:
env:
@@ -215,16 +223,10 @@ doctest_task:
env:
MPL_RC_DIR: ${HOME}/.config/matplotlib
MPL_RC_FILE: ${HOME}/.config/matplotlib/matplotlibrc
- data_cache:
- folder: ${IRIS_TEST_DATA_DIR}
- fingerprint_script:
- - echo "${IRIS_TEST_DATA_REF}"
- populate_script:
- - wget --quiet https://github.com/SciTools/iris-test-data/archive/${IRIS_TEST_DATA_REF}.zip -O iris-test-data.zip
- - unzip -q iris-test-data.zip
- - mv iris-test-data-$(echo "${IRIS_TEST_DATA_REF}" | sed "s/^v//") ${IRIS_TEST_DATA_DIR}
+ << : *IRIS_TEST_DATA_TEMPLATE
<< : *LINUX_TASK_TEMPLATE
tests_script:
+ - export CONDA_OVERRIDE_LINUX="$(uname -r | cut -d'+' -f1)"
- echo "[Resources]" > ${SITE_CFG}
- echo "test_data_dir = ${IRIS_TEST_DATA_DIR}/test_data" >> ${SITE_CFG}
- echo "doc_dir = ${CIRRUS_WORKING_DIR}/docs" >> ${SITE_CFG}
@@ -238,7 +240,7 @@ doctest_task:
# Testing Documentation Link Check (Linux)
#
linkcheck_task:
- only_if: $SKIP_LINKCHECK_TASK == "" && $SKIP_ALL_DOC_TASKS == ""
+ only_if: ${SKIP_LINKCHECK_TASK} == "" && ${SKIP_ALL_DOC_TASKS} == ""
<< : *CREDITS_TEMPLATE
matrix:
env:
@@ -253,6 +255,7 @@ linkcheck_task:
MPL_RC_FILE: ${HOME}/.config/matplotlib/matplotlibrc
<< : *LINUX_TASK_TEMPLATE
tests_script:
+ - export CONDA_OVERRIDE_LINUX="$(uname -r | cut -d'+' -f1)"
- mkdir -p ${MPL_RC_DIR}
- echo "backend : agg" > ${MPL_RC_FILE}
- echo "image.cmap : viridis" >> ${MPL_RC_FILE}
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 153687ad0c..cea9d3585d 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: 'v2.4.0'
+ rev: 'v3.4.0'
hooks:
# Prevent giant files from being committed.
- id: check-added-large-files
@@ -23,8 +23,8 @@ repos:
# 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.8.3'
+- repo: https://github.com/PyCQA/flake8
+ rev: '3.9.0'
hooks:
# Run flake8.
- id: flake8
diff --git a/README.md b/README.md
index e460f4a01a..d06e6758a1 100644
--- a/README.md
+++ b/README.md
@@ -12,39 +12,42 @@
+ alt="Cirrus-CI">
-
-
-
-
+ alt="Documentation Status">
+
+
+ alt="conda-forge">
+ alt="pypi">
+ alt="latest release">
+ alt="Commits since last release">
+ alt="zenodo">
+ alt="black">
+
+
+ alt="twitter scitools_iris">
-See the documentation for the latest development version of Iris.
-
+For documentation see the
+latest
+developer version or the most recent released
+stable version.
+
diff --git a/docs/gallery_code/general/plot_anomaly_log_colouring.py b/docs/gallery_code/general/plot_anomaly_log_colouring.py
index 846816aff7..5bde12ca39 100644
--- a/docs/gallery_code/general/plot_anomaly_log_colouring.py
+++ b/docs/gallery_code/general/plot_anomaly_log_colouring.py
@@ -68,14 +68,14 @@ def main():
# Create a 'logarithmic' data normalization.
anom_norm = mcols.SymLogNorm(
linthresh=minimum_log_level,
- linscale=0,
+ linscale=1,
vmin=-maximum_scale_level,
vmax=maximum_scale_level,
)
# Setting "linthresh=minimum_log_level" makes its non-logarithmic
# data range equal to our 'zero band'.
- # Setting "linscale=0" maps the whole zero band to the middle colour value
- # (i.e. 0.5), which is the neutral point of a "diverging" style colormap.
+ # Setting "linscale=1" maps the whole zero band to the middle colour value
+ # (i.e., 0.5), which is the neutral point of a "diverging" style colormap.
# Create an Axes, specifying the map projection.
plt.axes(projection=ccrs.LambertConformal())
diff --git a/docs/src/common_links.inc b/docs/src/common_links.inc
index d9df15be8b..7209d85c09 100644
--- a/docs/src/common_links.inc
+++ b/docs/src/common_links.inc
@@ -23,11 +23,13 @@
.. _napolean: https://sphinxcontrib-napoleon.readthedocs.io/en/latest/sphinxcontrib.napoleon.html
.. _nox: https://nox.thea.codes/en/stable/
.. _New Issue: https://github.com/scitools/iris/issues/new/choose
+.. _pre-commit: https://pre-commit.com/
.. _pull request: https://github.com/SciTools/iris/pulls
.. _pull requests: https://github.com/SciTools/iris/pulls
.. _Read the Docs: https://scitools-iris.readthedocs.io/en/latest/
.. _readthedocs.yml: https://github.com/SciTools/iris/blob/master/requirements/ci/readthedocs.yml
.. _SciTools: https://github.com/SciTools
+.. _scitools-iris: https://pypi.org/project/scitools-iris/
.. _sphinx: https://www.sphinx-doc.org/en/master/
.. _test-iris-imagehash: https://github.com/SciTools/test-iris-imagehash
.. _using git: https://docs.github.com/en/github/using-git
diff --git a/docs/src/developers_guide/contributing_ci_tests.rst b/docs/src/developers_guide/contributing_ci_tests.rst
index 8594612fe1..14bc6a2612 100644
--- a/docs/src/developers_guide/contributing_ci_tests.rst
+++ b/docs/src/developers_guide/contributing_ci_tests.rst
@@ -6,21 +6,12 @@ Continuous Integration (CI) Testing
===================================
The `Iris`_ GitHub repository is configured to run checks against all its
-branches automatically whenever a pull request is created, updated or merged.
+branches automatically whenever a pull-request is created, updated or merged.
The checks performed are:
-* :ref:`testing_cla`
* :ref:`testing_cirrus`
-
-
-.. _testing_cla:
-
-SciTools CLA Checker
-********************
-
-A bot which checks that the GitHub author of the pull request has signed the
-**SciTools Contributor's License Agreement (CLA)**. For more information on
-this please see https://scitools.org.uk/organisation.html#governance.
+* :ref:`testing_cla`
+* :ref:`pre_commit_ci`
.. _testing_cirrus:
@@ -44,7 +35,7 @@ refer to the `Cirrus-CI Documentation`_. The tasks performed during CI include:
* checking all URL references within the code base and documentation are valid
The above `cirrus-ci`_ tasks are run automatically against all `Iris`_ branches
-on GitHub whenever a pull request is submitted, updated or merged. See the
+on GitHub whenever a pull-request is submitted, updated or merged. See the
`Cirrus-CI Dashboard`_ for details of recent past and active Iris jobs.
.. _skipping Cirrus-CI tasks:
@@ -79,17 +70,41 @@ e.g., to skip the linting task, the following are all equivalent::
GitHub Checklist
-****************
+----------------
-An example snapshot from a successful GitHub pull request shows all tests
+An example snapshot from a successful GitHub pull-request shows all tests
passing:
.. image:: ci_checks.png
-If any CI tasks fail, then the pull request is unlikely to be merged to the
+If any CI tasks fail, then the pull-request is unlikely to be merged to the
Iris target branch by a core developer.
+.. _testing_cla:
+
+SciTools CLA Checker
+********************
+
+A bot which checks that the GitHub author of the pull-request has signed the
+**SciTools Contributor's License Agreement (CLA)**. For more information on
+this please see https://scitools.org.uk/organisation.html#governance.
+
+
+.. _pre_commit_ci:
+
+pre-commit CI
+*************
+
+A CI service for the `pre-commit`_ framework that checks and auto fixes all
+pull-requests given the `Iris`_ GitHub repository `.pre-commit-config.yaml`_.
+
+See the `pre-commit.ci dashboard`_ for details of recent past and active Iris jobs.
+
+
+
.. _Cirrus-CI Dashboard: https://cirrus-ci.com/github/SciTools/iris
.. _Cirrus-CI Documentation: https://cirrus-ci.org/guide/writing-tasks/
+.. _.pre-commit-config.yaml: https://github.com/SciTools/iris/blob/master/.pre-commit-config.yaml
+.. _pre-commit.ci dashboard: https://results.pre-commit.ci/repo/github/5312648
diff --git a/docs/src/developers_guide/release.rst b/docs/src/developers_guide/release.rst
index 90938b32d3..cf8dcc42cb 100644
--- a/docs/src/developers_guide/release.rst
+++ b/docs/src/developers_guide/release.rst
@@ -1,3 +1,5 @@
+.. include:: ../common_links.inc
+
.. _iris_development_releases:
Releases
@@ -82,14 +84,73 @@ Once all checks are complete, the release is cut by the creation of a new tag
in the ``SciTools/iris`` repository.
-Conda Recipe
-------------
+Update conda-forge
+------------------
Once a release is cut on GitHub, update the Iris conda recipe on the
`conda-forge iris-feedstock`_ for the release. This will build and publish the
conda package on the `conda-forge Anaconda channel`_.
+.. _update_pypi:
+
+Update PyPI
+-----------
+
+Update the `scitools-iris`_ project on PyPI with the latest Iris release.
+
+To do this perform the following steps.
+
+Create a conda environment with the appropriate conda packages to build the
+source distribution (``sdist``) and pure Python wheel (``bdist_wheel``)::
+
+ > conda create -n iris-pypi -c conda-forge --yes pip pyke python setuptools twine wheel
+ > . activate iris-pypi
+
+Checkout the lastest Iris ```` tag::
+
+ > git fetch --tags
+ > git checkout
+
+Build the source distribution and wheel from the Iris root directory::
+
+ > python setup.py sdist bdist_wheel
+
+This ``./dist`` directory should now be populated with the source archive
+``.tar.gz`` file, and built distribution ``.whl`` file.
+
+Check that the package description will render properly on PyPI for each
+of the built artifacts::
+
+ > python -m twine check dist/*
+
+To list and check the contents of the binary wheel::
+
+ > python -m zipfile --list dist/*.whl
+
+If all seems well, sufficient maintainer privileges will be required to
+upload these artifacts to `scitools-iris`_ on PyPI::
+
+ > python -m twine upload --repository-url https://upload.pypi.org/legecy/ dist/*
+
+Ensure that the artifacts are successfully uploaded and available on
+`scitools-iris`_ before creating a conda test environment to install Iris
+from PyPI::
+
+ > conda deactivate
+ > conda env create --file ./requrements/ci/iris.yml
+ > . activate iris-dev
+ > conda install -c conda-forge pip
+ > python -m pip install --no-deps scitools-iris
+
+For further details on how to test Iris, see :ref:`developer_running_tests`.
+
+.. seealso::
+
+ For further information on packaging and uploading a project to PyPI, please
+ refer to `Generating Distribution Archives`_ and `Packaging Your Project`_.
+
+
Merge Back
----------
@@ -179,7 +240,6 @@ Post Release Steps
#. Merge back to ``master``
-.. _Read The Docs: https://readthedocs.org/projects/scitools-iris/builds/
.. _SciTools/iris: https://github.com/SciTools/iris
.. _tag on the SciTools/Iris: https://github.com/SciTools/iris/releases
.. _conda-forge Anaconda channel: https://anaconda.org/conda-forge/iris
@@ -189,3 +249,5 @@ Post Release Steps
.. _Active Versions: https://readthedocs.org/projects/scitools-iris/versions/
.. _Editing v3.0.0rc0: https://readthedocs.org/dashboard/scitools-iris/version/v3.0.0rc0/
.. _rc_iris: https://anaconda.org/conda-forge/iris/labels
+.. _Generating Distribution Archives: https://packaging.python.org/tutorials/packaging-projects/#generating-distribution-archives
+.. _Packaging Your Project: https://packaging.python.org/guides/distributing-packages-using-setuptools/#packaging-your-project
diff --git a/docs/src/index.rst b/docs/src/index.rst
index 80aa696ba1..8c3455aba9 100644
--- a/docs/src/index.rst
+++ b/docs/src/index.rst
@@ -1,7 +1,7 @@
.. _iris_docs:
-Iris Documentation
-==================
+Iris |version|
+========================
**A powerful, format-agnostic, community-driven Python package for analysing
and visualising Earth science data.**
diff --git a/docs/src/sphinxext/generate_package_rst.py b/docs/src/sphinxext/generate_package_rst.py
index 5ce9f6d014..ec153c768f 100644
--- a/docs/src/sphinxext/generate_package_rst.py
+++ b/docs/src/sphinxext/generate_package_rst.py
@@ -313,14 +313,13 @@ def do_package(package_name):
)
paths.sort()
+ excluded_paths = [item[0] for item in exclude_modules]
# check for any modules to exclude
- for exclude_module in exclude_modules:
- if exclude_module[0] in paths:
- autolog(
- "Excluding module in package: {}".format(exclude_module[0])
- )
- paths.remove(exclude_module[0])
+ for excluded_path in excluded_paths:
+ if excluded_path in paths:
+ autolog(f"Excluding module in package: {excluded_path!r}")
+ paths.remove(excluded_path)
doc = auto_doc_package(package_path, package, root_package, paths)
@@ -341,33 +340,32 @@ def do_package(package_name):
with open(out_path, "w") as fh:
fh.write(doc)
+ excluded_imports = [item[1] for item in exclude_modules]
+
for import_name, module_path in module_folders.get(package, []):
# check for any modules to exclude
- for exclude_module in exclude_modules:
- if import_name == exclude_module[1]:
- autolog(
- "Excluding module file: {}".format(exclude_module[1])
- )
- else:
- doc = auto_doc_module(
- module_path, import_name, root_package
- )
- out_path = (
- out_dir
- + import_name.replace(".", os.path.sep)
- + ".rst"
- )
- if not os.path.exists(out_path):
- autolog("Creating {} ...".format(out_path))
- with open(out_path, "w") as fh:
- fh.write(doc)
- else:
- with open(out_path, "r") as fh:
- existing_content = "".join(fh.readlines())
- if doc != existing_content:
- autolog("Creating {} ...".format(out_path))
- with open(out_path, "w") as fh:
- fh.write(doc)
+ if import_name in excluded_imports:
+ autolog(f"Excluding module file: {import_name!r}")
+ continue
+ doc = auto_doc_module(
+ module_path, import_name, root_package
+ )
+ out_path = (
+ out_dir
+ + import_name.replace(".", os.path.sep)
+ + ".rst"
+ )
+ if not os.path.exists(out_path):
+ autolog("Creating {} ...".format(out_path))
+ with open(out_path, "w") as fh:
+ fh.write(doc)
+ else:
+ with open(out_path, "r") as fh:
+ existing_content = "".join(fh.readlines())
+ if doc != existing_content:
+ autolog("Creating {} ...".format(out_path))
+ with open(out_path, "w") as fh:
+ fh.write(doc)
def setup(app):
diff --git a/docs/src/whatsnew/latest.rst b/docs/src/whatsnew/latest.rst
index 6fcdcfb7bc..0b8c517421 100644
--- a/docs/src/whatsnew/latest.rst
+++ b/docs/src/whatsnew/latest.rst
@@ -48,6 +48,10 @@ This document explains the changes made to Iris for this release
representation of the 64-bit non-cryptographic hash of the object using the
extremely fast `xxhash`_ hashing algorithm. (:pull:`4020`)
+#. `@rcomer`_ implemented a ``__str__`` method for metadata classes, so
+ printing these objects skips metadata elements that are set to None or an
+ empty string or dictionary. (:pull:`4040`)
+
🐛 Bugs Fixed
=============
@@ -106,6 +110,12 @@ This document explains the changes made to Iris for this release
development documentation if being viewed on `Read the Docs`_.
(:pull:`3999`)
+#. `@bjlittle`_ added post-release instructions on how to :ref:`update_pypi`
+ with `scitools-iris`_. (:pull:`4038`)
+
+#. `@bjlittle`_ added the |pre-commit.ci|_ badge to the `README.md`_.
+ See :ref:`pre_commit_ci` for further details. (:pull:`4061`)
+
💼 Internal
===========
@@ -134,6 +144,12 @@ This document explains the changes made to Iris for this release
developers to easily disable `cirrus-ci`_ tasks. See
:ref:`skipping Cirrus-CI tasks`. (:pull:`4019`)
+#. `@bjlittle`_ and `@jamesp`_ addressed a regression in behaviour when using
+ `conda`_ 4.10.0 within `cirrus-ci`_. (:pull:`4084`)
+
+#. `@bjlittle`_ updated the perceptual imagehash graphical test support for
+ `matplotlib`_ 3.4.1. (:pull:`4087`)
+
.. comment
Whatsnew author names (@github name) in alphabetical order. Note that,
@@ -152,6 +168,8 @@ This document explains the changes made to Iris for this release
.. _GitHub: https://github.com/SciTools/iris/issues/new/choose
.. _Met Office: https://www.metoffice.gov.uk/
.. _numpy: https://numpy.org/doc/stable/release/1.20.0-notes.html
+.. |pre-commit.ci| image:: https://results.pre-commit.ci/badge/github/SciTools/iris/master.svg
+.. _pre-commit.ci: https://results.pre-commit.ci/latest/github/SciTools/iris/master
.. |PyPI| image:: https://img.shields.io/pypi/v/scitools-iris?color=orange&label=pypi%7Cscitools-iris
.. _PyPI: https://pypi.org/project/scitools-iris/
.. _Python 3.8: https://www.python.org/downloads/release/python-380/
diff --git a/lib/iris/common/metadata.py b/lib/iris/common/metadata.py
index 024b88d4de..8f19e076f7 100644
--- a/lib/iris/common/metadata.py
+++ b/lib/iris/common/metadata.py
@@ -241,6 +241,16 @@ def __ne__(self, other):
return result
+ def __str__(self):
+ field_strings = []
+ for field in self._fields:
+ value = getattr(self, field)
+ if value is None or isinstance(value, (str, dict)) and not value:
+ continue
+ field_strings.append(f"{field}={value}")
+
+ return f"{type(self).__name__}({', '.join(field_strings)})"
+
def _api_common(
self, other, func_service, func_operation, action, lenient=None
):
diff --git a/lib/iris/fileformats/netcdf.py b/lib/iris/fileformats/netcdf.py
index 35626b15ca..5486c3a9db 100644
--- a/lib/iris/fileformats/netcdf.py
+++ b/lib/iris/fileformats/netcdf.py
@@ -1100,7 +1100,7 @@ def write(
dtype(i.e. 'i2', 'short', 'u4') or a dict of packing parameters as
described below. This provides support for netCDF data packing as
described in
- http://www.unidata.ucar.edu/software/netcdf/docs/BestPractices.html#bp_Packed-Data-Values
+ http://www.unidata.ucar.edu/software/netcdf/documentation/NUG/best_practices.html#bp_Packed-Data-Values
If this argument is a type (or type string), appropriate values of
scale_factor and add_offset will be automatically calculated based
on `cube.data` and possible masking. For more control, pass a dict
@@ -2646,7 +2646,7 @@ def save(
(i.e. 'i2', 'short', 'u4') or a dict of packing parameters as described
below or an iterable of such types, strings, or dicts.
This provides support for netCDF data packing as described in
- http://www.unidata.ucar.edu/software/netcdf/docs/BestPractices.html#bp_Packed-Data-Values
+ http://www.unidata.ucar.edu/software/netcdf/documentation/NUG/best_practices.html#bp_Packed-Data-Values
If this argument is a type (or type string), appropriate values of
scale_factor and add_offset will be automatically calculated based
on `cube.data` and possible masking. For more control, pass a dict with
diff --git a/lib/iris/tests/results/imagerepo.json b/lib/iris/tests/results/imagerepo.json
index 6c2bf66ba6..d73c8492e5 100644
--- a/lib/iris/tests/results/imagerepo.json
+++ b/lib/iris/tests/results/imagerepo.json
@@ -23,7 +23,8 @@
"gallery_tests.test_plot_anomaly_log_colouring.TestAnomalyLogColouring.test_plot_anomaly_log_colouring.0": [
"https://scitools.github.io/test-iris-imagehash/images/v4/ec4464e185a39f93931e9b1e91696d2949dde6e63e26a47a5ad391938d9a5a0c.png",
"https://scitools.github.io/test-iris-imagehash/images/v4/ecc164e78e979b19b3789b0885a564a56cc2c65e3ec69469db1bdb9a853c1e24.png",
- "https://scitools.github.io/test-iris-imagehash/images/v4/ece164e68e979b19b3781b0885a564a56ccac65e3ec69469db1bdb9a853c1e24.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/ece164e68e979b19b3781b0885a564a56ccac65e3ec69469db1bdb9a853c1e24.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/ece164e796979a1b39781b2881a564a56ccac6da3e87947bcb1bdb9a843c1e24.png"
],
"gallery_tests.test_plot_atlantic_profiles.TestAtlanticProfiles.test_plot_atlantic_profiles.0": [
"https://scitools.github.io/test-iris-imagehash/images/v4/9f8260536bd28e1320739437b5f437b0a51d66f4cc5d08fcd00fdb1c93fcb21c.png",
@@ -210,13 +211,15 @@
],
"iris.tests.test_mapping.TestBoundedCube.test_pcolormesh.0": [
"https://scitools.github.io/test-iris-imagehash/images/v4/fa81e535857e92ca8ec23d21b13ce15e7a811ea5c47e1a5ac17b652d3b05e4f2.png",
- "https://scitools.github.io/test-iris-imagehash/images/v4/fa81c17a857e1ea5857e634a7a81cd257e8584da857e3b29817e68f47a81c791.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/fa81c17a857e1ea5857e634a7a81cd257e8584da857e3b29817e68f47a81c791.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/fa81c17a857e1ea5857e734a7a81cd257e8484da857e3b29817a68f47a81c799.png"
],
"iris.tests.test_mapping.TestLimitedAreaCube.test_grid.0": [
"https://scitools.github.io/test-iris-imagehash/images/v4/bf80e2b1c17f1d0ac4f7c8d739a637202749699b6bb3ce3666e4b048944d9d89.png",
"https://scitools.github.io/test-iris-imagehash/images/v4/bf80e2f1c17f1d0ac457c8d619a637213749699b6bb34e3666e4b04e944d9d89.png",
"https://scitools.github.io/test-iris-imagehash/images/v4/ea05392995bac6d691ce3f21666569d86a96c6360ee195cb91e8ce54953b313b.png",
- "https://scitools.github.io/test-iris-imagehash/images/v4/ea05392995bac6d691ea3f21666569d86a97c6320ee195cb91e8ce559539391b.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/ea05392995bac6d691ea3f21666569d86a97c6320ee195cb91e8ce559539391b.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/fa1585e885ea7a1785fa7a157a177a017a1585e817a885ea85e86a1785fa7a17.png"
],
"iris.tests.test_mapping.TestLimitedAreaCube.test_outline.0": [
"https://scitools.github.io/test-iris-imagehash/images/v4/fa81857e857e3e80857e7a817a817a817a81817f7a81857e857e857e857e7a81.png",
@@ -226,7 +229,8 @@
],
"iris.tests.test_mapping.TestLimitedAreaCube.test_pcolormesh.0": [
"https://scitools.github.io/test-iris-imagehash/images/v4/bf81e6b1c17e1d4884bfc8df39a43720374969db69b34e26c4e4b0ca904f9d89.png",
- "https://scitools.github.io/test-iris-imagehash/images/v4/ea57396995a8c6d691ea3f25664569d86b16c63686ed958991ea4a549531393b.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/ea57396995a8c6d691ea3f25664569d86b16c63686ed958991ea4a549531393b.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/ea57396995a8c6d691ea3e25664569d96b16c63684e9958b91ea4a559431793b.png"
],
"iris.tests.test_mapping.TestLimitedAreaCube.test_scatter.0": [
"https://scitools.github.io/test-iris-imagehash/images/v4/ea053d2e916ac2d9c4d894346b24f3477acf68ad39329ed8c696e136c1ab9a71.png",
@@ -392,7 +396,8 @@
],
"iris.tests.test_plot.TestAttributePositive.test_2d_positive_down.0": [
"https://scitools.github.io/test-iris-imagehash/images/v4/fb946ba684e194fb901b3a0587641ad03b1ae7674e64c15a5b99c767c47e3a98.png",
- "https://scitools.github.io/test-iris-imagehash/images/v4/fb946ba484e194dbc01f3665c0e4399a3f0fc2653f90c99e3f613e64c81e3f81.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/fb946ba484e194dbc01f3665c0e4399a3f0fc2653f90c99e3f613e64c81e3f81.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/fb966ba6846194dbd01f3665c0e4399a3f1bc2653f90c99e2f613e64c01e3f81.png"
],
"iris.tests.test_plot.TestAttributePositive.test_2d_positive_up.0": [
"https://scitools.github.io/test-iris-imagehash/images/v4/ee176c7f93e093a0c50f9383815e6e156859e17e6e15e17a9be08e2d851a9b83.png",
@@ -506,7 +511,8 @@
"https://scitools.github.io/test-iris-imagehash/images/v4/fa816ac1857e853cc17f957ac15f3e849486c8f43e81c13b3f813e91c07e3f46.png"
],
"iris.tests.test_plot.TestMissingCoord.test_no_u.0": [
- "https://scitools.github.io/test-iris-imagehash/images/v4/ea856a95955a954ac17f954a807e3f48951ac07e3e81c0ff7ea16a81c0ff3f81.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/ea856a95955a954ac17f954a807e3f48951ac07e3e81c0ff7ea16a81c0ff3f81.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/ea856a95955a954ac17f954ac07e3f44951ac07e3e81c07f7ea16aa1c0ff3e81.png"
],
"iris.tests.test_plot.TestMissingCoord.test_no_u.1": [
"https://scitools.github.io/test-iris-imagehash/images/v4/ea956ab5954a954ac17e954a817f2f60950ac07f3e80c07f7a856aa5c2ff3f80.png"
@@ -585,7 +591,8 @@
"iris.tests.test_plot.TestPcolormesh.test_ty.0": [
"https://scitools.github.io/test-iris-imagehash/images/v4/ea74c707958b3878958b38f8c7236a557a542c7868d54b877875978abc789722.png",
"https://scitools.github.io/test-iris-imagehash/images/v4/ea74c707958b387895ab38f8c7236a557a542c7868d54b05787197eabc789722.png",
- "https://scitools.github.io/test-iris-imagehash/images/v4/ea953f83954ac2fc956ac07e956a3509c0de61796ab57a816a854ad16ab590fb.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/ea953f83954ac2fc956ac07e956a3509c0de61796ab57a816a854ad16ab590fb.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/ea953f83954ac2bc956ac07e956a3509c0de61796ab57a916a856a916ab590fb.png"
],
"iris.tests.test_plot.TestPcolormesh.test_tz.0": [
"https://scitools.github.io/test-iris-imagehash/images/v4/e874978b978b6875978b6875978b7854950b78506855787468747ea2687597aa.png",
@@ -597,7 +604,8 @@
],
"iris.tests.test_plot.TestPcolormesh.test_zx.0": [
"https://scitools.github.io/test-iris-imagehash/images/v4/e85e87a197a1695a97a16d5a97a17d5a97a17806785a7816685a7e86685ad687.png",
- "https://scitools.github.io/test-iris-imagehash/images/v4/fa81857e857e6e05857e7a81857e7a81a0577a816a8585fa7a85857e7a81857e.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/fa81857e857e6e05857e7a81857e7a81a0577a816a8585fa7a85857e7a81857e.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/fa81857e857a7e01857e7a81857e7a81a0577a816a8585fa7a85857e7a85857e.png"
],
"iris.tests.test_plot.TestPcolormesh.test_zy.0": [
"https://scitools.github.io/test-iris-imagehash/images/v4/af42c0bdd0ad2f52d0bd3f42d0bd7f02d0bd7f002d527f002f427fa82f42d6a8.png",
@@ -607,7 +615,8 @@
"iris.tests.test_plot.TestPcolormeshNoBounds.test_tx.0": [
"https://scitools.github.io/test-iris-imagehash/images/v4/fa1594f3858a670c94e37b1cccb13e736a1d84f17a1d94e2c11d938e9463678e.png",
"https://scitools.github.io/test-iris-imagehash/images/v4/fa1594f3858a670c94e37b1cccb13e736a1d8cf17a1d94e2c11993ae9463678c.png",
- "https://scitools.github.io/test-iris-imagehash/images/v4/ea858782957a703f957a3878957a7a65957e6bc06ae56f806ad50fd06a859c50.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/ea858782957a703f957a3878957a7a65957e6bc06ae56f806ad50fd06a859c50.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/ea858782957a703f957a3878957a7a65957a6b806ae56f846ad50fd46a859c50.png"
],
"iris.tests.test_plot.TestPcolormeshNoBounds.test_ty.0": [
"https://scitools.github.io/test-iris-imagehash/images/v4/ad5e94a5c3b0c3f096a1695a96a53c1f711b3c0f791b97b46943c3e06c436b5a.png",
@@ -615,7 +624,8 @@
],
"iris.tests.test_plot.TestPcolormeshNoBounds.test_tz.0": [
"https://scitools.github.io/test-iris-imagehash/images/v4/a95e3c1f96a096a5d6a56b40c3f06be2c1c0c3f07c0b3ebe96a13c1e6d5b694a.png",
- "https://scitools.github.io/test-iris-imagehash/images/v4/fa813e81857e857a857e7a81857e6a85817b00e63eb93e857e81c17e7a81956e.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/fa813e81857e857a857e7a81857e6a85817b00e63eb93e857e81c17e7a81956e.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/fa813e81857e857a857e7a81857e6a85817b0aa63e993e857e81c17e7a81956e.png"
],
"iris.tests.test_plot.TestPcolormeshNoBounds.test_yx.0": [
"https://scitools.github.io/test-iris-imagehash/images/v4/bc7a1c32d3c366cdc785c39986cdc78ec792e7a6960d584939793c3438703873.png",
@@ -669,23 +679,27 @@
],
"iris.tests.test_plot.TestPlotCoordinatesGiven.test_tx.0": [
"https://scitools.github.io/test-iris-imagehash/images/v4/fe8142f5c17ebd2cc16eb548954a9542916a347a915e60bd4afd68793f916296.png",
- "https://scitools.github.io/test-iris-imagehash/images/v4/ea853f10956ac5e1957a854e957a203e955e6aa76ae17aa16a856aaf6ab19e12.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/ea853f10956ac5e1957a854e957a203e955e6aa76ae17aa16a856aaf6ab19e12.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/ea853f10957a85e1957a854e957a203e955e6aa76ae17aa16a856a8f6ab1de12.png"
],
"iris.tests.test_plot.TestPlotCoordinatesGiven.test_tx.1": [
"https://scitools.github.io/test-iris-imagehash/images/v4/fa8542b7b503b548857abd08857abd09945eed6b91d968c161b972d76aa462b5.png",
"https://scitools.github.io/test-iris-imagehash/images/v4/fa8542b7b503b548857abd08857abd09945eed6a91d96ac163b972d36aa462b5.png",
- "https://scitools.github.io/test-iris-imagehash/images/v4/ea853a85857a857a957a857a957ad05a857b3e946a606b917a816f647a853af4.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/ea853a85857a857a957a857a957ad05a857b3e946a606b917a816f647a853af4.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/ea853a85957a857a957a857a957ac05ac56b3ac46ae16b817a816f647a853af4.png"
],
"iris.tests.test_plot.TestPlotCoordinatesGiven.test_tx.2": [
"https://scitools.github.io/test-iris-imagehash/images/v4/8bf88f457a03b5307e16b561f007b53ed067217ac1786afec0f570bf8178681a.png",
"https://scitools.github.io/test-iris-imagehash/images/v4/8bf98f057a03b5307e16b561f007b53ad067217ac1786afec0f570bf8178685a.png",
"https://scitools.github.io/test-iris-imagehash/images/v4/eafdcec9bc219530b696a56694c2852a95656b7b81986acdc0e516adad186eda.png",
- "https://scitools.github.io/test-iris-imagehash/images/v4/eafdcec9f4219530b696a56694c3852a95656b7b85986acdc06516adad186e9a.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/eafdcec9f4219530b696a56694c3852a95656b7b85986acdc06516adad186e9a.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/eafd86c9f8219430fe96a56684c3852e95656b7b85b86acdc0e5162da5186eda.png"
],
"iris.tests.test_plot.TestPlotCoordinatesGiven.test_tx.3": [
"https://scitools.github.io/test-iris-imagehash/images/v4/8ffe8f367e05952afe05a50b980ded4bd05d69c2c1fb71c1c06272f4d0a06af4.png",
"https://scitools.github.io/test-iris-imagehash/images/v4/aff24ab7bd05952fbd0f950f914fcd48c47860f3e1b9329094266e345a850f6c.png",
- "https://scitools.github.io/test-iris-imagehash/images/v4/aff24ab7fd05952dbd0f950f914fcd40c47868f3e1b9329094266e345a850f6c.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/aff24ab7fd05952dbd0f950f914fcd40c47868f3e1b9329094266e345a850f6c.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/aff21eb6bd04952cbc0f950f914fedc1c0f961f3e1f9329084266e345a850f6c.png"
],
"iris.tests.test_plot.TestPlotCoordinatesGiven.test_tx.4": [
"https://scitools.github.io/test-iris-imagehash/images/v4/aa953d0f85fab50fd0f2956a7a1785fafa176877d00f68f1d02c60f2f008d0f0.png",
@@ -693,13 +707,15 @@
"https://scitools.github.io/test-iris-imagehash/images/v4/ebeaa5419e95b5419e97950d6853953ee053617ad05560fad01570fef001dabe.png",
"https://scitools.github.io/test-iris-imagehash/images/v4/ebfaa56f96a1856cd681a56ee8162d52e8467e12c50c7e8095ad7e0095ad03ff.png",
"https://scitools.github.io/test-iris-imagehash/images/v4/eaa9b5699556854e9456854ed05625f9c0a92bfdc0a90afd81f97e00857e6af6.png",
- "https://scitools.github.io/test-iris-imagehash/images/v4/eaa9b5699556854e9456854ed05625f9d0a92bfdc0a90afd81f97e00855e7ab6.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/eaa9b5699556854e9456854ed05625f9d0a92bfdc0a90afd81f97e00855e7ab6.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/eaa9b5299d56854e9156856ed05625fdc0292bfdc0a90afd85b97e00857e6ad6.png"
],
"iris.tests.test_plot.TestPlotCoordinatesGiven.test_tx.5": [
"https://scitools.github.io/test-iris-imagehash/images/v4/ebfaaf439e87b5019687b5019687b56ac05561fae07103fe6079687a607178f8.png",
"https://scitools.github.io/test-iris-imagehash/images/v4/ebfa2d4b968795059e87970f6854697ae055697ac08561fad041d7aef001d6ae.png",
"https://scitools.github.io/test-iris-imagehash/images/v4/eb7a3e0c978187a4950190bc6856687a607e687bc0fcc1e394acfc0197fc2bfb.png",
- "https://scitools.github.io/test-iris-imagehash/images/v4/eaf73e0d9503852c950395ac9528c1fad16cc0f2d1ec6af2c0ec6a536a1797f3.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/eaf73e0d9503852c950395ac9528c1fad16cc0f2d1ec6af2c0ec6a536a1797f3.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/eaf73e0c9402952c950195acd528c1fac1ecc1f3c1ec63f3c0ec6a536a179ff2.png"
],
"iris.tests.test_plot.TestPlotCoordinatesGiven.test_x.0": [
"https://scitools.github.io/test-iris-imagehash/images/v4/aeb8b5095a87cd60386592d9ec97ad6dd23ca4f6d0797827f0096216c1f878e6.png",
@@ -807,7 +823,8 @@
],
"iris.tests.test_plot.TestPlotOtherCoordSystems.test_plot_tmerc.0": [
"https://scitools.github.io/test-iris-imagehash/images/v4/e63399cd99cd64b29999335965369b262649c98c9b3966c6998d3319ccd69333.png",
- "https://scitools.github.io/test-iris-imagehash/images/v4/e665326d999ecc9b3319b3246666cce69b496cccccc9669923193336666699a6.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/e665326d999ecc9b3319b3246666cce69b496cccccc9669923193336666699a6.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/e665326d999acc9b3319b3246666cce69b496cccccc966996719333666669986.png"
],
"iris.tests.test_plot.TestQuickplotPlot.test_t.0": [
"https://scitools.github.io/test-iris-imagehash/images/v4/83ffb5d67fd4e5962211d9c6a443da77d5389c8ed346d923d011d968dc00da48.png",
@@ -834,10 +851,12 @@
"https://scitools.github.io/test-iris-imagehash/images/v4/a3ffc1de7e009c7030019786f438cde3810fd93c9b734a778ce47c9799b02731.png"
],
"iris.tests.test_plot.TestSimple.test_bounds.0": [
- "https://scitools.github.io/test-iris-imagehash/images/v4/ea856a85954a957ac17e954ac17a9c3e956ac07e3e80c07f3e857aa5c27d3f80.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/ea856a85954a957ac17e954ac17a9c3e956ac07e3e80c07f3e857aa5c27d3f80.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/ea856a85954a957ac17e954ac17a9d22956ac0fe3e81c07f3e857aa5c27d3f80.png"
],
"iris.tests.test_plot.TestSimple.test_points.0": [
- "https://scitools.github.io/test-iris-imagehash/images/v4/fa856a85957a957ac17e954ac17e1ca2950bc07e3e80c07f3e807a85c1ff3f81.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/fa856a85957a957ac17e954ac17e1ca2950bc07e3e80c07f3e807a85c1ff3f81.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/fa856a85957a957ac17e954ac17e0da2954bc07e3e81c07f3a806a85c1ff3f81.png"
],
"iris.tests.test_plot.TestSymbols.test_cloud_cover.0": [
"https://scitools.github.io/test-iris-imagehash/images/v4/e95a330c96a5ccf2695a330c96a5ccf2695a330c96b5ccf3694a330c96b5ccf3.png",
@@ -848,33 +867,40 @@
"https://scitools.github.io/test-iris-imagehash/images/v4/fa95350f952ad2f0c1f66ac1c55a4af4e550a52b3e05905e1e419e6f937e3b21.png",
"https://scitools.github.io/test-iris-imagehash/images/v4/fa95350f952ad3f0c1f66a81e55a4af4e550a52b3e05905e1e419e6f937e1b21.png",
"https://scitools.github.io/test-iris-imagehash/images/v4/be8137f4954ac03fc0ff3e81d03f496a6d00b4af3ea0c07f6fa232c0db7f2d00.png",
- "https://scitools.github.io/test-iris-imagehash/images/v4/be813fe0954ac07fc0ff3e81c03fc97a6d0094af3f80c17f36a53240d97f2d82.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/be813fe0954ac07fc0ff3e81c03fc97a6d0094af3f80c17f36a53240d97f2d82.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/be8137e0954ac05fc0ff3e81c07fc97a6d0094af3fa0c17f36a53244d97e2da0.png"
],
"iris.tests.test_quickplot.TestLabels.test_contour.0": [
"https://scitools.github.io/test-iris-imagehash/images/v4/a3fd956a7a01a5ee321fc96666919b6ec15fdca593600d2586785a259dfa5a01.png",
"https://scitools.github.io/test-iris-imagehash/images/v4/a3fd956a7a01a5ee3217c9e66691996ec15fdca593680d2586785a259dfa5a01.png",
"https://scitools.github.io/test-iris-imagehash/images/v4/a7fd95da7a01654a3217c962e4819a56c96f3c8593624da584da3b658db662db.png",
- "https://scitools.github.io/test-iris-imagehash/images/v4/a7fd955a7a016d1a3217c962e4819a56c96f3c859b624d2584de3a6999b662db.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/a7fd955a7a016d1a3217c962e4819a56c96f3c859b624d2584de3a6999b662db.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/a3fd95ea6a11258c3217c966e4019a56c96f3c859b62492584fe7a699db46adb.png"
],
"iris.tests.test_quickplot.TestLabels.test_contour.1": [
"https://scitools.github.io/test-iris-imagehash/images/v4/faa12bc1954ef43fc0bf9f02854a4ee48548c17a5ab5c17e7a0d7875a17e3a81.png",
- "https://scitools.github.io/test-iris-imagehash/images/v4/bf802f85c17fc17fc07eb42ac07f3f929130c07e3f80c07f7aa02e85c07f3e81.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/bf802f85c17fc17fc07eb42ac07f3f929130c07e3f80c07f7aa02e85c07f3e81.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/bf802e85c07fc17fc07eb42ac17f3f829161c06e3f81c07f7ba02e85c07f3e81.png"
],
"iris.tests.test_quickplot.TestLabels.test_contourf.0": [
"https://scitools.github.io/test-iris-imagehash/images/v4/fe812f88957a955a857a9257c17f7aa5c03dc0bf5a85c07e7f402d40a57a3f01.png",
- "https://scitools.github.io/test-iris-imagehash/images/v4/be816a95957a957ac0fe1e8bc07f7f806e01c07f3f80c07f3fa23f00c07f3d00.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/be816a95957a957ac0fe1e8bc07f7f806e01c07f3f80c07f3fa23f00c07f3d00.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/be816a85957a955ac0ff1e8bc07f7f806e01c07f3f80c07f3fa23f80c07f3d00.png"
],
"iris.tests.test_quickplot.TestLabels.test_contourf.1": [
"https://scitools.github.io/test-iris-imagehash/images/v4/faa12bc1954ef43fc0bf9f02854a4ee48548c17a5ab5c17e7a0d7875a17e3a81.png",
- "https://scitools.github.io/test-iris-imagehash/images/v4/bf802f85c17fc17fc07eb42ac07f3f929130c07e3f80c07f7aa02e85c07f3e81.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/bf802f85c17fc17fc07eb42ac07f3f929130c07e3f80c07f7aa02e85c07f3e81.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/bf802e85c07fc17fc07eb42ac17f3f829161c06e3f81c07f7ba02e85c07f3e81.png"
],
"iris.tests.test_quickplot.TestLabels.test_contourf.2": [
"https://scitools.github.io/test-iris-imagehash/images/v4/fa852f81955ac532c0bf9e89c57edae69357e13f4ea0c05a3f8561a4935a3e01.png",
- "https://scitools.github.io/test-iris-imagehash/images/v4/be816a95907ae508c17e955ac07f3fa0945bc07f3f80c07f3aa36f01c0ff3f80.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/be816a95907ae508c17e955ac07f3fa0945bc07f3f80c07f3aa36f01c0ff3f80.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/be816ab5907ae508c17e955ac07f3fa0945ac07f3f80c07f3aa32f81c0ff3f80.png"
],
"iris.tests.test_quickplot.TestLabels.test_contourf_nameless.0": [
"https://scitools.github.io/test-iris-imagehash/images/v4/faa52ec1955ac536c0bf9e09c57edae69357e13f4e80c0da2f81618493da3f01.png",
- "https://scitools.github.io/test-iris-imagehash/images/v4/be816af5907ee508c17e955ac03f3f809419c07f3f80c07f3a8b6f81c0ff3f80.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/be816af5907ee508c17e955ac03f3f809419c07f3f80c07f3a8b6f81c0ff3f80.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/be816ab5907ee508c17e975ac07f3fa09459c07f3f80c07f3a812f81c0ff3f80.png"
],
"iris.tests.test_quickplot.TestLabels.test_map.0": [
"https://scitools.github.io/test-iris-imagehash/images/v4/ea5e618434ac36e5c1c9369b95b39c38c3a39a4fcee19a6e9b64cb609925cd25.png",
@@ -890,36 +916,45 @@
],
"iris.tests.test_quickplot.TestLabels.test_pcolor.0": [
"https://scitools.github.io/test-iris-imagehash/images/v4/bb423d4e94a5c6b9c15adaadc1fb6a469c8de43a3e07904e5f016b57984e1ea1.png",
- "https://scitools.github.io/test-iris-imagehash/images/v4/eea16affc05ab500956e974ac53f3d80925ac03f2f81c07e3fa12da1c2fe3f80.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/eea16affc05ab500956e974ac53f3d80925ac03f2f81c07e3fa12da1c2fe3f80.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/eea16abfc05ab500956e974ac13f3da0925ac07f3fa1c07e3fa12da1c25e3f80.png"
],
"iris.tests.test_quickplot.TestLabels.test_pcolormesh.0": [
"https://scitools.github.io/test-iris-imagehash/images/v4/bb433d4e94a4c6b9c15adaadc1fb6a469c8de43a3e07904e5f016b57984e1ea1.png",
- "https://scitools.github.io/test-iris-imagehash/images/v4/eea16affc05ab500956e974ac53f3d80925ac03f3f81c07e3fa12da1c27e3f80.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/eea16affc05ab500956e974ac53f3d80925ac03f3f81c07e3fa12da1c27e3f80.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/eea16abfc05ab500956e974ac13f3da0925ac07f3fa1c07e3fa12da1c25e3f80.png"
],
"iris.tests.test_quickplot.TestLabels.test_pcolormesh_str_symbol.0": [
- "https://scitools.github.io/test-iris-imagehash/images/v4/eea16affc05ab500956e974ac53f3d80925ac03f3f80c07e3fa12da1c27f3f80.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/eea16affc05ab500956e974ac53f3d80925ac03f3f80c07e3fa12da1c27f3f80.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/eea16abfc05ab500956e974ac13f3da0925ac07f3fa1c07e3fa12da1c25e3f80.png"
],
"iris.tests.test_quickplot.TestQuickplotCoordinatesGiven.test_non_cube_coordinate.0": [
"https://scitools.github.io/test-iris-imagehash/images/v4/fa816a85857a955ae17e957ec57e7a81855fc17e3a81c57e1a813a85c57a1a05.png",
"https://scitools.github.io/test-iris-imagehash/images/v4/fe816a85857a957ac07f957ac07f3e80956ac07f3e80c07f3e813e85c07e3f80.png"
],
"iris.tests.test_quickplot.TestQuickplotCoordinatesGiven.test_tx.0": [
- "https://scitools.github.io/test-iris-imagehash/images/v4/ea856a95955a956ac17f950a807e3f4c951ac07e3f81c0ff3ea16aa1c0bd3f81.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/ea856a95955a956ac17f950a807e3f4c951ac07e3f81c0ff3ea16aa1c0bd3f81.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/ea856a95955a954ac17f950ac07e3f44951ac07e3f81c0ff3ea16aa1c0ff3e81.png"
],
"iris.tests.test_quickplot.TestQuickplotCoordinatesGiven.test_tx.1": [
- "https://scitools.github.io/test-iris-imagehash/images/v4/fa856a85957a957ac17e954ac17e1ca2950bc07e3e80c07f3e807a85c1ff3f81.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/fa856a85957a957ac17e954ac17e1ca2950bc07e3e80c07f3e807a85c1ff3f81.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/fa856a85957a957ac17e954ac17e0da2954bc07e3e81c07f3a806a85c1ff3f81.png"
],
"iris.tests.test_quickplot.TestQuickplotCoordinatesGiven.test_tx.2": [
- "https://scitools.github.io/test-iris-imagehash/images/v4/eafdeec9f729943032168d66d4cb896e9567497b81304aedc96514ad8d18669a.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/eafdeec9f729943032168d66d4cb896e9567497b81304aedc96514ad8d18669a.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/eaf9a6c9f728943032168d66d4cb8d2e9567497b81304aedc9e51e2d9d186ada.png"
],
"iris.tests.test_quickplot.TestQuickplotCoordinatesGiven.test_tx.3": [
- "https://scitools.github.io/test-iris-imagehash/images/v4/a6fb4b967f00950eb00f9d0f900fcd62dc7868f2c1bb3a909c266e34daa52f6c.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/a6fb4b967f00950eb00f9d0f900fcd62dc7868f2c1bb3a909c266e34daa52f6c.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/a6fa1e967f00950eb00f9d0f914fcdc2d560c9f3c1fb3a9084266e34daa52f6c.png"
],
"iris.tests.test_quickplot.TestQuickplotCoordinatesGiven.test_tx.4": [
- "https://scitools.github.io/test-iris-imagehash/images/v4/eaa9b549f756854ea0168d6ed556896dd8e909ed88290afdd9e97e008d6e2296.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/eaa9b549f756854ea0168d6ed556896dd8e909ed88290afdd9e97e008d6e2296.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/eaa9b529f756850ea0169566d1568d6dd86909ed88290afd9ded7e008d666ad6.png"
],
"iris.tests.test_quickplot.TestQuickplotCoordinatesGiven.test_tx.5": [
- "https://scitools.github.io/test-iris-imagehash/images/v4/aad73e0df78085ac840395ac9428d9fad56cd8f2906c48f2d0ec7a536a1737f3.png"
+ "https://scitools.github.io/test-iris-imagehash/images/v4/aad73e0df78085ac840395ac9428d9fad56cd8f2906c48f2d0ec7a536a1737f3.png",
+ "https://scitools.github.io/test-iris-imagehash/images/v4/aad73e0cf710952c840195acd528c1e2d1ecc9f3c1ec49f3c1ec6a536a1737f3.png"
],
"iris.tests.test_quickplot.TestQuickplotCoordinatesGiven.test_x.0": [
"https://scitools.github.io/test-iris-imagehash/images/v4/a6ffb5097e84cde2224598d1649f8d6cd2388c76d0799867d009da76c9f8d866.png",
@@ -1013,4 +1048,4 @@
"https://scitools.github.io/test-iris-imagehash/images/v4/82fe81987fdf77ffe0002addd4002805dd28df67d9a9d4625bfddc209841de20.png",
"https://scitools.github.io/test-iris-imagehash/images/v4/82fa80997f547799a0037a00d52f0956ddaf9f7e98a1816e09f5d8260bfffe00.png"
]
-}
+}
\ No newline at end of file
diff --git a/lib/iris/tests/unit/common/metadata/test_BaseMetadata.py b/lib/iris/tests/unit/common/metadata/test_BaseMetadata.py
index 4ff8ec0de6..7cb8e3394b 100644
--- a/lib/iris/tests/unit/common/metadata/test_BaseMetadata.py
+++ b/lib/iris/tests/unit/common/metadata/test_BaseMetadata.py
@@ -53,6 +53,19 @@ def test_repr(self):
)
self.assertEqual(expected, repr(metadata))
+ def test_str(self):
+ metadata = self.cls(
+ standard_name="",
+ long_name=None,
+ var_name=self.var_name,
+ units=self.units,
+ attributes={},
+ )
+ expected = (
+ f"BaseMetadata(var_name={self.var_name!r}, units={self.units!r})"
+ )
+ self.assertEqual(expected, str(metadata))
+
def test__fields(self):
expected = (
"standard_name",
diff --git a/requirements/ci/py36.yml b/requirements/ci/py36.yml
index 0f99659d8e..9915b4b25c 100644
--- a/requirements/ci/py36.yml
+++ b/requirements/ci/py36.yml
@@ -28,6 +28,7 @@ dependencies:
- mo_pack
- nc-time-axis
- pandas
+ - pip
- python-stratify
# Test dependencies.
diff --git a/requirements/ci/py37.yml b/requirements/ci/py37.yml
index ca967725a3..1c21b1eb76 100644
--- a/requirements/ci/py37.yml
+++ b/requirements/ci/py37.yml
@@ -28,6 +28,7 @@ dependencies:
- mo_pack
- nc-time-axis
- pandas
+ - pip
- python-stratify
# Test dependencies.
diff --git a/requirements/ci/py38.yml b/requirements/ci/py38.yml
index 8b4d12c082..33ff15ffd5 100644
--- a/requirements/ci/py38.yml
+++ b/requirements/ci/py38.yml
@@ -28,6 +28,7 @@ dependencies:
- mo_pack
- nc-time-axis
- pandas
+ - pip
- python-stratify
# Test dependencies.