@@ -37,7 +37,7 @@ def _get_function_template(function_name: str) -> dict:
3737 return {
3838 "function" : {
3939 "default" : function_name ,
40- "inputBinding" : {"position" : 2 , "prefix" : "--function=" , "separate" : False },
40+ "inputBinding" : {"position" : 3 , "prefix" : "--function=" , "separate" : False },
4141 "type" : "string" ,
4242 },
4343 }
@@ -96,9 +96,20 @@ def _write_function_cwl(workflow):
9696 "inputBinding" : {"position" : 1 , "prefix" : "-m" },
9797 "default" : "python_workflow_definition.cwl" ,
9898 },
99+ "workflowfile" : {
100+ "type" : "string" ,
101+ "inputBinding" : {
102+ "position" : 2 ,
103+ "separate" : False ,
104+ },
105+ "default" : "workflow.py" ,
106+ },
99107 },
100108 "outputs" : {},
101109 }
110+ template ["inputs" ]["workflowfile" ]["default" ] = (
111+ function_nodes_dict [i ].split ("." )[0 ] + ".py"
112+ )
102113 file_name = function_nodes_dict [i ].split ("." )[- 1 ] + ".cwl"
103114 if file_name not in file_lst :
104115 file_lst .append (file_name )
@@ -107,7 +118,7 @@ def _write_function_cwl(workflow):
107118 )
108119 for j , arg in enumerate (funct_dict [i ]["targetPorts" ]):
109120 template ["inputs" ].update (
110- _get_function_argument (argument = arg , position = 3 + j )
121+ _get_function_argument (argument = arg , position = 4 + j )
111122 )
112123 for out in funct_dict [i ]["sourcePorts" ]:
113124 if out is None :
0 commit comments