Skip to content

Commit

Permalink
Merge pull request #2298 from mashehu/fix-report-comment
Browse files Browse the repository at this point in the history
add version and subpath  to multiqc report comment link
  • Loading branch information
mashehu authored Jun 1, 2023
2 parents 138339a + 531f977 commit 4b1a3b8
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 @@ -11,6 +11,7 @@
- Move registry definitions out of profile scope ([#2286])(https://github.com/nf-core/tools/pull/2286)
- Remove `aws_tower` profile ([#2287])(https://github.com/nf-core/tools/pull/2287)
- Fixed the Slack report to include the pipeline name ([#2291](https://github.com/nf-core/tools/pull/2291))
- Fix link in the MultiQC report to point to exact version of output docs ([#2298](https://github.com/nf-core/tools/pull/2298))

### Download

Expand Down
15 changes: 13 additions & 2 deletions nf_core/bump_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"""

import logging
import os
import re
from pathlib import Path

import rich.console

Expand Down Expand Up @@ -44,6 +44,17 @@ def bump_pipeline_version(pipeline_obj, new_version):
)
],
)
# multiqc_config.yaml
update_file_version(
Path("assets", "multiqc_config.yml"),
pipeline_obj,
[
(
rf"{re.escape(current_version)}",
f"{new_version}",
)
],
)


def bump_nextflow_version(pipeline_obj, new_version):
Expand Down Expand Up @@ -77,7 +88,7 @@ def bump_nextflow_version(pipeline_obj, new_version):

# .github/workflows/ci.yml - Nextflow version matrix
update_file_version(
os.path.join(".github", "workflows", "ci.yml"),
Path(".github", "workflows", "ci.yml"),
pipeline_obj,
[
(
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 @@ -71,12 +71,13 @@ def multiqc_config(self):
if "report_comment" not in ignore_configs:
# Check that the minimum plugins exist and are coming first in the summary
try:
version = self.nf_config.get("manifest.version", "").strip(" '\"")
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}" '
f'This report has been generated by the <a href="https://github.com/nf-core/{self.pipeline_name}/{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}" '
f'interpret these results, please see the <a href="https://nf-co.re/{self.pipeline_name}/{version}/output" '
'target="_blank">documentation</a>.'
):
raise AssertionError()
Expand Down
4 changes: 2 additions & 2 deletions nf_core/pipeline-template/assets/multiqc_config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
report_comment: >
This report has been generated by the <a href="https://github.com/{{ name }}" target="_blank">{{ name }}</a>
This report has been generated by the <a href="https://github.com/{{ name }}/{{ 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 }}" target="_blank">documentation</a>.{% endif %}
<a href="https://nf-co.re/{{ short_name }}/{{ version }}/output" target="_blank">documentation</a>.{% endif %}
report_section_order:
"{{ name_noslash }}-methods-description":
order: -1000
Expand Down

0 comments on commit 4b1a3b8

Please sign in to comment.