Louis Le Nézet
11/10/2026, 9:04 AMparams {
module_args = ""
}
process {
withName: "MYMODULE" {
ext.args = params.module_args
}
}
This way you can load the config for all the test in main.nf.test and only specify params.module_args only for the test where the value is different from “”.
This has been done for 9 modules (gcta, ldak and regenie) and I’m currently reviewing a module using it.
I quite like this solution and reduce a bit the main.nf.test file.
What do you think ?Maxime Garcia
11/10/2026, 9:06 AMMaxime Garcia
11/10/2026, 9:06 AMMaxime Garcia
11/10/2026, 9:06 AMLouis Le Nézet
11/10/2026, 9:07 AMext.args = params.module_args or ext.args = { params.module_args ?: "" } ?
I guess the first one should be sufficient ?Nicolas Vannieuwkerke
11/10/2026, 9:08 AMmashehu
11/10/2026, 9:09 AMMaxime Garcia
11/10/2026, 9:14 AMMaxime Garcia
11/10/2026, 9:14 AMMaxime Garcia
11/10/2026, 9:16 AMMaxime Garcia
11/10/2026, 9:16 AMMaxime Garcia
11/10/2026, 9:17 AMLouis Le Nézet
11/10/2026, 9:17 AMMaxime Garcia
11/10/2026, 9:21 AMLouis Le Nézet
11/10/2026, 9:27 AMparams {
module_args = ""
}
process {
withName: "REGENIE_STEP2" {
ext.args = { params.module_args ?: "" }
}
}
Isn’t it redundant ? you should simply need either to specify the default globally or use the closure ?Mahesh Binzer-Panchal
11/10/2026, 9:36 AMMahesh Binzer-Panchal
11/10/2026, 9:41 AMFirst one is sufficient since the param has to be declared or the linter complains.orext.args = params.module_argsext.args = { params.module_args ?: "" }