Skip to content

Commit

Permalink
Merge pull request #2568 from mirpedrol/nftest-template
Browse files Browse the repository at this point in the history
migrating from pytest to nf-test will copy the template files
  • Loading branch information
mirpedrol authored Dec 14, 2023
2 parents cb787dd + 1a5e9b9 commit 7c56b2f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,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 ([#2568](https://github.com/nf-core/tools/pull/2568))

### Subworkflows

Expand Down
5 changes: 5 additions & 0 deletions nf_core/components/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,11 @@ def _copy_old_files(self, component_old_path):
if self.component_type == "modules":
log.debug("Copying original environment.yml file")
shutil.copyfile(component_old_path / "environment.yml", self.file_paths["environment.yml"])
if (component_old_path / "templates").is_dir():
log.debug("Copying original templates directory")
shutil.copytree(
component_old_path / "templates", self.file_paths["environment.yml"].parent / "templates"
)
# Create a nextflow.config file if it contains information other than publishDir
pytest_dir = Path(self.directory, "tests", self.component_type, self.org, self.component_dir)
nextflow_config = pytest_dir / "nextflow.config"
Expand Down

0 comments on commit 7c56b2f

Please sign in to comment.