Loading autocnet/examples/__init__.py +2 −2 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ for d in dirs: file_2_dir[f] = tmp print(file_2_dir) def get_path(example_name): def get_path(example_name): # pragma: no cover """ Get the path of the example file Loading @@ -43,7 +43,7 @@ def get_path(example_name): raise KeyError(example_name + ' not found in built-in examples') def available(directory='', verbose=False): def available(directory='', verbose=False): # pragma: no cover """ List available datasets in autocnet.examples Loading autocnet/fileio/io_gdal.py +1 −1 Original line number Diff line number Diff line Loading @@ -114,7 +114,7 @@ class GeoDataSet(object): try: self._srs.MorphToESRI() self._srs.MorphFromESRI() except: pass except: pass #pragma: no cover #Setup the GCS self._gcs = self._srs.CloneGeogCS() Loading autocnet/fileio/tests/test_io_gdal.py +14 −2 Original line number Diff line number Diff line Loading @@ -61,6 +61,18 @@ class TestMercator(unittest.TestCase): def test_xpixelsize(self): self.assertAlmostEqual(self.ds.xpixelsize, 4630.0, 6) def test_xrotation(self): self.assertAlmostEqual(self.ds.xrotation, 0.0, 6) def test_yrotation(self): self.assertAlmostEqual(self.ds.yrotation, 0.0, 6) def test_centralmeridian(self): self.assertAlmostEqual(self.ds.central_meridian, 0.0, 6) def test_latlon_to_pixel(self): self.assertEqual(self.ds.latlon_to_pixel(0.0, 0.0), [4, 6]) def test_readarray(self): arr = self.ds.readarray() self.assertEqual(arr.shape, (1694, 2304)) Loading docs/conf.py +9 −9 Original line number Diff line number Diff line Loading @@ -15,6 +15,15 @@ import sys import os from unittest.mock import MagicMock class Mock(MagicMock): @classmethod def __getattr__(cls, name): return Mock() MOCK_MODULES = ['proj4', 'gdal', 'numpy', 'pandas', 'scipy'] sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) # If extensions (or modules to document with autodoc) are in another # directory, add these directories to sys.path here. If the directory is Loading Loading @@ -285,16 +294,7 @@ texinfo_documents = [ # If true, do not generate a @detailmenu in the "Top" node's menu. #texinfo_no_detailmenu = False #For ReadTheDocs, using Mocking to get the builds working. from unittest.mock import MagicMock class Mock(MagicMock): @classmethod def __getattr__(cls, name): return Mock() MOCK_MODULES = ['proj4', 'gdal', 'numpy', 'pandas', 'scipy'] sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) #NumpyDoc Options numpydoc_show_class_members = True Loading Loading
autocnet/examples/__init__.py +2 −2 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ for d in dirs: file_2_dir[f] = tmp print(file_2_dir) def get_path(example_name): def get_path(example_name): # pragma: no cover """ Get the path of the example file Loading @@ -43,7 +43,7 @@ def get_path(example_name): raise KeyError(example_name + ' not found in built-in examples') def available(directory='', verbose=False): def available(directory='', verbose=False): # pragma: no cover """ List available datasets in autocnet.examples Loading
autocnet/fileio/io_gdal.py +1 −1 Original line number Diff line number Diff line Loading @@ -114,7 +114,7 @@ class GeoDataSet(object): try: self._srs.MorphToESRI() self._srs.MorphFromESRI() except: pass except: pass #pragma: no cover #Setup the GCS self._gcs = self._srs.CloneGeogCS() Loading
autocnet/fileio/tests/test_io_gdal.py +14 −2 Original line number Diff line number Diff line Loading @@ -61,6 +61,18 @@ class TestMercator(unittest.TestCase): def test_xpixelsize(self): self.assertAlmostEqual(self.ds.xpixelsize, 4630.0, 6) def test_xrotation(self): self.assertAlmostEqual(self.ds.xrotation, 0.0, 6) def test_yrotation(self): self.assertAlmostEqual(self.ds.yrotation, 0.0, 6) def test_centralmeridian(self): self.assertAlmostEqual(self.ds.central_meridian, 0.0, 6) def test_latlon_to_pixel(self): self.assertEqual(self.ds.latlon_to_pixel(0.0, 0.0), [4, 6]) def test_readarray(self): arr = self.ds.readarray() self.assertEqual(arr.shape, (1694, 2304)) Loading
docs/conf.py +9 −9 Original line number Diff line number Diff line Loading @@ -15,6 +15,15 @@ import sys import os from unittest.mock import MagicMock class Mock(MagicMock): @classmethod def __getattr__(cls, name): return Mock() MOCK_MODULES = ['proj4', 'gdal', 'numpy', 'pandas', 'scipy'] sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) # If extensions (or modules to document with autodoc) are in another # directory, add these directories to sys.path here. If the directory is Loading Loading @@ -285,16 +294,7 @@ texinfo_documents = [ # If true, do not generate a @detailmenu in the "Top" node's menu. #texinfo_no_detailmenu = False #For ReadTheDocs, using Mocking to get the builds working. from unittest.mock import MagicMock class Mock(MagicMock): @classmethod def __getattr__(cls, name): return Mock() MOCK_MODULES = ['proj4', 'gdal', 'numpy', 'pandas', 'scipy'] sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) #NumpyDoc Options numpydoc_show_class_members = True Loading