Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
924dddb55e | ||
|
|
facfa49251 | ||
|
|
0dd10a097c | ||
|
|
01acc30df2 | ||
|
|
64c9d5b495 | ||
|
|
92222176fe | ||
|
|
e8852ff34b |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -4,3 +4,7 @@
|
||||
/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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 75584dd2b3d7c7411220bb21ee751002d51498c7 Mon Sep 17 00:00:00 2001
|
||||
From e1fe3194dcf9878b2e1895404ff13c0338ad0e1f 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.
|
||||
@@ -36,5 +36,5 @@ index 758d4cd3..f2a7b2db 100644
|
||||
|
||||
# The data is in UTM projection. We have to set it manually until
|
||||
--
|
||||
2.21.1
|
||||
2.26.2
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From bc95d0d73a1ab2f25ce7074bf0de803892eced54 Mon Sep 17 00:00:00 2001
|
||||
From 1f0ab97be49d2fef87f0da7ca2bab33be41e2480 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.
|
||||
@@ -9,18 +9,18 @@ Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/doc/io.rst b/doc/io.rst
|
||||
index e9109432..3e95540c 100644
|
||||
index 5119bac1..a2d70436 100644
|
||||
--- a/doc/io.rst
|
||||
+++ b/doc/io.rst
|
||||
@@ -498,6 +498,7 @@ installed xarray can convert a ``DataArray`` into a ``Cube`` using
|
||||
@@ -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), dims=['x', 'y'],
|
||||
coords=dict(x=[10, 20, 30, 40],
|
||||
@@ -510,6 +511,7 @@ Conversely, we can create a new ``DataArray`` object from a ``Cube`` using
|
||||
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
|
||||
@@ -29,5 +29,5 @@ index e9109432..3e95540c 100644
|
||||
da_cube = xr.DataArray.from_iris(cube)
|
||||
da_cube
|
||||
--
|
||||
2.21.1
|
||||
2.26.2
|
||||
|
||||
|
||||
@@ -1,18 +1,26 @@
|
||||
From aebdf7c14a3a7df2ab45467074b4dd6dacc8d682 Mon Sep 17 00:00:00 2001
|
||||
From cc094db443b53f96b32708676e515658ada8313f 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 | 7 -------
|
||||
1 file changed, 7 deletions(-)
|
||||
doc/conf.py | 8 --------
|
||||
1 file changed, 8 deletions(-)
|
||||
|
||||
diff --git a/doc/conf.py b/doc/conf.py
|
||||
index 578f9cf5..a23031a0 100644
|
||||
index 74c3fd12..27a2f7b7 100644
|
||||
--- a/doc/conf.py
|
||||
+++ b/doc/conf.py
|
||||
@@ -32,13 +32,6 @@ allowed_failures = set()
|
||||
@@ -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)
|
||||
|
||||
@@ -23,9 +31,9 @@ index 578f9cf5..a23031a0 100644
|
||||
- print("pip environment:")
|
||||
- subprocess.run(["pip", "list"])
|
||||
-
|
||||
print("xarray: %s, %s" % (xarray.__version__, xarray.__file__))
|
||||
print(f"xarray: {xarray.__version__}, {xarray.__file__}")
|
||||
|
||||
with suppress(ImportError):
|
||||
--
|
||||
2.21.1
|
||||
2.26.2
|
||||
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
From 507bf6860cc59d7a1320e39b4138418874f7ca15 Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Sat, 26 Sep 2020 23:10:31 -0400
|
||||
Subject: [PATCH 4/4] Revert "un-xfail the pint assert_allclose and
|
||||
assert_duckarray_equal tests"
|
||||
|
||||
This reverts commit e045bd3e1dcbeedd31205d8ceb4186e28edc6cc2.
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
xarray/tests/test_testing.py | 14 ++++++++++++--
|
||||
1 file changed, 12 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/xarray/tests/test_testing.py b/xarray/tests/test_testing.py
|
||||
index 30ea6aaa..0f2ae8b3 100644
|
||||
--- a/xarray/tests/test_testing.py
|
||||
+++ b/xarray/tests/test_testing.py
|
||||
@@ -70,7 +70,12 @@ def test_assert_allclose(obj1, obj2):
|
||||
pytest.param(
|
||||
quantity,
|
||||
id="pint",
|
||||
- marks=pytest.mark.skipif(not has_pint, reason="requires pint"),
|
||||
+ marks=[
|
||||
+ pytest.mark.skipif(not has_pint, reason="requires pint"),
|
||||
+ pytest.mark.xfail(
|
||||
+ reason="inconsistencies in the return value of pint's implementation of eq"
|
||||
+ ),
|
||||
+ ],
|
||||
),
|
||||
),
|
||||
)
|
||||
@@ -110,7 +115,12 @@ def test_assert_duckarray_equal_failing(duckarray, obj1, obj2):
|
||||
pytest.param(
|
||||
quantity,
|
||||
id="pint",
|
||||
- marks=pytest.mark.skipif(not has_pint, reason="requires pint"),
|
||||
+ marks=[
|
||||
+ pytest.mark.skipif(not has_pint, reason="requires pint"),
|
||||
+ pytest.mark.xfail(
|
||||
+ reason="inconsistencies in the return value of pint's implementation of eq"
|
||||
+ ),
|
||||
+ ],
|
||||
),
|
||||
),
|
||||
)
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
From 7c9e266e5a2460391700a54da1c14e35205536a6 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 4/4] 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 | 18 +++++++++---------
|
||||
xarray/plot/utils.py | 4 ++--
|
||||
2 files changed, 11 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/xarray/plot/plot.py b/xarray/plot/plot.py
|
||||
index 98131887..302cac05 100644
|
||||
--- a/xarray/plot/plot.py
|
||||
+++ b/xarray/plot/plot.py
|
||||
@@ -329,7 +329,7 @@ def line(
|
||||
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
|
||||
|
||||
@@ -359,16 +359,16 @@ def step(darray, *args, where="pre", linestyle=None, ls=None, **kwargs):
|
||||
if where not in {"pre", "post", "mid"}:
|
||||
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(
|
||||
diff --git a/xarray/plot/utils.py b/xarray/plot/utils.py
|
||||
index 6eec7c6b..08991e08 100644
|
||||
--- a/xarray/plot/utils.py
|
||||
+++ b/xarray/plot/utils.py
|
||||
@@ -461,7 +461,7 @@ def _resolve_intervals_1dplot(xval, yval, xlabel, ylabel, kwargs):
|
||||
"""
|
||||
|
||||
# Is it a step plot? (see matplotlib.Axes.step)
|
||||
- if kwargs.get("linestyle", "").startswith("steps-"):
|
||||
+ if kwargs.get("drawstyle", "").startswith("steps-"):
|
||||
|
||||
# Convert intervals to double points
|
||||
if _valid_other_type(np.array([xval, yval]), [pd.Interval]):
|
||||
@@ -472,7 +472,7 @@ def _resolve_intervals_1dplot(xval, yval, xlabel, ylabel, kwargs):
|
||||
yval, xval = _interval_to_double_bound_points(yval, xval)
|
||||
|
||||
# Remove steps-* to be sure that matplotlib is not confused
|
||||
- del kwargs["linestyle"]
|
||||
+ del kwargs["drawstyle"]
|
||||
|
||||
# Is it another kind of plot?
|
||||
else:
|
||||
--
|
||||
2.21.1
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
%global srcname xarray
|
||||
%global data_commit 870b5d7a9dbfa821423f1b88056890c22341f085
|
||||
%global data_commit 5fdb22b5613ba8176b9f6fa67be783d7810643eb
|
||||
|
||||
%bcond_with docs
|
||||
|
||||
Name: python-%{srcname}
|
||||
Version: 0.15.1
|
||||
Release: 2%{?dist}
|
||||
Version: 0.16.2
|
||||
Release: 1%{?dist}
|
||||
Summary: N-D labeled arrays and datasets in Python
|
||||
|
||||
License: ASL 2.0
|
||||
@@ -18,8 +18,8 @@ Source2: https://github.com/mapbox/rasterio/raw/1.0.21/tests/data/RGB.byt
|
||||
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
|
||||
# https://github.com/pydata/xarray/pull/3274
|
||||
Patch0004: 0004-Use-drawstyle-instead-of-linestyle-in-plot.step.patch
|
||||
# We do not have new enough pint.
|
||||
Patch0004: 0004-Revert-un-xfail-the-pint-assert_allclose-and-assert_.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
@@ -76,7 +76,6 @@ BuildRequires: python3-ipython-sphinx
|
||||
BuildRequires: python3dist(jupyter-client)
|
||||
BuildRequires: python3dist(matplotlib)
|
||||
BuildRequires: python3dist(netcdf4)
|
||||
BuildRequires: python3dist(numpydoc)
|
||||
BuildRequires: python3dist(rasterio)
|
||||
BuildRequires: python3dist(sphinx)
|
||||
BuildRequires: python3dist(sphinx-gallery)
|
||||
@@ -117,8 +116,7 @@ popd
|
||||
|
||||
%check
|
||||
rm -rf xarray
|
||||
PYTHONPATH=%{buildroot}%{python3_sitelib} \
|
||||
pytest-3 -ra -n auto -m "not network" --pyargs xarray
|
||||
%{pytest} -ra -n auto -m "not network" --pyargs xarray
|
||||
|
||||
|
||||
%files -n python3-%{srcname}
|
||||
@@ -135,6 +133,24 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} \
|
||||
|
||||
|
||||
%changelog
|
||||
* 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
|
||||
|
||||
4
sources
4
sources
@@ -1,3 +1,3 @@
|
||||
SHA512 (xarray-0.15.1.tar.gz) = 8a2d7e9173c51c65ffe856fa83df730e0e7de9777726c6d6e8f7f4edcc512b3a980c7dc854c19d3bc4bec50e815ad776bd433a5750680f2851a2b0b1f505ea14
|
||||
SHA512 (xarray-data-870b5d7a9dbfa821423f1b88056890c22341f085.tar.gz) = 27de6e274d18d266d6d8a1f0c8f65396fff16d177cf6df41cfd4bcf839e6d083512c4f4dbc1163ab7380a8905acecfe15b7978e23b9c360bad2dd879addb421c
|
||||
SHA512 (xarray-0.16.2.tar.gz) = f6cd3eee2012e3b544874388c4824e911ce5d213cd393bf01b10deb9742a1168f41629e4f1e49220228771cac920980eaa98a599a6d62c383dd3da7b3bfe0dd8
|
||||
SHA512 (xarray-data-5fdb22b5613ba8176b9f6fa67be783d7810643eb.tar.gz) = a1ed7c14e9fe6a0e4327b374b1b0ecd93472cd8308b3e2bbc078172576b8f31cd27c11da4b1c557e9b1615a411beaf21db83de755ece342343a4db2773ce6d29
|
||||
SHA512 (RGB.byte.tif) = 34aa1b196f6c5880530d42ec8a25193bc79db803a8427adc9b115373d222b9f4318a04f06c8b37118df7e09d96b9c470ecec543c604af18861f11b786ed6fbfd
|
||||
|
||||
Reference in New Issue
Block a user