Skip to content

Commit

Permalink
more logging to help debug
Browse files Browse the repository at this point in the history
  • Loading branch information
mbthornton-lbl committed Nov 15, 2024
1 parent e20f88f commit e9d9fe6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nmdc_automation/workflow_automation/wfutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,7 @@ def make_workflow_execution_record(self, data_objects: List[DataObject]) -> Dict
for field_name in field_names:
# add to wf_dict if it has a value
if field_name in data:
logging.info(f"Adding {field_name} from {data_path} to workflow execution record")
wf_dict[field_name] = _normalize_value(field_name,data[field_name])
else:
logging.warning(f"Field {field_name} not found in {data_path}")
Expand All @@ -554,6 +555,7 @@ def _normalize_value(field_name,value: Any) -> Any:
""" Normalize values and fix common issues """
# completeness and contamination need to be converted from string to float
if field_name in ["completeness", "contamination"]:
logging.info(f"Converting {field_name} to float")
return float(value)

return value
Expand Down

0 comments on commit e9d9fe6

Please sign in to comment.