Skip to content

Commit

Permalink
stashing this
Browse files Browse the repository at this point in the history
  • Loading branch information
AngRodrigues committed Dec 11, 2024
1 parent 406f1a6 commit d29191a
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions map2loop/mapdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -1184,18 +1184,18 @@ def check_fault_fields_validity(self) -> Tuple[bool, str]:
# )

# Check if "fault_text" is defined and contained in the column
fault_text = config.get("fault_text", None)
if not fault_text:
logger.error(
"Datatype FAULT: 'fault_text' is not defined in the configuration, but it is required to filter faults."
)
return (True, "Datatype FAULT: 'fault_text' is not defined in the configuration.")

if not fault_data[structtype_column].str.contains(fault_text).any():
logger.error(
f"Datatype FAULT: The 'fault_text' value '{fault_text}' is not found in column '{structtype_column}'. Ensure it is correctly defined at least for one row"
)
return (True, f"Datatype FAULT: The 'fault_text' value '{fault_text}' is not found in column '{structtype_column}'.")
# fault_text = config.get("fault_text", None)
# if not fault_text:
# logger.error(
# "Datatype FAULT: 'fault_text' is not defined in the configuration, but it is required to filter faults."
# )
# return (True, "Datatype FAULT: 'fault_text' is not defined in the configuration.")

# if not fault_data[structtype_column].str.contains(fault_text).any():
# logger.error(
# f"Datatype FAULT: The 'fault_text' value '{fault_text}' is not found in column '{structtype_column}'. Ensure it is correctly defined at least for one row"
# )
# return (True, f"Datatype FAULT: The 'fault_text' value '{fault_text}' is not found in column '{structtype_column}'.")

#checks on name column
name_column = config.get("name_column")
Expand Down

0 comments on commit d29191a

Please sign in to comment.