Skip to content

Commit

Permalink
fix more pytests
Browse files Browse the repository at this point in the history
  • Loading branch information
mirpedrol committed Feb 11, 2025
1 parent 3dead1e commit 47036ff
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion nf_core/module-template/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ process {{ component_name_underscore|upper }} {
{%- if outputs %}
// TODO nf-core: Update the information obtained from bio.tools and make sure that it is correct
{%- for output_name, ontologies in outputs.items() %}
{{ 'tuple val(meta), path("*{' + ontologies[2]|join(',') + '}")' if has_meta else 'path ' + output_name }}, emit: {{ output_name }}
{{ 'tuple val(meta), path("*.{' + ontologies[2]|join(',') + '}")' if has_meta else 'path ' + output_name }}, emit: {{ output_name }}
{%- endfor %}
{%- else %}
{% if not_empty_template -%}
Expand Down
6 changes: 4 additions & 2 deletions tests/components/test_components_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ def test_get_biotools_ch_info(self):
"http://edamontology.org/format_2182",
"http://edamontology.org/format_2573",
],
["", "fastq-like", "sam"],
["Raw sequence", "FASTQ-like format (text)", "SAM"],
["fastq-like", "sam"],
)
}
assert outputs == {
"sequence_report": (
["http://edamontology.org/data_2955", "http://edamontology.org/format_2331"],
["", "html"],
["Sequence report", "HTML"],
["html"],
)
}

Expand Down
2 changes: 1 addition & 1 deletion tests/modules/test_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ def test_modules_meta_yml_output_mismatch(self):
"""Test linting a module with an extra entry in output fields in meta.yml compared to module.output"""
with open(Path(self.nfcore_modules, "modules", "nf-core", "bpipe", "test", "main.nf")) as fh:
main_nf = fh.read()
main_nf_new = main_nf.replace("emit: bam", "emit: bai")
main_nf_new = main_nf.replace("emit: sequence_report", "emit: bai")
with open(Path(self.nfcore_modules, "modules", "nf-core", "bpipe", "test", "main.nf"), "w") as fh:
fh.write(main_nf_new)
module_lint = nf_core.modules.lint.ModuleLint(directory=self.nfcore_modules)
Expand Down

0 comments on commit 47036ff

Please sign in to comment.