forked from pool/python-xarray
4042c8f6d5
- Update to 2024.5.0 * Update reference to 'Weighted quantile estimators' by @AndreyAkinshin in #8898 * Update docstring for compute and persist by @saschahofmann in #8903 * Stateful tests with Dataset by @dcherian in #8658 * Trigger hypothesis stateful tests nightly by @dcherian in #8907 * Don't access data when creating DataArray from Variable. by @dcherian in #8754 * Add typing to test_plot.py by @Illviljan in #8889 * Update hypothesis action to always save the cache by @dcherian in #8913 * Add typing to some functions in indexing.py by @Illviljan in #8922 * Enhance the ugly error in constructor when no data passed by @aimtsou in #8920 * Migrate iterators.py for datatree. by @owenlittlejohns in #8879 * use pd.to_timedelta instead of TimedeltaIndex by @keewis in #8938 * adapt more tests to the copy-on-write behavior of pandas by @keewis in #8940 * Correct save_mfdataset docstring by @TomNicholas in #8934 * Convert 360_day calendars by choosing random dates to drop or add by @aulemahal in #8603 * Migrate datatree mapping.py by @owenlittlejohns in #8948 * (feat): Support for pandas ExtensionArray by @ilan-gold in #8723 * Migrate formatting_html.py into xarray core by @eni-awowale in #8930 * use nan instead of NaN by @keewis in #8961 * stop pruning datatree_ directory from distribution by @flamingbear in #8953 * Delete pynio backend. by @dcherian in #8971 * Migrate datatreee assertions/extensions/formatting by @owenlittlejohns in #8967 * Bump dependencies incl pandas>=2 by @dcherian in #8968 * Option to not auto-create index during expand_dims by @TomNicholas in #8960 * Raise errors on new warnings from within xarray by @max-sixty in #8974 * more engine environment tricks in preparation for numpy>=2 by @keewis in #8978 * Switch all methods to dim by @max-sixty in #8982 * Docstring and documentation improvement for the Dataset class by @noahbenson in #8973 * Add notes on when to add ignores to warnings by @max-sixty in #8987 * Remove .drop warning allow by @max-sixty in #8988 * Skip flaky test_open_mfdataset_manyfiles test by @max-sixty in #8989 * avoid a couple of warnings in polyfit by @keewis in #8939 * Migration of datatree/ops.py -> datatree_ops.py by @flamingbear in #8976 * Mark test_use_cftime_false_standard_calendar_in_range as an expected failure by @spencerkclark in #8996 * call np.cross with 3D vectors only by @keewis in #8993 * Fix syntax error in test related to cupy by @hmaarrfk in #9000 * Add argument check_dims to assert_allclose to allow transposed inputs (#5733) by @ignamv in #8991 * Faster fastpath by @hmaarrfk in #9001 * Speed up localize by @Illviljan in #8536 * Port negative frequency fix for pandas.date_range to cftime_range by @spencerkclark in #8999 * Zarr: Optimize region="auto" detection by @dcherian in #8997 * Add a benchmark to monitor performance for large dataset indexing by @hmaarrfk in #9012 * Avoid extra read from disk when creating Pandas Index. by @dcherian in #8893 * Avoid auto creation of indexes in concat by @TomNicholas in #8872 * Zarr: Optimize appending by @dcherian in #8998 - Drop xarray-pr8953-nodatatreeprune.patch - Add xarray-pr8854-np2.patch gh#pydata/xarray#8854 - Add xarray-pr9305-cftime.patch gh#pydata/xarray#9305 OBS-URL: https://build.opensuse.org/request/show/1179054 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-xarray?expand=0&rev=97
223 lines
7.0 KiB
RPMSpec
223 lines
7.0 KiB
RPMSpec
#
|
|
# spec file for package python-xarray
|
|
#
|
|
# Copyright (c) 2024 SUSE LLC
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
%if "%{flavor}" == "test"
|
|
%bcond_without test
|
|
%define psuffix -test
|
|
%else
|
|
%bcond_with test
|
|
%define psuffix %{nil}
|
|
%endif
|
|
|
|
%define ghversion 2024.05.0
|
|
|
|
%{?sle15_python_module_pythons}
|
|
Name: python-xarray%{psuffix}
|
|
Version: 2024.5.0
|
|
Release: 0
|
|
Summary: N-D labeled arrays and datasets in Python
|
|
License: Apache-2.0
|
|
URL: https://github.com/pydata/xarray
|
|
Source: https://github.com/pydata/xarray/archive/refs/tags/v%{ghversion}.tar.gz#/xarray-%{ghversion}-gh.tar.gz
|
|
# 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-pr8854-np2.patch gh#pydata/xarray#8854
|
|
Patch1: xarray-pr8854-np2.patch
|
|
# PATCH-FIX-UPSTREAM xarray-pr9305-cftime.patch gh#pydata/xarray#9305
|
|
Patch2: xarray-pr9305-cftime.patch
|
|
BuildRequires: %{python_module base >= 3.9}
|
|
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.23
|
|
Requires: python-packaging >= 23.1
|
|
Requires: python-pandas >= 2
|
|
Obsoletes: python-xray <= 0.7
|
|
BuildArch: noarch
|
|
%if %{with test}
|
|
BuildRequires: %{python_module xarray-complete = %{version}}
|
|
%endif
|
|
# /SECTION
|
|
%python_subpackages
|
|
|
|
%description
|
|
xarray (formerly xray) is a python-pandas-like and pandas-compatible
|
|
toolkit for analytics on multi-dimensional arrays. It provides
|
|
N-dimensional variants of the python-pandas labeled data structures,
|
|
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-%{ghversion}
|
|
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))"
|
|
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 or TestZarrWriteEmpty"
|
|
donttest="$donttest or test_repr_multiindex or test_array_repr_dtypes_unix"
|
|
fi
|
|
# h5py was built without ROS3 support, can't use ros3 driver
|
|
donttest="$donttest or TestH5NetCDFDataRos3Driver"
|
|
# 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
|