24 Commits
f28 ... f34

Author SHA1 Message Date
Elliott Sales de Andrade
92642a4ace Update to latest version. 2021-03-13 06:01:29 -05:00
Fedora Release Engineering
a0d4600a4a - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-27 14:15:31 +00:00
Elliott Sales de Andrade
924dddb55e Update to latest version. 2020-12-12 19:03:21 -05:00
Elliott Sales de Andrade
facfa49251 Update to latest version. 2020-09-26 23:53:57 -04:00
Fedora Release Engineering
0dd10a097c - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-29 04:42:00 +00:00
Elliott Sales de Andrade
01acc30df2 Update to latest version. 2020-07-12 20:46:32 -04:00
Elliott Sales de Andrade
64c9d5b495 Backport fix for alternate architectures. 2020-06-24 15:44:18 -04:00
Elliott Sales de Andrade
92222176fe Backport patch to fix tests catching too many warnings. 2020-06-23 04:32:16 -04:00
Miro Hrončok
e8852ff34b Rebuilt for Python 3.9 2020-05-26 03:46:31 +02:00
Elliott Sales de Andrade
9ac9523bf9 Add more test dependencies. 2020-04-18 05:01:16 -04:00
Elliott Sales de Andrade
b7026ce966 Fix broken package, and test install instead of build. 2020-04-18 04:30:41 -04:00
Elliott Sales de Andrade
e45e16ba78 Fix sources list. 2020-03-25 01:55:27 -04:00
Elliott Sales de Andrade
7a3c73e1fd Remove old patch. 2020-03-25 01:19:38 -04:00
Elliott Sales de Andrade
11f4833e22 Update to latest version. 2020-03-25 01:18:24 -04:00
Elliott Sales de Andrade
9fd78590b1 Backport fix for seaborn 0.10.0. 2020-03-06 19:24:39 -05:00
Elliott Sales de Andrade
77b148455a Re-add secondary sources. 2020-02-08 06:54:55 -05:00
Elliott Sales de Andrade
618c5a443a Update to latest version. 2020-02-08 06:46:40 -05:00
Elliott Sales de Andrade
e818d8f2bb Temporarily disable docs. 2020-02-08 06:37:18 -05:00
Fedora Release Engineering
6e3bbdab77 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-30 16:16:19 +00:00
Elliott Sales de Andrade
6aeeebb116 Fix build against Matplotlib 3.1. 2019-08-31 04:37:57 -04:00
Miro Hrončok
757e1e406c Rebuilt for Python 3.8 2019-08-19 11:02:22 +02:00
Fedora Release Engineering
497faee79e - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-26 17:09:00 +00:00
Elliott Sales de Andrade
e4e3bbeae9 Fix sources. 2019-07-21 22:15:39 -04:00
Elliott Sales de Andrade
d06712ba48 Update to latest version. 2019-07-21 17:29:03 -04:00
9 changed files with 211 additions and 140 deletions

8
.gitignore vendored
View File

@@ -1,3 +1,11 @@
/xarray-0.12.0.tar.gz
/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

View File

@@ -1,71 +1,40 @@
From fe8259c549993aac5909e756a4bfcd507a32c5d1 Mon Sep 17 00:00:00 2001
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 | 7 -------
doc/gallery/plot_rasterio_rgb.py | 7 -------
2 files changed, 14 deletions(-)
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 98801990..cfddb2a0 100644
index 99eb1fd1..3d797296 100644
--- a/doc/gallery/plot_rasterio.py
+++ b/doc/gallery/plot_rasterio.py
@@ -17,7 +17,6 @@ original map projection (see :ref:`recipes.rasterio_rgb`).
"""
import os
-import urllib.request
import cartopy.crs as ccrs
import matplotlib.pyplot as plt
@@ -26,9 +25,6 @@ from rasterio.warp import transform
@@ -23,7 +23,7 @@ from rasterio.warp import transform
import xarray as xr
-# Download the file from rasterio's repository
-url = 'https://github.com/mapbox/rasterio/raw/master/tests/data/RGB.byte.tif'
-urllib.request.urlretrieve(url, 'RGB.byte.tif')
# Read the data
da = xr.open_rasterio('RGB.byte.tif')
@@ -54,6 +50,3 @@ greyscale.plot(ax=ax, x='lon', y='lat', transform=ccrs.PlateCarree(),
cmap='Greys_r', add_colorbar=False)
ax.coastlines('10m', color='r')
plt.show()
-
-# Delete the file
-os.remove('RGB.byte.tif')
-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 2733bf14..e842758e 100644
index 758d4cd3..f2a7b2db 100644
--- a/doc/gallery/plot_rasterio_rgb.py
+++ b/doc/gallery/plot_rasterio_rgb.py
@@ -14,16 +14,12 @@ transformation.
"""
import os
-import urllib.request
import cartopy.crs as ccrs
import matplotlib.pyplot as plt
@@ -18,7 +18,7 @@ import matplotlib.pyplot as plt
import xarray as xr
-# Download the file from rasterio's repository
-url = 'https://github.com/mapbox/rasterio/raw/master/tests/data/RGB.byte.tif'
-urllib.request.urlretrieve(url, 'RGB.byte.tif')
# Read the data
da = xr.open_rasterio('RGB.byte.tif')
@@ -37,6 +33,3 @@ ax = plt.subplot(projection=crs)
da.plot.imshow(ax=ax, rgb='band', transform=crs)
ax.coastlines('10m', color='r')
plt.show()
-
-# Delete the file
-os.remove('RGB.byte.tif')
-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.20.1
2.29.2

