Skip to content

Commit

Permalink
de-cruft
Browse files Browse the repository at this point in the history
  • Loading branch information
mbthornton-lbl committed Nov 18, 2024
1 parent be9e752 commit 39a028e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
3 changes: 0 additions & 3 deletions nmdc_automation/models/nmdc.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ def workflow_process_factory(record: Dict[str, Any], validate: bool = False) ->
if validation_report.results:
raise ValueError(f"Validation error: {validation_report.results[0].message}")




try:
cls = process_types[record["type"]]
except KeyError:
Expand Down
23 changes: 0 additions & 23 deletions nmdc_automation/workflow_automation/wfutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,29 +551,6 @@ def make_workflow_execution(self, data_objects: List[DataObject]) -> WorkflowExe
return wfe


# def _normalize_workflow_dict(workflow_dict: Dict[str, Any]) -> Dict[str, Any]:
# """
# Traverse the workflow dict and normalize incorrectly formatted values e.g. "16.37" -> 16.37
# """
# logging.info("Normalizing workflow dict")
# for key, value in workflow_dict.items():
# if isinstance(value, dict):
# workflow_dict[key] = _normalize_workflow_dict(value)
# elif isinstance(value, list):
# workflow_dict[key] = [_normalize_value(key, item) for item in value]
# else:
# workflow_dict[key] = _normalize_value(key, value)
# return workflow_dict


# def _normalize_value(key: str, value: Any) -> Any:
# """
# Normalize a value based on the key.
# """
# if key in ["completeness", "contamination"]:
# logging.info(f"Normalizing {key} value: {value}")
# return float(value)
# return value

def _json_tmp(data):
fp, fname = tempfile.mkstemp(suffix=".json")
Expand Down

0 comments on commit 39a028e

Please sign in to comment.