From b2cef9152998bf3e14262d67010554767916281f Mon Sep 17 00:00:00 2001 From: Bill Little Date: Sun, 14 Feb 2021 16:05:33 +0000 Subject: [PATCH 1/4] update intersphinx mapping and matplotlib urls (#4003) * update intersphinx mapping and matplotlib urls * use matplotlib intersphinx where possible * review actions * review actions --- .../general/plot_anomaly_log_colouring.py | 13 +++++------- docs/src/common_links.inc | 2 +- docs/src/conf.py | 12 +++++------ docs/src/whatsnew/3.0.1.rst | 21 ++++++++----------- docs/src/whatsnew/3.0.rst | 21 ++++++++----------- docs/src/whatsnew/latest.rst | 3 +++ 6 files changed, 33 insertions(+), 39 deletions(-) diff --git a/docs/gallery_code/general/plot_anomaly_log_colouring.py b/docs/gallery_code/general/plot_anomaly_log_colouring.py index 778f92db1b..846816aff7 100644 --- a/docs/gallery_code/general/plot_anomaly_log_colouring.py +++ b/docs/gallery_code/general/plot_anomaly_log_colouring.py @@ -12,18 +12,15 @@ "zero band" which is plotted in white. To do this, we create a custom value mapping function (normalization) using -the matplotlib Norm class `matplotlib.colours.SymLogNorm -`_. -We use this to make a cell-filled pseudocolour plot with a colorbar. +the matplotlib Norm class :obj:`matplotlib.colors.SymLogNorm`. +We use this to make a cell-filled pseudocolor plot with a colorbar. NOTE: By "pseudocolour", we mean that each data point is drawn as a "cell" region on the plot, coloured according to its data value. This is provided in Iris by the functions :meth:`iris.plot.pcolor` and :meth:`iris.plot.pcolormesh`, which call the underlying matplotlib -functions of the same names (i.e. `matplotlib.pyplot.pcolor -`_ -and `matplotlib.pyplot.pcolormesh -`_). +functions of the same names (i.e., :obj:`matplotlib.pyplot.pcolor` +and :obj:`matplotlib.pyplot.pcolormesh`). See also: http://en.wikipedia.org/wiki/False_color#Pseudocolor. """ @@ -65,7 +62,7 @@ def main(): # Use a standard colour map which varies blue-white-red. # For suitable options, see the 'Diverging colormaps' section in: - # http://matplotlib.org/examples/color/colormaps_reference.html + # http://matplotlib.org/stable/gallery/color/colormap_reference.html anom_cmap = "bwr" # Create a 'logarithmic' data normalization. diff --git a/docs/src/common_links.inc b/docs/src/common_links.inc index 157444d65d..3c465b67dc 100644 --- a/docs/src/common_links.inc +++ b/docs/src/common_links.inc @@ -18,7 +18,7 @@ .. _issue: https://github.com/SciTools/iris/issues .. _issues: https://github.com/SciTools/iris/issues .. _legacy documentation: https://scitools.org.uk/iris/docs/v2.4.0/ -.. _matplotlib: https://matplotlib.org/ +.. _matplotlib: https://matplotlib.org/stable/ .. _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 diff --git a/docs/src/conf.py b/docs/src/conf.py index 843af17944..9bab5850b8 100644 --- a/docs/src/conf.py +++ b/docs/src/conf.py @@ -184,18 +184,18 @@ def autolog(message): # -- intersphinx extension ---------------------------------------------------- # See https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html intersphinx_mapping = { - "cartopy": ("http://scitools.org.uk/cartopy/docs/latest/", None), - "matplotlib": ("http://matplotlib.org/", None), - "numpy": ("http://docs.scipy.org/doc/numpy/", None), - "python": ("http://docs.python.org/2.7", None), - "scipy": ("http://docs.scipy.org/doc/scipy/reference/", None), + "cartopy": ("https://scitools.org.uk/cartopy/docs/latest/", None), + "matplotlib": ("https://matplotlib.org/stable/", None), + "numpy": ("https://numpy.org/doc/stable/", None), + "python": ("https://docs.python.org/3/", None), + "scipy": ("https://docs.scipy.org/doc/scipy/reference/", None), } # The name of the Pygments (syntax highlighting) style to use. pygments_style = "sphinx" # -- plot_directive extension ------------------------------------------------- -# See https://matplotlib.org/3.1.3/devel/plot_directive.html#options +# See https://matplotlib.org/stable/api/sphinxext_plot_directive_api.html#options plot_formats = [ ("png", 100), ] diff --git a/docs/src/whatsnew/3.0.1.rst b/docs/src/whatsnew/3.0.1.rst index 163fe4ff3e..05bf41ce18 100644 --- a/docs/src/whatsnew/3.0.1.rst +++ b/docs/src/whatsnew/3.0.1.rst @@ -167,12 +167,12 @@ This document explains the changes made to Iris for this release ``volume`` are the only accepted values. (:pull:`3533`) #. `@trexfeathers`_ set **all** plot types in :mod:`iris.plot` to now use - `matplotlib.dates.date2num`_ to format date/time coordinates for use on a plot + :obj:`matplotlib.dates.date2num` to format date/time coordinates for use on a plot axis (previously :meth:`~iris.plot.pcolor` and :meth:`~iris.plot.pcolormesh` did not include this behaviour). (:pull:`3762`) #. `@trexfeathers`_ changed date/time axis labels in :mod:`iris.quickplot` to - now **always** be based on the ``epoch`` used in `matplotlib.dates.date2num`_ + now **always** be based on the ``epoch`` used in :obj:`matplotlib.dates.date2num` (previously would take the unit from a time coordinate, if present, even though the coordinate's value had been changed via ``date2num``). (:pull:`3762`) @@ -189,7 +189,7 @@ This document explains the changes made to Iris for this release #. `@stephenworsley`_ changed the way tick labels are assigned from string coords. Previously, the first tick label would occasionally be duplicated. This also - removes the use of Matplotlib's deprecated ``IndexFormatter``. (:pull:`3857`) + removes the use of the deprecated `matplotlib`_ ``IndexFormatter``. (:pull:`3857`) #. `@znicholls`_ fixed :meth:`~iris.quickplot._title` to only check ``units.is_time_reference`` if the ``units`` symbol is not used. (:pull:`3902`) @@ -295,11 +295,11 @@ This document explains the changes made to Iris for this release #. `@stephenworsley`_ and `@trexfeathers`_ pinned Iris to require `Cartopy`_ ``>=0.18``, in order to remain compatible with the latest version - of `Matplotlib`_. (:pull:`3762`) + of `matplotlib`_. (:pull:`3762`) -#. `@bjlittle`_ unpinned Iris to use the latest version of `Matplotlib`_. +#. `@bjlittle`_ unpinned Iris to use the latest version of `matplotlib`_. Supporting ``Iris`` for both ``Python2`` and ``Python3`` had resulted in - pinning our dependency on `Matplotlib`_ at ``v2.x``. But this is no longer + pinning our dependency on `matplotlib`_ at ``v2.x``. But this is no longer necessary now that ``Python2`` support has been dropped. (:pull:`3468`) #. `@stephenworsley`_ and `@trexfeathers`_ unpinned Iris to use the latest version @@ -422,11 +422,11 @@ This document explains the changes made to Iris for this release grid-line spacing in `Cartopy`_. (:pull:`3762`) (see also `Cartopy#1117`_) #. `@trexfeathers`_ added additional acceptable graphics test targets to account - for very minor changes in `Matplotlib`_ version ``3.3`` (colormaps, fonts and + for very minor changes in `matplotlib`_ version ``3.3`` (colormaps, fonts and axes borders). (:pull:`3762`) -#. `@rcomer`_ corrected the Matplotlib backend in Iris tests to ignore - `matplotlib.rcdefaults`_, instead the tests will **always** use ``agg``. +#. `@rcomer`_ corrected the `matplotlib`_ backend in Iris tests to ignore + :obj:`matplotlib.rcdefaults`, instead the tests will **always** use ``agg``. (:pull:`3846`) #. `@bjlittle`_ migrated the `black`_ support from ``19.10b0`` to ``20.8b1``. @@ -470,7 +470,6 @@ This document explains the changes made to Iris for this release with `flake8`_ and `black`_. (:pull:`3928`) .. _Read the Docs: https://scitools-iris.readthedocs.io/en/latest/ -.. _Matplotlib: https://matplotlib.org/ .. _CF units rules: https://cfconventions.org/Data/cf-conventions/cf-conventions-1.8/cf-conventions.html#units .. _CF Ancillary Data: https://cfconventions.org/Data/cf-conventions/cf-conventions-1.8/cf-conventions.html#ancillary-data .. _Quality Flags: https://cfconventions.org/Data/cf-conventions/cf-conventions-1.8/cf-conventions.html#flags @@ -480,7 +479,6 @@ This document explains the changes made to Iris for this release .. _Cartopy#1105: https://github.com/SciTools/cartopy/pull/1105 .. _Cartopy#1117: https://github.com/SciTools/cartopy/pull/1117 .. _Dask: https://github.com/dask/dask -.. _matplotlib.dates.date2num: https://matplotlib.org/api/dates_api.html#matplotlib.dates.date2num .. _Proj: https://github.com/OSGeo/PROJ .. _black: https://black.readthedocs.io/en/stable/ .. _Proj#1292: https://github.com/OSGeo/PROJ/pull/1292 @@ -510,7 +508,6 @@ This document explains the changes made to Iris for this release .. _numpy: https://github.com/numpy/numpy .. _xxHash: https://github.com/Cyan4973/xxHash .. _PyKE: https://pypi.org/project/scitools-pyke/ -.. _matplotlib.rcdefaults: https://matplotlib.org/3.1.1/api/matplotlib_configuration_api.html?highlight=rcdefaults#matplotlib.rcdefaults .. _@owena11: https://github.com/owena11 .. _GitHub: https://github.com/SciTools/iris/issues/new/choose .. _readthedocs: https://readthedocs.org/ diff --git a/docs/src/whatsnew/3.0.rst b/docs/src/whatsnew/3.0.rst index 0f61d62033..7fdc2e3400 100644 --- a/docs/src/whatsnew/3.0.rst +++ b/docs/src/whatsnew/3.0.rst @@ -150,12 +150,12 @@ This document explains the changes made to Iris for this release ``volume`` are the only accepted values. (:pull:`3533`) #. `@trexfeathers`_ set **all** plot types in :mod:`iris.plot` to now use - `matplotlib.dates.date2num`_ to format date/time coordinates for use on a plot + :obj:`matplotlib.dates.date2num` to format date/time coordinates for use on a plot axis (previously :meth:`~iris.plot.pcolor` and :meth:`~iris.plot.pcolormesh` did not include this behaviour). (:pull:`3762`) #. `@trexfeathers`_ changed date/time axis labels in :mod:`iris.quickplot` to - now **always** be based on the ``epoch`` used in `matplotlib.dates.date2num`_ + now **always** be based on the ``epoch`` used in :obj:`matplotlib.dates.date2num` (previously would take the unit from a time coordinate, if present, even though the coordinate's value had been changed via ``date2num``). (:pull:`3762`) @@ -172,7 +172,7 @@ This document explains the changes made to Iris for this release #. `@stephenworsley`_ changed the way tick labels are assigned from string coords. Previously, the first tick label would occasionally be duplicated. This also - removes the use of Matplotlib's deprecated ``IndexFormatter``. (:pull:`3857`) + removes the use of the deprecated `matplotlib`_ ``IndexFormatter``. (:pull:`3857`) #. `@znicholls`_ fixed :meth:`~iris.quickplot._title` to only check ``units.is_time_reference`` if the ``units`` symbol is not used. (:pull:`3902`) @@ -278,11 +278,11 @@ This document explains the changes made to Iris for this release #. `@stephenworsley`_ and `@trexfeathers`_ pinned Iris to require `Cartopy`_ ``>=0.18``, in order to remain compatible with the latest version - of `Matplotlib`_. (:pull:`3762`) + of `matplotlib`_. (:pull:`3762`) -#. `@bjlittle`_ unpinned Iris to use the latest version of `Matplotlib`_. +#. `@bjlittle`_ unpinned Iris to use the latest version of `matplotlib`_. Supporting ``Iris`` for both ``Python2`` and ``Python3`` had resulted in - pinning our dependency on `Matplotlib`_ at ``v2.x``. But this is no longer + pinning our dependency on `matplotlib`_ at ``v2.x``. But this is no longer necessary now that ``Python2`` support has been dropped. (:pull:`3468`) #. `@stephenworsley`_ and `@trexfeathers`_ unpinned Iris to use the latest version @@ -405,11 +405,11 @@ This document explains the changes made to Iris for this release grid-line spacing in `Cartopy`_. (:pull:`3762`) (see also `Cartopy#1117`_) #. `@trexfeathers`_ added additional acceptable graphics test targets to account - for very minor changes in `Matplotlib`_ version ``3.3`` (colormaps, fonts and + for very minor changes in `matplotlib`_ version ``3.3`` (colormaps, fonts and axes borders). (:pull:`3762`) -#. `@rcomer`_ corrected the Matplotlib backend in Iris tests to ignore - `matplotlib.rcdefaults`_, instead the tests will **always** use ``agg``. +#. `@rcomer`_ corrected the `matplotlib`_ backend in Iris tests to ignore + :obj:`matplotlib.rcdefaults`, instead the tests will **always** use ``agg``. (:pull:`3846`) #. `@bjlittle`_ migrated the `black`_ support from ``19.10b0`` to ``20.8b1``. @@ -453,7 +453,6 @@ This document explains the changes made to Iris for this release with `flake8`_ and `black`_. (:pull:`3928`) .. _Read the Docs: https://scitools-iris.readthedocs.io/en/latest/ -.. _Matplotlib: https://matplotlib.org/ .. _CF units rules: https://cfconventions.org/Data/cf-conventions/cf-conventions-1.8/cf-conventions.html#units .. _CF Ancillary Data: https://cfconventions.org/Data/cf-conventions/cf-conventions-1.8/cf-conventions.html#ancillary-data .. _Quality Flags: https://cfconventions.org/Data/cf-conventions/cf-conventions-1.8/cf-conventions.html#flags @@ -463,7 +462,6 @@ This document explains the changes made to Iris for this release .. _Cartopy#1105: https://github.com/SciTools/cartopy/pull/1105 .. _Cartopy#1117: https://github.com/SciTools/cartopy/pull/1117 .. _Dask: https://github.com/dask/dask -.. _matplotlib.dates.date2num: https://matplotlib.org/api/dates_api.html#matplotlib.dates.date2num .. _Proj: https://github.com/OSGeo/PROJ .. _black: https://black.readthedocs.io/en/stable/ .. _Proj#1292: https://github.com/OSGeo/PROJ/pull/1292 @@ -493,7 +491,6 @@ This document explains the changes made to Iris for this release .. _numpy: https://github.com/numpy/numpy .. _xxHash: https://github.com/Cyan4973/xxHash .. _PyKE: https://pypi.org/project/scitools-pyke/ -.. _matplotlib.rcdefaults: https://matplotlib.org/3.1.1/api/matplotlib_configuration_api.html?highlight=rcdefaults#matplotlib.rcdefaults .. _@owena11: https://github.com/owena11 .. _GitHub: https://github.com/SciTools/iris/issues/new/choose .. _readthedocs: https://readthedocs.org/ diff --git a/docs/src/whatsnew/latest.rst b/docs/src/whatsnew/latest.rst index b290b7ab5a..f96cb8c7eb 100644 --- a/docs/src/whatsnew/latest.rst +++ b/docs/src/whatsnew/latest.rst @@ -86,6 +86,9 @@ This document explains the changes made to Iris for this release on :ref:`installing_iris` and to the footer of all pages. Also added the copyright years to the footer. (:pull:`3989`) +#. `@bjlittle`_ updated the ``intersphinx_mapping`` and fixed documentation + to use ``stable`` URLs for `matplotlib`_. (:pull:`4003`) + 💼 Internal =========== From e5cb25960e22f3befd36e78bc449add7ac16d859 Mon Sep 17 00:00:00 2001 From: Bill Little Date: Sun, 14 Feb 2021 17:13:14 +0000 Subject: [PATCH 2/4] update readme badges (#4004) * update readme badges * pimp twitter badge --- README.md | 20 +++++++++++++------- docs/src/whatsnew/latest.rst | 5 +++++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 0ceac7e089..c6cd4de47f 100644 --- a/README.md +++ b/README.md @@ -13,18 +13,24 @@ Cirrus-CI - -Documentation Status + +Documentation Status conda-forge downloads # contributors + +conda-forge + +pypi -Latest version +latest release Commits since last release @@ -35,8 +41,8 @@ black -twitter +twitter scitools_iris

diff --git a/docs/src/whatsnew/latest.rst b/docs/src/whatsnew/latest.rst index f96cb8c7eb..68872beb64 100644 --- a/docs/src/whatsnew/latest.rst +++ b/docs/src/whatsnew/latest.rst @@ -89,6 +89,8 @@ This document explains the changes made to Iris for this release #. `@bjlittle`_ updated the ``intersphinx_mapping`` and fixed documentation to use ``stable`` URLs for `matplotlib`_. (:pull:`4003`) +#. `@bjlittle`_ added the |PyPI|_ badge to the `README.md`_. (:pull:`4004`) + 💼 Internal =========== @@ -123,4 +125,7 @@ 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 +.. |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/ +.. _README.md: https://github.com/SciTools/iris#----- From 343e7a4e84e3783e343a7b814f766f2d8973b342 Mon Sep 17 00:00:00 2001 From: Bill Little Date: Sun, 14 Feb 2021 17:13:40 +0000 Subject: [PATCH 3/4] update readme logo img src and href (#4006) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c6cd4de47f..e460f4a01a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

- - Iris
+ + Iris

From f569a55e4644af1e1c0019c61a908bf3cda420ce Mon Sep 17 00:00:00 2001 From: Bill Little Date: Sun, 14 Feb 2021 17:14:08 +0000 Subject: [PATCH 4/4] update setuptools description (#4008) --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b1c8939fdd..f4bfe4cf08 100644 --- a/setup.py +++ b/setup.py @@ -263,7 +263,7 @@ def long_description(): author="UK Met Office", author_email="scitools-iris-dev@googlegroups.com", description="A powerful, format-agnostic, community-driven Python " - "library for analysing and visualising Earth science data", + "package for analysing and visualising Earth science data", long_description=long_description(), long_description_content_type="text/markdown", packages=find_package_tree("lib/iris", "iris"),