+
Skip to content

update module commands with new format #983

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Strip values from `nf-core launch` web response which are False and have no default in the schema [[#976](https://github.com/nf-core/tools/issues/976)]
* Try to fix the fix for the automated sync when we submit too many PRs at once [[#970](https://github.com/nf-core/tools/issues/970)]
* Added `--conda-name` flag to `nf-core modules create` command to allow sidestepping questionary [[#988](https://github.com/nf-core/tools/issues/988)]
* Update `modules` commands to use new test tag format `tool/subtool`

### Template

Expand Down
2 changes: 1 addition & 1 deletion nf_core/module-template/tests/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
tags:
- {{ tool }}
{%- if subtool %}
- {{ tool_name }}
- {{ tool }}/{{ subtool }}
{%- endif %}
files:
- path: output/{{ tool }}/test.bam
Expand Down
2 changes: 1 addition & 1 deletion nf_core/modules/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def create(self):
self.tool_dir = self.tool

if self.subtool:
self.tool_name = f"{self.tool}_{self.subtool}"
self.tool_name = f"{self.tool}/{self.subtool}"
self.tool_dir = os.path.join(self.tool, self.subtool)

# Check existance of directories early for fast-fail
Expand Down
1 change: 1 addition & 0 deletions nf_core/modules/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@ def lint_module_tests(self):
# Lint the test.yml file
try:
with open(self.test_yml, "r") as fh:
# TODO: verify that the tags are correct
test_yml = yaml.safe_load(fh)
self.passed.append(("test_yml_exists", "Test `test.yml` exists", self.test_yml))
except FileNotFoundError:
Expand Down
2 changes: 1 addition & 1 deletion nf_core/modules/test_yml_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def build_single_test(self, entry_point):
mod_name_parts = self.module_name.split("/")
tag_defaults = []
for idx in range(0, len(mod_name_parts)):
tag_defaults.append("_".join(mod_name_parts[: idx + 1]))
tag_defaults.append("/".join(mod_name_parts[: idx + 1]))
tag_defaults.append(entry_point.replace("test_", ""))
# Remove duplicates
tag_defaults = list(set(tag_defaults))
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载