diff --git a/python-xarray.changes b/python-xarray.changes index 5e6668d..40e0838 100644 --- a/python-xarray.changes +++ b/python-xarray.changes @@ -1,3 +1,106 @@ +------------------------------------------------------------------- +Tue Jul 27 11:01:52 UTC 2021 - Sebastian Wagner + +- remove xarray-pr5449-dask-meta.patch, merged upstream. +- remove test_resample_loffset.patch, merged upstream. +- update to version 0.19.0: + - 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 `_. + - 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 `_. + - Added :py:meth:`Dataset.coarsen.construct`, :py:meth:`DataArray.coarsen.construct` (:issue:`5454`, :pull:`5475`). + By `Deepak Cherian `_. + - Xarray now uses consolidated metadata by default when writing and reading Zarr + stores (:issue:`5251`). + By `Stephan Hoyer `_. + - New top-level function :py:func:`unify_chunks`. + By `Mattia Almansi `_. + - Allow assigning values to a subset of a dataset using positional or label-based + indexing (:issue:`3015`, :pull:`5362`). + By `Matthias Göbel `_. + - Attempting to reduce a weighted object over missing dimensions now raises an error (:pull:`5362`). + By `Mattia Almansi `_. + - 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 `_. + - :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 `_. + - 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 `_. + - allow passing a function to ``combine_attrs`` (:pull:`4896`). + By `Justus Magin `_. + - Allow plotting categorical data (:pull:`5464`). + By `Jimmy Westling `_. + - Allow removal of the coordinate attribute ``coordinates`` on variables by setting ``.attrs['coordinates']= None`` + (:issue:`5510`). + By `Elle Smith `_. + - Added :py:meth:`DataArray.to_numpy`, :py:meth:`DataArray.as_numpy`, and :py:meth:`Dataset.as_numpy`. (:pull:`5568`). + By `Tom Nicholas `_. + - Units in plot labels are now automatically inferred from wrapped :py:meth:`pint.Quantity` arrays. (:pull:`5561`). + By `Tom Nicholas `_. + - 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 `_. + - 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 `_. + - 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 `_. + - Fix 1-level multi-index incorrectly converted to single index (:issue:`5384`, + :pull:`5385`). + By `Benoit Bovy `_. + - Don't cast a duck array in a coordinate to :py:class:`numpy.ndarray` in + :py:meth:`DataArray.differentiate` (:pull:`5408`) + By `Justus Magin `_. + - Fix the ``repr`` of :py:class:`Variable` objects with ``display_expand_data=True`` + (:pull:`5406`) + By `Justus Magin `_. + - 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 `_ + - :py:func:`combine_by_coords` can now handle combining a list of unnamed + ``DataArray`` as input (:issue:`3248`, :pull:`4696`). + By `Augustus Ijams `_. + - Internal Changes: + - Run CI on the first & last python versions supported only; currently 3.7 & 3.9. + (:pull:`5433`) + By `Maximilian Roos `_. + - Publish test results & timings on each PR. + (:pull:`5537`) + By `Maximilian Roos `_. + - 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 `_. + ------------------------------------------------------------------- Fri Jul 16 16:01:56 UTC 2021 - Ben Greiner diff --git a/python-xarray.spec b/python-xarray.spec index 8ca9416..c4cc84a 100644 --- a/python-xarray.spec +++ b/python-xarray.spec @@ -21,7 +21,7 @@ # NEP 29: Numpy 1.20 dropped support for Python 3.6, python36-numpy is removed from Tumbleweed. xarray will follow on next release %define skip_python36 1 Name: python-xarray -Version: 0.18.2 +Version: 0.19.0 Release: 0 Summary: N-D labeled arrays and datasets in Python License: Apache-2.0 @@ -33,11 +33,6 @@ Patch0: local_dataset.patch # PATCH-FIX-UPSTREAM scipy-interpolate.patch gh#pydata/xarray#5375 mcepl@suse.com # Add missing import scipy.interpolate Patch1: scipy-interpolate.patch -# PATCH-FIX-UPSTREAM test_resample_loffset.patch gh#pydata/xarray#5364 mcepl@suse.com -# use assert_allclose in test_resample_loffset test -Patch2: test_resample_loffset.patch -# PATCH-FIX-UPSTREAM xarray-pr5449-dask-meta.patch -- gh#pydata/xarray#5449 -Patch3: https://github.com/pydata/xarray/pull/5449.patch#/xarray-pr5449-dask-meta.patch BuildRequires: %{python_module numpy >= 1.15} BuildRequires: %{python_module numpy-devel >= 1.14} BuildRequires: %{python_module pandas >= 0.25} diff --git a/test_resample_loffset.patch b/test_resample_loffset.patch deleted file mode 100644 index a3d1577..0000000 --- a/test_resample_loffset.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- - xarray/tests/test_dataset.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/xarray/tests/test_dataset.py -+++ b/xarray/tests/test_dataset.py -@@ -3988,7 +3988,7 @@ class TestDataset: - expected_ = ds.bar.to_series().resample("24H").mean() - expected_.index += to_offset("-12H") - expected = DataArray.from_series(expected_) -- assert_identical(actual, expected) -+ assert_allclose(actual, expected) - - def test_resample_by_mean_discarding_attrs(self): - times = pd.date_range("2000-01-01", freq="6H", periods=10) diff --git a/xarray-0.18.2.tar.gz b/xarray-0.18.2.tar.gz deleted file mode 100644 index b8a3570..0000000 --- a/xarray-0.18.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5d2e72a228286fcf60f66e16876bd27629a1a70bf64822c565f16515c4d10284 -size 2850065 diff --git a/xarray-0.19.0.tar.gz b/xarray-0.19.0.tar.gz new file mode 100644 index 0000000..1621fcb --- /dev/null +++ b/xarray-0.19.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3a365ce09127fc841ba88baa63f37ca61376ffe389a6c5e66d52f2c88c23a62b +size 2882403 diff --git a/xarray-pr5449-dask-meta.patch b/xarray-pr5449-dask-meta.patch deleted file mode 100644 index 467abc4..0000000 --- a/xarray-pr5449-dask-meta.patch +++ /dev/null @@ -1,115 +0,0 @@ -From 941b8a8286178c13ee057d87a5198f163c174b0e Mon Sep 17 00:00:00 2001 -From: Mathias Hauser -Date: Mon, 7 Jun 2021 20:21:00 +0200 -Subject: [PATCH 1/3] fix dask meta and output_dtypes error - ---- - xarray/tests/test_computation.py | 13 ++++++++++--- - 1 file changed, 10 insertions(+), 3 deletions(-) - -diff --git a/xarray/tests/test_computation.py b/xarray/tests/test_computation.py -index b7ae1ca982..7759e7d6a8 100644 ---- a/xarray/tests/test_computation.py -+++ b/xarray/tests/test_computation.py -@@ -1313,7 +1313,8 @@ def test_vectorize_dask_dtype_meta(): - data_array = xr.DataArray([[0, 1, 2], [1, 2, 3]], dims=("x", "y")) - expected = xr.DataArray([1, 2], dims=["x"]) - -- actual = apply_ufunc( -+ func = functools.partial( -+ apply_ufunc, - pandas_median, - data_array.chunk({"x": 1}), - input_core_dims=[["y"]], -@@ -1323,8 +1324,14 @@ def test_vectorize_dask_dtype_meta(): - dask_gufunc_kwargs=dict(meta=np.ndarray((0, 0), dtype=float)), - ) - -- assert_identical(expected, actual) -- assert float == actual.dtype -+ # dask/dask#7669: can no longer pass output_dtypes and meta -+ if LooseVersion(dask.__version__) >= "2021.06": -+ with pytest.raises(ValueError): -+ func() -+ else: -+ actual = func() -+ assert_identical(expected, actual) -+ assert float == actual.dtype - - - def pandas_median_add(x, y): - -From 2e51db563f82657a30a0b3d87f0ddab36a936fe9 Mon Sep 17 00:00:00 2001 -From: Mathias Hauser -Date: Mon, 7 Jun 2021 21:48:15 +0200 -Subject: [PATCH 2/3] don't test in newer dask versions - ---- - xarray/tests/test_computation.py | 18 +++++++----------- - 1 file changed, 7 insertions(+), 11 deletions(-) - -diff --git a/xarray/tests/test_computation.py b/xarray/tests/test_computation.py -index 7759e7d6a8..92a543e14b 100644 ---- a/xarray/tests/test_computation.py -+++ b/xarray/tests/test_computation.py -@@ -1306,15 +1306,17 @@ def test_vectorize_dask_dtype_without_output_dtypes(data_array): - assert expected.dtype == actual.dtype - - --@pytest.mark.xfail(LooseVersion(dask.__version__) < "2.3", reason="dask GH5274") -+@pytest.mark.skip( -+ LooseVersion(dask.__version__) > "2021.06", -+ reason="dask/dask#7669: can no longer pass output_dtypes and meta", -+) - @requires_dask - def test_vectorize_dask_dtype_meta(): - # meta dtype takes precedence - data_array = xr.DataArray([[0, 1, 2], [1, 2, 3]], dims=("x", "y")) - expected = xr.DataArray([1, 2], dims=["x"]) - -- func = functools.partial( -- apply_ufunc, -+ actual = apply_ufunc( - pandas_median, - data_array.chunk({"x": 1}), - input_core_dims=[["y"]], -@@ -1324,14 +1326,8 @@ def test_vectorize_dask_dtype_meta(): - dask_gufunc_kwargs=dict(meta=np.ndarray((0, 0), dtype=float)), - ) - -- # dask/dask#7669: can no longer pass output_dtypes and meta -- if LooseVersion(dask.__version__) >= "2021.06": -- with pytest.raises(ValueError): -- func() -- else: -- actual = func() -- assert_identical(expected, actual) -- assert float == actual.dtype -+ assert_identical(expected, actual) -+ assert float == actual.dtype - - - def pandas_median_add(x, y): - -From a4cef6dac3fa5a84f144e56c63ce4b3b903681b4 Mon Sep 17 00:00:00 2001 -From: Mathias Hauser -Date: Mon, 7 Jun 2021 21:56:46 +0200 -Subject: [PATCH 3/3] skipIF - ---- - xarray/tests/test_computation.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/xarray/tests/test_computation.py b/xarray/tests/test_computation.py -index 92a543e14b..09bed72496 100644 ---- a/xarray/tests/test_computation.py -+++ b/xarray/tests/test_computation.py -@@ -1306,7 +1306,7 @@ def test_vectorize_dask_dtype_without_output_dtypes(data_array): - assert expected.dtype == actual.dtype - - --@pytest.mark.skip( -+@pytest.mark.skipif( - LooseVersion(dask.__version__) > "2021.06", - reason="dask/dask#7669: can no longer pass output_dtypes and meta", - )