Subject: CVS commit: pkgsrc/math/py-xarray
From: Adam Ciarcinski
Date: 2020-04-11 15:47:08
Message id: 20200411134708.5E860FB27@cvs.NetBSD.org

Log Message:
py-xarray: updated to 0.15.1

v0.15.1:
This release brings many new features such as :py:meth:`Dataset.weighted` \ 
methods for weighted array
reductions, a new jupyter repr by default, and the start of units integration \ 
with pint. There's also
the usual batch of usability improvements, documentation additions, and bug fixes.

Breaking changes
- Raise an error when assigning to the ``.values`` or ``.data`` attribute of
  dimension coordinates i.e. ``IndexVariable`` objects. This has been broken since
  v0.12.0. Please use :py:meth:`DataArray.assign_coords` or \ 
:py:meth:`Dataset.assign_coords`
  instead.

New Features
- Weighted array reductions are now supported via the new \ 
:py:meth:`DataArray.weighted`
  and :py:meth:`Dataset.weighted` methods. See :ref:`comput.weighted`.
- The new jupyter notebook repr (``Dataset._repr_html_`` and
  ``DataArray._repr_html_``) (introduced in 0.14.1) is now on by default. To
  disable, use ``xarray.set_options(display_style="text")``.
- Added support for :py:class:`pandas.DatetimeIndex`-style rounding of
  ``cftime.datetime`` objects directly via a :py:class:`CFTimeIndex` or via the
  :py:class:`~core.accessor_dt.DatetimeAccessor`.
- Support new h5netcdf backend keyword `phony_dims` (available from h5netcdf
  v0.8.0 for :py:class:`~xarray.backends.H5NetCDFStore`.
- Add partial support for unit aware arrays with pint.
- :py:meth:`Dataset.groupby` and :py:meth:`DataArray.groupby` now raise a
  `TypeError` on multiple string arguments. Receiving multiple string arguments
  often means a user is attempting to pass multiple dimensions as separate
  arguments and should instead pass a single list of dimensions.
- :py:func:`map_blocks` can now apply functions that add new unindexed dimensions.
- An ellipsis (``...``) is now supported in the ``dims`` argument of
  :py:meth:`Dataset.stack` and :py:meth:`DataArray.stack`, meaning all
  unlisted dimensions, similar to its meaning in :py:meth:`DataArray.transpose`.
- :py:meth:`Dataset.where` and :py:meth:`DataArray.where` accept a lambda as a
  first argument, which is then called on the input; replicating pandas' behavior.
- ``skipna`` is available in :py:meth:`Dataset.quantile`, \ 
:py:meth:`DataArray.quantile`,
  :py:meth:`core.groupby.DatasetGroupBy.quantile`, \ 
:py:meth:`core.groupby.DataArrayGroupBy.quantile`

Bug fixes
- Fix :py:meth:`Dataset.interp` when indexing array shares coordinates with the
  indexed variable
- Fix recombination of groups in :py:meth:`Dataset.groupby` and
  :py:meth:`DataArray.groupby` when performing an operation that changes the
  size of the groups along the grouped dimension. By `Eric Jansen
  <https://github.com/ej81>`_.
- Fix use of multi-index with categorical values
- Fix alignment with ``join="override"`` when some dimensions are \ 
unindexed.
- Fix :py:meth:`Dataset.swap_dims` and :py:meth:`DataArray.swap_dims` producing
  index with name reflecting the previous dimension name instead of the new one
- Use ``dask_array_type`` instead of ``dask_array.Array`` for type
  checking.
- :py:func:`concat` can now handle coordinate variables only present in one of
  the objects to be concatenated when ``coords="different"``.
- xarray now respects the over, under and bad colors if set on a provided colormap.
- :py:func:`coarsen` now respects ``xr.set_options(keep_attrs=True)``
  to preserve attributes. :py:meth:`Dataset.coarsen` accepts a keyword
  argument ``keep_attrs`` to change this setting.
  :pull:`3801`) By `Andrew Thomas <https://github.com/amcnicho>`_.
- Delete associated indexes when deleting coordinate variables.
- Fix :py:meth:`xarray.core.dataset.Dataset.to_zarr` when using `append_dim` and \ 
`group`
  simultaneously.
- Fix html repr on :py:class:`Dataset` with non-string keys

