@@ -386,6 +386,8 @@ def check_all_types(
386
386
message = "Source is from conditional step, but pickValue is not used" ,
387
387
)
388
388
)
389
+ if is_all_output_method_loop_step (param_to_step , parm_id ):
390
+ src_dict [parm_id ]['type' ] = {'type' : 'array' , 'items' : src_dict [parm_id ]['type' ]}
389
391
else :
390
392
parm_id = cast (str , sink [sourceField ])
391
393
if parm_id not in src_dict :
@@ -427,6 +429,9 @@ def check_all_types(
427
429
428
430
srcs_of_sink [0 ]["type" ] = src_typ
429
431
432
+ if is_all_output_method_loop_step (param_to_step , parm_id ):
433
+ src_dict [parm_id ]['type' ] = {'type' : 'array' , 'items' : src_dict [parm_id ]['type' ]}
434
+
430
435
for src in srcs_of_sink :
431
436
check_result = check_types (src , sink , linkMerge , valueFrom )
432
437
if check_result == "warning" :
@@ -514,3 +519,16 @@ def is_conditional_step(param_to_step: Dict[str, CWLObjectType], parm_id: str) -
514
519
if source_step .get ("when" ) is not None :
515
520
return True
516
521
return False
522
+
523
+
524
+ def is_all_output_method_loop_step (param_to_step : Dict [str , CWLObjectType ], parm_id : str ) -> bool :
525
+ source_step = param_to_step .get (parm_id )
526
+ if source_step is not None :
527
+ requirements = {
528
+ ** {h ['class' ]: h for h in source_step .get ('hints' , [])},
529
+ ** {r ['class' ]: r for r in source_step .get ('requirements' , [])}}
530
+ if 'http://commonwl.org/cwltool#Loop' in requirements :
531
+ output_method = requirements ['http://commonwl.org/cwltool#Loop' ].get ('outputMethod' , 'last' )
532
+ if output_method == 'all' :
533
+ return True
534
+ return False
0 commit comments