Subject: CVS commit: pkgsrc/math/py-xarray
From: Adam Ciarcinski
Date: 2021-11-23 22:45:36
Message id: 20211123214536.21334FAEC@cvs.NetBSD.org

Log Message:
py-xarray: updated to 0.20.1

v0.20.1 (5 November 2021)
-------------------------

This is a bugfix release to fix :issue:`5930`.

Bug fixes
~~~~~~~~~
- Fix a regression in the detection of the backend entrypoints (:issue:`5930`, \ 
:pull:`5931`)
  By `Justus Magin <https://github.com/keewis>`_.

Documentation
~~~~~~~~~~~~~

- Significant improvements to  :ref:`api`. By `Deepak Cherian \ 
<https://github.com/dcherian>`_.

.. _whats-new.0.20.0:

v0.20.0 (1 November 2021)
-------------------------

This release brings improved support for pint arrays, methods for weighted \ 
standard deviation, variance,
and sum of squares, the option to disable the use of the bottleneck library, \ 
significantly improved performance of
unstack, as well as many bugfixes and internal changes.

Many thanks to the 40 contributors to this release!:

Aaron Spring, Akio Taniguchi, Alan D. Snow, arfy slowy, Benoit Bovy, Christian \ 
Jauvin, crusaderky, Deepak Cherian,
Giacomo Caria, Illviljan, James Bourbeau, Joe Hamman, Joseph K Aicher, Julien \ 
Herzen, Kai Mühlbauer,
keewis, lusewell, Martin K. Scherer, Mathias Hauser, Max Grover, Maxime Liquet, \ 
Maximilian Roos, Mike Taves, Nathan Lis,
pmav99, Pushkar Kopparla, Ray Bell, Rio McMahon, Scott Staniewicz, Spencer \ 
Clark, Stefan Bender, Taher Chegini,
Thomas Nicholas, Tomas Chor, Tom Augspurger, Victor Negîrneac, Zachary \ 
Blackwood, Zachary Moon, and Zeb Nicholls.

New Features
~~~~~~~~~~~~
- Add ``std``, ``var``,  ``sum_of_squares`` to \ 
:py:class:`~core.weighted.DatasetWeighted` and \ 
:py:class:`~core.weighted.DataArrayWeighted`.
  By `Christian Jauvin <https://github.com/cjauvin>`_.
- Added a :py:func:`get_options` method to xarray's root namespace \ 
(:issue:`5698`, :pull:`5716`)
  By `Pushkar Kopparla <https://github.com/pkopparla>`_.
- Xarray now does a better job rendering variable names that are long LaTeX \ 
sequences when plotting (:issue:`5681`, :pull:`5682`).
  By `Tomas Chor <https://github.com/tomchor>`_.
- Add an option (``"use_bottleneck"``) to disable the use of \ 
``bottleneck`` using :py:func:`set_options` (:pull:`5560`)
  By `Justus Magin <https://github.com/keewis>`_.
- Added ``**kwargs`` argument to :py:meth:`open_rasterio` to access overviews \ 
(:issue:`3269`).
  By `Pushkar Kopparla <https://github.com/pkopparla>`_.
- Added ``storage_options`` argument to :py:meth:`to_zarr` (:issue:`5601`, \ 
:pull:`5615`).
  By `Ray Bell <https://github.com/raybellwaves>`_, `Zachary Blackwood \ 
<https://github.com/blackary>`_ and
  `Nathan Lis <https://github.com/wxman22>`_.
- Histogram plots are set with a title displaying the scalar coords if any, \ 
similarly to the other plots (:issue:`5791`, :pull:`5792`).
  By `Maxime Liquet <https://github.com/maximlt>`_.
- Slice plots display the coords units in the same way as x/y/colorbar labels \ 
(:pull:`5847`).
  By `Victor Negîrneac <https://github.com/caenrigen>`_.
- Added a new :py:attr:`Dataset.chunksizes`, :py:attr:`DataArray.chunksizes`, \ 
and :py:attr:`Variable.chunksizes`
  property, which will always return a mapping from dimension names to chunking \ 
pattern along that dimension,
  regardless of whether the object is a Dataset, DataArray, or Variable. \ 
(:issue:`5846`, :pull:`5900`)
  By `Tom Nicholas <https://github.com/TomNicholas>`_.

