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

style: yaml => yml #1471

Merged
merged 2 commits into from
Mar 18, 2022
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
4 changes: 2 additions & 2 deletions nf_core/lint/files_exist.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def files_exist(self):
.. code-block:: bash

main.nf
assets/multiqc_config.yaml
assets/multiqc_config.yml
conf/base.config
conf/igenomes.config
.github/workflows/awstest.yml
Expand Down Expand Up @@ -144,7 +144,7 @@ def files_exist(self):

files_warn = [
["main.nf"],
[os.path.join("assets", "multiqc_config.yaml")],
[os.path.join("assets", "multiqc_config.yml")],
[os.path.join("conf", "base.config")],
[os.path.join("conf", "igenomes.config")],
[os.path.join(".github", "workflows", "awstest.yml")],
Expand Down
16 changes: 8 additions & 8 deletions nf_core/lint/multiqc_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ def multiqc_config(self):
warned = []
failed = []

fn = os.path.join(self.wf_path, "assets", "multiqc_config.yaml")
fn = os.path.join(self.wf_path, "assets", "multiqc_config.yml")

# Return a failed status if we can't find the file
if not os.path.isfile(fn):
return {"ignored": ["'assets/multiqc_config.yaml' not found"]}
return {"ignored": ["'assets/multiqc_config.yml' not found"]}

try:
with open(fn, "r") as fh:
Expand Down Expand Up @@ -61,9 +61,9 @@ def multiqc_config(self):
orders.values()
), f"Section software_versions should have the second lowest order"
except (AssertionError, KeyError, TypeError) as e:
failed.append(f"'assets/multiqc_config.yaml' does not meet requirements: {e}")
failed.append(f"'assets/multiqc_config.yml' does not meet requirements: {e}")
else:
passed.append("'assets/multiqc_config.yaml' follows the ordering scheme of the minimally required plugins.")
passed.append("'assets/multiqc_config.yml' follows the ordering scheme of the minimally required plugins.")

# Check that the minimum plugins exist and are coming first in the summary
try:
Expand All @@ -73,17 +73,17 @@ def multiqc_config(self):
== f'This report has been generated by the <a href="https://github.com/nf-core/{self.pipeline_name}" target="_blank">nf-core/{self.pipeline_name}</a> analysis pipeline. For information about how to interpret these results, please see the <a href="https://nf-co.re/{self.pipeline_name}" target="_blank">documentation</a>.'
)
except (AssertionError, KeyError, TypeError):
failed.append("'assets/multiqc_config.yaml' does not contain a matching 'report_comment'.")
failed.append("'assets/multiqc_config.yml' does not contain a matching 'report_comment'.")
else:
passed.append("'assets/multiqc_config.yaml' contains a matching 'report_comment'.")
passed.append("'assets/multiqc_config.yml' contains a matching 'report_comment'.")

# Check that export_plots is activated
try:
assert "export_plots" in mqc_yml
assert mqc_yml["export_plots"] == True
except (AssertionError, KeyError, TypeError):
failed.append("'assets/multiqc_config.yaml' does not contain 'export_plots: true'.")
failed.append("'assets/multiqc_config.yml' does not contain 'export_plots: true'.")
else:
passed.append("'assets/multiqc_config.yaml' contains 'export_plots: true'.")
passed.append("'assets/multiqc_config.yml' contains 'export_plots: true'.")

return {"passed": passed, "failed": failed}
2 changes: 1 addition & 1 deletion nf_core/pipeline-template/.github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ If you wish to contribute a new step, please use the following coding standards:
6. Add sanity checks and validation for all relevant parameters.
7. Perform local tests to validate that the new code works as expected.
8. If applicable, add a new test command in `.github/workflow/ci.yml`.
9. Update MultiQC config `assets/multiqc_config.yaml` so relevant suffixes, file name clean up and module plots are in the appropriate order. If applicable, add a [MultiQC](https://https://multiqc.info/) module.
9. Update MultiQC config `assets/multiqc_config.yml` so relevant suffixes, file name clean up and module plots are in the appropriate order. If applicable, add a [MultiQC](https://https://multiqc.info/) module.
10. Add a description of the output files and if relevant any appropriate images from the MultiQC report to `docs/output.md`.

### Default values
Expand Down
2 changes: 1 addition & 1 deletion nf_core/pipeline-template/workflows/pipeline.nf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if (params.input) { ch_input = file(params.input) } else { exit 1, 'Input sample
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/

ch_multiqc_config = file("$projectDir/assets/multiqc_config.yaml", checkIfExists: true)
ch_multiqc_config = file("$projectDir/assets/multiqc_config.yml", checkIfExists: true)
ch_multiqc_custom_config = params.multiqc_config ? Channel.fromPath(params.multiqc_config) : Channel.empty()

/*
Expand Down