Skip to content

Commit 5b1f315

Browse files
author
Alan Christie
committed
feat: Add get_steps to decoder
1 parent 4263159 commit 5b1f315

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

workflow/decoder.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ def get_step_names(definition: dict[str, Any]) -> list[str]:
4646
return names
4747

4848

49+
def get_steps(definition: dict[str, Any]) -> list[dict[str, Any]]:
50+
"""Given a Workflow definition this function returns the steps."""
51+
response: list[dict[str, Any]] = definition.get("steps", [])
52+
return response
53+
54+
4955
def get_workflow_name(definition: dict[str, Any]) -> str:
5056
"""Given a Workflow definition this function returns its name."""
5157
return str(definition.get("name", ""))

workflow/workflow_abc.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ def get_workflow(
8787
# "steps": [
8888
# {
8989
# "name": "step-name"
90+
# "specification": "{}",
9091
# }
9192
# ]
9293
# }

0 commit comments

Comments
 (0)