Documentation
- Fix documentation of :py:class:`DataArray` removing the deprecated mention
  that when omitted, `dims` are inferred from a `coords`-dict.
- Improve the :py:func:`where` docstring.
- Update the installation instructions: only explicitly list recommended dependencies

Internal Changes
- Remove the internal ``import_seaborn`` function which handled the deprecation of
  the ``seaborn.apionly`` entry point
- Don't test pint integration in combination with datetime objects.
- Change test_open_mfdataset_list_attr to only run with dask installed
- Preserve the ability to index with ``method="nearest"`` with a
  :py:class:`CFTimeIndex` with pandas versions greater than 1.0.1
- Greater flexibility and improved test coverage of subtracting various types
  of objects from a :py:class:`CFTimeIndex`. By `Spencer Clark
  <https://github.com/spencerkclark>`_.
- Update Azure CI MacOS image, given pending removal.
- Remove xfails for scipy 1.0.1 for tests that append to netCDF files
- Remove conversion to :py:class:`pandas.Panel`, given its removal in pandas
  in favor of xarray's objects.

v0.15.0:
This release brings many improvements to xarray's documentation: our examples \ 
are now binderized notebooks (`click here \ 
<https://mybinder.org/v2/gh/pydata/xarray/master?urlpath=lab/tree/doc/examples/weather-data.ipynb>`_)
and we have new example notebooks from our SciPy 2019 sprint (many thanks to our \ 
contributors!).

This release also features many API improvements such as a new
:py:class:`~core.accessor_dt.TimedeltaAccessor` and support for \ 
:py:class:`CFTimeIndex` in
:py:meth:`~DataArray.interpolate_na`); as well as many bug fixes.

Breaking changes
- Bumped minimum tested versions for dependencies:
  - numpy 1.15
  - pandas 0.25
  - dask 2.2
  - distributed 2.2
  - scipy 1.3

- Remove ``compat`` and ``encoding`` kwargs from ``DataArray``, which
  have been deprecated since 0.12.
  Instead, specify the ``encoding`` kwarg when writing to disk or set
  the :py:attr:`DataArray.encoding` attribute directly.
- :py:func:`xarray.dot`, :py:meth:`DataArray.dot`, and the ``@`` operator now
  use ``align="inner"`` (except when \ 
``xarray.set_options(arithmetic_join="exact")``;

New Features
- Implement :py:meth:`DataArray.pad` and :py:meth:`Dataset.pad`.
- :py:meth:`DataArray.sel` and :py:meth:`Dataset.sel` now support \ 
:py:class:`pandas.CategoricalIndex`.
- Support using an existing, opened h5netcdf ``File`` with
  :py:class:`~xarray.backends.H5NetCDFStore`. This permits creating an
  :py:class:`~xarray.Dataset` from a h5netcdf ``File`` that has been opened
  using other means
- Implement ``median`` and ``nanmedian`` for dask arrays. This works by rechunking
  to a single chunk along all reduction axes.
- :py:func:`~xarray.concat` now preserves attributes from the first Variable.
- :py:meth:`Dataset.quantile`, :py:meth:`DataArray.quantile` and ``GroupBy.quantile``
  now work with dask Variables.
- Added the ``count`` reduction method to both \ 
:py:class:`~core.rolling.DatasetCoarsen`
  and :py:class:`~core.rolling.DataArrayCoarsen` objects.
- Add ``meta`` kwarg to :py:func:`~xarray.apply_ufunc`;
  this is passed on to :py:func:`dask.array.blockwise`.
- Add ``attrs_file`` option in :py:func:`~xarray.open_mfdataset` to choose the
  source file for global attributes in a multi-file dataset
  :pull:`3498`). By `Julien Seguinot <https://github.com/juseg>`_.
- :py:meth:`Dataset.swap_dims` and :py:meth:`DataArray.swap_dims`
  now allow swapping to dimension names that don't exist yet.
- Extend :py:class:`~core.accessor_dt.DatetimeAccessor` properties
  and support ``.dt`` accessor for timedeltas
  via :py:class:`~core.accessor_dt.TimedeltaAccessor`
- Improvements to interpolating along time axes
  - Support :py:class:`CFTimeIndex` in :py:meth:`DataArray.interpolate_na`
  - define 1970-01-01 as the default offset for the interpolation index for both
    :py:class:`pandas.DatetimeIndex` and :py:class:`CFTimeIndex`,
  - use microseconds in the conversion from timedelta objects to floats to avoid
    overflow errors.