View File

@@ -1,4 +1,4 @@
From 2eb33a619724bed0c324e3723d3f0eedf82806a1 Mon Sep 17 00:00:00 2001
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.
@@ -9,19 +9,19 @@ 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 51c74718..64aa4d88 100644
index c2022cc9..fb9cba9c 100644
--- a/doc/io.rst
+++ b/doc/io.rst
@@ -366,6 +366,7 @@ installed xarray can convert a ``DataArray`` into a ``Cube`` using
:py:meth:`~xarray.DataArray.to_iris`:
@@ -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],
@@ -378,6 +379,7 @@ Conversely, we can create a new ``DataArray`` object from a ``Cube`` using
:py:meth:`~xarray.DataArray.from_iris`:
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:
@@ -29,5 +29,5 @@ index 51c74718..64aa4d88 100644
da_cube = xr.DataArray.from_iris(cube)
da_cube
--
2.20.1
2.29.2

View File

@@ -0,0 +1,39 @@
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

View File

@@ -1,26 +0,0 @@
From 31da0ae60854e4678468a161217548c0daa7af59 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/4] 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 3921d0c3..60beae90 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']
if sys.version_info[0] < 3:
TESTS_REQUIRE.append('mock')
--
2.20.1

View File

@@ -1,31 +0,0 @@
From f35372127084836ec4b9871f809a688c465f4ee2 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/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(-)
diff --git a/doc/conf.py b/doc/conf.py
index 32274155..e6071cdd 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.20.1

51
4256.patch Normal file
View File

@@ -0,0 +1,51 @@
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:

View File

@@ -1,8 +1,10 @@
%global srcname xarray
%global data_commit 870b5d7a9dbfa821423f1b88056890c22341f085
%global data_commit 5fdb22b5613ba8176b9f6fa67be783d7810643eb
%bcond_with docs
Name: python-%{srcname}
Version: 0.12.0
Version: 0.17.0
Release: 1%{?dist}
Summary: N-D labeled arrays and datasets in Python
@@ -15,22 +17,27 @@ Source2: https://github.com/mapbox/rasterio/raw/1.0.21/tests/data/RGB.byt
# 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
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
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3-dask+array
BuildRequires: python3-dask+dataframe
BuildRequires: python3dist(numpy) >= 1.12
BuildRequires: python3dist(numpydoc)
BuildRequires: python3dist(pandas) >= 0.19.2
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(pytest) >= 2.7.1
BuildRequires: python3dist(pytest-runner)
BuildRequires: python3dist(pytest-xdist)
BuildRequires: python3dist(seaborn)
BuildRequires: python3dist(setuptools)
BuildRequires: python3dist(rasterio) >= 1.1
BuildRequires: python3dist(seaborn) >= 0.10
BuildRequires: python3dist(setuptools) >= 41.2
BuildRequires: python3dist(setuptools-scm)
BuildRequires: python3dist(zarr) >= 2.4
%global _description %{expand: \
Xarray (formerly xray) is an open source project and Python package that
@@ -58,6 +65,7 @@ Summary: %{summary}
%description -n python3-%{srcname} %{_description}
%if %{with docs}
%package -n python-%{srcname}-doc
Summary: xarray documentation
@@ -65,38 +73,38 @@ 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(netcdf4)
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
%endif
%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/
# Remove bundled egg-info
rm -rf %{srcname}.egg-info
%endif
%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
%install
@@ -104,20 +112,73 @@ popd
%check
%{__python3} setup.py test --addopts='-ra -n auto'
rm -rf xarray
%{pytest} -ra -n auto -m "not network" --pyargs xarray
%files -n python3-%{srcname}
%license LICENSE
%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
%{python3_sitelib}/%{srcname}-%{version}-py*.egg-info
%if %{with docs}
%files -n python-%{srcname}-doc
%doc doc/_build/html
%license LICENSE
%license LICENSE licenses/DASK_LICENSE licenses/NUMPY_LICENSE licenses/PANDAS_LICENSE licenses/PYTHON_LICENSE licenses/SEABORN_LICENSE
%endif
%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.

View File

@@ -1,3 +1,3 @@
SHA512 (xarray-0.12.0.tar.gz) = 7e8f71cdf68f5f8c18d9311490121a9a76ad49ccd8345960214e323ebe0588e82d041eb579d83d52592147ac3629a0611b61b1ac7d0c7d320651fe658967140e
SHA512 (xarray-data-870b5d7a9dbfa821423f1b88056890c22341f085.tar.gz) = 27de6e274d18d266d6d8a1f0c8f65396fff16d177cf6df41cfd4bcf839e6d083512c4f4dbc1163ab7380a8905acecfe15b7978e23b9c360bad2dd879addb421c
SHA512 (xarray-0.17.0.tar.gz) = 726d548519614936f4b6c6ded0375a35362b195a2c6b55a282d198cbb8a70fa7439377a88f253cf4f16c86582fc22c8a4700b9645516decf7edd3e980d9dda34
SHA512 (xarray-data-5fdb22b5613ba8176b9f6fa67be783d7810643eb.tar.gz) = a1ed7c14e9fe6a0e4327b374b1b0ecd93472cd8308b3e2bbc078172576b8f31cd27c11da4b1c557e9b1615a411beaf21db83de755ece342343a4db2773ce6d29
SHA512 (RGB.byte.tif) = 34aa1b196f6c5880530d42ec8a25193bc79db803a8427adc9b115373d222b9f4318a04f06c8b37118df7e09d96b9c470ecec543c604af18861f11b786ed6fbfd