Skip to content

Commit

Permalink
clean up comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mbthornton-lbl committed Nov 22, 2024
1 parent 3677acb commit 19f4e31
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
7 changes: 2 additions & 5 deletions nmdc_automation/workflow_automation/workflow_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,14 +220,11 @@ def _map_nodes_to_data_objects(current_nodes: List[WorkflowProcessNode], require
"""
node_data_object_map = dict()
for node in current_nodes:
for data_object_id in node.has_output:
for data_object_id in node.has_output + node.has_input:
if data_object_id in required_data_object_map:
do = required_data_object_map[data_object_id]
node.add_data_object(do)
# If its a dupe, set it to none
# so we can ignore it later.
# Once we re-id the data objects this
# Post re-id we would not expect thi

if data_object_id in node_data_object_map:
if data_object_id not in warned_objects:
logging.warning(f"Duplicate output object {data_object_id}")
Expand Down
19 changes: 9 additions & 10 deletions tests/test_workflow_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,21 +87,20 @@ def test_load_workflow_process_nodes_with_obsolete_versions(test_db, workflows_c

# _map_nodes_to_data_objects
node_dobj_map, current_nodes = _map_nodes_to_data_objects(current_nodes, data_objs_by_id)
# for node in current_nodes:
# assert node.data_objects_by_type
for node in current_nodes:
# check that the data objects are mapped to the nodes
assert node.data_objects_by_type
# parent / children are not set
assert node.parent is None
assert not node.children

# _resolve_relationships
resolved_nodes = _resolve_relationships(current_nodes, node_dobj_map)
assert resolved_nodes

workflow_process_nodes = load_workflow_process_nodes(test_db, workflow_config)
# for node in workflow_process_nodes:
# assert node.type in exp_current_node_types
# if node.type == "nmdc:NucleotideSequencing":
# assert node.children
# else:
# assert node.parent
assert workflow_process_nodes






Expand Down

0 comments on commit 19f4e31

Please sign in to comment.