Skip to content

Commit

Permalink
strip output_dir when normalizing mags record
Browse files Browse the repository at this point in the history
  • Loading branch information
mbthornton-lbl committed Nov 18, 2024
1 parent d60fd21 commit 903b032
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions nmdc_automation/models/nmdc.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ def _normalize_mags_record(record: Dict[str, Any]) -> Dict[str, Any]:
# for backwards compatibility normalize num_tRNA to num_t_rna
if "num_tRNA" in mag:
record["mags_list"][i]["num_t_rna"] = mag.pop("num_tRNA")
# strip output_dir if present
if "output_dir" in mag:
record["mags_list"][i].pop("output_dir")
# add type to eukaryotic_evaluation if it exists
if "eukaryotic_evaluation" in mag:
record["mags_list"][i]["eukaryotic_evaluation"]["type"] = "nmdc:EukEval"
Expand Down
2 changes: 1 addition & 1 deletion nmdc_automation/workflow_automation/wfutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ def make_data_objects(self, output_dir: Union[str, Path] = None) -> List[DataObj

def make_workflow_execution(self, data_objects: List[DataObject]) -> WorkflowExecution:
"""
Create a workflow execution record for the job. This record includes the basic workflow execution attributes
Create a workflow execution instance for the job. This record includes the basic workflow execution attributes
and the data objects generated by the job. Additional workflow-specific attributes can be defined in the
workflow execution template and read from a job's output files.
The data objects are added to the record as a list of IDs in the "has_output" key.
Expand Down

0 comments on commit 903b032

Please sign in to comment.