Breaking changes
~~~~~~~~~~~~~~~~
- The minimum versions of some dependencies were changed:

  =============== ====== ====
  Package         Old    New
  =============== ====== ====
  cftime          1.1    1.2
  dask            2.15   2.30
  distributed     2.15   2.30
  lxml            4.5    4.6
  matplotlib-base 3.2    3.3
  numba           0.49   0.51
  numpy           1.17   1.18
  pandas          1.0    1.1
  pint            0.15   0.16
  scipy           1.4    1.5
  seaborn         0.10   0.11
  sparse          0.8    0.11
  toolz           0.10   0.11
  zarr            2.4    2.5
  =============== ====== ====

- The ``__repr__`` of a :py:class:`xarray.Dataset`'s ``coords`` and ``data_vars``
  ignore ``xarray.set_option(display_max_rows=...)`` and show the full output
  when called directly as, e.g., ``ds.data_vars`` or ``print(ds.data_vars)``
  (:issue:`5545`, :pull:`5580`).
  By `Stefan Bender <https://github.com/st-bender>`_.

Deprecations
~~~~~~~~~~~~

- Deprecate :py:func:`open_rasterio` (:issue:`4697`, :pull:`5808`).
  By `Alan Snow <https://github.com/snowman2>`_.
- Set the default argument for `roll_coords` to `False` for :py:meth:`DataArray.roll`
  and :py:meth:`Dataset.roll`. (:pull:`5653`)
  By `Tom Nicholas <https://github.com/TomNicholas>`_.
- :py:meth:`xarray.open_mfdataset` will now error instead of warn when a value \ 
for ``concat_dim`` is
  passed alongside ``combine='by_coords'``.
  By `Tom Nicholas <https://github.com/TomNicholas>`_.

Bug fixes
~~~~~~~~~

- Fix ZeroDivisionError from saving dask array with empty dimension (:issue: `5741`).
  By `Joseph K Aicher <https://github.com/jaicher>`_.
- Fixed performance bug where ``cftime`` import attempted within various core \ 
operations if ``cftime`` not
  installed (:pull:`5640`).
  By `Luke Sewell <https://github.com/lusewell>`_
- Fixed bug when combining named DataArrays using :py:func:`combine_by_coords`. \ 
(:pull:`5834`).
  By `Tom Nicholas <https://github.com/TomNicholas>`_.
- When a custom engine was used in :py:func:`~xarray.open_dataset` the engine
  wasn't initialized properly, causing missing argument errors or inconsistent
  method signatures. (:pull:`5684`)
  By `Jimmy Westling <https://github.com/illviljan>`_.
- Numbers are properly formatted in a plot's title (:issue:`5788`, :pull:`5789`).
  By `Maxime Liquet <https://github.com/maximlt>`_.
- Faceted plots will no longer raise a `pint.UnitStrippedWarning` when a \ 
`pint.Quantity` array is plotted,
  and will correctly display the units of the data in the colorbar (if there is \ 
one) (:pull:`5886`).
  By `Tom Nicholas <https://github.com/TomNicholas>`_.
- With backends, check for path-like objects rather than ``pathlib.Path``
  type, use ``os.fspath`` (:pull:`5879`).
  By `Mike Taves <https://github.com/mwtoews>`_.
- ``open_mfdataset()`` now accepts a single ``pathlib.Path`` object (:issue: `5881`).
  By `Panos Mavrogiorgos <https://github.com/pmav99>`_.
- Improved performance of :py:meth:`Dataset.unstack` (:pull:`5906`). By `Tom \ 
Augspurger <https://github.com/TomAugspurger>`_.

Documentation
~~~~~~~~~~~~~

- Users are instructed to try ``use_cftime=True`` if a ``TypeError`` occurs when \ 
combining datasets and one of the types involved is a subclass of \ 
``cftime.datetime`` (:pull:`5776`).
  By `Zeb Nicholls <https://github.com/znicholls>`_.
- A clearer error is now raised if a user attempts to assign a Dataset to a \ 
single key of
  another Dataset. (:pull:`5839`)
  By `Tom Nicholas <https://github.com/TomNicholas>`_.

Internal Changes
~~~~~~~~~~~~~~~~

- Explicit indexes refactor: avoid ``len(index)`` in ``map_blocks`` (:pull:`5670`).
  By `Deepak Cherian <https://github.com/dcherian>`_.
- Explicit indexes refactor: decouple ``xarray.Index``` from ``xarray.Variable`` \ 
(:pull:`5636`).
  By `Benoit Bovy <https://github.com/benbovy>`_.
- Fix ``Mapping`` argument typing to allow mypy to pass on ``str`` keys \ 
(:pull:`5690`).
  By `Maximilian Roos <https://github.com/max-sixty>`_.
- Annotate many of our tests, and fix some of the resulting typing errors. This will
  also mean our typing annotations are tested as part of CI. (:pull:`5728`).
  By `Maximilian Roos <https://github.com/max-sixty>`_.
