From 675e98ee898f51d92ba166c7ca52238ded9210a9 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Tue, 10 Dec 2024 15:16:04 +0100 Subject: [PATCH] Sync symbols with GTN --- scripts/create_mermaid.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/create_mermaid.py b/scripts/create_mermaid.py index 37306bd99..9a6f84fdb 100644 --- a/scripts/create_mermaid.py +++ b/scripts/create_mermaid.py @@ -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( @@ -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}"