From 609e28e687f94412e119f1766dcb428f8fd4bd24 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Fri, 11 Dec 2020 01:29:39 +0100 Subject: [PATCH] Errors to docstring - readme lint test --- docs/lint_errors.md | 21 --------------------- nf_core/lint/readme.py | 25 +++++++++++++++++++++++-- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/docs/lint_errors.md b/docs/lint_errors.md index dc84477354..10e14bffb0 100644 --- a/docs/lint_errors.md +++ b/docs/lint_errors.md @@ -69,27 +69,6 @@ The following variables are depreciated and fail the test if they are still pres Process-level configuration syntax is checked and fails if uses the old Nextflow syntax, for example: `process.$fastqc` instead of `process withName:'fastqc'`. -## Error #6 - Repository `README.md` tests ## {#6} - -The `README.md` files for a project are very important and must meet some requirements: - -* Nextflow badge - * If no Nextflow badge is found, a warning is given - * If a badge is found but the version doesn't match the minimum version in the config file, the test fails - * Example badge code: - - ```markdown - [![Nextflow](https://img.shields.io/badge/nextflow-%E2%89%A50.27.6-brightgreen.svg)](https://www.nextflow.io/) - ``` - -* Bioconda badge - * If your pipeline contains a file called `environment.yml`, a bioconda badge is required - * Required badge code: - - ```markdown - [![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg)](https://bioconda.github.io/) - ``` - ## Error #7 - Pipeline and container version numbers ## {#7} > This test only runs when `--release` is set or `$GITHUB_REF` is equal to `master` diff --git a/nf_core/lint/readme.py b/nf_core/lint/readme.py index 6c310cdfe5..18bf41b0b7 100644 --- a/nf_core/lint/readme.py +++ b/nf_core/lint/readme.py @@ -5,9 +5,30 @@ def readme(self): - """Checks the repository README file for errors. + """Repository ``README.md`` tests - Currently just checks the badges at the top of the README. + The ``README.md`` files for a project are very important and must meet some requirements: + + * Nextflow badge + + * If no Nextflow badge is found, a warning is given + * If a badge is found but the version doesn't match the minimum version in the config file, the test fails + * Example badge code: + + .. code-block:: md + + [![Nextflow](https://img.shields.io/badge/nextflow-%E2%89%A50.27.6-brightgreen.svg)](https://www.nextflow.io/) + + * Bioconda badge + + * If your pipeline contains a file called ``environment.yml`` in the root directory, a bioconda badge is required + * Required badge code: + + .. code-block:: md + + [![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg)](https://bioconda.github.io/) + + .. note:: These badges are a markdown image (``![alt-text]()``) *inside* a markdown link (``[markdown image]()``), so a bit fiddly. """ passed = [] warned = []