Skip to content

Commit 1568248

Browse files
fix: add check for geology_data
1 parent 5328fef commit 1568248

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

map2loop/sorter.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,16 @@ def __init__(
8080
"""
8181
super().__init__()
8282
self.sorter_label = "SorterUseNetworkX"
83+
84+
if isinstance(geology_data, geopandas.GeoDataFrame) is False:
85+
raise TypeError("geology_data must be a geopandas.GeoDataFrame")
86+
8387
if 'UNITNAME' not in geology_data.columns:
8488
raise ValueError("geology_data must contain 'UNITNAME' column")
89+
8590
self.topology = Topology(geology_data=geology_data)
8691
self.unit_relationships = self.topology.get_unit_unit_relationships()
92+
8793
@beartype.beartype
8894
def sort(self, units: pandas.DataFrame) -> list:
8995
"""

0 commit comments

Comments
 (0)