diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 7bf1f9f..914fda2 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -37,6 +37,13 @@ jobs: flake8 . --count --exit-zero --max-complexity=15 --max-line-length=127 --statistics - name: Test with unittest run: | + export PYTHONPATH= + export PYTHONPATH=$PYTHONPATH:geodataflow/api/ + export PYTHONPATH=$PYTHONPATH:geodataflow/core/ + export PYTHONPATH=$PYTHONPATH:geodataflow/spatial/ + export PYTHONPATH=$PYTHONPATH:geodataflow/dataframes/ + export PYTHONPATH=$PYTHONPATH:geodataflow/spark/ + export PYTHONPATH=$PYTHONPATH:geodataflow/sql/ python -m unittest geodataflow/core/tests/test_*.py python -m unittest geodataflow/spatial/tests/test_*.py python -m unittest geodataflow/dataframes/tests/test_*.py diff --git a/geodataflow/core/geodataflow/core/processing.py b/geodataflow/core/geodataflow/core/processing.py index 5520a7e..179b6c0 100644 --- a/geodataflow/core/geodataflow/core/processing.py +++ b/geodataflow/core/geodataflow/core/processing.py @@ -306,4 +306,3 @@ def unpack(self, data_store) -> Iterable[object]: yield row pass - diff --git a/geodataflow/core/geodataflow/core/settingsmanager.py b/geodataflow/core/geodataflow/core/settingsmanager.py index 25a3142..68a6235 100644 --- a/geodataflow/core/geodataflow/core/settingsmanager.py +++ b/geodataflow/core/geodataflow/core/settingsmanager.py @@ -70,4 +70,4 @@ def load_from_dict(self, settings_dict: Dict) -> "SettingsManager": """ Singleton for Application Configuration. """ -ApplicationSettings: SettingsManager = SettingsManager() +ApplicationSettings = SettingsManager() diff --git a/geodataflow/dataframes/tests/data/test_feature_buffer.json b/geodataflow/dataframes/tests/data/test_feature_buffer.json index 1c44664..a00641c 100644 --- a/geodataflow/dataframes/tests/data/test_feature_buffer.json +++ b/geodataflow/dataframes/tests/data/test_feature_buffer.json @@ -23,10 +23,20 @@ } }, # Buffer of Geometries of input Features. + { + "type": "GeometryTransform", + "sourceCrs": 4326, + "targetCrs": 25830 + }, { "type": "GeometryBuffer", "distance": 0.01 }, + { + "type": "GeometryTransform", + "sourceCrs": 25830, + "targetCrs": 4326 + }, # Save Features to GeoPackage. { "type": "FeatureWriter", diff --git a/geodataflow/dataframes/tests/data/test_feature_centroid.json b/geodataflow/dataframes/tests/data/test_feature_centroid.json index c09f323..d30bd61 100644 --- a/geodataflow/dataframes/tests/data/test_feature_centroid.json +++ b/geodataflow/dataframes/tests/data/test_feature_centroid.json @@ -23,9 +23,19 @@ } }, # Centroid of Geometries of input Features. + { + "type": "GeometryTransform", + "sourceCrs": 4326, + "targetCrs": 25830 + }, { "type": "GeometryCentroid" }, + { + "type": "GeometryTransform", + "sourceCrs": 25830, + "targetCrs": 4326 + }, # Save Features to GeoPackage. { "type": "FeatureWriter", diff --git a/geodataflow/dataframes/tests/test_geopandas.py b/geodataflow/dataframes/tests/test_geopandas.py index 5722867..be44707 100644 --- a/geodataflow/dataframes/tests/test_geopandas.py +++ b/geodataflow/dataframes/tests/test_geopandas.py @@ -185,8 +185,8 @@ def test_func(features): feature = features[0] self.assertEqual(feature.type, 'Feature') self.assertEqual(feature.geometry.geom_type, 'Point') - self.assertAlmostEqual(feature.geometry.x, -1.6527555, places=6) - self.assertAlmostEqual(feature.geometry.y, 42.8170465, places=6) + self.assertAlmostEqual(feature.geometry.x, -1.652754, places=6) + self.assertAlmostEqual(feature.geometry.y, 42.817075, places=6) self.process_pipeline(test_func, pipeline_file) pass @@ -240,7 +240,7 @@ def test_func(features): feature = features[0] self.assertEqual(feature.type, 'Feature') self.assertEqual(feature.geometry.geom_type, 'Polygon') - self.assertAlmostEqual(feature.geometry.area, 0.0223177, places=6) + self.assertAlmostEqual(feature.geometry.area, 0.016489, places=6) self.process_pipeline(test_func, pipeline_file) pass diff --git a/geodataflow/spatial/geodataflow/spatial/modules/FeatureWriter.py b/geodataflow/spatial/geodataflow/spatial/modules/FeatureWriter.py index b4c4585..61c2927 100644 --- a/geodataflow/spatial/geodataflow/spatial/modules/FeatureWriter.py +++ b/geodataflow/spatial/geodataflow/spatial/modules/FeatureWriter.py @@ -67,7 +67,7 @@ def params(self) -> Dict: return { 'connectionString': { 'description': - "Connection string of the FeatureStore ('.csv', '.fgb', '.geojson', '.gpkg' and '.shp.zip' are supported).", + "Connection string of FeatureStore ('.csv', '.fgb', '.geojson', '.gpkg' and '.shp.zip' are supported).", 'dataType': 'string', 'default': 'output.gpkg', 'extensions': ['.csv', '.fgb', '.geojson', '.gpkg', '.shp.zip']