Skip to content

Commit 1688a59

Browse files
Joe Hammanshoyer
Joe Hamman
authored andcommitted
update minimum versions and associated code cleanup (#2204)
* update minimum versions and associated code cleanup * fix a few typos * pandas to 0.20 * dask min version to 0.16 * more min versions for ci * docs for pandas version * pandas ver 0.19 * revert back to using pytest.mark.skipif * bump min version of matplotlib to 1.5 (remove viridis colormap packaged in xarray) * pin distributed version as well * no distributed in compat build * skip distributed test for old versions of dask/distributed * skip a plotting test for older versions of mpl * whatsnew
1 parent 448c3f1 commit 1688a59

24 files changed

+79
-694
lines changed

.travis.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ matrix:
1414
env: CONDA_ENV=py27-min
1515
- python: 2.7
1616
env: CONDA_ENV=py27-cdat+iris+pynio
17-
- python: 3.4
18-
env: CONDA_ENV=py34
1917
- python: 3.5
2018
env: CONDA_ENV=py35
2119
- python: 3.6
@@ -102,7 +100,7 @@ install:
102100

103101
script:
104102
# TODO: restore this check once the upstream pandas issue is fixed:
105-
# https://github.com/pandas-dev/pandas/issues/21071
103+
# https://github.com/pandas-dev/pandas/issues/21071
106104
# - python -OO -c "import xarray"
107105
- if [[ "$CONDA_ENV" == "docs" ]]; then
108106
conda install -c conda-forge sphinx sphinx_rtd_theme sphinx-gallery numpydoc;

ci/requirements-py27-min.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ dependencies:
44
- pytest
55
- flake8
66
- mock
7-
- numpy==1.11
8-
- pandas==0.18.0
7+
- numpy=1.12
8+
- pandas=0.19
99
- pip:
1010
- coveralls
1111
- pytest-cov

ci/requirements-py34.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

ci/requirements-py35.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ channels:
44
dependencies:
55
- python=3.5
66
- cftime
7-
- dask
8-
- distributed
7+
- dask=0.16
98
- h5py
109
- h5netcdf
11-
- matplotlib
10+
- matplotlib=1.5
1211
- netcdf4
1312
- pytest
1413
- flake8

doc/installing.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ Installation
66
Required dependencies
77
---------------------
88

9-
- Python 2.7 [1]_, 3.4, 3.5, or 3.6
10-
- `numpy <http://www.numpy.org/>`__ (1.11 or later)
11-
- `pandas <http://pandas.pydata.org/>`__ (0.18.0 or later)
9+
- Python 2.7 [1]_, 3.5, or 3.6
10+
- `numpy <http://www.numpy.org/>`__ (1.12 or later)
11+
- `pandas <http://pandas.pydata.org/>`__ (0.19.2 or later)
1212

1313
Optional dependencies
1414
---------------------
@@ -45,13 +45,14 @@ For accelerating xarray
4545
For parallel computing
4646
~~~~~~~~~~~~~~~~~~~~~~
4747

48-
- `dask.array <http://dask.pydata.org>`__ (0.9.0 or later): required for
48+
- `dask.array <http://dask.pydata.org>`__ (0.16 or later): required for
4949
:ref:`dask`.
5050

5151
For plotting
5252
~~~~~~~~~~~~
5353

5454
- `matplotlib <http://matplotlib.org/>`__: required for :ref:`plotting`
55+
(1.5 or later)
5556
- `cartopy <http://scitools.org.uk/cartopy/>`__: recommended for
5657
:ref:`plot-maps`
5758
- `seaborn <https://stanford.edu/~mwaskom/software/seaborn/>`__: for better

doc/whats-new.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,18 @@ Bug fixes
6666
weren't monotonic (:issue:`2250`).
6767
By `Fabien Maussion <https://github.com/fmaussion>`_.
6868

69+
Breaking changes
70+
~~~~~~~~~~~~~~~~
71+
72+
- Xarray no longer supports python 3.4. Additionally, the minimum supported
73+
versions of the following dependencies has been updated and/or clarified:
74+
75+
- Pandas: 0.18 -> 0.19
76+
- NumPy: 1.11 -> 1.12
77+
- Dask: 0.9 -> 0.16
78+
- Matplotlib: unspecified -> 1.5
79+
80+
(:issue:`2204`). By `Joe Hamman <https://github.com/jhamman>`_.
6981

7082
.. _whats-new.0.10.7:
7183

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@
7171
tests_require=TESTS_REQUIRE,
7272
url=URL,
7373
packages=find_packages(),
74-
package_data={'xarray': ['tests/data/*', 'plot/default_colormap.csv']})
74+
package_data={'xarray': ['tests/data/*']})

xarray/core/duck_array_ops.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,9 @@ def f(values, axis=None, skipna=None, **kwargs):
363363
median = _create_nan_agg_method('median', numeric_only=True)
364364
prod = _create_nan_agg_method('prod', numeric_only=True, no_bottleneck=True)
365365
cumprod_1d = _create_nan_agg_method(
366-
'cumprod', numeric_only=True, np_compat=True, no_bottleneck=True)
366+
'cumprod', numeric_only=True, no_bottleneck=True)
367367
cumsum_1d = _create_nan_agg_method(
368-
'cumsum', numeric_only=True, np_compat=True, no_bottleneck=True)
368+
'cumsum', numeric_only=True, no_bottleneck=True)
369369

370370

371371
def _nd_cum_func(cum_func, array, axis, **kwargs):

xarray/core/missing.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
from . import rolling
1010
from .computation import apply_ufunc
11-
from .npcompat import flip
1211
from .pycompat import iteritems
1312
from .utils import is_scalar, OrderedSet
1413
from .variable import Variable, broadcast_variables
@@ -245,13 +244,13 @@ def _bfill(arr, n=None, axis=-1):
245244
'''inverse of ffill'''
246245
import bottleneck as bn
247246

248-
arr = flip(arr, axis=axis)
247+
arr = np.flip(arr, axis=axis)
249248

250249
# fill
251250
arr = bn.push(arr, axis=axis, n=n)
252251

253252
# reverse back to original
254-
return flip(arr, axis=axis)
253+
return np.flip(arr, axis=axis)
255254

256255

257256
def ffill(arr, dim=None, limit=None):

0 commit comments

Comments
 (0)