Skip to content

Commit

Permalink
Merge pull request #2372 from mirpedrol/multiqc-cofig-links
Browse files Browse the repository at this point in the history
Fix `multiqc_config.yml` links
  • Loading branch information
mirpedrol authored Jul 18, 2023
2 parents b8c278a + 19a19f6 commit 5e5b41a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Template

- Fix links in `multiqc_config.yml` ([#2372](https://github.com/nf-core/tools/pull/2372))
- Remove default false from nextflow_schema.json ([#2376](https://github.com/nf-core/tools/pull/2376))
- Add module MULTIQC to modules.config ([#2377](https://github.com/nf-core/tools/pull/2377))

Expand Down
9 changes: 7 additions & 2 deletions nf_core/bump_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,19 @@ def bump_pipeline_version(pipeline_obj, new_version):
],
)
# multiqc_config.yaml
multiqc_new_version = "dev" if "dev" in new_version else new_version
update_file_version(
Path("assets", "multiqc_config.yml"),
pipeline_obj,
[
(
"/dev",
f"/{multiqc_new_version}",
),
(
rf"{re.escape(current_version)}",
f"{new_version}",
)
f"{multiqc_new_version}",
),
],
)

Expand Down
5 changes: 3 additions & 2 deletions nf_core/lint/multiqc_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,13 @@ def multiqc_config(self):
# Check that the minimum plugins exist and are coming first in the summary
try:
version = self.nf_config.get("manifest.version", "").strip(" '\"")
version = "dev" if "dev" in version else version
if "report_comment" not in mqc_yml:
raise AssertionError()
if mqc_yml["report_comment"].strip() != (
f'This report has been generated by the <a href="https://github.com/nf-core/{self.pipeline_name}/{version}" '
f'This report has been generated by the <a href="https://github.com/nf-core/{self.pipeline_name}/tree/{version}" '
f'target="_blank">nf-core/{self.pipeline_name}</a> analysis pipeline. For information about how to '
f'interpret these results, please see the <a href="https://nf-co.re/{self.pipeline_name}/{version}/output" '
f'interpret these results, please see the <a href="https://nf-co.re/{self.pipeline_name}/{version}/docs/output" '
'target="_blank">documentation</a>.'
):
raise AssertionError()
Expand Down
10 changes: 8 additions & 2 deletions nf_core/pipeline-template/assets/multiqc_config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
report_comment: >
This report has been generated by the <a href="https://github.com/{{ name }}/{{ version}}" target="_blank">{{ name }}</a>
{% if 'dev' in version -%}
This report has been generated by the <a href="https://github.com/{{ name }}/tree/dev" target="_blank">{{ name }}</a>
analysis pipeline.{% if branded %} For information about how to interpret these results, please see the
<a href="https://nf-co.re/{{ short_name }}/{{ version }}/output" target="_blank">documentation</a>.{% endif %}
<a href="https://nf-co.re/{{ short_name }}/dev/docs/output" target="_blank">documentation</a>.{% endif %}
{%- else %}
This report has been generated by the <a href="https://github.com/{{ name }}/tree/{{ version }}" target="_blank">{{ name }}</a>
analysis pipeline.{% if branded %} For information about how to interpret these results, please see the
<a href="https://nf-co.re/{{ short_name }}/{{ version }}/docs/output" target="_blank">documentation</a>.{% endif %}
{% endif %}
report_section_order:
"{{ name_noslash }}-methods-description":
order: -1000
Expand Down

0 comments on commit 5e5b41a

Please sign in to comment.