From 53ea6b097ce112f3cbb889b5f2407c6866262c8a Mon Sep 17 00:00:00 2001 From: "stephen.worsley" Date: Thu, 3 Sep 2020 15:47:46 +0100 Subject: [PATCH 1/5] Add whatsnew entries for unpinning Proj --- ci/requirements/readthedocs.yml | 5 ++--- docs/iris/src/whatsnew/latest.rst | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/ci/requirements/readthedocs.yml b/ci/requirements/readthedocs.yml index 4a1df9cc7b..121f8a6722 100644 --- a/ci/requirements/readthedocs.yml +++ b/ci/requirements/readthedocs.yml @@ -14,12 +14,11 @@ dependencies: # Without these, iris won't even import. - - cartopy>=0.12 - - proj4<6 + - cartopy>=0.18 - cf-units>=2 - cftime - dask>=2 - - matplotlib<3.3 + - matplotlib - netcdf4 - numpy>=1.14 - scipy diff --git a/docs/iris/src/whatsnew/latest.rst b/docs/iris/src/whatsnew/latest.rst index a32aca6d5f..119ac5afd5 100644 --- a/docs/iris/src/whatsnew/latest.rst +++ b/docs/iris/src/whatsnew/latest.rst @@ -30,6 +30,18 @@ Features * `CF Ancillary Data`_ variables are now supported. +Dependency Updates +================== + +* Iris now supports the latest version of Proj. + +* Iris now requires Cartopy >= 0.18 in order to remain compatible with the latest + version of Matplotlib. + +* GDAL is removed from the extensions dependency group. We no longer consider it to + be an extension. + + Bugs Fixed ========== @@ -83,6 +95,14 @@ Incompatible Changes :func:`iris.experimental.concatenate.concatenate` function raised an exception. +Internal +======== + +* Changed the numerical values in tests involving the Robinson projection due + to improvements made in Proj. + +* Change tests to account for changes in behaviour in GDAL. + Deprecations ============ @@ -121,6 +141,9 @@ Documentation The PDF may be accessed by clicking on the version at the bottom of the side bar, then selecting ``PDF`` from the ``Downloads`` section. +* Added a warning to the :func:`iris.analysis.cartography.project` function + regarding its behaviour on projections with non-rectangular boundaries. + .. _Read the Docs: https://scitools-iris.readthedocs.io/en/latest/ .. _matplotlib: https://matplotlib.org/ .. _CF Ancillary Data: https://cfconventions.org/Data/cf-conventions/cf-conventions-1.8/cf-conventions.html#ancillary-data \ No newline at end of file From 6895ba8bd2af22bc8f88c7a11e0eed840933b3bc Mon Sep 17 00:00:00 2001 From: Martin Yeo Date: Fri, 4 Sep 2020 11:51:20 +0100 Subject: [PATCH 2/5] Whats new entries for graphics tests and time axis changes. --- docs/iris/src/whatsnew/latest.rst | 58 ++++++++++++++++++++++--------- 1 file changed, 42 insertions(+), 16 deletions(-) diff --git a/docs/iris/src/whatsnew/latest.rst b/docs/iris/src/whatsnew/latest.rst index 119ac5afd5..df1e5b1d4e 100644 --- a/docs/iris/src/whatsnew/latest.rst +++ b/docs/iris/src/whatsnew/latest.rst @@ -19,14 +19,14 @@ Features * Statistical operations :meth:`iris.cube.Cube.collapsed`, :meth:`iris.cube.Cube.aggregated_by` and :meth:`iris.cube.Cube.rolling_window` - previously removed every :class:`iris.coord.CellMeasure` attached to the - cube. Now, a :class:`iris.coord.CellMeasure` will only be removed if it is + previously removed every :class:`iris.coord.CellMeasure` attached to the + cube. Now, a :class:`iris.coord.CellMeasure` will only be removed if it is associated with an axis over which the statistic is being run. * Supporting ``Iris`` for both ``Python2`` and ``Python3`` resulted in pinning our dependency on `matplotlib`_ at ``v2.x``. Now that ``Python2`` support has been dropped, ``Iris`` is free to use the latest version of `matplotlib`_. - + * `CF Ancillary Data`_ variables are now supported. @@ -52,20 +52,32 @@ Bugs Fixed ``TypeError`` is still raised if a :class:`~iris.cube.Cube` is iterated over but ``isinstance(cube, collections.Iterable)`` now behaves as expected. -* Concatenating cubes along an axis shared by cell measures would cause - concatenation to inappropriately fail. These cell measures are now +* Concatenating cubes along an axis shared by cell measures would cause + concatenation to inappropriately fail. These cell measures are now concatenated together in the resulting cube. -* Copying a cube would previously ignore any attached +* Copying a cube would previously ignore any attached :class:`~iris.coords.CellMeasure`. These are now copied over. * A :class:`~iris.coords.CellMeasure` requires a string ``measure`` attribute - to be defined, which can only have a value of ``area`` or ``volume``. + to be defined, which can only have a value of ``area`` or ``volume``. Previously, the ``measure`` was provided as a keyword argument to - :class:`~iris.coords.CellMeasure` with an default value of ``None``, which + :class:`~iris.coords.CellMeasure` with an default value of ``None``, which caused a ``TypeError`` when no ``measure`` was provided. The default value of ``area`` is now used. +* **All** plot types in `iris.plot` now use `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). + +* Date/time axis labels in `iris.quickplot` are now **always** based on the + ``epoch`` used in `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``). + Incompatible Changes ==================== @@ -89,10 +101,10 @@ Incompatible Changes :mod:`iris.util` module. Please use the :func:`iris.util.equalise_attributes` function instead. -* The :mod:`iris.experimental.concatenate` module has now been removed. In +* The :mod:`iris.experimental.concatenate` module has now been removed. In ``v1.6.0`` the experimental ``concatenate`` functionality was moved to the :meth:`iris.cube.CubeList.concatenate` method. Since then, calling the - :func:`iris.experimental.concatenate.concatenate` function raised an + :func:`iris.experimental.concatenate.concatenate` function raised an exception. Internal @@ -103,6 +115,20 @@ Internal * Change tests to account for changes in behaviour in GDAL. +* Changed every graphics test that includes `Cartopy's coastlines + `_ + to account for new adaptive coastline scaling (`see cartopy#1105 + `_). + +* Changed graphics tests to account for some new default grid-line spacing in + `Cartopy `_ (`part of cartopy#1117 + `_). + +* Additional acceptable graphics test targets to account for very minor changes + in `Matplotlib `_ version 3.3 + (colormaps, fonts and axes borders). + Deprecations ============ @@ -121,20 +147,20 @@ Documentation * Moved the :ref:`sphx_glr_generated_gallery_oceanography_plot_orca_projection.py` from the general part of the gallery to oceanography. -* Updated documentation to use a modern sphinx theme and be served from +* Updated documentation to use a modern sphinx theme and be served from https://scitools-iris.readthedocs.io/en/latest/. -* Added support for the `black `_ code - formatter. This is now automatically checked on GitHub PRs, replacing the +* Added support for the `black `_ code + formatter. This is now automatically checked on GitHub PRs, replacing the older, unittest-based "iris.tests.test_coding_standards.TestCodeFormat". - Black provides automatic code format correction for most IDEs. See the new + Black provides automatic code format correction for most IDEs. See the new developer guide section on :ref:`iris_code_format`. * Refreshed the :ref:`whats_new_contributions` for the :ref:`iris_whatsnew`. This includes always creating the ``latest`` what's new page so it appears on the latest documentation at https://scitools-iris.readthedocs.io/en/latest/whatsnew. This resolves - :issue:`2104` and :issue:`3451`. Also updated the + :issue:`2104` and :issue:`3451`. Also updated the :ref:`iris_development_releases_steps` to follow when making a release. * Enabled the PDF creation of the documentation on the `Read the Docs`_ service. @@ -146,4 +172,4 @@ Documentation .. _Read the Docs: https://scitools-iris.readthedocs.io/en/latest/ .. _matplotlib: https://matplotlib.org/ -.. _CF Ancillary Data: https://cfconventions.org/Data/cf-conventions/cf-conventions-1.8/cf-conventions.html#ancillary-data \ No newline at end of file +.. _CF Ancillary Data: https://cfconventions.org/Data/cf-conventions/cf-conventions-1.8/cf-conventions.html#ancillary-data From 82b80db7b97da8e867d882af684c9c90a1197f50 Mon Sep 17 00:00:00 2001 From: Martin Yeo Date: Fri, 4 Sep 2020 12:30:53 +0100 Subject: [PATCH 3/5] Additional links for What's New. --- docs/iris/src/whatsnew/latest.rst | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/iris/src/whatsnew/latest.rst b/docs/iris/src/whatsnew/latest.rst index df1e5b1d4e..a3753ddc58 100644 --- a/docs/iris/src/whatsnew/latest.rst +++ b/docs/iris/src/whatsnew/latest.rst @@ -33,10 +33,12 @@ Features Dependency Updates ================== -* Iris now supports the latest version of Proj. +* Iris now supports the latest version of + `Proj `_. -* Iris now requires Cartopy >= 0.18 in order to remain compatible with the latest - version of Matplotlib. +* Iris now requires `Cartopy `_ >= 0.18 in + order to remain compatible with the latest version of + `Matplotlib `_. * GDAL is removed from the extensions dependency group. We no longer consider it to be an extension. @@ -111,9 +113,10 @@ Internal ======== * Changed the numerical values in tests involving the Robinson projection due - to improvements made in Proj. + to improvements made in `Proj `_. -* Change tests to account for changes in behaviour in GDAL. +* Change tests to account for changes in behaviour in + `GDAL `_. * Changed every graphics test that includes `Cartopy's coastlines Date: Fri, 4 Sep 2020 13:22:41 +0100 Subject: [PATCH 4/5] address review comments --- docs/iris/src/whatsnew/latest.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/iris/src/whatsnew/latest.rst b/docs/iris/src/whatsnew/latest.rst index a3753ddc58..13ec6314a2 100644 --- a/docs/iris/src/whatsnew/latest.rst +++ b/docs/iris/src/whatsnew/latest.rst @@ -115,9 +115,12 @@ Internal * Changed the numerical values in tests involving the Robinson projection due to improvements made in `Proj `_. -* Change tests to account for changes in behaviour in +* Change tests to account for more detailed descriptions of projections in `GDAL `_. +* Change tests to account for `GDAL `_ now + saving fill values for data without masked points. + * Changed every graphics test that includes `Cartopy's coastlines `_ From 6cc478da91ef8d2f71aca8ec97518ffa99de42e7 Mon Sep 17 00:00:00 2001 From: stephenworsley <49274989+stephenworsley@users.noreply.github.com> Date: Fri, 4 Sep 2020 14:08:13 +0100 Subject: [PATCH 5/5] Apply suggestions from code review Add reference to source of changes Co-authored-by: Martin Yeo <40734014+trexfeathers@users.noreply.github.com> --- docs/iris/src/whatsnew/latest.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/iris/src/whatsnew/latest.rst b/docs/iris/src/whatsnew/latest.rst index 13ec6314a2..ec7cffad92 100644 --- a/docs/iris/src/whatsnew/latest.rst +++ b/docs/iris/src/whatsnew/latest.rst @@ -113,10 +113,10 @@ Internal ======== * Changed the numerical values in tests involving the Robinson projection due - to improvements made in `Proj `_. + to improvements made in `Proj `_ (see `proj#1292 `_ and `proj#2151 `_). * Change tests to account for more detailed descriptions of projections in - `GDAL `_. + `GDAL `_ (`see GDAL#1185 `_). * Change tests to account for `GDAL `_ now saving fill values for data without masked points.