Skip to content

Commit

Permalink
Sync symbols with GTN
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Dec 10, 2024
1 parent 3a5e1a4 commit 675e98e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion scripts/create_mermaid.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
"tool": "@{ shape: process }",
"subworkflow": "@{ shape: subprocess }",
}
STEP_TYPE_TO_SYMBOL = {
"data_input": "ℹ️ ",
"data_collection_input": "ℹ️ ",
"parameter_input": "ℹ️ ",
"subworkflow": "🛠️ ",
"tool": "",
}


def step_to_mermaid_item(
Expand All @@ -21,7 +28,8 @@ def step_to_mermaid_item(
],
step_label: str,
):
step_label_anchor = f'["{step_label}"]'
prefix = STEP_TYPE_TO_SYMBOL[step_type]
step_label_anchor = f'["{prefix}{step_label}"]'
shape = STEP_TYPE_TO_SHAPE.get(step_type, "")
return f"{step_label_anchor}{shape}"

Expand Down

0 comments on commit 675e98e

Please sign in to comment.