From 618c5a443a7cd6e22e9677f6922afff99aa47335 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sat, 8 Feb 2020 06:46:40 -0500 Subject: [PATCH] Update to latest version. --- .gitignore | 1 + ...t-download-RGB.byte.tif-during-build.patch | 22 +++--- ...amples-using-unpackaged-dependencies.patch | 16 ++-- ...on-t-print-out-conda-pip-environment.patch | 20 ++--- ...educe-required-pytest-runner-version.patch | 26 ------- ...le-instead-of-linestyle-in-plot.step.patch | 78 +++++++++++++++++++ ...-t-set-box-forced-in-Cartopy-example.patch | 28 ------- ...le-instead-of-linestyle-in-plot.step.patch | 76 ------------------ python-xarray.spec | 23 +++--- sources | 4 +- 10 files changed, 121 insertions(+), 173 deletions(-) rename 0004-DOC-Don-t-print-out-conda-pip-environment.patch => 0003-DOC-Don-t-print-out-conda-pip-environment.patch (56%) delete mode 100644 0003-TST-Reduce-required-pytest-runner-version.patch create mode 100644 0004-Use-drawstyle-instead-of-linestyle-in-plot.step.patch delete mode 100644 0005-Don-t-set-box-forced-in-Cartopy-example.patch delete mode 100644 0006-Use-drawstyle-instead-of-linestyle-in-plot.step.patch diff --git a/.gitignore b/.gitignore index 7c2fc88..a0f6ed1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /xarray-data-870b5d7a9dbfa821423f1b88056890c22341f085.tar.gz /RGB.byte.tif /xarray-0.12.3.tar.gz +/xarray-0.15.0.tar.gz diff --git a/0001-DOC-Don-t-download-RGB.byte.tif-during-build.patch b/0001-DOC-Don-t-download-RGB.byte.tif-during-build.patch index c79c03a..7274703 100644 --- a/0001-DOC-Don-t-download-RGB.byte.tif-during-build.patch +++ b/0001-DOC-Don-t-download-RGB.byte.tif-during-build.patch @@ -1,7 +1,7 @@ -From 63fc5acba81601e473ead5c4e82de78b5ae61ad0 Mon Sep 17 00:00:00 2001 +From 75584dd2b3d7c7411220bb21ee751002d51498c7 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 15 Mar 2019 22:31:18 -0400 -Subject: [PATCH 1/6] DOC: Don't download RGB.byte.tif during build. +Subject: [PATCH 1/4] DOC: Don't download RGB.byte.tif during build. Signed-off-by: Elliott Sales de Andrade --- @@ -10,31 +10,31 @@ Signed-off-by: Elliott Sales de Andrade 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 +index 99eb1fd1..3d797296 100644 --- a/doc/gallery/plot_rasterio.py +++ b/doc/gallery/plot_rasterio.py -@@ -24,7 +24,7 @@ from rasterio.warp import transform +@@ -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' +-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 +index 758d4cd3..f2a7b2db 100644 --- a/doc/gallery/plot_rasterio_rgb.py +++ b/doc/gallery/plot_rasterio_rgb.py -@@ -19,7 +19,7 @@ import matplotlib.pyplot as plt +@@ -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' +-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 +2.21.1 diff --git a/0002-DOC-Skip-examples-using-unpackaged-dependencies.patch b/0002-DOC-Skip-examples-using-unpackaged-dependencies.patch index d6712bc..9c85f1b 100644 --- a/0002-DOC-Skip-examples-using-unpackaged-dependencies.patch +++ b/0002-DOC-Skip-examples-using-unpackaged-dependencies.patch @@ -1,7 +1,7 @@ -From 90f116ffbf6eb403d4ddd44e6b9bafddced99419 Mon Sep 17 00:00:00 2001 +From bc95d0d73a1ab2f25ce7074bf0de803892eced54 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 15 Mar 2019 22:48:25 -0400 -Subject: [PATCH 2/6] DOC: Skip examples using unpackaged dependencies. +Subject: [PATCH 2/4] DOC: Skip examples using unpackaged dependencies. Signed-off-by: Elliott Sales de Andrade --- @@ -9,19 +9,19 @@ Signed-off-by: Elliott Sales de Andrade 1 file changed, 2 insertions(+) diff --git a/doc/io.rst b/doc/io.rst -index 85cb73a0..60990627 100644 +index e9109432..3e95540c 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`: +@@ -498,6 +498,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], -@@ -385,6 +386,7 @@ Conversely, we can create a new ``DataArray`` object from a ``Cube`` using - :py:meth:`~xarray.DataArray.from_iris`: +@@ -510,6 +511,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 85cb73a0..60990627 100644 da_cube = xr.DataArray.from_iris(cube) da_cube -- -2.21.0 +2.21.1 diff --git a/0004-DOC-Don-t-print-out-conda-pip-environment.patch b/0003-DOC-Don-t-print-out-conda-pip-environment.patch similarity index 56% rename from 0004-DOC-Don-t-print-out-conda-pip-environment.patch rename to 0003-DOC-Don-t-print-out-conda-pip-environment.patch index aaa115d..595ef0c 100644 --- a/0004-DOC-Don-t-print-out-conda-pip-environment.patch +++ b/0003-DOC-Don-t-print-out-conda-pip-environment.patch @@ -1,7 +1,7 @@ -From 46ca88294c55170c442417f7341571079f1bc2a9 Mon Sep 17 00:00:00 2001 +From aebdf7c14a3a7df2ab45467074b4dd6dacc8d682 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sat, 16 Mar 2019 02:59:15 -0400 -Subject: [PATCH 4/6] DOC: Don't print out conda/pip environment. +Subject: [PATCH 3/4] DOC: Don't print out conda/pip environment. Signed-off-by: Elliott Sales de Andrade --- @@ -9,23 +9,23 @@ Signed-off-by: Elliott Sales de Andrade 1 file changed, 7 deletions(-) diff --git a/doc/conf.py b/doc/conf.py -index 23766946..33bfcf9d 100644 +index 578f9cf5..a23031a0 100644 --- a/doc/conf.py +++ b/doc/conf.py -@@ -26,13 +26,6 @@ allowed_failures = set() +@@ -32,13 +32,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']) +-if "conda" in sys.executable: +- print("conda environment:") +- subprocess.run(["conda", "list"]) -else: -- print('pip environment:') -- subprocess.run(['pip', 'list']) +- print("pip environment:") +- subprocess.run(["pip", "list"]) - print("xarray: %s, %s" % (xarray.__version__, xarray.__file__)) with suppress(ImportError): -- -2.21.0 +2.21.1 diff --git a/0003-TST-Reduce-required-pytest-runner-version.patch b/0003-TST-Reduce-required-pytest-runner-version.patch deleted file mode 100644 index 4861d25..0000000 --- a/0003-TST-Reduce-required-pytest-runner-version.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 2b193b193b422b322a5f5e6475ce72d9a453fb9f Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade -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 ---- - 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 - diff --git a/0004-Use-drawstyle-instead-of-linestyle-in-plot.step.patch b/0004-Use-drawstyle-instead-of-linestyle-in-plot.step.patch new file mode 100644 index 0000000..10c2f81 --- /dev/null +++ b/0004-Use-drawstyle-instead-of-linestyle-in-plot.step.patch @@ -0,0 +1,78 @@ +From 7c9e266e5a2460391700a54da1c14e35205536a6 Mon Sep 17 00:00:00 2001 +From: Elliott Sales de Andrade +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 +--- + 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 + diff --git a/0005-Don-t-set-box-forced-in-Cartopy-example.patch b/0005-Don-t-set-box-forced-in-Cartopy-example.patch deleted file mode 100644 index 94e343e..0000000 --- a/0005-Don-t-set-box-forced-in-Cartopy-example.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 386cd9833b20bbb566501482ceffd89b962ee975 Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade -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 ---- - 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 - diff --git a/0006-Use-drawstyle-instead-of-linestyle-in-plot.step.patch b/0006-Use-drawstyle-instead-of-linestyle-in-plot.step.patch deleted file mode 100644 index 4266946..0000000 --- a/0006-Use-drawstyle-instead-of-linestyle-in-plot.step.patch +++ /dev/null @@ -1,76 +0,0 @@ -From f20d0d12197e20f0baa258347e8efdf9811f9fa1 Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade -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 ---- - 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 - diff --git a/python-xarray.spec b/python-xarray.spec index 7d8c9ff..1528ce6 100644 --- a/python-xarray.spec +++ b/python-xarray.spec @@ -4,8 +4,8 @@ %bcond_with docs Name: python-%{srcname} -Version: 0.12.3 -Release: 5%{?dist} +Version: 0.15.0 +Release: 1%{?dist} Summary: N-D labeled arrays and datasets in Python License: ASL 2.0 @@ -17,25 +17,22 @@ 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 -# https://github.com/pydata/xarray/pull/3273 -Patch0005: 0005-Don-t-set-box-forced-in-Cartopy-example.patch +Patch0003: 0003-DOC-Don-t-print-out-conda-pip-environment.patch # https://github.com/pydata/xarray/pull/3274 -Patch0006: 0006-Use-drawstyle-instead-of-linestyle-in-plot.step.patch +Patch0004: 0004-Use-drawstyle-instead-of-linestyle-in-plot.step.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(numpy) >= 1.15 +BuildRequires: python3dist(pandas) >= 0.25 BuildRequires: python3dist(pytest) >= 2.7.1 -BuildRequires: python3dist(pytest-runner) BuildRequires: python3dist(pytest-xdist) BuildRequires: python3dist(seaborn) BuildRequires: python3dist(setuptools) +BuildRequires: python3dist(setuptools-scm) %global _description %{expand: \ Xarray (formerly xray) is an open source project and Python package that @@ -71,6 +68,7 @@ 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(numpydoc) @@ -116,7 +114,7 @@ popd %check -%{__python3} setup.py test --addopts='-ra -n auto -m "not network"' +pytest-3 -ra -n auto -m "not network" %files -n python3-%{srcname} @@ -133,6 +131,9 @@ popd %changelog +* Sat Feb 08 2020 Elliott Sales de Andrade - 0.15.0-1 +- Update to latest version + * Thu Jan 30 2020 Fedora Release Engineering - 0.12.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/sources b/sources index c55402b..5e72087 100644 --- a/sources +++ b/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-0.15.0.tar.gz) = bb98ab523d58a1d6d9ea0bde0355951bb2bc4bf56e0d9a797eac87c6e64c4d7be90e8615a453d0bcba5863ba90be69664af7aaf171f2c652ff852663209994c5