Compare commits
43 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b1aece274c | ||
|
|
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 |
20
.gitignore
vendored
20
.gitignore
vendored
@@ -9,3 +9,23 @@
|
||||
/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
|
||||
|
||||
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 d1bff712ac7f0d65d943c77de7008fd192eae919 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/4] 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 99eb1fd1..3d797296 100644
|
||||
--- a/doc/gallery/plot_rasterio.py
|
||||
+++ b/doc/gallery/plot_rasterio.py
|
||||
@@ -23,7 +23,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 758d4cd3..f2a7b2db 100644
|
||||
--- a/doc/gallery/plot_rasterio_rgb.py
|
||||
+++ b/doc/gallery/plot_rasterio_rgb.py
|
||||
@@ -18,7 +18,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.29.2
|
||||
|
||||
34
0001-Fix-test_doc_example-on-big-endian-systems.patch
Normal file
34
0001-Fix-test_doc_example-on-big-endian-systems.patch
Normal file
@@ -0,0 +1,34 @@
|
||||
From f41100ae4202dce5891854143ba3a31f4e2d5a6d Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Tue, 14 Jan 2025 02:46:39 -0500
|
||||
Subject: [PATCH 1/2] Fix test_doc_example on big-endian systems
|
||||
|
||||
... by using a fixed-endian input.
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
xarray/tests/test_datatree.py | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/xarray/tests/test_datatree.py b/xarray/tests/test_datatree.py
|
||||
index 7b295128..21870050 100644
|
||||
--- a/xarray/tests/test_datatree.py
|
||||
+++ b/xarray/tests/test_datatree.py
|
||||
@@ -1240,8 +1240,12 @@ class TestRepr:
|
||||
)
|
||||
def test_doc_example(self) -> None:
|
||||
# regression test for https://github.com/pydata/xarray/issues/9499
|
||||
- time = xr.DataArray(data=["2022-01", "2023-01"], dims="time")
|
||||
- stations = xr.DataArray(data=list("abcdef"), dims="station")
|
||||
+ time = xr.DataArray(
|
||||
+ data=np.array(["2022-01", "2023-01"], dtype="<U7"), dims="time"
|
||||
+ )
|
||||
+ stations = xr.DataArray(
|
||||
+ data=np.array(list("abcdef"), dtype="<U1"), dims="station"
|
||||
+ )
|
||||
lon = [-100, -80, -60]
|
||||
lat = [10, 20, 30]
|
||||
# Set up fake data
|
||||
--
|
||||
2.47.0
|
||||
|
||||
53
0002-Avoid-unsafe-casts-from-float-to-unsigned-int.patch
Normal file
53
0002-Avoid-unsafe-casts-from-float-to-unsigned-int.patch
Normal file
@@ -0,0 +1,53 @@
|
||||
From e84321150e52a19e617efd7f8798d6859bd3c5e7 Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Sun, 19 Jan 2025 04:47:23 -0500
|
||||
Subject: [PATCH 2/2] Avoid unsafe casts from float to unsigned int
|
||||
|
||||
Fixes #9815
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
xarray/coding/variables.py | 5 ++++-
|
||||
xarray/core/duck_array_ops.py | 10 ++++++++++
|
||||
2 files changed, 14 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/xarray/coding/variables.py b/xarray/coding/variables.py
|
||||
index 8154f044..355f3b0b 100644
|
||||
--- a/xarray/coding/variables.py
|
||||
+++ b/xarray/coding/variables.py
|
||||
@@ -426,7 +426,10 @@ class CFMaskCoder(VariableCoder):
|
||||
if fill_value is not None and has_unsigned:
|
||||
pop_to(encoding, attrs, "_Unsigned")
|
||||
# XXX: Is this actually needed? Doesn't the backend handle this?
|
||||
- data = duck_array_ops.astype(duck_array_ops.around(data), dtype)
|
||||
+ signed_dtype = np.dtype(f"i{dtype.itemsize}")
|
||||
+ data = duck_array_ops.view(
|
||||
+ duck_array_ops.astype(duck_array_ops.around(data), signed_dtype), dtype
|
||||
+ )
|
||||
attrs["_FillValue"] = fill_value
|
||||
|
||||
return Variable(dims, data, attrs, encoding, fastpath=True)
|
||||
diff --git a/xarray/core/duck_array_ops.py b/xarray/core/duck_array_ops.py
|
||||
index 7e7333fd..be842b66 100644
|
||||
--- a/xarray/core/duck_array_ops.py
|
||||
+++ b/xarray/core/duck_array_ops.py
|
||||
@@ -236,6 +236,16 @@ def astype(data, dtype, **kwargs):
|
||||
return data.astype(dtype, **kwargs)
|
||||
|
||||
|
||||
+def view(data, *args, **kwargs):
|
||||
+ if hasattr(data, "__array_namespace__"):
|
||||
+ xp = get_array_namespace(data)
|
||||
+ if xp == np:
|
||||
+ # numpy currently doesn't have a view:
|
||||
+ return data.view(*args, **kwargs)
|
||||
+ return xp.view(data, *args, **kwargs)
|
||||
+ return data.view(*args, **kwargs)
|
||||
+
|
||||
+
|
||||
def asarray(data, xp=np, dtype=None):
|
||||
converted = data if is_duck_array(data) else xp.asarray(data)
|
||||
|
||||
--
|
||||
2.47.0
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
From 98140b3ff72134777959896d128e5049c182eaa7 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/4] 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 c2022cc9..fb9cba9c 100644
|
||||
--- a/doc/io.rst
|
||||
+++ b/doc/io.rst
|
||||
@@ -510,6 +510,7 @@ installed, xarray can convert a ``DataArray`` into a ``Cube`` using
|
||||
:py:meth:`DataArray.to_iris`:
|
||||
|
||||
.. ipython:: python
|
||||
+ :verbatim:
|
||||
|
||||
da = xr.DataArray(
|
||||
np.random.rand(4, 5),
|
||||
@@ -524,6 +525,7 @@ Conversely, we can create a new ``DataArray`` object from a ``Cube`` using
|
||||
:py:meth:`DataArray.from_iris`:
|
||||
|
||||
.. ipython:: python
|
||||
+ :verbatim:
|
||||
|
||||
da_cube = xr.DataArray.from_iris(cube)
|
||||
da_cube
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
From 16fd494e4f98eb702838ae980f20c2303241f19c 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 3/4] DOC: Don't print out conda/pip environment.
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
doc/conf.py | 8 --------
|
||||
1 file changed, 8 deletions(-)
|
||||
|
||||
diff --git a/doc/conf.py b/doc/conf.py
|
||||
index db7229cf..b15e8073 100644
|
||||
--- a/doc/conf.py
|
||||
+++ b/doc/conf.py
|
||||
@@ -15,7 +15,6 @@
|
||||
import datetime
|
||||
import os
|
||||
import pathlib
|
||||
-import subprocess
|
||||
import sys
|
||||
from contextlib import suppress
|
||||
|
||||
@@ -29,13 +28,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([sys.executable, "-m", "pip", "list"])
|
||||
-
|
||||
print(f"xarray: {xarray.__version__}, {xarray.__file__}")
|
||||
|
||||
with suppress(ImportError):
|
||||
--
|
||||
2.29.2
|
||||
|
||||
36
0003-tests-epel10.patch
Normal file
36
0003-tests-epel10.patch
Normal file
@@ -0,0 +1,36 @@
|
||||
--- xarray-2025.1.1/xarray/tests/test_dask.py.orig 2025-05-21 09:34:50.648289221 -0400
|
||||
+++ xarray-2025.1.1/xarray/tests/test_dask.py 2025-05-21 09:37:04.903633951 -0400
|
||||
@@ -1042,6 +1042,8 @@
|
||||
ds.foo.variable.compute()
|
||||
|
||||
|
||||
+@pytest.mark.flaky
|
||||
+@pytest.mark.skip(reason="maybe flaky epel10")
|
||||
def test_dask_layers_and_dependencies():
|
||||
ds = Dataset({"foo": ("x", range(5)), "bar": ("x", range(5))}).chunk()
|
||||
|
||||
--- xarray-2025.1.1/xarray/tests/test_datatree_mapping.py.orig 2025-05-21 09:37:35.179529595 -0400
|
||||
+++ xarray-2025.1.1/xarray/tests/test_datatree_mapping.py 2025-05-21 09:38:39.269279900 -0400
|
||||
@@ -157,6 +157,8 @@
|
||||
result = dt.map_over_datasets(empty_func)
|
||||
assert result["set1/set2"].attrs == dt["set1/set2"].attrs
|
||||
|
||||
+ @pytest.mark.flaky
|
||||
+ @pytest.mark.skip(reason="maybe flaky epel10")
|
||||
def test_error_contains_path_of_offending_node(self, create_test_datatree):
|
||||
dt = create_test_datatree()
|
||||
dt["set1"]["bad_var"] = 0
|
||||
--- xarray-2025.1.1/xarray/tests/test_backends.py.orig 2025-05-21 10:05:24.190411283 -0400
|
||||
+++ xarray-2025.1.1/xarray/tests/test_backends.py 2025-05-21 10:07:26.667130437 -0400
|
||||
@@ -5677,9 +5677,8 @@
|
||||
|
||||
@requires_scipy_or_netCDF4
|
||||
@pytest.mark.parametrize("calendar", _STANDARD_CALENDARS)
|
||||
-@pytest.mark.xfail(
|
||||
- has_numpy_2, reason="https://github.com/pandas-dev/pandas/issues/56996"
|
||||
-)
|
||||
+@pytest.mark.flaky
|
||||
+@pytest.mark.skip(reason="maybe flaky epel10")
|
||||
def test_use_cftime_false_standard_calendar_in_range(calendar) -> None:
|
||||
x = [0, 1]
|
||||
time = [0, 720]
|
||||
51
4256.patch
51
4256.patch
@@ -1,51 +0,0 @@
|
||||
From 9d1c3cb5d7fba68c0dc675dd80825cac8b644e01 Mon Sep 17 00:00:00 2001
|
||||
From: Keewis <keewis@posteo.de>
|
||||
Date: Sat, 6 Mar 2021 23:16:57 +0100
|
||||
Subject: [PATCH 1/3] duplicate the level if a single level was passed
|
||||
|
||||
---
|
||||
xarray/plot/utils.py | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/xarray/plot/utils.py b/xarray/plot/utils.py
|
||||
index 5510cf7f21..57cdf9f45d 100644
|
||||
--- a/xarray/plot/utils.py
|
||||
+++ b/xarray/plot/utils.py
|
||||
@@ -60,6 +60,11 @@ def _build_discrete_cmap(cmap, levels, extend, filled):
|
||||
"""
|
||||
import matplotlib as mpl
|
||||
|
||||
+ if isinstance(levels, (int, float)):
|
||||
+ levels = [levels, levels]
|
||||
+ elif len(levels) == 1:
|
||||
+ levels = [levels[0], levels[0]]
|
||||
+
|
||||
if not filled:
|
||||
# non-filled contour plots
|
||||
extend = "max"
|
||||
|
||||
From 7977ce0fa25971abc50a5dd010d15d71f8013a84 Mon Sep 17 00:00:00 2001
|
||||
From: Keewis <keewis@posteo.de>
|
||||
Date: Sat, 6 Mar 2021 23:29:39 +0100
|
||||
Subject: [PATCH 2/3] don't handle scalars
|
||||
|
||||
it seems these will never be passed at that level
|
||||
---
|
||||
xarray/plot/utils.py | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
diff --git a/xarray/plot/utils.py b/xarray/plot/utils.py
|
||||
index 57cdf9f45d..a83bc28e27 100644
|
||||
--- a/xarray/plot/utils.py
|
||||
+++ b/xarray/plot/utils.py
|
||||
@@ -60,9 +60,7 @@ def _build_discrete_cmap(cmap, levels, extend, filled):
|
||||
"""
|
||||
import matplotlib as mpl
|
||||
|
||||
- if isinstance(levels, (int, float)):
|
||||
- levels = [levels, levels]
|
||||
- elif len(levels) == 1:
|
||||
+ if len(levels) == 1:
|
||||
levels = [levels[0], levels[0]]
|
||||
|
||||
if not filled:
|
||||
102
9945.patch
Normal file
102
9945.patch
Normal file
@@ -0,0 +1,102 @@
|
||||
From da4aa1f2f116089c75adee5954bcc9ab755bcb89 Mon Sep 17 00:00:00 2001
|
||||
From: Deepak Cherian <deepak@cherian.net>
|
||||
Date: Mon, 13 Jan 2025 08:00:50 -0600
|
||||
Subject: [PATCH 1/2] Remove outdated quantile test.
|
||||
|
||||
dask now auto-rechunks for quantile.
|
||||
|
||||
Closes #9860
|
||||
---
|
||||
xarray/tests/test_groupby.py | 18 ++++++++++--------
|
||||
1 file changed, 10 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/xarray/tests/test_groupby.py b/xarray/tests/test_groupby.py
|
||||
index e4383dd58a9..2349ff0adfd 100644
|
||||
--- a/xarray/tests/test_groupby.py
|
||||
+++ b/xarray/tests/test_groupby.py
|
||||
@@ -284,7 +284,6 @@ def test_da_groupby_empty() -> None:
|
||||
|
||||
@requires_dask
|
||||
def test_dask_da_groupby_quantile() -> None:
|
||||
- # Only works when the grouped reduction can run blockwise
|
||||
# Scalar quantile
|
||||
expected = xr.DataArray(
|
||||
data=[2, 5], coords={"x": [1, 2], "quantile": 0.5}, dims="x"
|
||||
@@ -292,8 +291,6 @@ def test_dask_da_groupby_quantile() -> None:
|
||||
array = xr.DataArray(
|
||||
data=[1, 2, 3, 4, 5, 6], coords={"x": [1, 1, 1, 2, 2, 2]}, dims="x"
|
||||
)
|
||||
- with pytest.raises(ValueError):
|
||||
- array.chunk(x=1).groupby("x").quantile(0.5)
|
||||
|
||||
# will work blockwise with flox
|
||||
actual = array.chunk(x=3).groupby("x").quantile(0.5)
|
||||
@@ -327,7 +324,8 @@ def test_dask_da_groupby_median() -> None:
|
||||
assert_identical(expected, actual)
|
||||
|
||||
|
||||
-def test_da_groupby_quantile() -> None:
|
||||
+@pytest.mark.parametrize("use_flox", [True, False])
|
||||
+def test_da_groupby_quantile(use_flox) -> None:
|
||||
array = xr.DataArray(
|
||||
data=[1, 2, 3, 4, 5, 6], coords={"x": [1, 1, 1, 2, 2, 2]}, dims="x"
|
||||
)
|
||||
@@ -336,8 +334,10 @@ def test_da_groupby_quantile() -> None:
|
||||
expected = xr.DataArray(
|
||||
data=[2, 5], coords={"x": [1, 2], "quantile": 0.5}, dims="x"
|
||||
)
|
||||
- actual = array.groupby("x").quantile(0.5)
|
||||
- assert_identical(expected, actual)
|
||||
+
|
||||
+ with xr.set_options(use_flox=use_flox):
|
||||
+ actual = array.groupby("x").quantile(0.5)
|
||||
+ assert_identical(expected, actual)
|
||||
|
||||
# Vector quantile
|
||||
expected = xr.DataArray(
|
||||
@@ -345,7 +345,8 @@ def test_da_groupby_quantile() -> None:
|
||||
coords={"x": [1, 2], "quantile": [0, 1]},
|
||||
dims=("x", "quantile"),
|
||||
)
|
||||
- actual = array.groupby("x").quantile([0, 1])
|
||||
+ with xr.set_options(use_flox=use_flox):
|
||||
+ actual = array.groupby("x").quantile([0, 1])
|
||||
assert_identical(expected, actual)
|
||||
|
||||
array = xr.DataArray(
|
||||
@@ -356,7 +357,8 @@ def test_da_groupby_quantile() -> None:
|
||||
e = [np.nan, 5] if skipna is False else [2.5, 5]
|
||||
|
||||
expected = xr.DataArray(data=e, coords={"x": [1, 2], "quantile": 0.5}, dims="x")
|
||||
- actual = array.groupby("x").quantile(0.5, skipna=skipna)
|
||||
+ with xr.set_options(use_flox=use_flox):
|
||||
+ actual = array.groupby("x").quantile(0.5, skipna=skipna)
|
||||
assert_identical(expected, actual)
|
||||
|
||||
# Multiple dimensions
|
||||
|
||||
From 3d6e76a29a328489b0867a89fce1c157605c5f5d Mon Sep 17 00:00:00 2001
|
||||
From: Deepak Cherian <dcherian@users.noreply.github.com>
|
||||
Date: Mon, 13 Jan 2025 10:28:29 -0600
|
||||
Subject: [PATCH 2/2] Apply suggestions from code review
|
||||
|
||||
Co-authored-by: Michael Niklas <mick.niklas@gmail.com>
|
||||
---
|
||||
xarray/tests/test_groupby.py | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/xarray/tests/test_groupby.py b/xarray/tests/test_groupby.py
|
||||
index 2349ff0adfd..7dd6cdb622d 100644
|
||||
--- a/xarray/tests/test_groupby.py
|
||||
+++ b/xarray/tests/test_groupby.py
|
||||
@@ -324,8 +324,8 @@ def test_dask_da_groupby_median() -> None:
|
||||
assert_identical(expected, actual)
|
||||
|
||||
|
||||
-@pytest.mark.parametrize("use_flox", [True, False])
|
||||
-def test_da_groupby_quantile(use_flox) -> None:
|
||||
+@pytest.mark.parametrize("use_flox", [pytest.param(True, marks=requires_flox), False])
|
||||
+def test_da_groupby_quantile(use_flox: bool) -> None:
|
||||
array = xr.DataArray(
|
||||
data=[1, 2, 3, 4, 5, 6], coords={"x": [1, 1, 1, 2, 2, 2]}, dims="x"
|
||||
)
|
||||
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,43 +1,34 @@
|
||||
%global srcname xarray
|
||||
%global data_commit 5fdb22b5613ba8176b9f6fa67be783d7810643eb
|
||||
|
||||
%bcond_with docs
|
||||
|
||||
Name: python-%{srcname}
|
||||
Version: 0.17.0
|
||||
Release: 1%{?dist}
|
||||
Version: 2025.1.1
|
||||
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-DOC-Don-t-print-out-conda-pip-environment.patch
|
||||
# Fix tests with Matplotlib 3.4.
|
||||
Patch0004: https://github.com/pydata/xarray/pull/4256.patch
|
||||
Source: %pypi_source %{srcname}
|
||||
|
||||
# Fix test_dask_da_groupby_quantile.
|
||||
Patch: https://github.com/pydata/xarray/pull/9945.patch
|
||||
|
||||
# https://github.com/pydata/xarray/pull/9949
|
||||
Patch: 0001-Fix-test_doc_example-on-big-endian-systems.patch
|
||||
# https://github.com/pydata/xarray/pull/9964
|
||||
Patch: 0002-Avoid-unsafe-casts-from-float-to-unsigned-int.patch
|
||||
Patch: 0003-tests-epel10.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3dist(cftime) >= 1
|
||||
BuildRequires: python3-dask+array >= 2.11
|
||||
BuildRequires: python3-dask+dataframe >= 2.11
|
||||
BuildRequires: python3dist(netcdf4) >= 1.5
|
||||
BuildRequires: python3dist(numpy) >= 1.17
|
||||
BuildRequires: python3dist(pandas) >= 1
|
||||
BuildRequires: python3dist(pint)
|
||||
BuildRequires: python3dist(bottleneck)
|
||||
BuildRequires: python3dist(dask[array]) >= 2023.9
|
||||
BuildRequires: python3dist(dask[dataframe]) >= 2023.9
|
||||
BuildRequires: python3dist(pint) >= 0.16
|
||||
BuildRequires: python3dist(pytest) >= 2.7.1
|
||||
BuildRequires: python3dist(pytest-xdist)
|
||||
BuildRequires: python3dist(rasterio) >= 1.1
|
||||
BuildRequires: python3dist(seaborn) >= 0.10
|
||||
BuildRequires: python3dist(setuptools) >= 41.2
|
||||
BuildRequires: python3dist(setuptools-scm)
|
||||
BuildRequires: python3dist(zarr) >= 2.4
|
||||
BuildRequires: python3dist(seaborn) >= 0.11
|
||||
|
||||
%global _description %{expand: \
|
||||
Xarray (formerly xray) is an open source project and Python package that
|
||||
@@ -52,133 +43,45 @@ 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}
|
||||
|
||||
|
||||
%if %{with docs}
|
||||
%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(jupyter-client)
|
||||
BuildRequires: python3dist(matplotlib)
|
||||
BuildRequires: python3dist(sphinx)
|
||||
BuildRequires: python3dist(sphinx-gallery)
|
||||
BuildRequires: python3dist(sphinx-rtd-theme)
|
||||
|
||||
%description -n python-%{srcname}-doc
|
||||
Documentation for xarray
|
||||
%endif
|
||||
|
||||
%pyproject_extras_subpkg -n python3-%{srcname} io
|
||||
|
||||
%prep
|
||||
%autosetup -n %{srcname}-%{version} -p1
|
||||
|
||||
%if %{with docs}
|
||||
# Provide example datasets for building docs.
|
||||
tar xf %SOURCE1 --transform='s~^\(%{srcname}-data-%{data_commit}/\)~\1.xarray_tutorial_data/~'
|
||||
cp -p %SOURCE2 ./doc/gallery/
|
||||
%endif
|
||||
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires -x io
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
|
||||
%if %{with docs}
|
||||
# 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
|
||||
%endif
|
||||
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%py3_install
|
||||
|
||||
%pyproject_install
|
||||
%pyproject_save_files -l %{srcname}
|
||||
|
||||
%check
|
||||
rm -rf xarray
|
||||
%{pytest} -ra -n auto -m "not network" --pyargs xarray
|
||||
|
||||
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 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
|
||||
|
||||
%if %{with docs}
|
||||
%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
|
||||
%endif
|
||||
%{pytest} -ra "${pytest_args[@]}" --pyargs xarray
|
||||
|
||||
%files -n python3-%{srcname} -f %{pyproject_files}
|
||||
%license licenses/*
|
||||
%doc README.md
|
||||
|
||||
%changelog
|
||||
* 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.
|
||||
%autochangelog
|
||||
|
||||
4
sources
4
sources
@@ -1,3 +1 @@
|
||||
SHA512 (xarray-0.17.0.tar.gz) = 726d548519614936f4b6c6ded0375a35362b195a2c6b55a282d198cbb8a70fa7439377a88f253cf4f16c86582fc22c8a4700b9645516decf7edd3e980d9dda34
|
||||
SHA512 (xarray-data-5fdb22b5613ba8176b9f6fa67be783d7810643eb.tar.gz) = a1ed7c14e9fe6a0e4327b374b1b0ecd93472cd8308b3e2bbc078172576b8f31cd27c11da4b1c557e9b1615a411beaf21db83de755ece342343a4db2773ce6d29
|
||||
SHA512 (RGB.byte.tif) = 34aa1b196f6c5880530d42ec8a25193bc79db803a8427adc9b115373d222b9f4318a04f06c8b37118df7e09d96b9c470ecec543c604af18861f11b786ed6fbfd
|
||||
SHA512 (xarray-2025.1.1.tar.gz) = a0cde2c8e38887878bcde25fd3ea6ee436b522ca73f52359d2c8ac1993447472d7cd5e5d4b11016ec48d1b86dba08e9207caf00b2b43ab896c777395e51f7943
|
||||
|
||||
Reference in New Issue
Block a user