Bug fixes
- Applying a user-defined function that adds new dimensions using \ 
:py:func:`apply_ufunc`
  and ``vectorize=True`` now works with ``dask > 2.0``.
- Fix :py:meth:`~xarray.combine_by_coords` to allow for combining incomplete
  hypercubes of Datasets
- Fix :py:func:`~xarray.combine_by_coords` when combining cftime coordinates
  which span long time intervals
- Fix plotting with transposed 2D non-dimensional coordinates.
- :py:meth:`plot.FacetGrid.set_titles` can now replace existing row titles of a
  :py:class:`~xarray.plot.FacetGrid` plot. In addition \ 
:py:class:`~xarray.plot.FacetGrid` gained
  two new attributes: :py:attr:`~xarray.plot.FacetGrid.col_labels` and
  :py:attr:`~xarray.plot.FacetGrid.row_labels` contain \ 
:py:class:`matplotlib.text.Text` handles for both column and
  row labels. These can be used to manually change the labels.
- Fix issue with Dask-backed datasets raising a ``KeyError`` on some \ 
computations involving :py:func:`map_blocks`
- Ensure :py:meth:`Dataset.quantile`, :py:meth:`DataArray.quantile` issue the \ 
correct error
  when ``q`` is out of bounds
- Fix regression in xarray 0.14.1 that prevented encoding times with certain
  ``dtype``, ``_FillValue``, and ``missing_value`` encodings
- Raise an error when trying to use :py:meth:`Dataset.rename_dims` to
  rename to an existing name
- :py:meth:`Dataset.rename`, :py:meth:`DataArray.rename` now check for conflicts with
  MultiIndex level names.
- :py:meth:`Dataset.merge` no longer fails when passed a :py:class:`DataArray` \ 
instead of a :py:class:`Dataset`.
- Fix a regression in :py:meth:`Dataset.drop`: allow passing any
  iterable when dropping variables
- Fixed errors emitted by ``mypy --strict`` in modules that import xarray.
- Allow plotting of binned coordinates on the y axis in :py:meth:`plot.line`
  and :py:meth:`plot.step` plots
- setuptools is now marked as a dependency of xarray

Documentation
- Switch doc examples to use `nbsphinx <https://nbsphinx.readthedocs.io>`_ \ 
and replace
  ``sphinx_gallery`` scripts with Jupyter notebooks.
- Added :doc:`example notebook <examples/ROMS_ocean_model>` demonstrating \ 
use of xarray with
  Regional Ocean Modeling System (ROMS) ocean hydrodynamic model output.
- Added :doc:`example notebook <examples/ERA5-GRIB-example>` demonstrating \ 
the visualization of
  ERA5 GRIB data.
  `Stephan Siemen <https://github.com/StephanSiemen>`_.
- Added examples for :py:meth:`DataArray.quantile`, :py:meth:`Dataset.quantile` and
  ``GroupBy.quantile``.
- Add new :doc:`example notebook <examples/apply_ufunc_vectorize_1d>` \ 
example notebook demonstrating
  vectorization of a 1D function using :py:func:`apply_ufunc` , dask and numba.
- Added example for :py:func:`~xarray.map_blocks`.

Internal Changes
- Make sure dask names change when rechunking by different chunk sizes. \ 
Conversely, make sure they
  stay the same when rechunking by the same chunk size.
- 2x to 5x speed boost (on small arrays) for :py:meth:`Dataset.isel`,
  :py:meth:`DataArray.isel`, and :py:meth:`DataArray.__getitem__` when indexing \ 
by int,
  slice, list of int, scalar ndarray, or 1-dimensional ndarray.
- Removed internal method ``Dataset._from_vars_and_coord_names``,
  which was dominated by ``Dataset._construct_direct``.
- Replaced versioneer with setuptools-scm. Moved contents of setup.py to setup.cfg.
  Removed pytest-runner from setup.py, as per deprecation notice on the pytest-runner
  project.
- Use of isort is now enforced by CI.

Files:
RevisionActionfile
1.3modifypkgsrc/math/py-xarray/Makefile
1.2modifypkgsrc/math/py-xarray/PLIST
1.2modifypkgsrc/math/py-xarray/distinfo