pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/math/py-xarray py-xarray: updated to 0.15.1
details: https://anonhg.NetBSD.org/pkgsrc/rev/478ce9f93608
branches: trunk
changeset: 427093:478ce9f93608
user: adam <adam%pkgsrc.org@localhost>
date: Sat Apr 11 13:47:08 2020 +0000
description:
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.
diffstat:
math/py-xarray/Makefile | 11 ++++++-----
math/py-xarray/PLIST | 28 +++++++++++++++++++++++-----
math/py-xarray/distinfo | 10 +++++-----
3 files changed, 34 insertions(+), 15 deletions(-)
diffs (141 lines):
diff -r 203ed161a248 -r 478ce9f93608 math/py-xarray/Makefile
--- a/math/py-xarray/Makefile Sat Apr 11 13:40:15 2020 +0000
+++ b/math/py-xarray/Makefile Sat Apr 11 13:47:08 2020 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.2 2019/09/21 21:10:49 minskim Exp $
+# $NetBSD: Makefile,v 1.3 2020/04/11 13:47:08 adam Exp $
-DISTNAME= xarray-0.13.0
+DISTNAME= xarray-0.15.1
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
-CATEGORIES= math
+CATEGORIES= math python
MASTER_SITES= ${MASTER_SITE_PYPI:=x/xarray/}
MAINTAINER= jihbed.research%gmail.com@localhost
@@ -12,10 +12,11 @@
DEPENDS+= ${PYPKGPREFIX}-numpy>=1.0:../../math/py-numpy
DEPENDS+= ${PYPKGPREFIX}-pandas>=0.18.1:../../math/py-pandas
+DEPENDS+= ${PYPKGPREFIX}-setuptools>=41.2:../../devel/py-setuptools
+
+USE_LANGUAGES= # none
PYTHON_VERSIONS_INCOMPATIBLE= 27 # py-pandads
-USE_LANGUAGES= # none
-
.include "../../lang/python/egg.mk"
.include "../../mk/bsd.pkg.mk"
diff -r 203ed161a248 -r 478ce9f93608 math/py-xarray/PLIST
--- a/math/py-xarray/PLIST Sat Apr 11 13:40:15 2020 +0000
+++ b/math/py-xarray/PLIST Sat Apr 11 13:47:08 2020 +0000
@@ -1,15 +1,13 @@
-@comment $NetBSD: PLIST,v 1.1 2019/09/21 18:14:21 minskim Exp $
+@comment $NetBSD: PLIST,v 1.2 2020/04/11 13:47:08 adam Exp $
${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
+${PYSITELIB}/${EGG_INFODIR}/not-zip-safe
${PYSITELIB}/${EGG_INFODIR}/requires.txt
${PYSITELIB}/${EGG_INFODIR}/top_level.txt
${PYSITELIB}/xarray/__init__.py
${PYSITELIB}/xarray/__init__.pyc
${PYSITELIB}/xarray/__init__.pyo
-${PYSITELIB}/xarray/_version.py
-${PYSITELIB}/xarray/_version.pyc
-${PYSITELIB}/xarray/_version.pyo
${PYSITELIB}/xarray/backends/__init__.py
${PYSITELIB}/xarray/backends/__init__.pyc
${PYSITELIB}/xarray/backends/__init__.pyo
@@ -139,6 +137,9 @@
${PYSITELIB}/xarray/core/formatting.py
${PYSITELIB}/xarray/core/formatting.pyc
${PYSITELIB}/xarray/core/formatting.pyo
+${PYSITELIB}/xarray/core/formatting_html.py
+${PYSITELIB}/xarray/core/formatting_html.pyc
+${PYSITELIB}/xarray/core/formatting_html.pyo
${PYSITELIB}/xarray/core/groupby.py
${PYSITELIB}/xarray/core/groupby.pyc
${PYSITELIB}/xarray/core/groupby.pyo
@@ -169,6 +170,9 @@
${PYSITELIB}/xarray/core/options.py
${PYSITELIB}/xarray/core/options.pyc
${PYSITELIB}/xarray/core/options.pyo
+${PYSITELIB}/xarray/core/parallel.py
+${PYSITELIB}/xarray/core/parallel.pyc
+${PYSITELIB}/xarray/core/parallel.pyo
${PYSITELIB}/xarray/core/pdcompat.py
${PYSITELIB}/xarray/core/pdcompat.pyc
${PYSITELIB}/xarray/core/pdcompat.pyo
@@ -193,6 +197,9 @@
${PYSITELIB}/xarray/core/variable.py
${PYSITELIB}/xarray/core/variable.pyc
${PYSITELIB}/xarray/core/variable.pyo
+${PYSITELIB}/xarray/core/weighted.py
+${PYSITELIB}/xarray/core/weighted.pyc
+${PYSITELIB}/xarray/core/weighted.pyo
${PYSITELIB}/xarray/plot/__init__.py
${PYSITELIB}/xarray/plot/__init__.pyc
${PYSITELIB}/xarray/plot/__init__.pyo
@@ -209,6 +216,8 @@
${PYSITELIB}/xarray/plot/utils.pyc
${PYSITELIB}/xarray/plot/utils.pyo
${PYSITELIB}/xarray/py.typed
+${PYSITELIB}/xarray/static/css/style.css
+${PYSITELIB}/xarray/static/html/icons-svg-inline.html
${PYSITELIB}/xarray/testing.py
${PYSITELIB}/xarray/testing.pyc
${PYSITELIB}/xarray/testing.pyo
@@ -299,6 +308,9 @@
${PYSITELIB}/xarray/tests/test_formatting.py
${PYSITELIB}/xarray/tests/test_formatting.pyc
${PYSITELIB}/xarray/tests/test_formatting.pyo
+${PYSITELIB}/xarray/tests/test_formatting_html.py
+${PYSITELIB}/xarray/tests/test_formatting_html.pyc
+${PYSITELIB}/xarray/tests/test_formatting_html.pyo
${PYSITELIB}/xarray/tests/test_groupby.py
${PYSITELIB}/xarray/tests/test_groupby.pyc
${PYSITELIB}/xarray/tests/test_groupby.pyo
@@ -338,12 +350,18 @@
${PYSITELIB}/xarray/tests/test_ufuncs.py
${PYSITELIB}/xarray/tests/test_ufuncs.pyc
${PYSITELIB}/xarray/tests/test_ufuncs.pyo
+${PYSITELIB}/xarray/tests/test_units.py
+${PYSITELIB}/xarray/tests/test_units.pyc
+${PYSITELIB}/xarray/tests/test_units.pyo
${PYSITELIB}/xarray/tests/test_utils.py
${PYSITELIB}/xarray/tests/test_utils.pyc
${PYSITELIB}/xarray/tests/test_utils.pyo
${PYSITELIB}/xarray/tests/test_variable.py
${PYSITELIB}/xarray/tests/test_variable.pyc
${PYSITELIB}/xarray/tests/test_variable.pyo
+${PYSITELIB}/xarray/tests/test_weighted.py
+${PYSITELIB}/xarray/tests/test_weighted.pyc
+${PYSITELIB}/xarray/tests/test_weighted.pyo
${PYSITELIB}/xarray/tutorial.py
${PYSITELIB}/xarray/tutorial.pyc
${PYSITELIB}/xarray/tutorial.pyo
@@ -353,6 +371,6 @@
${PYSITELIB}/xarray/util/__init__.py
${PYSITELIB}/xarray/util/__init__.pyc
${PYSITELIB}/xarray/util/__init__.pyo
+${PYSITELIB}/xarray/util/print_versions.py
${PYSITELIB}/xarray/util/print_versions.pyc
${PYSITELIB}/xarray/util/print_versions.pyo
-${PYSITELIB}/xarray/util/print_versions.py
diff -r 203ed161a248 -r 478ce9f93608 math/py-xarray/distinfo
--- a/math/py-xarray/distinfo Sat Apr 11 13:40:15 2020 +0000
+++ b/math/py-xarray/distinfo Sat Apr 11 13:47:08 2020 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.1 2019/09/21 18:14:21 minskim Exp $
+$NetBSD: distinfo,v 1.2 2020/04/11 13:47:08 adam Exp $
-SHA1 (xarray-0.13.0.tar.gz) = 99a1feb68499c2954e3e407f6d382a9ca0eec23b
-RMD160 (xarray-0.13.0.tar.gz) = ac1dd2421efed8f0a4ef0ab2c4e7f30551ef2e88
-SHA512 (xarray-0.13.0.tar.gz) = 09f25e5ec06c1ff904ad24a01d24de719aa4903d214115ce1d5bbab21b0acc6b9374845da728495aaf67984cbf06b9d93dd5035cf25ec5c918977be707b3898d
-Size (xarray-0.13.0.tar.gz) = 1821280 bytes
+SHA1 (xarray-0.15.1.tar.gz) = 40efe1711499dab9d2c47c32721eca416a75b30f
+RMD160 (xarray-0.15.1.tar.gz) = 215db3e091b5d6712390116a4006cda7fbab226b
+SHA512 (xarray-0.15.1.tar.gz) = 8a2d7e9173c51c65ffe856fa83df730e0e7de9777726c6d6e8f7f4edcc512b3a980c7dc854c19d3bc4bec50e815ad776bd433a5750680f2851a2b0b1f505ea14
+Size (xarray-0.15.1.tar.gz) = 1934184 bytes
Home |
Main Index |
Thread Index |
Old Index