Loading .travis.yml +6 −4 Original line number Diff line number Diff line Loading @@ -10,11 +10,10 @@ os: - osx env: - PYTHON_VERSION=3.5 HAS_GDAL=true - PYTHON_VERSION=3.6 HAS_GDAL=true - PYTHON_VERSION=3.5 HAS_GDAL=false - PYTHON_VERSION=3.6 HAS_GDAL=false - PYTHON_VERSION=3.7 HAS_GDAL=true - PYTHON_VERSION=3.7 HAS_GDAL=false before_install: # We do this conditionally because it saves us some downloading if the # version is the same. Loading Loading @@ -56,7 +55,10 @@ after_success: - conda config --set anaconda_upload no - conda build recipe -q - builddir=(`conda build recipe --output`) - anaconda -t="$CONDA_UPLOAD_TOKEN" upload $builddir --label dev --force; - | if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then anaconda -t="$CONDA_UPLOAD_TOKEN" upload $builddir --force; fi # Docs to gh-pages - source activate test # Reactivate the env to have all deps installed. Loading environment.yml +3 −3 Original line number Diff line number Diff line Loading @@ -3,8 +3,8 @@ channels: - conda-forge - usgs-astrogeology dependencies: - libgdal - gdal - libgdal < 3 - gdal < 3 - numpy - pyproj - h5py Loading plio/io/io_gdal.py +2 −0 Original line number Diff line number Diff line Loading @@ -191,6 +191,7 @@ class GeoDataset(object): @property def forward_affine(self): print(self.geotransform) self._fa = affine.Affine.from_gdal(*self.geotransform) return self._fa Loading Loading @@ -460,6 +461,7 @@ class GeoDataset(object): (Latitude, Longitude) corresponding to the given (x,y). """ lon, lat = self.forward_affine * (x,y) lon, lat, _ = self.coordinate_transformation.TransformPoint(lon, lat) return lat, lon Loading plio/io/io_yaml.py +1 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ def read_yaml(inputfile): """ try: with open(inputfile, 'r') as f: ydict = yaml.load(f) ydict = yaml.safe_load(f) except: # pragma: no cover raise IOError('Unable to load YAML file.') return ydict plio/io/tests/test_io_gdal.py +14 −12 Original line number Diff line number Diff line Loading @@ -62,7 +62,9 @@ class TestMercator(unittest.TestCase): def test_spheroid(self): sphere = self.dataset.spheroid self.assertAlmostEqual(sphere[0], 3396190.0, 6) self.assertEqual(self.dataset.spheroid, (3396190.0, 3376200.0, 169.8944472236118)) self.assertAlmostEqual(self.dataset.spheroid[0], 3396190.0) self.assertAlmostEqual(self.dataset.spheroid[1], 3376200.0) self.assertAlmostEqual(self.dataset.spheroid[2], 169.8944472236118) self.assertAlmostEqual(sphere[1], 3376200.0, 6) self.assertAlmostEqual(sphere[2], 169.8944472236118, 6) Loading Loading
.travis.yml +6 −4 Original line number Diff line number Diff line Loading @@ -10,11 +10,10 @@ os: - osx env: - PYTHON_VERSION=3.5 HAS_GDAL=true - PYTHON_VERSION=3.6 HAS_GDAL=true - PYTHON_VERSION=3.5 HAS_GDAL=false - PYTHON_VERSION=3.6 HAS_GDAL=false - PYTHON_VERSION=3.7 HAS_GDAL=true - PYTHON_VERSION=3.7 HAS_GDAL=false before_install: # We do this conditionally because it saves us some downloading if the # version is the same. Loading Loading @@ -56,7 +55,10 @@ after_success: - conda config --set anaconda_upload no - conda build recipe -q - builddir=(`conda build recipe --output`) - anaconda -t="$CONDA_UPLOAD_TOKEN" upload $builddir --label dev --force; - | if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then anaconda -t="$CONDA_UPLOAD_TOKEN" upload $builddir --force; fi # Docs to gh-pages - source activate test # Reactivate the env to have all deps installed. Loading
environment.yml +3 −3 Original line number Diff line number Diff line Loading @@ -3,8 +3,8 @@ channels: - conda-forge - usgs-astrogeology dependencies: - libgdal - gdal - libgdal < 3 - gdal < 3 - numpy - pyproj - h5py Loading
plio/io/io_gdal.py +2 −0 Original line number Diff line number Diff line Loading @@ -191,6 +191,7 @@ class GeoDataset(object): @property def forward_affine(self): print(self.geotransform) self._fa = affine.Affine.from_gdal(*self.geotransform) return self._fa Loading Loading @@ -460,6 +461,7 @@ class GeoDataset(object): (Latitude, Longitude) corresponding to the given (x,y). """ lon, lat = self.forward_affine * (x,y) lon, lat, _ = self.coordinate_transformation.TransformPoint(lon, lat) return lat, lon Loading
plio/io/io_yaml.py +1 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ def read_yaml(inputfile): """ try: with open(inputfile, 'r') as f: ydict = yaml.load(f) ydict = yaml.safe_load(f) except: # pragma: no cover raise IOError('Unable to load YAML file.') return ydict
plio/io/tests/test_io_gdal.py +14 −12 Original line number Diff line number Diff line Loading @@ -62,7 +62,9 @@ class TestMercator(unittest.TestCase): def test_spheroid(self): sphere = self.dataset.spheroid self.assertAlmostEqual(sphere[0], 3396190.0, 6) self.assertEqual(self.dataset.spheroid, (3396190.0, 3376200.0, 169.8944472236118)) self.assertAlmostEqual(self.dataset.spheroid[0], 3396190.0) self.assertAlmostEqual(self.dataset.spheroid[1], 3376200.0) self.assertAlmostEqual(self.dataset.spheroid[2], 169.8944472236118) self.assertAlmostEqual(sphere[1], 3376200.0, 6) self.assertAlmostEqual(sphere[2], 169.8944472236118, 6) Loading