forked from pool/python-xarray
Accepting request 1154193 from devel:languages:python:numeric
- Skip Python 3.9. It requires pydap, which is not available any more. - Update to 2024.2.0 * This release brings size information to the text repr, changes to the accepted frequency strings, and various bug fixes. ## New Features * Added a simple nbytes representation in DataArrays and Dataset repr. (GH8690, PR8702). By Etienne Schalk. * Allow negative frequency strings (e.g. "-1YE"). These strings are for example used in date_range(), and cftime_range() (PR8651). By Mathias Hauser. * Add NamedArray.expand_dims(), NamedArray.permute_dims() and NamedArray.broadcast_to() (PR8380) By Anderson Banihirwe. * Xarray now defers to flox’s heuristics to set the default method for groupby problems. This only applies to flox>=0.9. By Deepak Cherian. * All quantile methods (e.g. DataArray.quantile()) now use numbagg for the calculation of nanquantiles (i.e., skipna=True) if it is installed. This is currently limited to the linear interpolation method (method=’linear’). (GH7377, PR8684) By Marco Wolsza. ## Breaking changes * infer_freq() always returns the frequency strings as defined in pandas 2.2 (GH8612, PR8627). By Mathias Hauser. * Deprecations * The dt.weekday_name parameter wasn’t functional on modern pandas versions and has been removed. (GH8610, PR8664) By Sam Coleman. ## Bug fixes * Fixed a regression that prevented multi-index level coordinates being serialized after resetting or dropping the multi-index (GH8628, PR8672). By Benoit Bovy. * Fix bug with broadcasting when wrapping array API-compliant classes. (GH8665, PR8669) By Tom Nicholas. * Ensure DataArray.unstack() works when wrapping array API-compliant classes. (GH8666, PR8668) By Tom Nicholas. * Fix negative slicing of Zarr arrays without dask installed. (GH8252) By Deepak Cherian. * Preserve chunks when writing time-like variables to zarr by enabling lazy CF encoding of time-like variables (GH7132, GH8230, GH8432, PR8575). By Spencer Clark and Mattia Almansi. * Preserve chunks when writing time-like variables to zarr by enabling their lazy encoding (GH7132, GH8230, GH8432, PR8253, PR8575; see also discussion in PR8253). By Spencer Clark and Mattia Almansi. * Raise an informative error if dtype encoding of time-like variables would lead to integer overflow or unsafe conversion from floating point to integer values (GH8542, PR8575). By Spencer Clark. * Raise an error when unstacking a MultiIndex that has duplicates as this would lead to silent data loss (GH7104, PR8737). By Mathias Hauser. - Release 2024.1.1 ## Breaking changes * Following pandas, infer_freq() will return "YE", instead of "Y" (formerly "A"). This is to be consistent with the deprecation of the latter frequency string in pandas 2.2. This is a follow up to PR8415 (GH8612, PR8642). By Mathias Hauser. ## Deprecations * Following pandas, the frequency string "Y" (formerly "A") is deprecated in favor of "YE". These strings are used, for example, in date_range(), cftime_range(), DataArray.resample(), and Dataset.resample() among others (GH8612, PR8629). By Mathias Hauser. - Release 2024.1.0 * This release brings support for weights in correlation and covariance functions, a new DataArray.cumulative aggregation, improvements to xr.map_blocks, an update to our minimum dependencies, and various bugfixes. ## New Features * xr.cov() and xr.corr() now support using weights (GH8527, PR7392). By Llorenç Lledó. * Accept the compression arguments new in netCDF 1.6.0 in the netCDF4 backend. See netCDF4 documentation for details. Note that some new compression filters needs plugins to be installed which may not be available in all netCDF distributions. By Markel García-Díez. (GH6929, PR7551) * Add DataArray.cumulative() & Dataset.cumulative() to compute cumulative aggregations, such as sum, along a dimension — for example da.cumulative('time').sum(). This is similar to pandas’ .expanding, and mostly equivalent to .cumsum methods, or to DataArray.rolling() with a window length equal to the dimension size. By Maximilian Roos. (PR8512) * Decode/Encode netCDF4 enums and store the enum definition in dataarrays’ dtype metadata. If multiple variables share the same enum in netCDF4, each dataarray will have its own enum definition in their respective dtype metadata. By Abel Aoun. (GH8144, PR8147) ## Deprecations * The squeeze kwarg to GroupBy is now deprecated. (GH2157, PR8507) By Deepak Cherian. ## Bug fixes * Support non-string hashable dimensions in xarray.DataArray (GH8546, PR8559). By Michael Niklas. * Reverse index output of bottleneck’s rolling move_argmax/move_argmin functions (GH8541, PR8552). By Kai Mühlbauer. * Vendor SerializableLock from dask and use as default lock for netcdf4 backends (GH8442, PR8571). By Kai Mühlbauer. * Add tests and fixes for empty CFTimeIndex, including broken html repr (GH7298, PR8600). By Mathias Hauser. - Create subpackages for the python [extras], test dependencies with _multibuild OBS-URL: https://build.opensuse.org/request/show/1154193 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-xarray?expand=0&rev=46
This commit is contained in:
commit
201d95acff
3
_multibuild
Normal file
3
_multibuild
Normal file
@ -0,0 +1,3 @@
|
||||
<multibuild>
|
||||
<package>test</package>
|
||||
</multibuild>
|
@ -1,3 +1,114 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 1 21:04:08 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Skip Python 3.9. It requires pydap, which is not available any
|
||||
more.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 27 10:56:32 UTC 2024 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Update to 2024.2.0
|
||||
* This release brings size information to the text repr, changes
|
||||
to the accepted frequency strings, and various bug fixes.
|
||||
## New Features
|
||||
* Added a simple nbytes representation in DataArrays and Dataset
|
||||
repr. (GH8690, PR8702). By Etienne Schalk.
|
||||
* Allow negative frequency strings (e.g. "-1YE"). These strings
|
||||
are for example used in date_range(), and cftime_range()
|
||||
(PR8651). By Mathias Hauser.
|
||||
* Add NamedArray.expand_dims(), NamedArray.permute_dims() and
|
||||
NamedArray.broadcast_to() (PR8380) By Anderson Banihirwe.
|
||||
* Xarray now defers to flox’s heuristics to set the default
|
||||
method for groupby problems. This only applies to flox>=0.9. By
|
||||
Deepak Cherian.
|
||||
* All quantile methods (e.g. DataArray.quantile()) now use
|
||||
numbagg for the calculation of nanquantiles (i.e., skipna=True)
|
||||
if it is installed. This is currently limited to the linear
|
||||
interpolation method (method=’linear’). (GH7377, PR8684) By
|
||||
Marco Wolsza.
|
||||
## Breaking changes
|
||||
* infer_freq() always returns the frequency strings as defined in
|
||||
pandas 2.2 (GH8612, PR8627). By Mathias Hauser.
|
||||
* Deprecations
|
||||
* The dt.weekday_name parameter wasn’t functional on modern
|
||||
pandas versions and has been removed. (GH8610, PR8664) By Sam
|
||||
Coleman.
|
||||
## Bug fixes
|
||||
* Fixed a regression that prevented multi-index level coordinates
|
||||
being serialized after resetting or dropping the multi-index
|
||||
(GH8628, PR8672). By Benoit Bovy.
|
||||
* Fix bug with broadcasting when wrapping array API-compliant
|
||||
classes. (GH8665, PR8669) By Tom Nicholas.
|
||||
* Ensure DataArray.unstack() works when wrapping array
|
||||
API-compliant classes. (GH8666, PR8668) By Tom Nicholas.
|
||||
* Fix negative slicing of Zarr arrays without dask installed.
|
||||
(GH8252) By Deepak Cherian.
|
||||
* Preserve chunks when writing time-like variables to zarr by
|
||||
enabling lazy CF encoding of time-like variables (GH7132,
|
||||
GH8230, GH8432, PR8575). By Spencer Clark and Mattia Almansi.
|
||||
* Preserve chunks when writing time-like variables to zarr by
|
||||
enabling their lazy encoding (GH7132, GH8230, GH8432, PR8253,
|
||||
PR8575; see also discussion in PR8253). By Spencer Clark and
|
||||
Mattia Almansi.
|
||||
* Raise an informative error if dtype encoding of time-like
|
||||
variables would lead to integer overflow or unsafe conversion
|
||||
from floating point to integer values (GH8542, PR8575). By
|
||||
Spencer Clark.
|
||||
* Raise an error when unstacking a MultiIndex that has duplicates
|
||||
as this would lead to silent data loss (GH7104, PR8737). By
|
||||
Mathias Hauser.
|
||||
- Release 2024.1.1
|
||||
## Breaking changes
|
||||
* Following pandas, infer_freq() will return "YE", instead of "Y"
|
||||
(formerly "A"). This is to be consistent with the deprecation
|
||||
of the latter frequency string in pandas 2.2. This is a follow
|
||||
up to PR8415 (GH8612, PR8642). By Mathias Hauser.
|
||||
## Deprecations
|
||||
* Following pandas, the frequency string "Y" (formerly "A") is
|
||||
deprecated in favor of "YE". These strings are used, for
|
||||
example, in date_range(), cftime_range(), DataArray.resample(),
|
||||
and Dataset.resample() among others (GH8612, PR8629). By
|
||||
Mathias Hauser.
|
||||
- Release 2024.1.0
|
||||
* This release brings support for weights in correlation and
|
||||
covariance functions, a new DataArray.cumulative aggregation,
|
||||
improvements to xr.map_blocks, an update to our minimum
|
||||
dependencies, and various bugfixes.
|
||||
## New Features
|
||||
* xr.cov() and xr.corr() now support using weights (GH8527,
|
||||
PR7392). By Llorenç Lledó.
|
||||
* Accept the compression arguments new in netCDF 1.6.0 in the
|
||||
netCDF4 backend. See netCDF4 documentation for details. Note
|
||||
that some new compression filters needs plugins to be installed
|
||||
which may not be available in all netCDF distributions. By
|
||||
Markel García-Díez. (GH6929, PR7551)
|
||||
* Add DataArray.cumulative() & Dataset.cumulative() to compute
|
||||
cumulative aggregations, such as sum, along a dimension — for
|
||||
example da.cumulative('time').sum(). This is similar to pandas’
|
||||
.expanding, and mostly equivalent to .cumsum methods, or to
|
||||
DataArray.rolling() with a window length equal to the dimension
|
||||
size. By Maximilian Roos. (PR8512)
|
||||
* Decode/Encode netCDF4 enums and store the enum definition in
|
||||
dataarrays’ dtype metadata. If multiple variables share the
|
||||
same enum in netCDF4, each dataarray will have its own enum
|
||||
definition in their respective dtype metadata. By Abel Aoun.
|
||||
(GH8144, PR8147)
|
||||
## Deprecations
|
||||
* The squeeze kwarg to GroupBy is now deprecated. (GH2157,
|
||||
PR8507) By Deepak Cherian.
|
||||
## Bug fixes
|
||||
* Support non-string hashable dimensions in xarray.DataArray
|
||||
(GH8546, PR8559). By Michael Niklas.
|
||||
* Reverse index output of bottleneck’s rolling
|
||||
move_argmax/move_argmin functions (GH8541, PR8552). By Kai
|
||||
Mühlbauer.
|
||||
* Vendor SerializableLock from dask and use as default lock for
|
||||
netcdf4 backends (GH8442, PR8571). By Kai Mühlbauer.
|
||||
* Add tests and fixes for empty CFTimeIndex, including broken
|
||||
html repr (GH7298, PR8600). By Mathias Hauser.
|
||||
- Create subpackages for the python [extras], test dependencies
|
||||
with _multibuild
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 4 11:16:58 UTC 2024 - Sebastian Wagner <sebix@sebix.at>
|
||||
|
||||
|
@ -16,9 +16,19 @@
|
||||
#
|
||||
|
||||
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "test"
|
||||
%bcond_without test
|
||||
%define psuffix -test
|
||||
%else
|
||||
%bcond_with test
|
||||
%define psuffix %{nil}
|
||||
%endif
|
||||
|
||||
%define skip_python39 1
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-xarray
|
||||
Version: 2023.12.0
|
||||
Name: python-xarray%{psuffix}
|
||||
Version: 2024.2.0
|
||||
Release: 0
|
||||
Summary: N-D labeled arrays and datasets in Python
|
||||
License: Apache-2.0
|
||||
@ -28,58 +38,20 @@ Source: https://files.pythonhosted.org/packages/source/x/xarray/xarray-%
|
||||
# fix xr.tutorial.open_dataset to work with the preloaded cache.
|
||||
Patch0: local_dataset.patch
|
||||
BuildRequires: %{python_module base >= 3.9}
|
||||
BuildRequires: %{python_module numpy-devel >= 1.22}
|
||||
BuildRequires: %{python_module packaging >= 21.3}
|
||||
BuildRequires: %{python_module pandas >= 1.4}
|
||||
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.22
|
||||
Requires: python-packaging >= 21.3
|
||||
Requires: python-pandas >= 1.4
|
||||
Provides: python-xray = %{version}
|
||||
Obsoletes: python-xray < %{version}
|
||||
Requires: python-numpy >= 1.23
|
||||
Requires: python-packaging >= 22
|
||||
Requires: python-pandas >= 1.5
|
||||
Obsoletes: python-xray <= 0.7
|
||||
BuildArch: noarch
|
||||
# SECTION extras accel
|
||||
Recommends: python-scipy
|
||||
Recommends: python-bottleneck
|
||||
Recommends: python-flox
|
||||
Recommends: python-numbagg
|
||||
# /SECTION
|
||||
# SECTION extras parallalel
|
||||
Suggests: python-dask-complete
|
||||
# /SECTION
|
||||
# SECTION extras viz
|
||||
Suggests: python-matplotlib
|
||||
Suggests: python-seaborn
|
||||
Suggests: python-nc-time-axis
|
||||
#/SECTION
|
||||
# SECTION extras io
|
||||
Suggests: python-netCDF4
|
||||
Suggests: python-h5netcdf
|
||||
Suggests: (python-pydap if python-base < 3.10)
|
||||
Suggests: python-zarr
|
||||
Suggests: python-fsspec
|
||||
Suggests: python-cftime
|
||||
Suggests: python-rasterio
|
||||
Suggests: python-cfgrib
|
||||
Suggests: python-pooch
|
||||
#/SECTION
|
||||
# SECTION tests
|
||||
BuildRequires: %{python_module Bottleneck}
|
||||
BuildRequires: %{python_module dask-dataframe}
|
||||
BuildRequires: %{python_module dask-diagnostics}
|
||||
BuildRequires: %{python_module h5netcdf}
|
||||
BuildRequires: %{python_module matplotlib}
|
||||
BuildRequires: %{python_module netCDF4}
|
||||
BuildRequires: %{python_module pooch}
|
||||
BuildRequires: %{python_module pytest-xdist}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module scipy}
|
||||
BuildRequires: %{python_module zarr}
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module xarray-complete = %{version}}
|
||||
%endif
|
||||
# /SECTION
|
||||
%python_subpackages
|
||||
|
||||
@ -92,18 +64,112 @@ rather than the tabular data that pandas uses.
|
||||
The Common Data Model for self-describing scientific data is used.
|
||||
The dataset is an in-memory representation of a netCDF file.
|
||||
|
||||
%package accel
|
||||
# for minimum versions, check ci/requirements/min-all-deps.yml
|
||||
Summary: The python xarray[accel] extra
|
||||
Requires: python-Bottleneck >= 1.3
|
||||
Requires: python-opt-einsum
|
||||
Requires: python-scipy
|
||||
Requires: python-xarray = %{version}
|
||||
# not available yet
|
||||
Recommends: python-flox >= 0.7
|
||||
Recommends: python-numbagg
|
||||
|
||||
%description accel
|
||||
The [accel] extra for xarray, N-D labeled arrays and datasets in Python
|
||||
Except flox and numbagg, because they are not packaged yet.
|
||||
Use `pip-%{python_bin_suffix} --user install flox numbagg` to install from PyPI, if needed.
|
||||
|
||||
%package complete
|
||||
Summary: The python xarray[complete] extra
|
||||
Requires: python-xarray = %{version}
|
||||
Requires: python-xarray-accel = %{version}
|
||||
Requires: python-xarray-dev = %{version}
|
||||
Requires: python-xarray-io = %{version}
|
||||
Requires: python-xarray-parallel = %{version}
|
||||
Requires: python-xarray-viz = %{version}
|
||||
|
||||
%description complete
|
||||
The [complete] extra for xarray, N-D labeled arrays and datasets in Python
|
||||
|
||||
%package dev
|
||||
Summary: The python xarray[dev] extra
|
||||
Requires: python-hypothesis
|
||||
Requires: python-pytest
|
||||
Requires: python-pytest-cov
|
||||
Requires: python-pytest-env
|
||||
Requires: python-pytest-timeout
|
||||
Requires: python-pytest-xdist
|
||||
Requires: python-ruff
|
||||
Requires: python-xarray = %{version}
|
||||
Requires: python-xarray-complete = %{version}
|
||||
# Not available and not really useful for us
|
||||
Recommends: python-pre-commit
|
||||
|
||||
%description dev
|
||||
The [dev] extra for xarray, N-D labeled arrays and datasets in Python
|
||||
Except pre-commit, Use `pip-%{python_bin_suffix} --user install pre-commit` to install, if needed.
|
||||
|
||||
%package io
|
||||
Summary: The python xarray[io] extra
|
||||
Requires: python-cftime >= 1.6
|
||||
Requires: python-fsspec
|
||||
Requires: python-h5netcdf >= 1.1
|
||||
Requires: python-netCDF4 >= 1.6
|
||||
Requires: python-pooch
|
||||
Requires: python-scipy >= 1.10
|
||||
Requires: python-xarray = %{version}
|
||||
Requires: python-zarr >= 2.13
|
||||
|
||||
%description io
|
||||
The [io] extra for xarray, N-D labeled arrays and datasets in Python
|
||||
|
||||
%package parallel
|
||||
Summary: The python xarray[parallel] extra
|
||||
Requires: python-dask-complete >= 2022.12
|
||||
Requires: python-xarray = %{version}
|
||||
|
||||
%description parallel
|
||||
The [parallel] extra for xarray, N-D labeled arrays and datasets in Python
|
||||
|
||||
%package viz
|
||||
Summary: The python xarray[viz] extra
|
||||
Requires: python-matplotlib >= 3.6
|
||||
Requires: python-seaborn >= 0.12
|
||||
Requires: python-xarray = %{version}
|
||||
# Not available yet
|
||||
Recommends: python-nc-time-axis
|
||||
|
||||
%description viz
|
||||
The [viz] extra for xarray, N-D labeled arrays and datasets in Python
|
||||
|
||||
Except nc-time-axis, because it's not packaged yet.
|
||||
Use `pip-%{python_bin_suffix} --user install nc-time-axis` to install from PyPI, if needed.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n xarray-%{version}
|
||||
%if "%{version}" == "2024.2.0"
|
||||
# gh#pydata/xarray#8768, remove this after the next update!
|
||||
rm -r xarray/tests/datatree
|
||||
%else
|
||||
echo "You failed to update the specfile"
|
||||
exit 1
|
||||
%endif
|
||||
|
||||
chmod -x xarray/util/print_versions.py
|
||||
|
||||
%build
|
||||
%if !%{with test}
|
||||
%pyproject_wheel
|
||||
%endif
|
||||
|
||||
%install
|
||||
%if !%{with test}
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
%endif
|
||||
|
||||
%if %{with test}
|
||||
%check
|
||||
# obs file open race conditions?
|
||||
donttest="(test_open_mfdataset_manyfiles and (h5netcdf or netCDF4))"
|
||||
@ -117,12 +183,42 @@ if [ $(getconf LONG_BIT) -eq 32 ]; then
|
||||
fi
|
||||
# h5py was built without ROS3 support, can't use ros3 driver
|
||||
donttest="$donttest or TestH5NetCDFDataRos3Driver"
|
||||
%pytest -n auto -rsEf -k "not ($donttest)" xarray
|
||||
# NetCDF4 fails with these unsupported drivers
|
||||
donttest="$donttest or (TestNetCDF4 and test_compression_encoding and (szip or zstd or blosc_lz or blosc_zlib))"
|
||||
|
||||
%pytest -n auto -rsEf -k "not ($donttest)" xarray
|
||||
%endif
|
||||
|
||||
%if !%{with test}
|
||||
%files %{python_files}
|
||||
%doc README.md
|
||||
%license LICENSE licenses/
|
||||
%{python_sitelib}/xarray
|
||||
%{python_sitelib}/xarray-%{version}.dist-info
|
||||
|
||||
%files %{python_files accel}
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
|
||||
%files %{python_files complete}
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
|
||||
%files %{python_files dev}
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
|
||||
%files %{python_files io}
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
|
||||
%files %{python_files parallel}
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
|
||||
%files %{python_files viz}
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4565dbc890de47e278346c44d6b33bb07d3427383e077a7ca8ab6606196fd433
|
||||
size 3602114
|
3
xarray-2024.2.0.tar.gz
Normal file
3
xarray-2024.2.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a105f02791082c888ebe2622090beaff2e7b68571488d62fe6afdab35b4b717f
|
||||
size 3634288
|
Loading…
x
Reference in New Issue
Block a user