Backport fix for alternate architectures.
This commit is contained in:
@@ -52,10 +52,10 @@ index 98131887..302cac05 100644
|
||||
|
||||
def hist(
|
||||
diff --git a/xarray/plot/utils.py b/xarray/plot/utils.py
|
||||
index 6eec7c6b..08991e08 100644
|
||||
index cb3bef6d..e6c15037 100644
|
||||
--- a/xarray/plot/utils.py
|
||||
+++ b/xarray/plot/utils.py
|
||||
@@ -461,7 +461,7 @@ def _resolve_intervals_1dplot(xval, yval, xlabel, ylabel, kwargs):
|
||||
@@ -465,7 +465,7 @@ def _resolve_intervals_1dplot(xval, yval, xlabel, ylabel, kwargs):
|
||||
"""
|
||||
|
||||
# Is it a step plot? (see matplotlib.Axes.step)
|
||||
@@ -64,7 +64,7 @@ index 6eec7c6b..08991e08 100644
|
||||
|
||||
# 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):
|
||||
@@ -476,7 +476,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
|
||||
|
||||
+5
-5
@@ -8,10 +8,10 @@ Subject: [PATCH] Only fail if a specific warning occurs
|
||||
1 file changed, 9 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/xarray/tests/test_backends.py b/xarray/tests/test_backends.py
|
||||
index 82fe1b3814..b26a3b37fc 100644
|
||||
index 5f8ba83c..39178213 100644
|
||||
--- a/xarray/tests/test_backends.py
|
||||
+++ b/xarray/tests/test_backends.py
|
||||
@@ -4334,6 +4334,12 @@ def test_source_encoding_always_present():
|
||||
@@ -4333,6 +4333,12 @@ def test_source_encoding_always_present():
|
||||
assert ds.encoding["source"] == tmp
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ index 82fe1b3814..b26a3b37fc 100644
|
||||
@requires_scipy_or_netCDF4
|
||||
@pytest.mark.parametrize("calendar", _STANDARD_CALENDARS)
|
||||
def test_use_cftime_standard_calendar_default_in_range(calendar):
|
||||
@@ -4360,7 +4366,7 @@ def test_use_cftime_standard_calendar_default_in_range(calendar):
|
||||
@@ -4359,7 +4365,7 @@ def test_use_cftime_standard_calendar_default_in_range(calendar):
|
||||
with open_dataset(tmp_file) as ds:
|
||||
assert_identical(expected_x, ds.x)
|
||||
assert_identical(expected_time, ds.time)
|
||||
@@ -33,7 +33,7 @@ index 82fe1b3814..b26a3b37fc 100644
|
||||
|
||||
|
||||
@requires_cftime
|
||||
@@ -4423,7 +4429,7 @@ def test_use_cftime_true(calendar, units_year):
|
||||
@@ -4422,7 +4428,7 @@ def test_use_cftime_true(calendar, units_year):
|
||||
with open_dataset(tmp_file, use_cftime=True) as ds:
|
||||
assert_identical(expected_x, ds.x)
|
||||
assert_identical(expected_time, ds.time)
|
||||
@@ -42,7 +42,7 @@ index 82fe1b3814..b26a3b37fc 100644
|
||||
|
||||
|
||||
@requires_scipy_or_netCDF4
|
||||
@@ -4452,7 +4458,7 @@ def test_use_cftime_false_standard_calendar_in_range(calendar):
|
||||
@@ -4451,7 +4457,7 @@ def test_use_cftime_false_standard_calendar_in_range(calendar):
|
||||
with open_dataset(tmp_file, use_cftime=False) as ds:
|
||||
assert_identical(expected_x, ds.x)
|
||||
assert_identical(expected_time, ds.time)
|
||||
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
From b99bc4807922b72bc5506f5ac2884aeb3c2da845 Mon Sep 17 00:00:00 2001
|
||||
From: Keewis <keewis@posteo.de>
|
||||
Date: Wed, 24 Jun 2020 20:24:54 +0200
|
||||
Subject: [PATCH] use assert_allclose in the aggregation-with-units tests
|
||||
(#4174)
|
||||
|
||||
* use assert_allclose in the aggregation tests
|
||||
|
||||
* install pint using pip
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
xarray/tests/test_units.py | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/xarray/tests/test_units.py b/xarray/tests/test_units.py
|
||||
index 2826dc24..5dd5cfaf 100644
|
||||
--- a/xarray/tests/test_units.py
|
||||
+++ b/xarray/tests/test_units.py
|
||||
@@ -1448,7 +1448,7 @@ class TestVariable(VariableSubclassobjects):
|
||||
actual = func(variable)
|
||||
|
||||
assert_units_equal(expected, actual)
|
||||
- xr.testing.assert_identical(expected, actual)
|
||||
+ assert_allclose(expected, actual)
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"func",
|
||||
@@ -2296,7 +2296,8 @@ class TestDataArray:
|
||||
expected = attach_units(func(strip_units(data_array)), units)
|
||||
actual = func(data_array)
|
||||
|
||||
- assert_equal_with_units(expected, actual)
|
||||
+ assert_units_equal(expected, actual)
|
||||
+ assert_allclose(expected, actual)
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"func",
|
||||
@@ -3809,7 +3810,8 @@ class TestDataset:
|
||||
},
|
||||
)
|
||||
|
||||
- assert_equal_with_units(actual, expected)
|
||||
+ assert_units_equal(expected, actual)
|
||||
+ assert_allclose(expected, actual)
|
||||
|
||||
@pytest.mark.parametrize("property", ("imag", "real"))
|
||||
def test_numpy_properties(self, property, dtype):
|
||||
--
|
||||
2.25.4
|
||||
|
||||
@@ -22,6 +22,8 @@ Patch0003: 0003-DOC-Don-t-print-out-conda-pip-environment.patch
|
||||
Patch0004: 0004-Use-drawstyle-instead-of-linestyle-in-plot.step.patch
|
||||
# https://github.com/pydata/xarray/pull/3930
|
||||
Patch0005: https://github.com/pydata/xarray/pull/3930.patch
|
||||
# https://github.com/pydata/xarray/issues/4172
|
||||
Patch0006: https://github.com/pydata/xarray/pull/4174.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
|
||||
Reference in New Issue
Block a user