- Improve the performance of reprs for large datasets or dataarrays. (:pull:`5661`)
  By `Jimmy Westling <https://github.com/illviljan>`_.
- Use isort's `float_to_top` config. (:pull:`5695`).
  By `Maximilian Roos <https://github.com/max-sixty>`_.
- Remove use of the deprecated ``kind`` argument in
  :py:meth:`pandas.Index.get_slice_bound` inside :py:class:`xarray.CFTimeIndex`
  tests (:pull:`5723`).  By `Spencer Clark \ 
<https://github.com/spencerkclark>`_.
- Refactor `xarray.core.duck_array_ops` to no longer special-case dispatching to
  dask versions of functions when acting on dask arrays, instead relying numpy
  and dask's adherence to NEP-18 to dispatch automatically. (:pull:`5571`)
  By `Tom Nicholas <https://github.com/TomNicholas>`_.
- Add an ASV benchmark CI and improve performance of the benchmarks (:pull:`5796`)
  By `Jimmy Westling <https://github.com/illviljan>`_.
- Use ``importlib`` to replace functionality of ``pkg_resources`` such
  as version setting and loading of resources. (:pull:`5845`).
  By `Martin K. Scherer <https://github.com/marscher>`_.

.. _whats-new.0.19.0:

v0.19.0 (23 July 2021)
----------------------

This release brings improvements to plotting of categorical data, the ability to \ 
specify how attributes
are combined in xarray operations, a new high-level :py:func:`unify_chunks` \ 
function, as well as various
deprecations, bug fixes, and minor improvements.

Many thanks to the 29 contributors to this release!:

Andrew Williams, Augustus, Aureliana Barghini, Benoit Bovy, crusaderky, Deepak \ 
Cherian, ellesmith88,
Elliott Sales de Andrade, Giacomo Caria, github-actions[bot], Illviljan, \ 
Joeperdefloep, joooeey, Julia Kent,
Julius Busecke, keewis, Mathias Hauser, Matthias Göbel, Mattia Almansi, \ 
Maximilian Roos, Peter Andreas Entschev,
Ray Bell, Sander, Santiago Soler, Sebastian, Spencer Clark, Stephan Hoyer, \ 
Thomas Hirtz, Thomas Nicholas.

New Features
~~~~~~~~~~~~
- Allow passing argument ``missing_dims`` to :py:meth:`Variable.transpose` and \ 
:py:meth:`Dataset.transpose`
  (:issue:`5550`, :pull:`5586`)
  By `Giacomo Caria <https://github.com/gcaria>`_.
- Allow passing a dictionary as coords to a :py:class:`DataArray` (:issue:`5527`,
  reverts :pull:`1539`, which had deprecated this due to python's inconsistent \ 
ordering in earlier versions).
  By `Sander van Rijn <https://github.com/sjvrijn>`_.
- Added :py:meth:`Dataset.coarsen.construct`, \ 
:py:meth:`DataArray.coarsen.construct` (:issue:`5454`, :pull:`5475`).
  By `Deepak Cherian <https://github.com/dcherian>`_.
- Xarray now uses consolidated metadata by default when writing and reading Zarr
  stores (:issue:`5251`).
  By `Stephan Hoyer <https://github.com/shoyer>`_.
- New top-level function :py:func:`unify_chunks`.
  By `Mattia Almansi <https://github.com/malmans2>`_.
- Allow assigning values to a subset of a dataset using positional or label-based
  indexing (:issue:`3015`, :pull:`5362`).
  By `Matthias Göbel <https://github.com/matzegoebel>`_.
- Attempting to reduce a weighted object over missing dimensions now raises an \ 
error (:pull:`5362`).
  By `Mattia Almansi <https://github.com/malmans2>`_.
- Add ``.sum`` to :py:meth:`~xarray.DataArray.rolling_exp` and
  :py:meth:`~xarray.Dataset.rolling_exp` for exponentially weighted rolling
  sums. These require numbagg 0.2.1;
  (:pull:`5178`).
  By `Maximilian Roos <https://github.com/max-sixty>`_.
- :py:func:`xarray.cov` and :py:func:`xarray.corr` now lazily check for missing
  values if inputs are dask arrays (:issue:`4804`, :pull:`5284`).
  By `Andrew Williams <https://github.com/AndrewWilliams3142>`_.
- Attempting to ``concat`` list of elements that are not all ``Dataset`` or all \ 
``DataArray`` now raises an error (:issue:`5051`, :pull:`5425`).
  By `Thomas Hirtz <https://github.com/thomashirtz>`_.
