File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -184,8 +184,9 @@ def generate_container_configs(
184184 for platform , module_containers in containers .items ():
185185 if not module_containers :
186186 continue
187+ container_key = "conda" if platform .startswith ("conda_lock_" ) else "container"
187188 lines = [
188- f"process {{ withName: '{ module_name } ' {{ container = '{ container } ' }} }}\n "
189+ f"process {{ withName: '{ module_name } ' {{ { container_key } = '{ container } ' }} }}\n "
189190 for module_name , container in sorted (module_containers .items ())
190191 ]
191192 config_path = self .workflow_directory / "conf" / f"containers_{ platform } .config"
Original file line number Diff line number Diff line change @@ -67,7 +67,8 @@ def test_generate_all_container_configs(self) -> None:
6767 with cfg_path .open ("r" ) as fh :
6868 content = fh .readlines ()
6969 value = fastqc_meta_yml ["containers" ][runtime ][arch ][protocol ]
70- assert f"process {{ withName: 'FASTQC' {{ container = '{ value } ' }} }}\n " in content
70+ key = "conda" if p_name .startswith ("conda_lock_" ) else "container"
71+ assert f"process {{ withName: 'FASTQC' {{ { key } = '{ value } ' }} }}\n " in content
7172
7273 def test_generate_container_configs_new_module_injected (self ) -> None :
7374 """new_module_name/path are used when nextflow inspect doesn't yet know about the module."""
@@ -96,7 +97,8 @@ def test_generate_container_configs_new_module_injected(self) -> None:
9697 cfg_path = conf_dir / f"containers_{ p_name } .config"
9798 assert cfg_path .exists ()
9899 value = fastqc_meta_yml ["containers" ][runtime ][arch ][protocol ]
99- assert f"process {{ withName: 'FASTQC' {{ container = '{ value } ' }} }}\n " in cfg_path .read_text ()
100+ key = "conda" if p_name .startswith ("conda_lock_" ) else "container"
101+ assert f"process {{ withName: 'FASTQC' {{ { key } = '{ value } ' }} }}\n " in cfg_path .read_text ()
100102
101103 def test_generate_container_configs_removes_stale_entries (self ) -> None :
102104 """Stale config files are deleted when all their modules have been removed."""
You can’t perform that action at this time.
0 commit comments