Skip to content

update minimum versions and associated code cleanup #2204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Jul 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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