Skip to content
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

add version and subpath to multiqc report comment link #2298

Merged
merged 6 commits into from
Jun 1, 2023
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 @@ -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))

### Linting

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