diff --git a/.travis.yml b/.travis.yml index 31d40550..e018f67c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,10 +3,8 @@ language: python dist: xenial jobs: include: - - python: 2.7 - python: 3.6 - python: 3.7 - - python: 3.8 services: xvfb addons: @@ -23,7 +21,10 @@ before_install: - pip install pandas - pip install xarray - pip install matplotlib - # Install pysatCDF and dump output +# Travis CI currently not working with netCDF4 1.5.3 + - pip install 'cftime==1.1.1' + - pip install 'netCDF4<1.5.3' +# Install pysatCDF and dump output - pip install pysatCDF >/dev/null # Prepare pysat install from git - cd .. diff --git a/pysatModels/tests/test_utils_extract.py b/pysatModels/tests/test_utils_extract.py index 56534b24..8b905076 100644 --- a/pysatModels/tests/test_utils_extract.py +++ b/pysatModels/tests/test_utils_extract.py @@ -6,6 +6,7 @@ import pytest import pysat +from pysat.instruments import pysat_testmodel import pysatModels.utils.extract as extract @@ -47,17 +48,15 @@ class TestUtilsExtractModObs: def setup(self): """Runs before every method to create a clean testing setup.""" self.inst = pysat.Instrument(platform=str('pysat'), - name=str('testing'), sat_id='1', + name=str('testing'), sat_id='10', clean_level='clean') - self.model = pysat.Instrument(platform=str('pysat'), - name=str('testing2d_xarray'), - clean_level='clean') + self.model = pysat.Instrument(inst_module=pysat_testmodel) self.inst.load(yr=2009, doy=1) self.model.load(yr=2009, doy=1) self.input_args = [self.inst, self.model.data, ["longitude", "latitude", "slt"], ["longitude", "latitude", "slt"], - "uts", "time", ["deg", "deg", "h"]] + "time", "time", ["deg", "deg", "h"]] def teardown(self): """Runs after every method to clean up previous testing.""" diff --git a/pysatModels/utils/match.py b/pysatModels/utils/match.py index e9adcb30..360566ec 100644 --- a/pysatModels/utils/match.py +++ b/pysatModels/utils/match.py @@ -224,9 +224,9 @@ def collect_inst_model_pairs(start, stop, tinc, inst, inst_download_kwargs={}, # Load the instrument data, if needed if inst.empty or inst.index[-1] < istart: - inst.custom.add(pysat.utils.coords.update_longitude, 'modify', - low=lon_low, lon_name=inst_lon_name, - high=lon_high) + inst.custom.attach(pysat.utils.coords.update_longitude, + 'modify', low=lon_low, + lon_name=inst_lon_name, high=lon_high) inst.load(date=istart) if not inst.empty and inst.index[0] >= istart: