From b361e144d4a420125757237c26539e1d59b71d03 Mon Sep 17 00:00:00 2001 From: Brett Naul Date: Wed, 12 Oct 2016 12:24:43 -0700 Subject: [PATCH] Add python2.7 to build matrix and restore python2-compatible syntax --- .drone/travis_install.sh | 3 ++- .travis.yml | 7 ++++++- cesium/featureset.py | 6 +++--- cesium/time_series.py | 2 +- cesium/version.py | 2 +- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.drone/travis_install.sh b/.drone/travis_install.sh index 04525a71..c08914d9 100755 --- a/.drone/travis_install.sh +++ b/.drone/travis_install.sh @@ -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" diff --git a/.travis.yml b/.travis.yml index f05983e3..814ac95f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/cesium/featureset.py b/cesium/featureset.py index b0c549b4..d3e00815 100644 --- a/cesium/featureset.py +++ b/cesium/featureset.py @@ -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) diff --git a/cesium/time_series.py b/cesium/time_series.py index 3f6b04e0..e0dc12be 100644 --- a/cesium/time_series.py +++ b/cesium/time_series.py @@ -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 diff --git a/cesium/version.py b/cesium/version.py index ee7481da..cef2b624 100644 --- a/cesium/version.py +++ b/cesium/version.py @@ -1 +1 @@ -version='0.6.5' +version='0.6.6'