Skip to content

Commit

Permalink
Merge pull request #198 from bnaul/python2
Browse files Browse the repository at this point in the history
Add python2.7 to build matrix and restore python2-compatible syntax
  • Loading branch information
bnaul authored Oct 13, 2016
2 parents a7f9473 + b361e14 commit d39f4ae
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .drone/travis_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
set -ex

section "create.virtualenv"
python${TRAVIS_PYTHON_VERSION} -m venv ~/envs/cesium
#python -m venv ~/envs/cesium
virtualenv -p python ~/envs/cesium
source ~/envs/cesium/bin/activate
section_end "create.virtualenv"

Expand Down
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,14 @@ notifications:

matrix:
include:
- python: 2.7
env:
- TEST_TARGET=test
- python: 3.4
env:
- TEST_TARGET=test
- python: 3.5
env:
- WITH_DOC=1
- TEST_TARGET=test

before_install:
Expand Down
6 changes: 3 additions & 3 deletions cesium/featureset.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ def __getitem__(self, key):
if (isinstance(key, (slice, int))
or (hasattr(key, '__iter__') and all(isinstance(el, int)
for el in key))):
return super().isel(name=key)
return xr.Dataset.isel(self, name=key)
elif ((hasattr(key, '__iter__') and all(el in names for el in key)) or
key in names):
return super().sel(name=key)
return xr.Dataset.sel(self, name=key)
else:
return super().__getitem__(key)
return xr.Dataset.__getitem__(self, key)
2 changes: 1 addition & 1 deletion cesium/time_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def from_netcdf(netcdf_path):
return TimeSeries(t, m, e, target, meta_features, name, path)


class TimeSeries:
class TimeSeries(object):
"""Class representing a single time series of measurements and metadata.
A `TimeSeries` object encapsulates a single set of time-domain
Expand Down
2 changes: 1 addition & 1 deletion cesium/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version='0.6.5'
version='0.6.6'

0 comments on commit d39f4ae

Please sign in to comment.