From 826a68a7695120c4ecc1865f54b2d2456ba74809 Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Mon, 11 Dec 2023 11:46:00 +0100 Subject: [PATCH 1/2] copy templates directory from old module if exists --- CHANGELOG.md | 1 + nf_core/components/create.py | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a68bb5571..2226f40de7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ - Replace ModulePatch by ComponentPatch ([#2482](https://github.com/nf-core/tools/pull/2482)) - Fixed `nf-core modules lint` to work with new module structure for nf-test ([#2494](https://github.com/nf-core/tools/pull/2494)) - Add option `--migrate-pytest` to create a module with nf-test taking into account an existing module ([#2549](https://github.com/nf-core/tools/pull/2549)) +- Modules `--migrate-pytest` copies template scripts () ### Subworkflows diff --git a/nf_core/components/create.py b/nf_core/components/create.py index 2105104922..c8457ec1d4 100644 --- a/nf_core/components/create.py +++ b/nf_core/components/create.py @@ -400,6 +400,7 @@ def _get_component_dirs(self): file_paths[os.path.join(self.component_type, "environment.yml")] = os.path.join( component_dir, "environment.yml" ) + file_paths["templates"] = component_dir / "templates" file_paths[os.path.join(self.component_type, "tests", "tags.yml")] = os.path.join( component_dir, "tests", "tags.yml" ) From 986c64faf93e8a385a18f291e5b4dfb7ca3b2afd Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Mon, 11 Dec 2023 12:37:48 +0100 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8d0d2ab0e..4656cdf6af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,7 @@ - Replace ModulePatch by ComponentPatch ([#2482](https://github.com/nf-core/tools/pull/2482)) - Fixed `nf-core modules lint` to work with new module structure for nf-test ([#2494](https://github.com/nf-core/tools/pull/2494)) - Add option `--migrate-pytest` to create a module with nf-test taking into account an existing module ([#2549](https://github.com/nf-core/tools/pull/2549)) -- Modules `--migrate-pytest` copies template scripts () +- Modules `--migrate-pytest` copies template scripts ([#2568](https://github.com/nf-core/tools/pull/2568)) ### Subworkflows