Skip to content

Commit

Permalink
update minimum versions and associated code cleanup (#2204)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Joe Hamman authored and shoyer committed Jul 8, 2018
1 parent 448c3f1 commit 1688a59
Show file tree
Hide file tree
Showing 24 changed files with 79 additions and 694 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ matrix:
env: CONDA_ENV=py27-min
- python: 2.7
env: CONDA_ENV=py27-cdat+iris+pynio
- python: 3.4
env: CONDA_ENV=py34
- python: 3.5
env: CONDA_ENV=py35
- python: 3.6
Expand Down Expand Up @@ -102,7 +100,7 @@ install:

script:
# TODO: restore this check once the upstream pandas issue is fixed:
# https://github.com/pandas-dev/pandas/issues/21071
# https://github.com/pandas-dev/pandas/issues/21071
# - python -OO -c "import xarray"
- if [[ "$CONDA_ENV" == "docs" ]]; then
conda install -c conda-forge sphinx sphinx_rtd_theme sphinx-gallery numpydoc;
Expand Down
4 changes: 2 additions & 2 deletions ci/requirements-py27-min.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ dependencies:
- pytest
- flake8
- mock
- numpy==1.11
- pandas==0.18.0
- numpy=1.12
- pandas=0.19
- pip:
- coveralls
- pytest-cov
10 changes: 0 additions & 10 deletions ci/requirements-py34.yml

This file was deleted.

5 changes: 2 additions & 3 deletions ci/requirements-py35.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ channels:
dependencies:
- python=3.5
- cftime
- dask
- distributed
- dask=0.16
- h5py
- h5netcdf
- matplotlib
- matplotlib=1.5
- netcdf4
- pytest
- flake8
Expand Down
9 changes: 5 additions & 4 deletions doc/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Installation
Required dependencies
---------------------

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

Optional dependencies
---------------------
Expand Down Expand Up @@ -45,13 +45,14 @@ For accelerating xarray
For parallel computing
~~~~~~~~~~~~~~~~~~~~~~

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

For plotting
~~~~~~~~~~~~

- `matplotlib <http://matplotlib.org/>`__: required for :ref:`plotting`
(1.5 or later)
- `cartopy <http://scitools.org.uk/cartopy/>`__: recommended for
:ref:`plot-maps`
- `seaborn <https://stanford.edu/~mwaskom/software/seaborn/>`__: for better
Expand Down
12 changes: 12 additions & 0 deletions doc/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,18 @@ Bug fixes
weren't monotonic (:issue:`2250`).
By `Fabien Maussion <https://github.com/fmaussion>`_.

Breaking changes
~~~~~~~~~~~~~~~~

- Xarray no longer supports python 3.4. Additionally, the minimum supported
versions of the following dependencies has been updated and/or clarified:

- Pandas: 0.18 -> 0.19
- NumPy: 1.11 -> 1.12
- Dask: 0.9 -> 0.16
- Matplotlib: unspecified -> 1.5

(:issue:`2204`). By `Joe Hamman <https://github.com/jhamman>`_.

.. _whats-new.0.10.7:

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@
tests_require=TESTS_REQUIRE,
url=URL,
packages=find_packages(),
package_data={'xarray': ['tests/data/*', 'plot/default_colormap.csv']})
package_data={'xarray': ['tests/data/*']})
4 changes: 2 additions & 2 deletions xarray/core/duck_array_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,9 @@ def f(values, axis=None, skipna=None, **kwargs):
median = _create_nan_agg_method('median', numeric_only=True)
prod = _create_nan_agg_method('prod', numeric_only=True, no_bottleneck=True)
cumprod_1d = _create_nan_agg_method(
'cumprod', numeric_only=True, np_compat=True, no_bottleneck=True)
'cumprod', numeric_only=True, no_bottleneck=True)
cumsum_1d = _create_nan_agg_method(
'cumsum', numeric_only=True, np_compat=True, no_bottleneck=True)
'cumsum', numeric_only=True, no_bottleneck=True)


def _nd_cum_func(cum_func, array, axis, **kwargs):
Expand Down
5 changes: 2 additions & 3 deletions xarray/core/missing.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

from . import rolling
from .computation import apply_ufunc
from .npcompat import flip
from .pycompat import iteritems
from .utils import is_scalar, OrderedSet
from .variable import Variable, broadcast_variables
Expand Down Expand Up @@ -245,13 +244,13 @@ def _bfill(arr, n=None, axis=-1):
'''inverse of ffill'''
import bottleneck as bn

arr = flip(arr, axis=axis)
arr = np.flip(arr, axis=axis)

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

# reverse back to original
return flip(arr, axis=axis)
return np.flip(arr, axis=axis)


def ffill(arr, dim=None, limit=None):
Expand Down
Loading

0 comments on commit 1688a59

Please sign in to comment.