diff --git a/.travis.yml b/.travis.yml index 881d293263b..8c2ee3ab0d5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,6 +32,7 @@ matrix: - env: CONDA_ENV=py36-rasterio - env: CONDA_ENV=py36-zarr-dev - env: CONDA_ENV=docs + - env: CONDA_ENV=flake8 - env: CONDA_ENV=py36-hypothesis allow_failures: @@ -62,6 +63,8 @@ before_install: install: - if [[ "$CONDA_ENV" == "docs" ]]; then conda env create -n test_env --file doc/environment.yml; + elif [[ "$CONDA_ENV" == "flake8" ]]; then + conda env create -n test_env --file ci/requirements-py37.yml; else conda env create -n test_env --file ci/requirements-$CONDA_ENV.yml; fi @@ -77,6 +80,8 @@ script: - if [[ "$CONDA_ENV" == "docs" ]]; then conda install -c conda-forge sphinx sphinx_rtd_theme sphinx-gallery numpydoc; sphinx-build -n -j auto -b html -d _build/doctrees doc _build/html; + elif [[ "$CONDA_ENV" == "flake8" ]]; then + flake8 xarray ; elif [[ "$CONDA_ENV" == "py36-hypothesis" ]]; then pytest properties ; else diff --git a/xarray/core/pdcompat.py b/xarray/core/pdcompat.py index c1e153f4d92..f76634c65aa 100644 --- a/xarray/core/pdcompat.py +++ b/xarray/core/pdcompat.py @@ -39,7 +39,6 @@ import numpy as np -import pandas as pd # for pandas 0.19 diff --git a/xarray/tests/test_dataarray.py b/xarray/tests/test_dataarray.py index 53f53574031..9b4f8523178 100644 --- a/xarray/tests/test_dataarray.py +++ b/xarray/tests/test_dataarray.py @@ -1028,7 +1028,7 @@ def test_sel(lab_indexer, pos_indexer, replaced_idx=False, assert_identical(mdata.sel(x={'one': 'a', 'two': 1}), mdata.sel(one='a', two=1)) - def test_selection_multiindex(self): + def test_selection_multiindex_remove_unused(self): # GH2619. For MultiIndex, we need to call remove_unused. ds = xr.DataArray(np.arange(40).reshape(8, 5), dims=['x', 'y'], coords={'x': np.arange(8), 'y': np.arange(5)})