File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -76,3 +76,17 @@ def get_variable_names(definition: dict[str, Any]) -> list[str]:
76
76
output_variable ["name" ] for output_variable in variables .get ("outputs" , [])
77
77
)
78
78
return wf_variable_names
79
+
80
+
81
+ def get_required_variable_names (definition : dict [str , Any ]) -> list [str ]:
82
+ """Given a Workflow definition this function returns all the names of the
83
+ variables that are required to be defined when it is RUN - i.e.
84
+ all those the user needs to provide."""
85
+ required_variables : list [str ] = []
86
+ variables : dict [str , Any ] | None = definition .get ("variables" )
87
+ if variables :
88
+ # For now, all inputs are required...
89
+ required_variables .extend (
90
+ input_variable ["name" ] for input_variable in variables .get ("inputs" , [])
91
+ )
92
+ return required_variables
You can’t perform that action at this time.
0 commit comments