@@ -202,28 +202,7 @@ def run_workflows(yml_path_str: str, yml_path: Path, cwl_runner: str, args: argp
202202 with open (f'autogenerated/{ Path (yml_path ).stem } _tree_merged_inlined.wic' , mode = 'w' , encoding = 'utf-8' ) as f :
203203 f .write (yaml .dump (yaml_tree .yml ))
204204
205- # core compiler options for transformation into CWL
206- compiler_options : Dict [str , bool ] = {}
207- compiler_options ['partial_failure_enable' ] = args .partial_failure_enable
208- compiler_options ['inference_use_naming_conventions' ] = args .inference_use_naming_conventions
209- compiler_options ['insert_steps_automatically' ] = args .insert_steps_automatically
210- compiler_options ['inference_disable' ] = args .inference_disable
211- compiler_options ['allow_raw_cwl' ] = args .allow_raw_cwl
212-
213- # to be given to graph util functions
214- graph_settings = {}
215- graph_settings ['graph_dark_theme' ] = args .graph_dark_theme
216- graph_settings ['graph_inline_depth' ] = args .graph_inline_depth
217- graph_settings ['graph_label_edges' ] = args .graph_label_edges
218- graph_settings ['graph_label_stepname' ] = args .graph_label_stepname
219- graph_settings ['graph_show_outputs' ] = args .graph_show_outputs
220- graph_settings ['graph_show_inputs' ] = args .graph_show_inputs
221-
222- # to be given to io absolute_yaml_tags function
223- yaml_tag_paths : Dict [str , str ] = {}
224- yaml_tag_paths ['cachedir' ] = args .cachedir
225- yaml_tag_paths ['yaml' ] = args .yaml
226- yaml_tag_paths ['homedir' ] = args .homedir
205+ compiler_options , graph_settings , yaml_tag_paths = sophios .cli .get_dicts_for_compilation ()
227206
228207 graph = get_graph_reps (str (yml_path ))
229208 compiler_info = sophios .compiler .compile_workflow (yaml_tree , compiler_options , graph_settings , yaml_tag_paths ,
@@ -306,28 +285,8 @@ def test_cwl_embedding_independence(yml_path_str: str, yml_path: Path) -> None:
306285
307286 graph = get_graph_reps (str (yml_path ))
308287 is_root = True
309- # core compiler options for transformation into CWL
310- compiler_options : Dict [str , bool ] = {}
311- compiler_options ['partial_failure_enable' ] = args .partial_failure_enable
312- compiler_options ['inference_use_naming_conventions' ] = args .inference_use_naming_conventions
313- compiler_options ['insert_steps_automatically' ] = args .insert_steps_automatically
314- compiler_options ['inference_disable' ] = args .inference_disable
315- compiler_options ['allow_raw_cwl' ] = args .allow_raw_cwl
316-
317- # to be given to graph util functions
318- graph_settings = {}
319- graph_settings ['graph_dark_theme' ] = args .graph_dark_theme
320- graph_settings ['graph_inline_depth' ] = args .graph_inline_depth
321- graph_settings ['graph_label_edges' ] = args .graph_label_edges
322- graph_settings ['graph_label_stepname' ] = args .graph_label_stepname
323- graph_settings ['graph_show_outputs' ] = args .graph_show_outputs
324- graph_settings ['graph_show_inputs' ] = args .graph_show_inputs
325-
326- # to be given to io absolute_yaml_tags function
327- yaml_tag_paths : Dict [str , str ] = {}
328- yaml_tag_paths ['cachedir' ] = args .cachedir
329- yaml_tag_paths ['yaml' ] = args .yaml
330- yaml_tag_paths ['homedir' ] = args .homedir
288+
289+ compiler_options , graph_settings , yaml_tag_paths = sophios .cli .get_dicts_for_compilation ()
331290
332291 compiler_info = sophios .compiler .compile_workflow (yaml_tree , compiler_options , graph_settings , yaml_tag_paths ,
333292 [], [graph ], {}, {}, {}, {}, tools_cwl ,
@@ -434,28 +393,7 @@ def test_inline_subworkflows(yml_path_str: str, yml_path: Path) -> None:
434393 if namespaces_list == []:
435394 assert True # There's nothing to test
436395
437- # core compiler options for transformation into CWL
438- compiler_options : Dict [str , bool ] = {}
439- compiler_options ['partial_failure_enable' ] = args .partial_failure_enable
440- compiler_options ['inference_use_naming_conventions' ] = args .inference_use_naming_conventions
441- compiler_options ['insert_steps_automatically' ] = args .insert_steps_automatically
442- compiler_options ['inference_disable' ] = args .inference_disable
443- compiler_options ['allow_raw_cwl' ] = args .allow_raw_cwl
444-
445- # to be given to graph util functions
446- graph_settings : Dict [str , Any ] = {}
447- graph_settings ['graph_dark_theme' ] = args .graph_dark_theme
448- graph_settings ['graph_inline_depth' ] = args .graph_inline_depth
449- graph_settings ['graph_label_edges' ] = args .graph_label_edges
450- graph_settings ['graph_label_stepname' ] = args .graph_label_stepname
451- graph_settings ['graph_show_outputs' ] = args .graph_show_outputs
452- graph_settings ['graph_show_inputs' ] = args .graph_show_inputs
453-
454- # to be given to io absolute_yaml_tags function
455- yaml_tag_paths : Dict [str , str ] = {}
456- yaml_tag_paths ['cachedir' ] = args .cachedir
457- yaml_tag_paths ['yaml' ] = args .yaml
458- yaml_tag_paths ['homedir' ] = args .homedir
396+ compiler_options , graph_settings , yaml_tag_paths = sophios .cli .get_dicts_for_compilation ()
459397
460398 graph = get_graph_reps (str (yml_path ))
461399 compiler_info = sophios .compiler .compile_workflow (yaml_tree , compiler_options , graph_settings , yaml_tag_paths , [], [graph ], {},
0 commit comments