From d61a51d13dd7ddbcba326a1a1d5efccd09399914 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Thu, 12 May 2022 15:32:18 +0200 Subject: [PATCH] Put the -c back for the test pipeline nextflow.config Avoid needing to change loads of module files due to the template update. See https://github.com/nf-core/tools/issues/1562#issuecomment-1124994152 --- nf_core/module-template/tests/test.yml | 2 +- nf_core/modules/test_yml_builder.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nf_core/module-template/tests/test.yml b/nf_core/module-template/tests/test.yml index c1782107a..b0eb64584 100644 --- a/nf_core/module-template/tests/test.yml +++ b/nf_core/module-template/tests/test.yml @@ -1,7 +1,7 @@ ## TODO nf-core: Please run the following command to build this file: # nf-core modules create-test-yml {{ tool }}{%- if subtool %}/{{ subtool }}{%- endif %} - name: "{{ tool }}{{ ' '+subtool if subtool else '' }}" - command: nextflow run ./tests/modules/{{ tool_dir }} -entry test_{{ tool_name_underscore }} -c ./tests/config/nextflow.config + command: nextflow run ./tests/modules/{{ tool_dir }} -entry test_{{ tool_name_underscore }} -c ./tests/config/nextflow.config -c ./tests/modules/{{ tool_dir }}/nextflow.config tags: - "{{ tool }}" # {%- if subtool %} diff --git a/nf_core/modules/test_yml_builder.py b/nf_core/modules/test_yml_builder.py index f96b3d6ca..4b8537159 100644 --- a/nf_core/modules/test_yml_builder.py +++ b/nf_core/modules/test_yml_builder.py @@ -164,7 +164,9 @@ def build_single_test(self, entry_point): ep_test["name"] = rich.prompt.Prompt.ask("[violet]Test name", default=default_val).strip() while ep_test["command"] == "": - default_val = f"nextflow run ./tests/modules/{self.module_name} -entry {entry_point} -c ./tests/config/nextflow.config" + # Don't think we need the last `-c` flag, but keeping to avoid having to update 100s modules. + # See https://github.com/nf-core/tools/issues/1562 + default_val = f"nextflow run ./tests/modules/{self.module_name} -entry {entry_point} -c ./tests/config/nextflow.config -c ./tests/modules/{self.module_name}/nextflow.config" if self.no_prompts: ep_test["command"] = default_val else: