Compare commits
70 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f10e4da66 | ||
|
|
751e38064f | ||
|
|
196ebc08ba | ||
|
|
f7571ba9d3 | ||
|
|
b402b2518a | ||
|
|
185ae2fc83 | ||
|
|
6f9b465990 | ||
|
|
8df0d82123 | ||
|
|
d121e78a08 | ||
|
|
6e553d61be | ||
|
|
ffa3ac90cb | ||
|
|
68a87599ce | ||
|
|
c40c2b8108 | ||
|
|
7aca2e8d68 | ||
|
|
b4a8abb2fc | ||
|
|
4a8ca0c05d | ||
|
|
28752f8893 | ||
|
|
f24a6d1c9b | ||
|
|
362dcc1ead | ||
|
|
0d92610f0c | ||
|
|
e61d64d3e4 | ||
|
|
e75d5c9d07 | ||
|
|
3bebaa049c | ||
|
|
ad60aec436 | ||
|
|
dd372c6ddb | ||
|
|
f0dca5ea32 | ||
|
|
8294269fad | ||
|
|
ea961bf619 | ||
|
|
099f6f89e8 | ||
|
|
72b1741aac | ||
|
|
1106cd741b | ||
|
|
2fd902e2ef | ||
|
|
7be656d7e6 | ||
|
|
10e862c9fd | ||
|
|
48efc18b8d | ||
|
|
d99c648e41 | ||
|
|
0d1637a5c2 | ||
|
|
3415293533 | ||
|
|
ceb9cc2296 | ||
|
|
9ed2fe88a3 | ||
|
|
9fb0fe6531 | ||
|
|
083a1048eb | ||
|
|
00fc971647 | ||
|
|
209398495a | ||
|
|
7b07a86ee0 | ||
|
|
679ba1684e | ||
|
|
f252ef5e5b | ||
|
|
e4e358fa82 | ||
|
|
4a68bbd5b8 | ||
|
|
5548983db1 | ||
|
|
c27bff9578 | ||
|
|
92642a4ace | ||
|
|
a0d4600a4a | ||
|
|
924dddb55e | ||
|
|
facfa49251 | ||
|
|
0dd10a097c | ||
|
|
01acc30df2 | ||
|
|
64c9d5b495 | ||
|
|
92222176fe | ||
|
|
e8852ff34b | ||
|
|
9ac9523bf9 | ||
|
|
b7026ce966 | ||
|
|
e45e16ba78 | ||
|
|
7a3c73e1fd | ||
|
|
11f4833e22 | ||
|
|
9fd78590b1 | ||
|
|
77b148455a | ||
|
|
618c5a443a | ||
|
|
e818d8f2bb | ||
|
|
6e3bbdab77 |
31
.gitignore
vendored
31
.gitignore
vendored
@@ -2,3 +2,34 @@
|
||||
/xarray-data-870b5d7a9dbfa821423f1b88056890c22341f085.tar.gz
|
||||
/RGB.byte.tif
|
||||
/xarray-0.12.3.tar.gz
|
||||
/xarray-0.15.0.tar.gz
|
||||
/xarray-0.15.1.tar.gz
|
||||
/xarray-0.16.0.tar.gz
|
||||
/xarray-data-5fdb22b5613ba8176b9f6fa67be783d7810643eb.tar.gz
|
||||
/xarray-0.16.1.tar.gz
|
||||
/xarray-0.16.2.tar.gz
|
||||
/xarray-0.17.0.tar.gz
|
||||
/xarray-0.18.2.tar.gz
|
||||
/xarray-0.19.0.tar.gz
|
||||
/xarray-0.20.1.tar.gz
|
||||
/xarray-0.20.2.tar.gz
|
||||
/xarray-0.21.0.tar.gz
|
||||
/xarray-0.21.1.tar.gz
|
||||
/xarray-2022.3.0.tar.gz
|
||||
/xarray-data-dbd07bb91a7112db0fd2f912c146999f9d436b0e.tar.gz
|
||||
/xarray-2022.6.0.tar.gz
|
||||
/xarray-data-86974d54ce83a130303fe8caa629e60deb3cb6e5.tar.gz
|
||||
/xarray-2023.1.0.tar.gz
|
||||
/xarray-2023.4.2.tar.gz
|
||||
/xarray-data-7d8290e0be9d2a8f4b4381641f20a97db6eaea3d.tar.gz
|
||||
/xarray-2023.7.0.tar.gz
|
||||
/xarray-2023.8.0.tar.gz
|
||||
/xarray-2023.9.0.tar.gz
|
||||
/xarray-2024.6.0.tar.gz
|
||||
/xarray-2024.7.0.tar.gz
|
||||
/xarray-2024.10.0.tar.gz
|
||||
/xarray-2025.1.1.tar.gz
|
||||
/xarray-2025.4.0.tar.gz
|
||||
/xarray-2025.9.0.tar.gz
|
||||
/xarray-2025.11.0.tar.gz
|
||||
/xarray-2025.12.0.tar.gz
|
||||
|
||||
18
.packit.yaml
Normal file
18
.packit.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
# See the documentation for more information:
|
||||
# https://packit.dev/docs/configuration/
|
||||
---
|
||||
jobs:
|
||||
- job: pull_from_upstream
|
||||
trigger: release
|
||||
dist_git_branches:
|
||||
rawhide:
|
||||
fast_forward_merge_into:
|
||||
- fedora-branched
|
||||
- job: koji_build
|
||||
trigger: commit
|
||||
dist_git_branches:
|
||||
- fedora-all
|
||||
- job: bodhi_update
|
||||
trigger: commit
|
||||
dist_git_branches:
|
||||
- fedora-all
|
||||
@@ -1,40 +0,0 @@
|
||||
From 63fc5acba81601e473ead5c4e82de78b5ae61ad0 Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Fri, 15 Mar 2019 22:31:18 -0400
|
||||
Subject: [PATCH 1/6] DOC: Don't download RGB.byte.tif during build.
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
doc/gallery/plot_rasterio.py | 2 +-
|
||||
doc/gallery/plot_rasterio_rgb.py | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/doc/gallery/plot_rasterio.py b/doc/gallery/plot_rasterio.py
|
||||
index 82d5ce61..24502f10 100644
|
||||
--- a/doc/gallery/plot_rasterio.py
|
||||
+++ b/doc/gallery/plot_rasterio.py
|
||||
@@ -24,7 +24,7 @@ from rasterio.warp import transform
|
||||
import xarray as xr
|
||||
|
||||
# Read the data
|
||||
-url = 'https://github.com/mapbox/rasterio/raw/master/tests/data/RGB.byte.tif'
|
||||
+url = 'RGB.byte.tif'
|
||||
da = xr.open_rasterio(url)
|
||||
|
||||
# Compute the lon/lat coordinates with rasterio.warp.transform
|
||||
diff --git a/doc/gallery/plot_rasterio_rgb.py b/doc/gallery/plot_rasterio_rgb.py
|
||||
index 23a56d5a..468e2bab 100644
|
||||
--- a/doc/gallery/plot_rasterio_rgb.py
|
||||
+++ b/doc/gallery/plot_rasterio_rgb.py
|
||||
@@ -19,7 +19,7 @@ import matplotlib.pyplot as plt
|
||||
import xarray as xr
|
||||
|
||||
# Read the data
|
||||
-url = 'https://github.com/mapbox/rasterio/raw/master/tests/data/RGB.byte.tif'
|
||||
+url = 'RGB.byte.tif'
|
||||
da = xr.open_rasterio(url)
|
||||
|
||||
# The data is in UTM projection. We have to set it manually until
|
||||
--
|
||||
2.21.0
|
||||
|
||||
42
0001-Drop-pydap-from-dependencies.patch
Normal file
42
0001-Drop-pydap-from-dependencies.patch
Normal file
@@ -0,0 +1,42 @@
|
||||
From 260fec7f2a203093cb6626d464e30fab3ec70de7 Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Mon, 15 Sep 2025 05:49:16 -0400
|
||||
Subject: [PATCH 1/2] Drop pydap from dependencies
|
||||
|
||||
We didn't have it since it wasn't available in Python 3.10+, and it's
|
||||
not yet pcakaged.
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
pyproject.toml | 1 -
|
||||
xarray/tests/test_backends.py | 2 +-
|
||||
2 files changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/pyproject.toml b/pyproject.toml
|
||||
index 52897064..23d0b8ee 100644
|
||||
--- a/pyproject.toml
|
||||
+++ b/pyproject.toml
|
||||
@@ -38,7 +38,6 @@ complete = ["xarray[accel,etc,io,parallel,viz]"]
|
||||
io = [
|
||||
"netCDF4>=1.6.0",
|
||||
"h5netcdf",
|
||||
- "pydap",
|
||||
"scipy>=1.13",
|
||||
"zarr>=2.18",
|
||||
"fsspec",
|
||||
diff --git a/xarray/tests/test_backends.py b/xarray/tests/test_backends.py
|
||||
index 5aab1531..89461b0a 100644
|
||||
--- a/xarray/tests/test_backends.py
|
||||
+++ b/xarray/tests/test_backends.py
|
||||
@@ -7457,7 +7457,7 @@ def test_remote_url_backend_auto_detection() -> None:
|
||||
"https://disc2.gesdisc.eosdis.nasa.gov/dods/TRMM_3B42", # GrADS /dods/
|
||||
]
|
||||
|
||||
- for url in dap_urls:
|
||||
+ for url in dap_urls[:0]:
|
||||
engine = guess_engine(url)
|
||||
assert engine == expected_dap_backend, (
|
||||
f"URL {url!r} should select {expected_dap_backend!r} but got {engine!r}"
|
||||
--
|
||||
2.52.0
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
From 90f116ffbf6eb403d4ddd44e6b9bafddced99419 Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Fri, 15 Mar 2019 22:48:25 -0400
|
||||
Subject: [PATCH 2/6] DOC: Skip examples using unpackaged dependencies.
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
doc/io.rst | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/doc/io.rst b/doc/io.rst
|
||||
index 85cb73a0..60990627 100644
|
||||
--- a/doc/io.rst
|
||||
+++ b/doc/io.rst
|
||||
@@ -373,6 +373,7 @@ installed xarray can convert a ``DataArray`` into a ``Cube`` using
|
||||
:py:meth:`~xarray.DataArray.to_iris`:
|
||||
|
||||
.. ipython:: python
|
||||
+ :verbatim:
|
||||
|
||||
da = xr.DataArray(np.random.rand(4, 5), dims=['x', 'y'],
|
||||
coords=dict(x=[10, 20, 30, 40],
|
||||
@@ -385,6 +386,7 @@ Conversely, we can create a new ``DataArray`` object from a ``Cube`` using
|
||||
:py:meth:`~xarray.DataArray.from_iris`:
|
||||
|
||||
.. ipython:: python
|
||||
+ :verbatim:
|
||||
|
||||
da_cube = xr.DataArray.from_iris(cube)
|
||||
da_cube
|
||||
--
|
||||
2.21.0
|
||||
|
||||
117
0002-Ensure-netcdf4-is-locked-while-closing.patch
Normal file
117
0002-Ensure-netcdf4-is-locked-while-closing.patch
Normal file
@@ -0,0 +1,117 @@
|
||||
From 5e5ef99ce6cae2179a2cc89b551b187fb97f35fe Mon Sep 17 00:00:00 2001
|
||||
From: David Bold <davidsch@fedoraproject.org>
|
||||
Date: Tue, 25 Nov 2025 19:58:05 -0500
|
||||
Subject: [PATCH 2/2] Ensure netcdf4 is locked while closing
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
xarray/backends/file_manager.py | 20 +++++++++++++++-----
|
||||
xarray/backends/locks.py | 3 +++
|
||||
xarray/backends/netCDF4_.py | 8 +++-----
|
||||
3 files changed, 21 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/xarray/backends/file_manager.py b/xarray/backends/file_manager.py
|
||||
index f7cd4675..cf85eaf3 100644
|
||||
--- a/xarray/backends/file_manager.py
|
||||
+++ b/xarray/backends/file_manager.py
|
||||
@@ -8,7 +8,7 @@ from collections.abc import Callable, Hashable, Iterator, Mapping, MutableMappin
|
||||
from contextlib import AbstractContextManager, contextmanager
|
||||
from typing import Any, Generic, Literal, TypeVar, cast
|
||||
|
||||
-from xarray.backends.locks import acquire
|
||||
+from xarray.backends.locks import NETCDF4_PYTHON_LOCK, acquire
|
||||
from xarray.backends.lru_cache import LRUCache
|
||||
from xarray.core import utils
|
||||
from xarray.core.options import OPTIONS
|
||||
@@ -89,7 +89,7 @@ class CachingFileManager(FileManager[T_File]):
|
||||
*args: Any,
|
||||
mode: Any = _OMIT_MODE,
|
||||
kwargs: Mapping[str, Any] | None = None,
|
||||
- lock: Lock | None | Literal[False] = None,
|
||||
+ lock: Lock | Literal[False] | None = None,
|
||||
cache: MutableMapping[Any, T_File] | None = None,
|
||||
manager_id: Hashable | None = None,
|
||||
ref_counts: dict[Any, int] | None = None,
|
||||
@@ -448,9 +448,16 @@ def _remove_del_methods():
|
||||
class DummyFileManager(FileManager[T_File]):
|
||||
"""FileManager that simply wraps an open file in the FileManager interface."""
|
||||
|
||||
- def __init__(self, value: T_File, *, close: Callable[[], None] | None = None):
|
||||
+ def __init__(
|
||||
+ self,
|
||||
+ value: T_File,
|
||||
+ *,
|
||||
+ close: Callable[[], None] | None = None,
|
||||
+ lock: Lock | Literal[False] | None = None,
|
||||
+ ):
|
||||
if close is None:
|
||||
close = value.close
|
||||
+ self._lock = lock
|
||||
self._value = value
|
||||
self._close = close
|
||||
|
||||
@@ -464,5 +471,8 @@ class DummyFileManager(FileManager[T_File]):
|
||||
yield self._value
|
||||
|
||||
def close(self, needs_lock: bool = True) -> None:
|
||||
- del needs_lock # unused
|
||||
- self._close()
|
||||
+ if needs_lock and self._lock:
|
||||
+ with self._lock:
|
||||
+ self._close()
|
||||
+ else:
|
||||
+ self._close()
|
||||
diff --git a/xarray/backends/locks.py b/xarray/backends/locks.py
|
||||
index 78444354..e2db5e93 100644
|
||||
--- a/xarray/backends/locks.py
|
||||
+++ b/xarray/backends/locks.py
|
||||
@@ -281,3 +281,6 @@ def ensure_lock(lock: Lock | None | Literal[False]) -> Lock:
|
||||
if lock is None or lock is False:
|
||||
return DummyLock()
|
||||
return lock
|
||||
+
|
||||
+
|
||||
+NETCDF4_PYTHON_LOCK = combine_locks([NETCDFC_LOCK, HDF5_LOCK])
|
||||
diff --git a/xarray/backends/netCDF4_.py b/xarray/backends/netCDF4_.py
|
||||
index bb511f9b..5d5d4e74 100644
|
||||
--- a/xarray/backends/netCDF4_.py
|
||||
+++ b/xarray/backends/netCDF4_.py
|
||||
@@ -30,7 +30,7 @@ from xarray.backends.file_manager import (
|
||||
PickleableFileManager,
|
||||
)
|
||||
from xarray.backends.locks import (
|
||||
- HDF5_LOCK,
|
||||
+ NETCDF4_PYTHON_LOCK,
|
||||
NETCDFC_LOCK,
|
||||
combine_locks,
|
||||
ensure_lock,
|
||||
@@ -67,8 +67,6 @@ if TYPE_CHECKING:
|
||||
# string used by netCDF4.
|
||||
_endian_lookup = {"=": "native", ">": "big", "<": "little", "|": "native"}
|
||||
|
||||
-NETCDF4_PYTHON_LOCK = combine_locks([NETCDFC_LOCK, HDF5_LOCK])
|
||||
-
|
||||
|
||||
class BaseNetCDF4Array(BackendArray):
|
||||
__slots__ = ("datastore", "dtype", "shape", "variable_name")
|
||||
@@ -421,7 +419,7 @@ class NetCDF4DataStore(WritableCFDataStore):
|
||||
"argument is provided"
|
||||
)
|
||||
root = manager
|
||||
- manager = DummyFileManager(root)
|
||||
+ manager = DummyFileManager(root, lock=NETCDF4_PYTHON_LOCK)
|
||||
|
||||
self._manager = manager
|
||||
self._group = group
|
||||
@@ -520,7 +518,7 @@ class NetCDF4DataStore(WritableCFDataStore):
|
||||
)
|
||||
else:
|
||||
manager = CachingFileManager(
|
||||
- netCDF4.Dataset, filename, mode=mode, kwargs=kwargs
|
||||
+ netCDF4.Dataset, filename, lock=lock, mode=mode, kwargs=kwargs
|
||||
)
|
||||
return cls(manager, group=group, mode=mode, lock=lock, autoclose=autoclose)
|
||||
|
||||
--
|
||||
2.52.0
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
From 2b193b193b422b322a5f5e6475ce72d9a453fb9f Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Sat, 16 Mar 2019 02:42:37 -0400
|
||||
Subject: [PATCH 3/6] TST: Reduce required pytest-runner version.
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
setup.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index f24392db..af5190f3 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -25,7 +25,7 @@ CLASSIFIERS = [
|
||||
PYTHON_REQUIRES = '>=3.5'
|
||||
INSTALL_REQUIRES = ['numpy >= 1.12', 'pandas >= 0.19.2']
|
||||
needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv)
|
||||
-SETUP_REQUIRES = ['pytest-runner >= 4.2'] if needs_pytest else []
|
||||
+SETUP_REQUIRES = ['pytest-runner >= 4.0'] if needs_pytest else []
|
||||
TESTS_REQUIRE = ['pytest >= 2.7.1']
|
||||
|
||||
DESCRIPTION = "N-D labeled arrays and datasets in Python"
|
||||
--
|
||||
2.21.0
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
From 46ca88294c55170c442417f7341571079f1bc2a9 Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Sat, 16 Mar 2019 02:59:15 -0400
|
||||
Subject: [PATCH 4/6] DOC: Don't print out conda/pip environment.
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
doc/conf.py | 7 -------
|
||||
1 file changed, 7 deletions(-)
|
||||
|
||||
diff --git a/doc/conf.py b/doc/conf.py
|
||||
index 23766946..33bfcf9d 100644
|
||||
--- a/doc/conf.py
|
||||
+++ b/doc/conf.py
|
||||
@@ -26,13 +26,6 @@ allowed_failures = set()
|
||||
print("python exec:", sys.executable)
|
||||
print("sys.path:", sys.path)
|
||||
|
||||
-if 'conda' in sys.executable:
|
||||
- print('conda environment:')
|
||||
- subprocess.run(['conda', 'list'])
|
||||
-else:
|
||||
- print('pip environment:')
|
||||
- subprocess.run(['pip', 'list'])
|
||||
-
|
||||
print("xarray: %s, %s" % (xarray.__version__, xarray.__file__))
|
||||
|
||||
with suppress(ImportError):
|
||||
--
|
||||
2.21.0
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
From 386cd9833b20bbb566501482ceffd89b962ee975 Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Sat, 31 Aug 2019 04:17:40 -0400
|
||||
Subject: [PATCH 5/6] Don't set box-forced in Cartopy example.
|
||||
|
||||
It is deprecated in Matplotlib 2.2, removed in 3.1, and appears to have
|
||||
no effect on the result.
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
doc/gallery/plot_cartopy_facetgrid.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/doc/gallery/plot_cartopy_facetgrid.py b/doc/gallery/plot_cartopy_facetgrid.py
|
||||
index 3eded115..294529d1 100644
|
||||
--- a/doc/gallery/plot_cartopy_facetgrid.py
|
||||
+++ b/doc/gallery/plot_cartopy_facetgrid.py
|
||||
@@ -39,6 +39,6 @@ for ax in p.axes.flat:
|
||||
ax.set_extent([-160, -30, 5, 75])
|
||||
# Without this aspect attributes the maps will look chaotic and the
|
||||
# "extent" attribute above will be ignored
|
||||
- ax.set_aspect('equal', 'box-forced')
|
||||
+ ax.set_aspect('equal')
|
||||
|
||||
plt.show()
|
||||
--
|
||||
2.21.0
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
From f20d0d12197e20f0baa258347e8efdf9811f9fa1 Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Sat, 31 Aug 2019 04:24:59 -0400
|
||||
Subject: [PATCH 6/6] Use drawstyle instead of linestyle in plot.step.
|
||||
|
||||
Mixing the two is deprecated in Matplotlib 3.1, and breaks the doc build
|
||||
if warnings are set to errors (which they are in new IPython sphinx
|
||||
extensions.)
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
xarray/plot/plot.py | 26 +++++++++++++-------------
|
||||
1 file changed, 13 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/xarray/plot/plot.py b/xarray/plot/plot.py
|
||||
index 9d0bf671..55fa033b 100644
|
||||
--- a/xarray/plot/plot.py
|
||||
+++ b/xarray/plot/plot.py
|
||||
@@ -252,16 +252,16 @@ def line(darray, *args, row=None, col=None, figsize=None, aspect=None,
|
||||
# Remove pd.Intervals if contained in xplt.values.
|
||||
if _valid_other_type(xplt.values, [pd.Interval]):
|
||||
# Is it a step plot? (see matplotlib.Axes.step)
|
||||
- if kwargs.get('linestyle', '').startswith('steps-'):
|
||||
+ if kwargs.get('drawstyle', '').startswith('steps-'):
|
||||
xplt_val, yplt_val = _interval_to_double_bound_points(xplt.values,
|
||||
yplt.values)
|
||||
# Remove steps-* to be sure that matplotlib is not confused
|
||||
- kwargs['linestyle'] = (kwargs['linestyle']
|
||||
+ kwargs['drawstyle'] = (kwargs['drawstyle']
|
||||
.replace('steps-pre', '')
|
||||
.replace('steps-post', '')
|
||||
.replace('steps-mid', ''))
|
||||
- if kwargs['linestyle'] == '':
|
||||
- del kwargs['linestyle']
|
||||
+ if kwargs['drawstyle'] == '':
|
||||
+ del kwargs['drawstyle']
|
||||
else:
|
||||
xplt_val = _interval_to_mid_points(xplt.values)
|
||||
yplt_val = yplt.values
|
||||
@@ -303,7 +303,7 @@ def line(darray, *args, row=None, col=None, figsize=None, aspect=None,
|
||||
return primitive
|
||||
|
||||
|
||||
-def step(darray, *args, where='pre', linestyle=None, ls=None, **kwargs):
|
||||
+def step(darray, *args, where='pre', drawstyle=None, ds=None, **kwargs):
|
||||
"""
|
||||
Step plot of DataArray index against values
|
||||
|
||||
@@ -332,16 +332,16 @@ def step(darray, *args, where='pre', linestyle=None, ls=None, **kwargs):
|
||||
raise ValueError("'where' argument to step must be "
|
||||
"'pre', 'post' or 'mid'")
|
||||
|
||||
- if ls is not None:
|
||||
- if linestyle is None:
|
||||
- linestyle = ls
|
||||
+ if ds is not None:
|
||||
+ if drawstyle is None:
|
||||
+ drawstyle = ds
|
||||
else:
|
||||
- raise TypeError('ls and linestyle are mutually exclusive')
|
||||
- if linestyle is None:
|
||||
- linestyle = ''
|
||||
- linestyle = 'steps-' + where + linestyle
|
||||
+ raise TypeError('ds and drawstyle are mutually exclusive')
|
||||
+ if drawstyle is None:
|
||||
+ drawstyle = ''
|
||||
+ drawstyle = 'steps-' + where + drawstyle
|
||||
|
||||
- return line(darray, *args, linestyle=linestyle, **kwargs)
|
||||
+ return line(darray, *args, drawstyle=drawstyle, **kwargs)
|
||||
|
||||
|
||||
def hist(darray, figsize=None, size=None, aspect=None, ax=None,
|
||||
--
|
||||
2.21.0
|
||||
|
||||
3
README.packit
Normal file
3
README.packit
Normal file
@@ -0,0 +1,3 @@
|
||||
This repository is maintained by packit.
|
||||
https://packit.dev/
|
||||
The file was generated using packit 1.12.0.post1.dev20+g7d30dac21.
|
||||
66
changelog
Normal file
66
changelog
Normal file
@@ -0,0 +1,66 @@
|
||||
* Tue Jul 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.18.2-3
|
||||
- Second attempt - Rebuilt for
|
||||
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Sun Jul 04 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.18.2-2
|
||||
- Backport fixes to tests
|
||||
|
||||
* Thu Jun 17 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.18.2-1
|
||||
- Update to latest version (#1957925)
|
||||
- Skip failing tests (#1969172)
|
||||
|
||||
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.17.0-2
|
||||
- Rebuilt for Python 3.10
|
||||
|
||||
* Sat Mar 13 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.17.0-1
|
||||
- Update to latest version (#1933230)
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Sat Dec 12 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.16.2-1
|
||||
- Update to latest version (#1902888)
|
||||
|
||||
* Sat Sep 26 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.16.1-1
|
||||
- Update to latest version (#1880864)
|
||||
|
||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Sun Jul 12 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.16.0-1
|
||||
- Update to latest version
|
||||
|
||||
* Tue Jun 23 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.15.1-3
|
||||
- Backport patch to fix tests catching too many warnings
|
||||
|
||||
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.15.1-3
|
||||
- Rebuilt for Python 3.9
|
||||
|
||||
* Sat Apr 18 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.15.1-2
|
||||
- Fix broken install with missing files
|
||||
- Test against installed version to catch above issue
|
||||
- Add more test dependencies
|
||||
|
||||
* Wed Mar 25 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.15.1-1
|
||||
- Update to latest version
|
||||
|
||||
* Fri Mar 06 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.15.0-2
|
||||
- Backport fix for seaborn 0.10.0
|
||||
|
||||
* Sat Feb 08 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.15.0-1
|
||||
- Update to latest version
|
||||
|
||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.3-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.12.3-3
|
||||
- Rebuilt for Python 3.8
|
||||
|
||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Sun Jul 21 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.12.3-1
|
||||
- Update to latest version
|
||||
|
||||
* Sat Mar 16 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.12.0-1
|
||||
- Initial package.
|
||||
@@ -1,39 +1,32 @@
|
||||
%global srcname xarray
|
||||
%global data_commit 870b5d7a9dbfa821423f1b88056890c22341f085
|
||||
|
||||
Name: python-%{srcname}
|
||||
Version: 0.12.3
|
||||
Release: 3%{?dist}
|
||||
Version: 2025.12.0
|
||||
Release: %autorelease
|
||||
Summary: N-D labeled arrays and datasets in Python
|
||||
|
||||
License: ASL 2.0
|
||||
License: Apache-2.0
|
||||
URL: https://github.com/pydata/xarray
|
||||
Source0: %pypi_source
|
||||
# Data for examples only.
|
||||
Source1: https://github.com/pydata/xarray-data/archive/%{data_commit}/xarray-data-%{data_commit}.tar.gz
|
||||
Source2: https://github.com/mapbox/rasterio/raw/1.0.21/tests/data/RGB.byte.tif
|
||||
# All Fedora specific.
|
||||
Patch0001: 0001-DOC-Don-t-download-RGB.byte.tif-during-build.patch
|
||||
Patch0002: 0002-DOC-Skip-examples-using-unpackaged-dependencies.patch
|
||||
Patch0003: 0003-TST-Reduce-required-pytest-runner-version.patch
|
||||
Patch0004: 0004-DOC-Don-t-print-out-conda-pip-environment.patch
|
||||
# https://github.com/pydata/xarray/pull/3273
|
||||
Patch0005: 0005-Don-t-set-box-forced-in-Cartopy-example.patch
|
||||
# https://github.com/pydata/xarray/pull/3274
|
||||
Patch0006: 0006-Use-drawstyle-instead-of-linestyle-in-plot.step.patch
|
||||
Source: %pypi_source %{srcname}
|
||||
# Fedora specific.
|
||||
Patch: 0001-Drop-pydap-from-dependencies.patch
|
||||
# RHBZ#2395128
|
||||
# https://github.com/pydata/xarray/pull/10788
|
||||
Patch: 0002-Ensure-netcdf4-is-locked-while-closing.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-dask+array
|
||||
BuildRequires: python3-dask+dataframe
|
||||
BuildRequires: python3dist(numpy) >= 1.12
|
||||
BuildRequires: python3dist(pandas) >= 0.19.2
|
||||
BuildRequires: python3dist(bottleneck)
|
||||
BuildRequires: python3dist(dask[array]) >= 2023.11
|
||||
BuildRequires: python3dist(dask[dataframe]) >= 2023.11
|
||||
BuildRequires: python3dist(pint) >= 0.22
|
||||
BuildRequires: python3dist(pytest) >= 2.7.1
|
||||
BuildRequires: python3dist(pytest-runner)
|
||||
BuildRequires: python3dist(pytest-asyncio)
|
||||
BuildRequires: python3dist(pytest-xdist)
|
||||
BuildRequires: python3dist(seaborn)
|
||||
BuildRequires: python3dist(setuptools)
|
||||
BuildRequires: python3dist(pytest-timeout)
|
||||
BuildRequires: python3dist(rasterio) >= 1.3
|
||||
BuildRequires: python3dist(seaborn) >= 0.13
|
||||
|
||||
%global _description %{expand: \
|
||||
Xarray (formerly xray) is an open source project and Python package that
|
||||
@@ -48,89 +41,47 @@ for advanced analytics and visualization with these data structures.
|
||||
|
||||
Xarray was inspired by and borrows heavily from pandas, the popular data
|
||||
analysis package focused on labelled tabular data. It is particularly
|
||||
tailored to working with netCDF files, which were the source of xarray's
|
||||
tailored to working with netCDF files, which were the source of xarray’s
|
||||
data model, and integrates tightly with dask for parallel computing.}
|
||||
|
||||
%description %{_description}
|
||||
|
||||
|
||||
%package -n python3-%{srcname}
|
||||
Summary: %{summary}
|
||||
%{?python_provide:%python_provide python3-%{srcname}}
|
||||
|
||||
%description -n python3-%{srcname} %{_description}
|
||||
|
||||
|
||||
%package -n python-%{srcname}-doc
|
||||
Summary: xarray documentation
|
||||
|
||||
BuildRequires: python3dist(cartopy)
|
||||
BuildRequires: natural-earth-map-data-110m
|
||||
BuildRequires: natural-earth-map-data-10m
|
||||
BuildRequires: python3-ipython-sphinx
|
||||
BuildRequires: python3dist(matplotlib)
|
||||
BuildRequires: python3dist(netcdf4)
|
||||
BuildRequires: python3dist(numpydoc)
|
||||
BuildRequires: python3dist(rasterio)
|
||||
BuildRequires: python3dist(sphinx)
|
||||
BuildRequires: python3dist(sphinx-gallery)
|
||||
BuildRequires: python3dist(sphinx-rtd-theme)
|
||||
BuildRequires: python3dist(zarr)
|
||||
|
||||
%description -n python-%{srcname}-doc
|
||||
Documentation for xarray
|
||||
|
||||
%pyproject_extras_subpkg -n python3-%{srcname} io
|
||||
|
||||
%prep
|
||||
%autosetup -n %{srcname}-%{version} -p1
|
||||
|
||||
# Provide example datasets for building docs.
|
||||
tar xf %SOURCE1 --transform='s~^\(%{srcname}-data-%{data_commit}/\)~\1.xarray_tutorial_data/~'
|
||||
cp -p %SOURCE2 ./doc/gallery/
|
||||
|
||||
# Remove bundled egg-info
|
||||
rm -rf %{srcname}.egg-info
|
||||
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires -x io
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
|
||||
# generate html docs
|
||||
pushd doc
|
||||
PYTHONPATH=${PWD}/.. HOME=${PWD}/../%{srcname}-data-%{data_commit} make html
|
||||
# remove the sphinx-build leftovers
|
||||
rm -rf _build/html/.{doctrees,buildinfo}
|
||||
popd
|
||||
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%py3_install
|
||||
|
||||
%pyproject_install
|
||||
%pyproject_save_files -l %{srcname}
|
||||
|
||||
%check
|
||||
%{__python3} setup.py test --addopts='-ra -n auto -m "not network"'
|
||||
rm -rf xarray
|
||||
|
||||
echo >> pytest.ini # Ignore any command-line arguments from upstream.
|
||||
|
||||
%files -n python3-%{srcname}
|
||||
%license LICENSE licenses/DASK_LICENSE licenses/NUMPY_LICENSE licenses/PANDAS_LICENSE licenses/PYTHON_LICENSE licenses/SEABORN_LICENSE
|
||||
%doc README.rst
|
||||
%{python3_sitelib}/%{srcname}
|
||||
%{python3_sitelib}/%{srcname}-%{version}-py?.?.egg-info
|
||||
pytest_args=(
|
||||
-n auto
|
||||
-m "not network"
|
||||
# this test somehow crashes python interpreter entirely, was xfail upstream till recently
|
||||
-k 'not test_save_mfdataset_compute_false_roundtrip'
|
||||
)
|
||||
|
||||
%files -n python-%{srcname}-doc
|
||||
%doc doc/_build/html
|
||||
%license LICENSE licenses/DASK_LICENSE licenses/NUMPY_LICENSE licenses/PANDAS_LICENSE licenses/PYTHON_LICENSE licenses/SEABORN_LICENSE
|
||||
%{pytest} -ra "${pytest_args[@]}" --pyargs xarray --timeout 300 --full-trace
|
||||
|
||||
%files -n python3-%{srcname} -f %{pyproject_files}
|
||||
%license licenses/*
|
||||
%doc README.md
|
||||
|
||||
%changelog
|
||||
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.12.3-3
|
||||
- Rebuilt for Python 3.8
|
||||
|
||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Sun Jul 21 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.12.3-1
|
||||
- Update to latest version
|
||||
|
||||
* Sat Mar 16 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.12.0-1
|
||||
- Initial package.
|
||||
%autochangelog
|
||||
|
||||
4
sources
4
sources
@@ -1,3 +1 @@
|
||||
SHA512 (xarray-0.12.3.tar.gz) = bac585362920f22b128ea75d5434ff1e9494cc4b8bafbb11533e80f3e09fe18e580e3e0dd9696bd906ac552ce5eb134e92019f6d2a7b1af0d38d27ac6589a846
|
||||
SHA512 (xarray-data-870b5d7a9dbfa821423f1b88056890c22341f085.tar.gz) = 27de6e274d18d266d6d8a1f0c8f65396fff16d177cf6df41cfd4bcf839e6d083512c4f4dbc1163ab7380a8905acecfe15b7978e23b9c360bad2dd879addb421c
|
||||
SHA512 (RGB.byte.tif) = 34aa1b196f6c5880530d42ec8a25193bc79db803a8427adc9b115373d222b9f4318a04f06c8b37118df7e09d96b9c470ecec543c604af18861f11b786ed6fbfd
|
||||
SHA512 (xarray-2025.12.0.tar.gz) = 7bbdf756d24a91c4a11c5d38d10dfe520e2cb80ba2beecdbf534fae76c6c6148232f2f072d068daab60146d46c89e12800276ebc1bc4d5228b16dde8f80d9793
|
||||
|
||||
Reference in New Issue
Block a user