From 5c4544071d1a85ef60f9ebb033a710da239007f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlia=20Mir=20Pedrol?= Date: Thu, 21 Apr 2022 10:35:36 +0200 Subject: [PATCH 1/4] print include statement when installing a module --- nf_core/modules/install.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nf_core/modules/install.py b/nf_core/modules/install.py index 673e1d7f4..a72c45da7 100644 --- a/nf_core/modules/install.py +++ b/nf_core/modules/install.py @@ -130,6 +130,14 @@ def install(self, module): if not self.download_module_file(module, version, self.modules_repo, install_folder): return False + # Print include statement + if module == "stringtie/stringtie": + # Only with stringtie the process name is STRINGTIE instead of STRINGTIE_STRINGTIE + module_name = module.upper().split("/")[0] + else: + module_name = "_".join(module.upper().split("/")) + log.info(f"Include statement: include {{ {module_name} }} from '.{os.path.join(*install_folder, module)}/main’") + # Update module.json with newly installed module self.update_modules_json(modules_json, self.modules_repo.name, module, version) return True From cd57124cbafe400374fee0daf7b711947b4c9387 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlia=20Mir=20Pedrol?= Date: Thu, 21 Apr 2022 10:59:50 +0200 Subject: [PATCH 2/4] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fc9e1067..89d265bf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Fix Prettier formatting bug in completion email HTML template ([#1509](https://github.com/nf-core/tools/issues/1509)) - Removed retry strategy for AWS tests CI, as Nextflow now handles spot instance retries itself - Add `.prettierignore` file to stop Prettier linting tests from running over test files +- Print include statement to terminal when `modules install` ([#1520](https://github.com/nf-core/tools/pull/1520)) ### General From b1e255957470f1ff83b897584f4cc45117b1d2f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlia=20Mir=20Pedrol?= Date: Thu, 21 Apr 2022 11:04:56 +0200 Subject: [PATCH 3/4] update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 89d265bf0..378f14f72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,12 +8,12 @@ - Fix Prettier formatting bug in completion email HTML template ([#1509](https://github.com/nf-core/tools/issues/1509)) - Removed retry strategy for AWS tests CI, as Nextflow now handles spot instance retries itself - Add `.prettierignore` file to stop Prettier linting tests from running over test files -- Print include statement to terminal when `modules install` ([#1520](https://github.com/nf-core/tools/pull/1520)) ### General - Bumped the minimum version of `rich` from `v10` to `v10.7.0` - Add an empty line to `modules.json`, `params.json` and `nextflow-schema.json` when dumping them to avoid prettier errors. +- Print include statement to terminal when `modules install` ([#1520](https://github.com/nf-core/tools/pull/1520)) ### Modules From 9fec61b4f2bed1dedde65b7ae4078fe2c1cb23c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlia=20Mir=20Pedrol?= Date: Thu, 21 Apr 2022 13:52:56 +0200 Subject: [PATCH 4/4] remove remove stringtie special case --- nf_core/modules/install.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/nf_core/modules/install.py b/nf_core/modules/install.py index a72c45da7..96f04cb34 100644 --- a/nf_core/modules/install.py +++ b/nf_core/modules/install.py @@ -131,11 +131,7 @@ def install(self, module): return False # Print include statement - if module == "stringtie/stringtie": - # Only with stringtie the process name is STRINGTIE instead of STRINGTIE_STRINGTIE - module_name = module.upper().split("/")[0] - else: - module_name = "_".join(module.upper().split("/")) + module_name = "_".join(module.upper().split("/")) log.info(f"Include statement: include {{ {module_name} }} from '.{os.path.join(*install_folder, module)}/main’") # Update module.json with newly installed module