Skip to content

Commit

Permalink
Merge pull request #1520 from asthara10/include
Browse files Browse the repository at this point in the history
Print include statement when modules install
  • Loading branch information
drpatelh authored Apr 27, 2022
2 parents 6052563 + f0f5258 commit a383d6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- Add an empty line to `modules.json`, `params.json` and `nextflow-schema.json` when dumping them to avoid prettier errors.
- Add actions workflow to respond to `@nf-core-bot fix linting` comments on nf-core/tools PRs
- Linting: Don't allow a `.nf-core.yaml` file, should be `.yml` ([#1515](https://github.com/nf-core/tools/pull/1515)).
- Print include statement to terminal when `modules install` ([#1520](https://github.com/nf-core/tools/pull/1520))

### Modules

Expand Down
4 changes: 4 additions & 0 deletions nf_core/modules/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ def install(self, module):
if not self.download_module_file(module, version, self.modules_repo, install_folder):
return False

# Print include statement
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

0 comments on commit a383d6c

Please sign in to comment.