Thanks to visit codestin.com
Credit goes to github.com

Skip to content
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 @@ -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}" '
Copy link
Contributor

@SusiJo SusiJo Jul 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on line 74:
What about checking if the 'manifest.version' contains the 'dev' tag? Then it would also be possible to refer to the dev version of the pipeline and documentation and wouldn't create a false link.

if ("dev" in version):
    version = "dev"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea, thanks for the suggestion! I have pushed the changes :)

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