Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
mrsmrynk committed Dec 16, 2023
1 parent 60b6b70 commit 4bbdcd2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/parsing/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def validate_path_boundary(cls,
:raises GeoDataEmptyError: if the geo data is empty
:raises GeoDataFormatError: if the file extension of the geo data is not .gpkg or .shp
:raises GeoDataGeometryError: if the geo data contains invalid polygons
:raises GeoDataLoadingError: if an exception occurs while loading the geo data
:raises GeoDataLoadingError: if an exception is raised while loading the geo data
(the exception raised by geopandas is passed)
:raises GeoDataNotFoundError: if the geo data does not exist
:raises GeoDataTypeError: if the geo data contains geometries other than polygons
Expand Down Expand Up @@ -313,7 +313,7 @@ def validate_path_aggregation_areas(cls,
:raises GeoDataEmptyError: if the geo data is empty
:raises GeoDataFormatError: if the file extension of the geo data is not .gpkg or .shp
:raises GeoDataGeometryError: if the geo data contains invalid polygons
:raises GeoDataLoadingError: if an exception occurs while loading the geo data
:raises GeoDataLoadingError: if an exception is raised while loading the geo data
(the exception raised by geopandas is passed)
:raises GeoDataNotFoundError: if the geo data does not exist
:raises GeoDataTypeError: if the geo data contains geometries other than polygons
Expand Down
2 changes: 1 addition & 1 deletion src/parsing/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def __init__(self,
"""
message = (
f'Invalid {field} in the config!\n'
f'An exception occurred while loading the geo data at {path}.\n'
f'An exception is raised while loading the geo data at {path}.\n'
f'{passed_exception}')

super().__init__(message)
Expand Down
4 changes: 2 additions & 2 deletions src/parsing/tests/data/data_test_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@
data_test_GeoDataLoadingError = (
[(('path_test', Path(r'path\to\geo_data.gpkg'), Exception('Test message.')),
r'Invalid path_test in the config!\n'
r'An exception occurred while loading the geo data at path\\to\\geo_data.gpkg.\n'
r'An exception is raised while loading the geo data at path\\to\\geo_data.gpkg.\n'
'Test message.'),
(('path_test', Path('path/to/geo_data.gpkg'), Exception('Test message.')),
r'Invalid path_test in the config!\n'
r'An exception occurred while loading the geo data at path/to/geo_data.gpkg.\n'
r'An exception is raised while loading the geo data at path/to/geo_data.gpkg.\n'
'Test message.')])

data_test_GeoDataNotFoundError = (
Expand Down

0 comments on commit 4bbdcd2

Please sign in to comment.