- Update to 2025.12.0
* This release rolls back the default engine for HTTP urls, adds
support for DataTree objects in combine_nested and contains
numerous bug fixes.
- Release 2025.11.0
* This release changes the default for keep_attrs such that
attributes are preserved by default, adds support for DataTree
in top-level functions, and contains several memory and
performance improvements as well as a number of bug fixes.
- Release 2025.10.0 and 2025.10.1
* These releases revert a breaking change to Xarray's preferred
netCDF backend.
- Release 2025.09.1
* This release contains improvements to netCDF IO and the
DataTree.from_dict() constructor, as well as a variety of bug
fixes. In particular, the default netCDF backend has switched
from netCDF4 to h5netcdf, which is typically faster.
- Release 2025.09.0
* This release brings a number of small improvements and fixes,
especially related to writing DataTree objects and netCDF files
to disk.
## New Features
* Support rechunking by SeasonResampler for seasonal data
analysis (GH10425, PR10519). By Dhruva Kumar Kaushal.
* Add convenience methods to Coordinates (PR10318) By Justus
Magin.
* Added load_datatree() for loading DataTree objects into memory
from disk. It has the same relationship to open_datatree(), as
load_dataset() has to open_dataset(). By Stephan Hoyer.
* compute=False is now supported by DataTree.to_netcdf() and
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-xarray?expand=0&rev=114
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
||||
3
_multibuild
Normal file
3
_multibuild
Normal file
@@ -0,0 +1,3 @@
|
||||
<multibuild>
|
||||
<package>test</package>
|
||||
</multibuild>
|
||||
19
local_dataset.patch
Normal file
19
local_dataset.patch
Normal file
@@ -0,0 +1,19 @@
|
||||
Index: xarray-2025.03.0/xarray/tutorial.py
|
||||
===================================================================
|
||||
--- xarray-2025.03.0.orig/xarray/tutorial.py
|
||||
+++ xarray-2025.03.0/xarray/tutorial.py
|
||||
@@ -164,9 +164,11 @@ def open_dataset(
|
||||
downloader = pooch.HTTPDownloader(headers=headers)
|
||||
|
||||
# retrieve the file
|
||||
- filepath = pooch.retrieve(
|
||||
- url=url, known_hash=None, path=cache_dir, downloader=downloader
|
||||
- )
|
||||
+ fname = pathlib.Path(cache_dir, path).expanduser()
|
||||
+ if not fname.exists():
|
||||
+ fname = None
|
||||
+ filepath = pooch.retrieve(url=url, fname=fname, known_hash=None, path=cache_dir)
|
||||
+
|
||||
ds = _open_dataset(filepath, engine=engine, **kws)
|
||||
if not cache:
|
||||
ds = ds.load()
|
||||
13
no-mypy-test-plugin.patch
Normal file
13
no-mypy-test-plugin.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
Index: xarray-2025.03.0/pyproject.toml
|
||||
===================================================================
|
||||
--- xarray-2025.03.0.orig/pyproject.toml
|
||||
+++ xarray-2025.03.0/pyproject.toml
|
||||
@@ -296,8 +296,6 @@ ban-relative-imports = "all"
|
||||
addopts = [
|
||||
"--strict-config",
|
||||
"--strict-markers",
|
||||
- "--mypy-only-local-stub",
|
||||
- "--mypy-pyproject-toml-file=pyproject.toml",
|
||||
]
|
||||
|
||||
# We want to forbid warnings from within xarray in our tests — instead we should
|
||||
4149
python-xarray.changes
Normal file
4149
python-xarray.changes
Normal file
File diff suppressed because it is too large
Load Diff
206
python-xarray.spec
Normal file
206
python-xarray.spec
Normal file
@@ -0,0 +1,206 @@
|
||||
#
|
||||
# spec file for package python-xarray
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
#
|
||||
# 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
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-xarray%{psuffix}
|
||||
Version: 2025.12.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%{version}.tar.gz#/xarray-%{version}-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-OPENSUSE: skip dependency on pytest-mypy
|
||||
Patch1: no-mypy-test-plugin.patch
|
||||
BuildRequires: %{python_module base >= 3.11}
|
||||
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.26
|
||||
Requires: python-packaging >= 24.1
|
||||
Requires: python-pandas >= 2.2
|
||||
Obsoletes: python-xray <= 0.7
|
||||
BuildArch: noarch
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module hypothesis}
|
||||
BuildRequires: %{python_module pytest-asyncio}
|
||||
BuildRequires: %{python_module pytest-env}
|
||||
BuildRequires: %{python_module pytest-timeout}
|
||||
BuildRequires: %{python_module pytest-xdist}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module ruff >= 0.8.0}
|
||||
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
|
||||
Summary: The python xarray[accel] extra
|
||||
Requires: python-Bottleneck
|
||||
Requires: python-numba >= 0.62
|
||||
Requires: python-opt-einsum
|
||||
Requires: python-scipy >= 1.13
|
||||
Requires: python-xarray = %{version}
|
||||
# not available yet
|
||||
Recommends: python-flox
|
||||
Recommends: python-numbagg >= 0.8
|
||||
|
||||
%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 --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-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 io
|
||||
Summary: The python xarray[io] extra
|
||||
Requires: python-cftime
|
||||
Requires: python-fsspec
|
||||
Requires: python-h5netcdf
|
||||
Requires: python-netCDF4 >= 1.6
|
||||
Requires: python-pooch
|
||||
Requires: python-scipy >= 1.13
|
||||
Requires: python-xarray = %{version}
|
||||
Requires: python-zarr >= 2.18
|
||||
# Not available yet
|
||||
Recommends: python-pydap
|
||||
|
||||
%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
|
||||
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.8
|
||||
Requires: python-seaborn
|
||||
Requires: python-xarray = %{version}
|
||||
# Not available yet
|
||||
Recommends: python-cartopy >= 0.23
|
||||
Recommends: python-nc-time-axis
|
||||
|
||||
%description viz
|
||||
The [viz] extra for xarray, N-D labeled arrays and datasets in Python
|
||||
|
||||
Except nc-time-axis and cartopy, because they're not packaged yet.
|
||||
Use `pip --user install nc-time-axis cartopy` to install from PyPI, if needed.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n xarray-%{version}
|
||||
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 or test_asi8"
|
||||
donttest="$donttest or (test_datatree and TestRepr and test_doc_example)"
|
||||
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-*.dist-info
|
||||
|
||||
%files %{python_files accel}
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
|
||||
%files %{python_files complete}
|
||||
%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
|
||||
3
xarray-2025.03.0-gh.tar.gz
Normal file
3
xarray-2025.03.0-gh.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d5e3bb7e087feaa86f98f0a6bccb40e29205f2f9d6a8329741c2c843ab0f624c
|
||||
size 3281586
|
||||
3
xarray-2025.12.0-gh.tar.gz
Normal file
3
xarray-2025.12.0-gh.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:17aa3879c0d7c6c57f2f4a85b9c9684a5872bb591d9478405312d83a57d56ecd
|
||||
size 3068745
|
||||
Reference in New Issue
Block a user