From dff17e69ab7b5c2644b450544428412ff2dc482cf360b9f833d91adb39df9821 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 13 Sep 2023 07:39:53 +0000 Subject: [PATCH] Accepting request 1110376 from home:bnavigator:branches:devel:languages:python:numeric - Update to 2023.8.0 * This release brings changes to minimum dependencies, allows reading of datasets where a dimension name is associated with a multidimensional variable (e.g. finite volume ocean model output), and introduces a new xarray.Coordinates object. ## Announcements * The xarray.Variable class is being refactored out to a new project title 'namedarray'. See the design doc for more details. Reach out to us on this discussion topic if you have any thoughts. ## What's Changed * Use variable name in all exceptions raised in as_variable by @ZedThree in #7995 * Allow opening datasets with nD dimenson coordinate variables. by @dcherian in #7989 * join together duplicate entries in the text repr by @keewis in #7225 * Expose "Coordinates" as part of Xarray's public API by @benbovy in #7368 * Update interpolate_na in dataset.py by @ilgast in #7974 * Add HDF5 Section to read/write docs page by @rwegener2 in #8012 * Add examples to docstrings by @harshitha1201 in #7937 * (chore) min versions bump by @jhamman in #8022 * Automatically chunk other in GroupBy binary ops. by @dcherian in #7684 * change cumproduct to cumprod by @quantsnus in #8031 * Reduce pre-commit update frequency to monthly from weekly. by @dcherian in #8033 * sort when encoding coordinates for deterministic outputs by @itcarroll in #8034 * Zarr : Allow setting write_empty_chunks by @RKuttruff in #8016 * Count documentation by @Articoking in #8057 * unpin numpy by @keewis in #8061 - Release 2023.7.0 * This release brings improvements to the documentation on wrapping numpy-like arrays, improved docstrings, and bug fixes. ## What's Changed * Allow cubed arrays to be passed to flox groupby by @TomNicholas in #7941 * Duck array documentation improvements by @TomNicholas in #7911 * Docstring examples by @harshitha1201 in #7881 * Chunked array docs by @TomNicholas in #7951 * ensure no forward slashes in names for HDF5-based backends by @kmuehlbauer in #7953 * Move absolute path finder from open_mfdataset to own function by @Illviljan in #7968 * Skip broken tests on Python 3.11 and Windows by @Illviljan in #7972 * Examples added to docstrings by @harshitha1201 in #7936 * Fix typo in zarr.py by @johmathe in #7983 * Improve explanation in example "Working with Multidimensional Coordinates" by @yvonnefroehlich in #7984 * Remove hue_style from plot1d docstring by @Illviljan in #7925 - Release 2023.06.0 * This release adds features to curvefit, improves the performance of concatenation, and fixes various bugs. ## What's Changed * Array API fixes for astype by @TomNicholas in #7847 * Add type hints to test_dtypes by @Illviljan in #7858 * adapt the pint + dask test to the newest version of pint by @keewis in #7855 * Avoid explicit loop when updating OrderedSet by @Illviljan in #7857 * Improve to_dask_dataframe performance by @Illviljan in #7844 * Changed duck typing exception to: (ImportError, AttributeError) by @vhaasteren in #7874 * defer to numpy for the expected result by @keewis in #7875 * deprecate the cdms2 conversion methods by @keewis in #7876 * Implement multidimensional initial guess and bounds for curvefit by @mgunyho in #7821 * Improve concat performance by @Illviljan in #7824 * Fix .groupby(multi index level) by @dcherian in #7830 * don't use CacheFileManager.__del__ on interpreter shutdown by @keewis in #7880 * fix polyfit changing the original object by @malmans2 in #7900 * Fix flaky doctest for curvefit by @mgunyho in #7893 * Ensure dtype of reindex result matches dtype of the original DataArray by @andersy005 in #7917 * Add errors option to curvefit by @mgunyho in #7891 * CF encoding should preserve vlen dtype for empty arrays by @tomwhite in #7862 * use trusted publishers instead of a API token by @keewis in #7899 * Add cfgrib,ipywidgets to doc env by @dcherian in #7888 * Fix regression with grouper object on an IndexVariable by @mwtoews in #7920 * Fix check for chunk_store in zarr backend by @juntyr in #7923 * fixing rolling_window issue with cupy by @negin513 in #7938 - Add xarray-pr8139-pandas-fill_value.patch gh#pydata/xarray#8125, gh#pydata/xarray#8139 OBS-URL: https://build.opensuse.org/request/show/1110376 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-xarray?expand=0&rev=82 --- local_dataset.patch | 8 ++- python-xarray.changes | 94 +++++++++++++++++++++++++++ python-xarray.spec | 26 ++++---- xarray-2023.5.0.tar.gz | 3 - xarray-2023.8.0.tar.gz | 3 + xarray-pr8139-pandas-fill_value.patch | 38 +++++++++++ 6 files changed, 154 insertions(+), 18 deletions(-) delete mode 100644 xarray-2023.5.0.tar.gz create mode 100644 xarray-2023.8.0.tar.gz create mode 100644 xarray-pr8139-pandas-fill_value.patch diff --git a/local_dataset.patch b/local_dataset.patch index 0d5443a..fdf4bff 100644 --- a/local_dataset.patch +++ b/local_dataset.patch @@ -2,9 +2,11 @@ xarray/tutorial.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ---- a/xarray/tutorial.py -+++ b/xarray/tutorial.py -@@ -156,7 +156,10 @@ def open_dataset( +Index: xarray-2023.8.0/xarray/tutorial.py +=================================================================== +--- xarray-2023.8.0.orig/xarray/tutorial.py ++++ xarray-2023.8.0/xarray/tutorial.py +@@ -157,7 +157,10 @@ def open_dataset( url = f"{base_url}/raw/{version}/{path.name}" # retrieve the file diff --git a/python-xarray.changes b/python-xarray.changes index 57e4e11..201494f 100644 --- a/python-xarray.changes +++ b/python-xarray.changes @@ -1,3 +1,97 @@ +------------------------------------------------------------------- +Sun Sep 10 16:38:28 UTC 2023 - Ben Greiner + +- Update to 2023.8.0 + * This release brings changes to minimum dependencies, allows + reading of datasets where a dimension name is associated with a + multidimensional variable (e.g. finite volume ocean model + output), and introduces a new xarray.Coordinates object. + ## Announcements + * The xarray.Variable class is being refactored out to a new + project title 'namedarray'. See the design doc for more + details. Reach out to us on this discussion topic if you have + any thoughts. + ## What's Changed + * Use variable name in all exceptions raised in as_variable by + @ZedThree in #7995 + * Allow opening datasets with nD dimenson coordinate variables. + by @dcherian in #7989 + * join together duplicate entries in the text repr by @keewis in + #7225 + * Expose "Coordinates" as part of Xarray's public API by @benbovy + in #7368 + * Update interpolate_na in dataset.py by @ilgast in #7974 + * Add HDF5 Section to read/write docs page by @rwegener2 in #8012 + * Add examples to docstrings by @harshitha1201 in #7937 + * (chore) min versions bump by @jhamman in #8022 + * Automatically chunk other in GroupBy binary ops. by @dcherian + in #7684 + * change cumproduct to cumprod by @quantsnus in #8031 + * Reduce pre-commit update frequency to monthly from weekly. by + @dcherian in #8033 + * sort when encoding coordinates for deterministic outputs by + @itcarroll in #8034 + * Zarr : Allow setting write_empty_chunks by @RKuttruff in #8016 + * Count documentation by @Articoking in #8057 + * unpin numpy by @keewis in #8061 +- Release 2023.7.0 + * This release brings improvements to the documentation on + wrapping numpy-like arrays, improved docstrings, and bug fixes. + ## What's Changed + * Allow cubed arrays to be passed to flox groupby by @TomNicholas + in #7941 + * Duck array documentation improvements by @TomNicholas in #7911 + * Docstring examples by @harshitha1201 in #7881 + * Chunked array docs by @TomNicholas in #7951 + * ensure no forward slashes in names for HDF5-based backends by + @kmuehlbauer in #7953 + * Move absolute path finder from open_mfdataset to own function + by @Illviljan in #7968 + * Skip broken tests on Python 3.11 and Windows by @Illviljan in + #7972 + * Examples added to docstrings by @harshitha1201 in #7936 + * Fix typo in zarr.py by @johmathe in #7983 + * Improve explanation in example "Working with Multidimensional + Coordinates" by @yvonnefroehlich in #7984 + * Remove hue_style from plot1d docstring by @Illviljan in #7925 +- Release 2023.06.0 + * This release adds features to curvefit, improves the + performance of concatenation, and fixes various bugs. + ## What's Changed + * Array API fixes for astype by @TomNicholas in #7847 + * Add type hints to test_dtypes by @Illviljan in #7858 + * adapt the pint + dask test to the newest version of pint by + @keewis in #7855 + * Avoid explicit loop when updating OrderedSet by @Illviljan in + #7857 + * Improve to_dask_dataframe performance by @Illviljan in #7844 + * Changed duck typing exception to: (ImportError, AttributeError) + by @vhaasteren in #7874 + * defer to numpy for the expected result by @keewis in #7875 + * deprecate the cdms2 conversion methods by @keewis in #7876 + * Implement multidimensional initial guess and bounds for + curvefit by @mgunyho in #7821 + * Improve concat performance by @Illviljan in #7824 + * Fix .groupby(multi index level) by @dcherian in #7830 + * don't use CacheFileManager.__del__ on interpreter shutdown by + @keewis in #7880 + * fix polyfit changing the original object by @malmans2 in #7900 + * Fix flaky doctest for curvefit by @mgunyho in #7893 + * Ensure dtype of reindex result matches dtype of the original + DataArray by @andersy005 in #7917 + * Add errors option to curvefit by @mgunyho in #7891 + * CF encoding should preserve vlen dtype for empty arrays by + @tomwhite in #7862 + * use trusted publishers instead of a API token by @keewis in + #7899 + * Add cfgrib,ipywidgets to doc env by @dcherian in #7888 + * Fix regression with grouper object on an IndexVariable by + @mwtoews in #7920 + * Fix check for chunk_store in zarr backend by @juntyr in #7923 + * fixing rolling_window issue with cupy by @negin513 in #7938 +- Add xarray-pr8139-pandas-fill_value.patch gh#pydata/xarray#8125, + gh#pydata/xarray#8139 + ------------------------------------------------------------------- Wed May 31 08:23:29 UTC 2023 - Dirk Müller diff --git a/python-xarray.spec b/python-xarray.spec index ce3af24..6f72292 100644 --- a/python-xarray.spec +++ b/python-xarray.spec @@ -18,7 +18,7 @@ %{?sle15_python_module_pythons} Name: python-xarray -Version: 2023.5.0 +Version: 2023.8.0 Release: 0 Summary: N-D labeled arrays and datasets in Python License: Apache-2.0 @@ -27,15 +27,19 @@ Source: https://files.pythonhosted.org/packages/source/x/xarray/xarray-% # PATCH-FEATURE-UPSTREAM local_dataset.patch gh#pydata/xarray#5377 mcepl@suse.com # fix xr.tutorial.open_dataset to work with the preloaded cache. Patch0: local_dataset.patch +# PATCH-FIX-UPSTREAM xarray-pr8139-pandas-fill_value.patch gh#pydata/xarray#8125, gh#pydata/xarray#8139 +Patch1: https://github.com/pydata/xarray/pull/8139.patch#/xarray-pr8139-pandas-fill_value.patch BuildRequires: %{python_module base >= 3.9} BuildRequires: %{python_module numpy-devel >= 1.20} BuildRequires: %{python_module packaging >= 21.3} BuildRequires: %{python_module pandas >= 1.3} +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools_scm} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-numpy >= 1.21 +Requires: python-numpy >= 1.22 Requires: python-packaging >= 21.3 Requires: python-pandas >= 1.4 Provides: python-xray = %{version} @@ -68,9 +72,8 @@ Suggests: python-pooch #/SECTION # SECTION tests BuildRequires: %{python_module Bottleneck} -# not available on python 3.11 -#BuildRequires: %%{python_module dask-dataframe} -#BuildRequires: %%{python_module dask-diagnostics} +BuildRequires: %{python_module dask-dataframe} +BuildRequires: %{python_module dask-diagnostics} BuildRequires: %{python_module h5netcdf} BuildRequires: %{python_module matplotlib} BuildRequires: %{python_module netCDF4} @@ -97,22 +100,22 @@ The dataset is an in-memory representation of a netCDF file. chmod -x xarray/util/print_versions.py %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -# OOM crashes the whole vm or even the local host running osc: https://github.com/pydata/xarray/issues/6854 -donttest="nczarr" +# obs file open race conditions? +donttest="(test_open_mfdataset_manyfiles and (h5netcdf or netCDF4))" if [ $(getconf LONG_BIT) -eq 32 ]; then # https://github.com/pydata/xarray/issues/5341 # https://github.com/pydata/xarray/issues/5375 # still precision problems in 2022.11.0 donttest="$donttest or (test_interpolate_chunk_advanced and linear)" # tests for 64bit types - donttest="$donttest or TestZarrDictStore or TestZarrDirectoryStore" + donttest="$donttest or TestZarrDictStore or TestZarrDirectoryStore or TestZarrWriteEmpty" fi %pytest -n auto -rsEf -k "not ($donttest)" xarray @@ -120,7 +123,6 @@ fi %doc README.md %license LICENSE licenses/ %{python_sitelib}/xarray -%exclude %{python_sitelib}/xarray/tests -%{python_sitelib}/xarray-%{version}*-info +%{python_sitelib}/xarray-%{version}.dist-info %changelog diff --git a/xarray-2023.5.0.tar.gz b/xarray-2023.5.0.tar.gz deleted file mode 100644 index 877cfd7..0000000 --- a/xarray-2023.5.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:318a651f4182b9cecb7d1c57ad0ed9bdaed5f49c43dbb638c0a845b8faf405e8 -size 3707468 diff --git a/xarray-2023.8.0.tar.gz b/xarray-2023.8.0.tar.gz new file mode 100644 index 0000000..710e689 --- /dev/null +++ b/xarray-2023.8.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:825c6d64202a731a4e49321edd1e9dfabf4be06802f1b8c8a3c00a3ebfc8cedf +size 3757528 diff --git a/xarray-pr8139-pandas-fill_value.patch b/xarray-pr8139-pandas-fill_value.patch new file mode 100644 index 0000000..0b59437 --- /dev/null +++ b/xarray-pr8139-pandas-fill_value.patch @@ -0,0 +1,38 @@ +From 3e48312c41cb26bbd4dc83ae286444f1469b7aa2 Mon Sep 17 00:00:00 2001 +From: Maximilian Roos +Date: Fri, 1 Sep 2023 19:41:41 -0700 +Subject: [PATCH] Fix pandas interpolate(fill_value=) error + +Pandas no longer has a `fill_value` parameter for `interpolate`. + +Weirdly I wasn't getting this locally, on pandas 2.1.0, only in CI on https://github.com/pydata/xarray/actions/runs/6054400455/job/16431747966?pr=8138. + +Removing it passes locally, let's see whether this works in CI +--- + xarray/tests/test_missing.py | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/xarray/tests/test_missing.py b/xarray/tests/test_missing.py +index a6b6b1f80c..c303659116 100644 +--- a/xarray/tests/test_missing.py ++++ b/xarray/tests/test_missing.py +@@ -104,7 +104,8 @@ def test_interpolate_pd_compat(): + for dim in ["time", "x"]: + actual = da.interpolate_na(method=method, dim=dim, fill_value=np.nan) + expected = df.interpolate( +- method=method, axis=da.get_axis_num(dim), fill_value=(np.nan, np.nan) ++ method=method, ++ axis=da.get_axis_num(dim), + ) + # Note, Pandas does some odd things with the left/right fill_value + # for the linear methods. This next line inforces the xarray +@@ -140,7 +141,8 @@ def test_interpolate_pd_compat_non_uniform_index(): + method="linear", dim=dim, use_coordinate=True, fill_value=np.nan + ) + expected = df.interpolate( +- method=method, axis=da.get_axis_num(dim), fill_value=np.nan ++ method=method, ++ axis=da.get_axis_num(dim), + ) + + # Note, Pandas does some odd things with the left/right fill_value