11#!/usr/bin/env python
22# -*- coding: utf-8 -*-
33#
4- # Copyright (c) 2025 The WfCommons Team.
4+ # Copyright (c) 2025-2026 The WfCommons Team.
55#
66# This program is free software: you can redistribute it and/or modify
77# it under the terms of the GNU General Public License as published by
@@ -105,6 +105,7 @@ def _additional_setup_swiftt(container):
105105 "dask" : noop ,
106106 "parsl" : noop ,
107107 "nextflow" : noop ,
108+ "nextflow_subworkflow" : noop ,
108109 "airflow" : noop ,
109110 "bash" : noop ,
110111 "taskvine" : _additional_setup_taskvine ,
@@ -203,6 +204,7 @@ def run_workflow_swiftt(container, num_tasks, str_dirpath):
203204 "dask" : run_workflow_dask ,
204205 "parsl" : run_workflow_parsl ,
205206 "nextflow" : run_workflow_nextflow ,
207+ "nextflow_subworkflow" : run_workflow_nextflow ,
206208 "airflow" : run_workflow_airflow ,
207209 "bash" : run_workflow_bash ,
208210 "taskvine" : run_workflow_taskvine ,
@@ -216,6 +218,7 @@ def run_workflow_swiftt(container, num_tasks, str_dirpath):
216218 "dask" : DaskTranslator ,
217219 "parsl" : ParslTranslator ,
218220 "nextflow" : NextflowTranslator ,
221+ "nextflow_subworkflow" : NextflowTranslator ,
219222 "airflow" : AirflowTranslator ,
220223 "bash" : BashTranslator ,
221224 "taskvine" : TaskVineTranslator ,
@@ -235,6 +238,7 @@ class TestTranslators:
235238 "dask" ,
236239 "parsl" ,
237240 "nextflow" ,
241+ "nextflow_subworkflow" ,
238242 "airflow" ,
239243 "bash" ,
240244 "taskvine" ,
@@ -256,7 +260,10 @@ def test_translator(self, backend) -> None:
256260
257261 # Perform the translation
258262 sys .stderr .write (f"\n [{ backend } ] Translating workflow...\n " )
259- translator = translator_classes [backend ](benchmark .workflow )
263+ if backend == "nextflow_subworkflow" :
264+ translator = translator_classes [backend ](benchmark .workflow , use_subworkflows = True , max_tasks_per_subworkflow = 10 )
265+ else :
266+ translator = translator_classes [backend ](benchmark .workflow )
260267 translator .translate (output_folder = dirpath )
261268
262269 # # Make the directory that holds the translation world-writable,
@@ -266,7 +273,7 @@ def test_translator(self, backend) -> None:
266273 # os.chmod(dirpath, 0o777)
267274
268275 # Start the Docker container
269- container = _start_docker_container (backend , str_dirpath , str_dirpath , str_dirpath + "bin/" )
276+ container = _start_docker_container (backend if backend != "nextflow_subworkflow" else "nextflow" , str_dirpath , str_dirpath , str_dirpath + "bin/" )
270277
271278 # Do whatever necessary setup
272279 additional_setup_methods [backend ](container )
0 commit comments