- allow passing a function to ``combine_attrs`` (:pull:`4896`).
  By `Justus Magin <https://github.com/keewis>`_.
- Allow plotting categorical data (:pull:`5464`).
  By `Jimmy Westling <https://github.com/illviljan>`_.
- Allow removal of the coordinate attribute ``coordinates`` on variables by \ 
setting ``.attrs['coordinates']= None``
  (:issue:`5510`).
  By `Elle Smith <https://github.com/ellesmith88>`_.
- Added :py:meth:`DataArray.to_numpy`, :py:meth:`DataArray.as_numpy`, and \ 
:py:meth:`Dataset.as_numpy`. (:pull:`5568`).
  By `Tom Nicholas <https://github.com/TomNicholas>`_.
- Units in plot labels are now automatically inferred from wrapped \ 
:py:meth:`pint.Quantity` arrays. (:pull:`5561`).
  By `Tom Nicholas <https://github.com/TomNicholas>`_.

Breaking changes
~~~~~~~~~~~~~~~~

- The default ``mode`` for :py:meth:`Dataset.to_zarr` when ``region`` is set
  has changed to the new ``mode="r+"``, which only allows for overriding
  pre-existing array values. This is a safer default than the prior \ 
``mode="a"``,
  and allows for higher performance writes (:pull:`5252`).
  By `Stephan Hoyer <https://github.com/shoyer>`_.
- The main parameter to :py:func:`combine_by_coords` is renamed to \ 
`data_objects` instead
  of `datasets` so anyone calling this method using a named parameter will need \ 
to update
  the name accordingly (:issue:`3248`, :pull:`4696`).
  By `Augustus Ijams <https://github.com/aijams>`_.

Deprecations
~~~~~~~~~~~~

- Removed the deprecated ``dim`` kwarg to :py:func:`DataArray.integrate` \ 
(:pull:`5630`)
- Removed the deprecated ``keep_attrs`` kwarg to :py:func:`DataArray.rolling` \ 
(:pull:`5630`)
- Removed the deprecated ``keep_attrs`` kwarg to :py:func:`DataArray.coarsen` \ 
(:pull:`5630`)
- Completed deprecation of passing an ``xarray.DataArray`` to \ 
:py:func:`Variable` - will now raise a ``TypeError`` (:pull:`5630`)

Bug fixes
~~~~~~~~~
- Fix a minor incompatibility between partial datetime string indexing with a
  :py:class:`CFTimeIndex` and upcoming pandas version 1.3.0 (:issue:`5356`,
  :pull:`5359`).
  By `Spencer Clark <https://github.com/spencerkclark>`_.
- Fix 1-level multi-index incorrectly converted to single index (:issue:`5384`,
  :pull:`5385`).
  By `Benoit Bovy <https://github.com/benbovy>`_.
- Don't cast a duck array in a coordinate to :py:class:`numpy.ndarray` in
  :py:meth:`DataArray.differentiate` (:pull:`5408`)
  By `Justus Magin <https://github.com/keewis>`_.
- Fix the ``repr`` of :py:class:`Variable` objects with ``display_expand_data=True``
  (:pull:`5406`)
  By `Justus Magin <https://github.com/keewis>`_.
- Plotting a pcolormesh with ``xscale="log"`` and/or \ 
``yscale="log"`` works as
  expected after improving the way the interval breaks are generated (:issue:`5333`).
  By `Santiago Soler <https://github.com/santisoler>`_
- :py:func:`combine_by_coords` can now handle combining a list of unnamed
  ``DataArray`` as input (:issue:`3248`, :pull:`4696`).
  By `Augustus Ijams <https://github.com/aijams>`_.

Internal Changes
~~~~~~~~~~~~~~~~
- Run CI on the first & last python versions supported only; currently 3.7 \ 
& 3.9.
  (:pull:`5433`)
  By `Maximilian Roos <https://github.com/max-sixty>`_.
- Publish test results & timings on each PR.
  (:pull:`5537`)
  By `Maximilian Roos <https://github.com/max-sixty>`_.
- Explicit indexes refactor: add a ``xarray.Index.query()`` method in which
  one may eventually provide a custom implementation of label-based data
  selection (not ready yet for public use). Also refactor the internal,
  pandas-specific implementation into ``PandasIndex.query()`` and
  ``PandasMultiIndex.query()`` (:pull:`5322`).
  By `Benoit Bovy <https://github.com/benbovy>`_.

Files:
RevisionActionfile
1.9modifypkgsrc/math/py-xarray/Makefile
1.4modifypkgsrc/math/py-xarray/PLIST
1.7modifypkgsrc/math/py-xarray/distinfo