add create_workflow script and test

This commit is contained in:
Junhan Chang
2025-10-21 20:32:00 +08:00
parent 3ff894feee
commit 8c77a20c43
3 changed files with 889 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
import pytest
import json
from scripts.workflow import build_protocol_graph, draw_protocol_graph, draw_protocol_graph_with_ports
@pytest.mark.parametrize("protocol_name", [
"example_bio",
# "bioyond_materials_liquidhandling_1",
])
def test_build_protocol_graph(protocol_name):
d = json.load(open(f"{protocol_name}.json"))
graph = build_protocol_graph(labware_info=d["reagent"], protocol_steps=d["workflow"], workstation_name="PRCXi")
draw_protocol_graph_with_ports(graph, "graph.png")
print(graph)