From db5a7fa0ed4d083f3e0d3b49aacc4ea11e71ce39 Mon Sep 17 00:00:00 2001 From: jpfeuffer Date: Wed, 16 Mar 2022 12:56:28 +0000 Subject: [PATCH 01/13] allow using plain pytest --- .github/CONTRIBUTING.md | 2 +- pytest.ini | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index e9e98d457c..999cebd8a6 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -75,7 +75,7 @@ New features should also come with new tests, to keep the test-coverage high (we You can try running the tests locally before pushing code using the following command: ```bash -pytest --color=yes tests/ +pytest --color=yes ``` ### Lint Tests diff --git a/pytest.ini b/pytest.ini index 02a8acac0f..57209fee41 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,3 +1,5 @@ [pytest] filterwarnings = ignore::pytest.PytestRemovedIn8Warning:_pytest.nodes:140 +testpaths = + tests From a520a187fcbbd96d7552f4349f5d37d6bc63c82d Mon Sep 17 00:00:00 2001 From: jpfeuffer Date: Wed, 16 Mar 2022 14:01:11 +0000 Subject: [PATCH 02/13] [FEATURE] flexible linting for actionsCI and multiqc_config --- .../pipeline_lint_tests/multiqc_config.rst | 4 + nf_core/lint/__init__.py | 2 + nf_core/lint/actions_ci.py | 8 +- nf_core/lint/files_unchanged.py | 3 - nf_core/lint/multiqc_config.py | 84 +++++++++++++++++++ 5 files changed, 96 insertions(+), 5 deletions(-) create mode 100644 docs/api/_src/pipeline_lint_tests/multiqc_config.rst create mode 100644 nf_core/lint/multiqc_config.py diff --git a/docs/api/_src/pipeline_lint_tests/multiqc_config.rst b/docs/api/_src/pipeline_lint_tests/multiqc_config.rst new file mode 100644 index 0000000000..1a68bc2c21 --- /dev/null +++ b/docs/api/_src/pipeline_lint_tests/multiqc_config.rst @@ -0,0 +1,4 @@ +multiqc_config +=============== + +.. automethod:: nf_core.lint.PipelineLint.multiqc_config diff --git a/nf_core/lint/__init__.py b/nf_core/lint/__init__.py index 14f3667e2c..a0dad185b8 100644 --- a/nf_core/lint/__init__.py +++ b/nf_core/lint/__init__.py @@ -153,6 +153,7 @@ class PipelineLint(nf_core.utils.Pipeline): from .files_unchanged import files_unchanged from .merge_markers import merge_markers from .modules_json import modules_json + from .multiqc_config import multiqc_config from .nextflow_config import nextflow_config from .pipeline_name_conventions import pipeline_name_conventions from .pipeline_todos import pipeline_todos @@ -205,6 +206,7 @@ def _get_all_lint_tests(release_mode): "actions_schema_validation", "merge_markers", "modules_json", + "multiqc_config", ] + (["version_consistency"] if release_mode else []) def _load(self): diff --git a/nf_core/lint/actions_ci.py b/nf_core/lint/actions_ci.py index e9adf706b7..52e92591f7 100644 --- a/nf_core/lint/actions_ci.py +++ b/nf_core/lint/actions_ci.py @@ -85,9 +85,13 @@ def actions_ci(self): # Check that the action is turned on for the correct events try: - expected = {"push": {"branches": ["dev"]}, "pull_request": None, "release": {"types": ["published"]}} # NB: YAML dict key 'on' is evaluated to a Python dict key True - assert ciwf[True] == expected + assert "dev" in ciwf[True]["push"]["branches"] + pr_subtree = ciwf[True]["pull_request"] + assert pr_subtree == None or \ + ("branches" in pr_subtree and "dev" in pr_subtree["branches"]) or \ + ("ignore_branches" in pr_subtree and not "dev" in pr_subtree["ignore_branches"]) + assert "published" in ciwf[True]["release"]["types"] except (AssertionError, KeyError, TypeError): failed.append("'.github/workflows/ci.yml' is not triggered on expected events") else: diff --git a/nf_core/lint/files_unchanged.py b/nf_core/lint/files_unchanged.py index 229f5bb94c..cd034fa24b 100644 --- a/nf_core/lint/files_unchanged.py +++ b/nf_core/lint/files_unchanged.py @@ -45,7 +45,6 @@ def files_unchanged(self): Files that can have additional content but must include the template contents:: .gitignore - assets/multiqc_config.yaml .. tip:: You can configure the ``nf-core lint`` tests to ignore any of these checks by setting the ``files_unchanged`` key as follows in your linting config file. For example: @@ -54,7 +53,6 @@ def files_unchanged(self): files_unchanged: - .github/workflows/branch.yml - - assets/multiqc_config.yaml """ @@ -102,7 +100,6 @@ def files_unchanged(self): ] files_partial = [ [".gitignore", "foo"], - [os.path.join("assets", "multiqc_config.yaml")], ] # Only show error messages from pipeline creation diff --git a/nf_core/lint/multiqc_config.py b/nf_core/lint/multiqc_config.py new file mode 100644 index 0000000000..84dd978bc0 --- /dev/null +++ b/nf_core/lint/multiqc_config.py @@ -0,0 +1,84 @@ +#!/usr/bin/env python + +import os +from logging import warn +from nf_core.modules.modules_command import ModuleCommand + + +def multiqc_config(self): + """Make sure basic multiQC plugins are installed and plots are exported + Basic template: + report_comment: > + This report has been generated by the nf-core/quantms + analysis pipeline. For information about how to interpret these results, please see the + documentation. + report_section_order: + software_versions: + order: -1000 + nf-core-quantms-summary: + order: -1001 + + export_plots: true + """ + passed = [] + failed = [] + + fn = os.path.join(self.wf_path, "assets", "multiqc_config.yaml") + + # Return a failed status if we can't find the file + if not os.path.isfile(fn): + return {"failed": ["'assets/multiqc_config.yaml' not found"]} + + try: + with open(fn, "r") as fh: + mqc_yml = yaml.safe_load(fh) + except Exception as e: + return {"failed": ["Could not parse yaml file: {}, {}".format(fn, e)]} + + # Check that the report_comment exists and matches + try: + assert "report_section_order" in mqc_yml + orders = defaultdict(int) + summary_plugin_name = "nf-core-" + self.pipeline_name + "-summary" + min_plugins = ["software_versions", summary_plugin_name] + for plugin in min_plugins: + assert plugin in mqc_yml["report_section_order"] + assert "order" in mqc_yml["report_section_order"][plugin] + plugin_order = mqc_yml["report_section_order"][plugin]["order"] + assert plugin_order < 0 + + for plugin in mqc_yml["report_section_order"]: + if "order" in mqc_yml["report_section_order"][plugin]: + orders[plugin] = mqc_yml["report_section_order"][plugin]["order"] + + assert orders[summary_plugin_name] == min(orders) + orders.pop(summary_plugin_name) + assert orders["software_versions"] == min(orders) + except (AssertionError, KeyError, TypeError): + failed.append("'assets/multiqc_config.yaml' does not follow the ordering scheme of the minimally required plugins.") + else: + passed.append("'assets/multiqc_config.yaml' contains a matching report_comment.") + + # Check that the minimum plugins exist and are coming first in the summary + try: + assert "report_comment" in mqc_yml + assert mqc_yml["report_comment"].trim() == \ + '''This report has been generated by the nf-core/%s + analysis pipeline. For information about how to interpret these results, please see the + documentation. + ''' % (self.pipeline_name) + except (AssertionError, KeyError, TypeError): + failed.append("'assets/multiqc_config.yaml' does not contain a matching report_comment.") + else: + passed.append("'assets/multiqc_config.yaml' 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'.") + else: + passed.append("'assets/multiqc_config.yaml' contains 'export_plots: true'.") + + return {"passed": passed, "failed": failed} From 26643ab0c9c36d46641f68ca1677a533fba66ccf Mon Sep 17 00:00:00 2001 From: jpfeuffer Date: Wed, 16 Mar 2022 14:13:43 +0000 Subject: [PATCH 03/13] black reformat --- nf_core/lint/actions_ci.py | 8 +++++--- nf_core/lint/multiqc_config.py | 17 +++++++++++------ 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/nf_core/lint/actions_ci.py b/nf_core/lint/actions_ci.py index 52e92591f7..89d9becd04 100644 --- a/nf_core/lint/actions_ci.py +++ b/nf_core/lint/actions_ci.py @@ -88,9 +88,11 @@ def actions_ci(self): # NB: YAML dict key 'on' is evaluated to a Python dict key True assert "dev" in ciwf[True]["push"]["branches"] pr_subtree = ciwf[True]["pull_request"] - assert pr_subtree == None or \ - ("branches" in pr_subtree and "dev" in pr_subtree["branches"]) or \ - ("ignore_branches" in pr_subtree and not "dev" in pr_subtree["ignore_branches"]) + assert ( + pr_subtree == None + or ("branches" in pr_subtree and "dev" in pr_subtree["branches"]) + or ("ignore_branches" in pr_subtree and not "dev" in pr_subtree["ignore_branches"]) + ) assert "published" in ciwf[True]["release"]["types"] except (AssertionError, KeyError, TypeError): failed.append("'.github/workflows/ci.yml' is not triggered on expected events") diff --git a/nf_core/lint/multiqc_config.py b/nf_core/lint/multiqc_config.py index 84dd978bc0..8204f95224 100644 --- a/nf_core/lint/multiqc_config.py +++ b/nf_core/lint/multiqc_config.py @@ -46,27 +46,32 @@ def multiqc_config(self): assert "order" in mqc_yml["report_section_order"][plugin] plugin_order = mqc_yml["report_section_order"][plugin]["order"] assert plugin_order < 0 - + for plugin in mqc_yml["report_section_order"]: if "order" in mqc_yml["report_section_order"][plugin]: orders[plugin] = mqc_yml["report_section_order"][plugin]["order"] - + assert orders[summary_plugin_name] == min(orders) orders.pop(summary_plugin_name) assert orders["software_versions"] == min(orders) except (AssertionError, KeyError, TypeError): - failed.append("'assets/multiqc_config.yaml' does not follow the ordering scheme of the minimally required plugins.") + failed.append( + "'assets/multiqc_config.yaml' does not follow the ordering scheme of the minimally required plugins." + ) else: passed.append("'assets/multiqc_config.yaml' contains a matching report_comment.") # Check that the minimum plugins exist and are coming first in the summary try: assert "report_comment" in mqc_yml - assert mqc_yml["report_comment"].trim() == \ - '''This report has been generated by the nf-core/%s + assert ( + mqc_yml["report_comment"].trim() + == """This report has been generated by the nf-core/%s analysis pipeline. For information about how to interpret these results, please see the documentation. - ''' % (self.pipeline_name) + """ + % (self.pipeline_name) + ) except (AssertionError, KeyError, TypeError): failed.append("'assets/multiqc_config.yaml' does not contain a matching report_comment.") else: From 69d8b37a969a1bbb19ad13846a4fa75130932c00 Mon Sep 17 00:00:00 2001 From: jpfeuffer Date: Wed, 16 Mar 2022 15:13:59 +0000 Subject: [PATCH 04/13] refactor version to avoid install. fix multiqc_config lint --- nf_core/__init__.py | 4 +--- nf_core/lint/multiqc_config.py | 26 ++++++++++++++------------ nf_core/version.py | 1 + setup.py | 8 +++++++- 4 files changed, 23 insertions(+), 16 deletions(-) create mode 100644 nf_core/version.py diff --git a/nf_core/__init__.py b/nf_core/__init__.py index 42c3f188f3..a309d7690e 100644 --- a/nf_core/__init__.py +++ b/nf_core/__init__.py @@ -4,6 +4,4 @@ Shouldn't do much, as everything is under subcommands. """ -import pkg_resources - -__version__ = pkg_resources.get_distribution("nf_core").version +from .version import __version__ diff --git a/nf_core/lint/multiqc_config.py b/nf_core/lint/multiqc_config.py index 8204f95224..5d41542f36 100644 --- a/nf_core/lint/multiqc_config.py +++ b/nf_core/lint/multiqc_config.py @@ -1,8 +1,7 @@ #!/usr/bin/env python import os -from logging import warn -from nf_core.modules.modules_command import ModuleCommand +import yaml def multiqc_config(self): @@ -38,7 +37,7 @@ def multiqc_config(self): # Check that the report_comment exists and matches try: assert "report_section_order" in mqc_yml - orders = defaultdict(int) + orders = dict() summary_plugin_name = "nf-core-" + self.pipeline_name + "-summary" min_plugins = ["software_versions", summary_plugin_name] for plugin in min_plugins: @@ -51,26 +50,29 @@ def multiqc_config(self): if "order" in mqc_yml["report_section_order"][plugin]: orders[plugin] = mqc_yml["report_section_order"][plugin]["order"] - assert orders[summary_plugin_name] == min(orders) + assert orders[summary_plugin_name] == min(orders.values()) orders.pop(summary_plugin_name) - assert orders["software_versions"] == min(orders) + assert orders["software_versions"] == min(orders.values()) except (AssertionError, KeyError, TypeError): failed.append( "'assets/multiqc_config.yaml' does not follow the ordering scheme of the minimally required plugins." ) else: - passed.append("'assets/multiqc_config.yaml' contains a matching report_comment.") + passed.append("'assets/multiqc_config.yaml' follows the ordering scheme of the minimally required plugins.") # Check that the minimum plugins exist and are coming first in the summary try: assert "report_comment" in mqc_yml assert ( - mqc_yml["report_comment"].trim() - == """This report has been generated by the nf-core/%s - analysis pipeline. For information about how to interpret these results, please see the - documentation. - """ - % (self.pipeline_name) + mqc_yml["report_comment"].strip() + == 'This report has been generated by the nf-core/%s ' + "analysis pipeline. For information about how to interpret these results, please see the " + 'documentation.' + % ( + self.pipeline_name, + self.pipeline_name, + self.pipeline_name, + ) ) except (AssertionError, KeyError, TypeError): failed.append("'assets/multiqc_config.yaml' does not contain a matching report_comment.") diff --git a/nf_core/version.py b/nf_core/version.py new file mode 100644 index 0000000000..8214ab8925 --- /dev/null +++ b/nf_core/version.py @@ -0,0 +1 @@ +__version__ = "2.4dev" \ No newline at end of file diff --git a/setup.py b/setup.py index 5fda0ae5be..bd793cc528 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,13 @@ from setuptools import setup, find_packages -version = "2.4dev" +versionfile = "autowrap/version.py" +try: + execfile(versionfile) +except: + exec(open(versionfile).read()) + +version = __version__ with open("README.md") as f: readme = f.read() From edbb9cf10ac8748b82a02b2c2fb4fa7efc5e95e1 Mon Sep 17 00:00:00 2001 From: jpfeuffer Date: Wed, 16 Mar 2022 15:31:17 +0000 Subject: [PATCH 05/13] black version.py --- nf_core/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/version.py b/nf_core/version.py index 8214ab8925..2c4485c6c0 100644 --- a/nf_core/version.py +++ b/nf_core/version.py @@ -1 +1 @@ -__version__ = "2.4dev" \ No newline at end of file +__version__ = "2.4dev" From dbc64982355b0a6d7d3fea5741a4b0576d08d47f Mon Sep 17 00:00:00 2001 From: jpfeuffer Date: Wed, 16 Mar 2022 15:33:02 +0000 Subject: [PATCH 06/13] fix copypaste error --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index bd793cc528..dc28528e26 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages -versionfile = "autowrap/version.py" +versionfile = "nf_core/version.py" try: execfile(versionfile) except: From 487e807f926139fe23931c6eeaf5aeca728e0b21 Mon Sep 17 00:00:00 2001 From: jpfeuffer Date: Wed, 16 Mar 2022 15:43:27 +0000 Subject: [PATCH 07/13] wrong ending --- .../pipeline_lint_tests/{multiqc_config.rst => multiqc_config.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/api/_src/pipeline_lint_tests/{multiqc_config.rst => multiqc_config.md} (100%) diff --git a/docs/api/_src/pipeline_lint_tests/multiqc_config.rst b/docs/api/_src/pipeline_lint_tests/multiqc_config.md similarity index 100% rename from docs/api/_src/pipeline_lint_tests/multiqc_config.rst rename to docs/api/_src/pipeline_lint_tests/multiqc_config.md From f8afc0be5d3fb2198c2909c95fd63eb1a3a1d70b Mon Sep 17 00:00:00 2001 From: Julianus Pfeuffer Date: Thu, 17 Mar 2022 11:09:36 +0100 Subject: [PATCH 08/13] revert version handling --- nf_core/__init__.py | 4 +++- nf_core/version.py | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) delete mode 100644 nf_core/version.py diff --git a/nf_core/__init__.py b/nf_core/__init__.py index a309d7690e..42c3f188f3 100644 --- a/nf_core/__init__.py +++ b/nf_core/__init__.py @@ -4,4 +4,6 @@ Shouldn't do much, as everything is under subcommands. """ -from .version import __version__ +import pkg_resources + +__version__ = pkg_resources.get_distribution("nf_core").version diff --git a/nf_core/version.py b/nf_core/version.py deleted file mode 100644 index 2c4485c6c0..0000000000 --- a/nf_core/version.py +++ /dev/null @@ -1 +0,0 @@ -__version__ = "2.4dev" From e271b0e4b77be0626ccc759674b29472413b9943 Mon Sep 17 00:00:00 2001 From: Julianus Pfeuffer Date: Thu, 17 Mar 2022 11:10:56 +0100 Subject: [PATCH 09/13] revert setup.py --- setup.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/setup.py b/setup.py index dc28528e26..5fda0ae5be 100644 --- a/setup.py +++ b/setup.py @@ -2,13 +2,7 @@ from setuptools import setup, find_packages -versionfile = "nf_core/version.py" -try: - execfile(versionfile) -except: - exec(open(versionfile).read()) - -version = __version__ +version = "2.4dev" with open("README.md") as f: readme = f.read() From 7de3b292fc25b5870870546a01fccdf818bd0477 Mon Sep 17 00:00:00 2001 From: Julianus Pfeuffer Date: Thu, 17 Mar 2022 13:08:57 +0100 Subject: [PATCH 10/13] Apply obvious suggestions from code review Co-authored-by: Phil Ewels --- nf_core/lint/multiqc_config.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nf_core/lint/multiqc_config.py b/nf_core/lint/multiqc_config.py index 5d41542f36..2199faae70 100644 --- a/nf_core/lint/multiqc_config.py +++ b/nf_core/lint/multiqc_config.py @@ -26,7 +26,7 @@ def multiqc_config(self): # Return a failed status if we can't find the file if not os.path.isfile(fn): - return {"failed": ["'assets/multiqc_config.yaml' not found"]} + return {"ignored": ["'assets/multiqc_config.yaml' not found"]} try: with open(fn, "r") as fh: @@ -38,7 +38,7 @@ def multiqc_config(self): try: assert "report_section_order" in mqc_yml orders = dict() - summary_plugin_name = "nf-core-" + self.pipeline_name + "-summary" + summary_plugin_name = f"nf-core-{self.pipeline_name}-summary" min_plugins = ["software_versions", summary_plugin_name] for plugin in min_plugins: assert plugin in mqc_yml["report_section_order"] @@ -53,9 +53,9 @@ def multiqc_config(self): assert orders[summary_plugin_name] == min(orders.values()) orders.pop(summary_plugin_name) assert orders["software_versions"] == min(orders.values()) - except (AssertionError, KeyError, TypeError): + except (AssertionError, KeyError, TypeError) as e: failed.append( - "'assets/multiqc_config.yaml' does not follow the ordering scheme of the minimally required plugins." + f"'assets/multiqc_config.yaml' does not meet requirements: {e}" ) else: passed.append("'assets/multiqc_config.yaml' follows the ordering scheme of the minimally required plugins.") @@ -75,7 +75,7 @@ def multiqc_config(self): ) ) except (AssertionError, KeyError, TypeError): - failed.append("'assets/multiqc_config.yaml' does not contain a matching report_comment.") + warned.append("'assets/multiqc_config.yaml' does not contain a matching report_comment.") else: passed.append("'assets/multiqc_config.yaml' contains a matching report_comment.") From 61cd9494d3a03fd45fb40d1dc6fe0b1a54599483 Mon Sep 17 00:00:00 2001 From: jpfeuffer Date: Thu, 17 Mar 2022 12:25:49 +0000 Subject: [PATCH 11/13] Address more comments --- nf_core/lint/multiqc_config.py | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/nf_core/lint/multiqc_config.py b/nf_core/lint/multiqc_config.py index 2199faae70..e2f4ffd951 100644 --- a/nf_core/lint/multiqc_config.py +++ b/nf_core/lint/multiqc_config.py @@ -20,6 +20,7 @@ def multiqc_config(self): export_plots: true """ passed = [] + warned = [] failed = [] fn = os.path.join(self.wf_path, "assets", "multiqc_config.yaml") @@ -41,22 +42,24 @@ def multiqc_config(self): summary_plugin_name = f"nf-core-{self.pipeline_name}-summary" min_plugins = ["software_versions", summary_plugin_name] for plugin in min_plugins: - assert plugin in mqc_yml["report_section_order"] - assert "order" in mqc_yml["report_section_order"][plugin] + assert plugin in mqc_yml["report_section_order"], f"Section {plugin} missing in report_section_order" + assert "order" in mqc_yml["report_section_order"][plugin], f"Section {plugin} 'order' missing. Must be < 0" plugin_order = mqc_yml["report_section_order"][plugin]["order"] - assert plugin_order < 0 + assert plugin_order < 0, f"Section {plugin} 'order' must be < 0" for plugin in mqc_yml["report_section_order"]: if "order" in mqc_yml["report_section_order"][plugin]: orders[plugin] = mqc_yml["report_section_order"][plugin]["order"] - assert orders[summary_plugin_name] == min(orders.values()) + assert orders[summary_plugin_name] == min( + orders.values() + ), f"Section {summary_plugin_name} should have the lowest order" orders.pop(summary_plugin_name) - assert orders["software_versions"] == min(orders.values()) + assert orders["software_versions"] == min( + 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.yaml' does not meet requirements: {e}") else: passed.append("'assets/multiqc_config.yaml' follows the ordering scheme of the minimally required plugins.") @@ -65,14 +68,9 @@ def multiqc_config(self): assert "report_comment" in mqc_yml assert ( mqc_yml["report_comment"].strip() - == 'This report has been generated by the nf-core/%s ' + == f'This report has been generated by the nf-core/{self.pipeline_name} ' "analysis pipeline. For information about how to interpret these results, please see the " - 'documentation.' - % ( - self.pipeline_name, - self.pipeline_name, - self.pipeline_name, - ) + 'documentation.' ) except (AssertionError, KeyError, TypeError): warned.append("'assets/multiqc_config.yaml' does not contain a matching report_comment.") @@ -88,4 +86,4 @@ def multiqc_config(self): else: passed.append("'assets/multiqc_config.yaml' contains 'export_plots: true'.") - return {"passed": passed, "failed": failed} + return {"passed": passed, "warned": warned, "failed": failed} From 89886fd4f5b0e510703d34b8d66f1000138f399b Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Thu, 17 Mar 2022 13:57:26 +0100 Subject: [PATCH 12/13] Update docs api for multiqc_config.md to match new rendering style syntax --- docs/api/_src/pipeline_lint_tests/multiqc_config.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/api/_src/pipeline_lint_tests/multiqc_config.md b/docs/api/_src/pipeline_lint_tests/multiqc_config.md index 1a68bc2c21..311f6b3049 100644 --- a/docs/api/_src/pipeline_lint_tests/multiqc_config.md +++ b/docs/api/_src/pipeline_lint_tests/multiqc_config.md @@ -1,4 +1,5 @@ -multiqc_config -=============== +# multiqc_config +```{eval-rst} .. automethod:: nf_core.lint.PipelineLint.multiqc_config +``` From 57ca562136d882740dc2afd4901a41725838cea4 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Thu, 17 Mar 2022 14:20:53 +0100 Subject: [PATCH 13/13] Docstring code block --- nf_core/lint/multiqc_config.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/nf_core/lint/multiqc_config.py b/nf_core/lint/multiqc_config.py index e2f4ffd951..aa9ce5d33d 100644 --- a/nf_core/lint/multiqc_config.py +++ b/nf_core/lint/multiqc_config.py @@ -7,17 +7,19 @@ def multiqc_config(self): """Make sure basic multiQC plugins are installed and plots are exported Basic template: - report_comment: > - This report has been generated by the nf-core/quantms - analysis pipeline. For information about how to interpret these results, please see the - documentation. - report_section_order: - software_versions: - order: -1000 - nf-core-quantms-summary: - order: -1001 - export_plots: true + .. code-block:: yaml + report_comment: > + This report has been generated by the nf-core/quantms + analysis pipeline. For information about how to interpret these results, please see the + documentation. + report_section_order: + software_versions: + order: -1000 + nf-core-quantms-summary: + order: -1001 + + export_plots: true """ passed = [] warned = []