Skip to content

Commit

Permalink
Add flake check to travis (#2632)
Browse files Browse the repository at this point in the history
* add flake check to travis

* only flake xarray

* flake changes

* rename flake -> flake8 in travis config
  • Loading branch information
max-sixty authored and shoyer committed Dec 30, 2018
1 parent a8e5002 commit 1545b50
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion xarray/core/pdcompat.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@


import numpy as np
import pandas as pd


# for pandas 0.19
Expand Down
2 changes: 1 addition & 1 deletion xarray/tests/test_dataarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)})
Expand Down

0 comments on commit 1545b50

Please sign in to comment.