@@ -145,11 +145,11 @@ def __init__(self, step): # type: (Any) -> None
145
145
self .iterable = None # type: Iterable
146
146
self .name = uniquename (u"step %s" % shortname (self .id ))
147
147
148
- def job (self , joborder , basedir , output_callback , ** kwargs ):
148
+ def job (self , joborder , output_callback , ** kwargs ):
149
149
# type: (Dict[str,str], str, functools.partial[None], **Any) -> Generator
150
150
kwargs ["part_of" ] = self .name
151
151
kwargs ["name" ] = shortname (self .id )
152
- for j in self .step .job (joborder , basedir , output_callback , ** kwargs ):
152
+ for j in self .step .job (joborder , output_callback , ** kwargs ):
153
153
yield j
154
154
155
155
@@ -197,7 +197,7 @@ def receive_output(self, step, outputparms, jobout, processStatus):
197
197
198
198
step .completed = True
199
199
200
- def try_make_job (self , step , basedir , ** kwargs ):
200
+ def try_make_job (self , step , ** kwargs ):
201
201
# type: (WorkflowJobStep, str, **Any) -> Generator
202
202
inputparms = step .tool ["inputs" ]
203
203
outputparms = step .tool ["outputs" ]
@@ -241,18 +241,18 @@ def valueFromFunc(k, v): # type: (Any, Any) -> Any
241
241
for k ,v in inputobj .items ()}
242
242
243
243
if method == "dotproduct" or method is None :
244
- jobs = dotproduct_scatter (step , inputobj , basedir , scatter ,
244
+ jobs = dotproduct_scatter (step , inputobj , scatter ,
245
245
cast ( # known bug with mypy
246
246
# https://github.com/python/mypy/issues/797
247
247
Callable [[Any ], Any ],callback ), ** kwargs )
248
248
elif method == "nested_crossproduct" :
249
- jobs = nested_crossproduct_scatter (step , inputobj , basedir ,
249
+ jobs = nested_crossproduct_scatter (step , inputobj ,
250
250
scatter , cast (Callable [[Any ], Any ], callback ),
251
251
# known bug in mypy
252
252
# https://github.com/python/mypy/issues/797
253
253
** kwargs )
254
254
elif method == "flat_crossproduct" :
255
- jobs = flat_crossproduct_scatter (step , inputobj , basedir ,
255
+ jobs = flat_crossproduct_scatter (step , inputobj ,
256
256
scatter ,
257
257
cast (Callable [[Any ], Any ],
258
258
# known bug in mypy
@@ -262,7 +262,7 @@ def valueFromFunc(k, v): # type: (Any, Any) -> Any
262
262
_logger .debug (u"[job %s] job input %s" , step .name , json .dumps (inputobj , indent = 4 ))
263
263
inputobj = {k : valueFromFunc (k , v ) for k ,v in inputobj .items ()}
264
264
_logger .debug (u"[job %s] evaluated job input to %s" , step .name , json .dumps (inputobj , indent = 4 ))
265
- jobs = step .job (inputobj , basedir , callback , ** kwargs )
265
+ jobs = step .job (inputobj , callback , ** kwargs )
266
266
267
267
step .submitted = True
268
268
@@ -278,7 +278,7 @@ def valueFromFunc(k, v): # type: (Any, Any) -> Any
278
278
def run (self , ** kwargs ):
279
279
_logger .debug (u"[%s] workflow starting" , self .name )
280
280
281
- def job (self , joborder , basedir , output_callback , move_outputs = True , ** kwargs ):
281
+ def job (self , joborder , output_callback , move_outputs = True , ** kwargs ):
282
282
# type: (Dict[str,str], str, Callable[[Any, Any], Any], bool, **Any) -> Generator[WorkflowJob, None, None]
283
283
self .state = {}
284
284
self .processStatus = "success"
@@ -307,7 +307,7 @@ def job(self, joborder, basedir, output_callback, move_outputs=True, **kwargs):
307
307
308
308
for step in self .steps :
309
309
if not step .submitted :
310
- step .iterable = self .try_make_job (step , basedir , ** kwargs )
310
+ step .iterable = self .try_make_job (step , ** kwargs )
311
311
312
312
if step .iterable :
313
313
for newjob in step .iterable :
@@ -387,15 +387,15 @@ def __init__(self, toolpath_object, **kwargs):
387
387
388
388
# TODO: statically validate data links instead of doing it at runtime.
389
389
390
- def job (self , joborder , basedir , output_callback , ** kwargs ):
390
+ def job (self , joborder , output_callback , ** kwargs ):
391
391
# type: (Dict[str,str], str, Callable[[Any, Any], Any], **Any) -> Generator[WorkflowJob, None, None]
392
- builder = self ._init_job (joborder , basedir , ** kwargs )
392
+ builder = self ._init_job (joborder , ** kwargs )
393
393
wj = WorkflowJob (self , ** kwargs )
394
394
yield wj
395
395
396
396
kwargs ["part_of" ] = u"workflow %s" % wj .name
397
397
398
- for w in wj .job (builder .job , basedir , output_callback , ** kwargs ):
398
+ for w in wj .job (builder .job , output_callback , ** kwargs ):
399
399
yield w
400
400
401
401
def visit (self , op ):
@@ -497,7 +497,7 @@ def receive_output(self, output_callback, jobout, processStatus):
497
497
processStatus = "permanentFail"
498
498
output_callback (output , processStatus )
499
499
500
- def job (self , joborder , basedir , output_callback , ** kwargs ):
500
+ def job (self , joborder , output_callback , ** kwargs ):
501
501
# type: (Dict[str, Any], str, Callable[...,Any], **Any) -> Generator
502
502
for i in self .tool ["inputs" ]:
503
503
p = i ["id" ]
@@ -509,7 +509,7 @@ def job(self, joborder, basedir, output_callback, **kwargs):
509
509
kwargs ["hints" ] = kwargs .get ("hints" , []) + self .tool .get ("hints" , [])
510
510
511
511
try :
512
- for t in self .embedded_tool .job (joborder , basedir ,
512
+ for t in self .embedded_tool .job (joborder ,
513
513
functools .partial (self .receive_output , output_callback ),
514
514
** kwargs ):
515
515
yield t
@@ -554,7 +554,7 @@ def setTotal(self, total): # type: (int) -> None
554
554
self .output_callback (self .dest , self .processStatus )
555
555
556
556
557
- def dotproduct_scatter (process , joborder , basedir , scatter_keys , output_callback , ** kwargs ):
557
+ def dotproduct_scatter (process , joborder , scatter_keys , output_callback , ** kwargs ):
558
558
# type: (WorkflowJobStep, Dict[str, Any], str, List[str], Callable[..., Any], **Any) -> Generator[WorkflowJob, None, None]
559
559
l = None
560
560
for s in scatter_keys :
@@ -574,13 +574,13 @@ def dotproduct_scatter(process, joborder, basedir, scatter_keys, output_callback
574
574
for s in scatter_keys :
575
575
jo [s ] = kwargs ["valueFrom" ](s , joborder [s ][n ])
576
576
577
- for j in process .job (jo , basedir , functools .partial (rc .receive_scatter_output , n ), ** kwargs ):
577
+ for j in process .job (jo , functools .partial (rc .receive_scatter_output , n ), ** kwargs ):
578
578
yield j
579
579
580
580
rc .setTotal (l )
581
581
582
582
583
- def nested_crossproduct_scatter (process , joborder , basedir , scatter_keys , output_callback , ** kwargs ):
583
+ def nested_crossproduct_scatter (process , joborder , scatter_keys , output_callback , ** kwargs ):
584
584
# type: (WorkflowJobStep, Dict[str, Any], str, List[str], Callable[..., Any], **Any) -> Generator[WorkflowJob, None, None]
585
585
scatter_key = scatter_keys [0 ]
586
586
l = len (joborder [scatter_key ])
@@ -595,10 +595,10 @@ def nested_crossproduct_scatter(process, joborder, basedir, scatter_keys, output
595
595
jo [scatter_key ] = kwargs ["valueFrom" ](scatter_key , joborder [scatter_key ][n ])
596
596
597
597
if len (scatter_keys ) == 1 :
598
- for j in process .job (jo , basedir , functools .partial (rc .receive_scatter_output , n ), ** kwargs ):
598
+ for j in process .job (jo , functools .partial (rc .receive_scatter_output , n ), ** kwargs ):
599
599
yield j
600
600
else :
601
- for j in nested_crossproduct_scatter (process , jo , basedir ,
601
+ for j in nested_crossproduct_scatter (process , jo ,
602
602
scatter_keys [1 :], cast ( # known bug with mypy
603
603
# https://github.com/python/mypy/issues/797
604
604
Callable [[Any ], Any ],
@@ -622,7 +622,7 @@ def crossproduct_size(joborder, scatter_keys):
622
622
sum += crossproduct_size (joborder , scatter_keys [1 :])
623
623
return sum
624
624
625
- def flat_crossproduct_scatter (process , joborder , basedir , scatter_keys , output_callback , startindex , ** kwargs ):
625
+ def flat_crossproduct_scatter (process , joborder , scatter_keys , output_callback , startindex , ** kwargs ):
626
626
# type: (WorkflowJobStep, Dict[str, Any], str, List[str], Union[ReceiveScatterOutput,Callable[..., Any]], int, **Any) -> Generator[WorkflowJob, None, None]
627
627
scatter_key = scatter_keys [0 ]
628
628
l = len (joborder [scatter_key ])
@@ -644,11 +644,11 @@ def flat_crossproduct_scatter(process, joborder, basedir, scatter_keys, output_c
644
644
jo [scatter_key ] = kwargs ["valueFrom" ](scatter_key , joborder [scatter_key ][n ])
645
645
646
646
if len (scatter_keys ) == 1 :
647
- for j in process .job (jo , basedir , functools .partial (rc .receive_scatter_output , put ), ** kwargs ):
647
+ for j in process .job (jo , functools .partial (rc .receive_scatter_output , put ), ** kwargs ):
648
648
yield j
649
649
put += 1
650
650
else :
651
- for j in flat_crossproduct_scatter (process , jo , basedir , scatter_keys [1 :], rc , put , ** kwargs ):
651
+ for j in flat_crossproduct_scatter (process , jo , scatter_keys [1 :], rc , put , ** kwargs ):
652
652
if j :
653
653
put += 1
654
654
yield j
0 commit comments