From 005f52adad916a827fa3bac11a6f238d5a8c0194 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Fri, 31 Jul 2020 12:56:25 +0200 Subject: [PATCH 01/55] Sync checkout - fetch everything next time --- .github/workflows/sync.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 764649e5cc..1f23a4888b 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -32,6 +32,7 @@ jobs: ref: dev token: ${{ secrets.nf_core_bot_auth_token }} path: nf-core/${{ matrix.pipeline }} + fetch-depth: '0' - name: Set up Python 3.8 uses: actions/setup-python@v1 From 18c3df279c249a0e516cb7810297e47a98c233cb Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Fri, 31 Jul 2020 12:57:27 +0200 Subject: [PATCH 02/55] Bump v1.11dev --- CHANGELOG.md | 10 ++++++++++ setup.py | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d959b2d246..c07f8ad7cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # nf-core/tools: Changelog +## v1.11dev + +### Template + +### Linting + +### Other + +* Pipeline sync - fetch full repo when checking out before sync + ## [v1.10.2 - Copper Camel _(brought back from the dead)_](https://github.com/nf-core/tools/releases/tag/1.10.2) - [2020-07-31] Second patch release to address some small errors discovered in the pipeline template. diff --git a/setup.py b/setup.py index cbb355615e..6155104034 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup, find_packages import sys -version = "1.10.2" +version = "1.11dev" with open("README.md") as f: readme = f.read() From 13caf92ccd6ad038aceef7666c5f284578bd1013 Mon Sep 17 00:00:00 2001 From: jpfeuffer Date: Sun, 2 Aug 2020 16:49:25 +0200 Subject: [PATCH 03/55] [FIX] Doc links in Readme template --- .../pipeline-template/{{cookiecutter.name_noslash}}/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md index 169587892b..72feddb566 100644 --- a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md +++ b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md @@ -36,11 +36,11 @@ The pipeline is built using [Nextflow](https://www.nextflow.io), a workflow tool nextflow run {{ cookiecutter.name }} -profile --input '*_R{1,2}.fastq.gz' --genome GRCh37 ``` -See [usage docs](docs/usage.md) for all of the available options when running the pipeline. +See [usage docs](https://nf-co.re/{{ cookiecutter.short_name }}/usage) for all of the available options when running the pipeline. ## Documentation -The {{ cookiecutter.name }} pipeline comes with documentation about the pipeline which you can read at [https://nf-core/{{ cookiecutter.short_name }}/docs](https://nf-core/{{ cookiecutter.short_name }}/docs) or find in the [`docs/` directory](docs). +The {{ cookiecutter.name }} pipeline comes with documentation about the pipeline which you can read at [https://nf-co.re/{{ cookiecutter.short_name }}](https://nf-core/{{ cookiecutter.short_name }}) or partly find in the [`docs/` directory](docs). From cc264f6d16ed703fcd58cd9adeca23b1102a4b92 Mon Sep 17 00:00:00 2001 From: jpfeuffer Date: Sun, 2 Aug 2020 16:52:40 +0200 Subject: [PATCH 04/55] Forgot another dot --- .../pipeline-template/{{cookiecutter.name_noslash}}/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md index 72feddb566..25cd9a8bf9 100644 --- a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md +++ b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md @@ -40,7 +40,7 @@ See [usage docs](https://nf-co.re/{{ cookiecutter.short_name }}/usage) for all o ## Documentation -The {{ cookiecutter.name }} pipeline comes with documentation about the pipeline which you can read at [https://nf-co.re/{{ cookiecutter.short_name }}](https://nf-core/{{ cookiecutter.short_name }}) or partly find in the [`docs/` directory](docs). +The {{ cookiecutter.name }} pipeline comes with documentation about the pipeline which you can read at [https://nf-co.re/{{ cookiecutter.short_name }}](https://nf-co.re/{{ cookiecutter.short_name }}) or partly find in the [`docs/` directory](docs). From 833944272a5325bcd4a1896afce8f2de709bfc72 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Sun, 2 Aug 2020 20:15:33 +0200 Subject: [PATCH 05/55] Update nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md --- .../pipeline-template/{{cookiecutter.name_noslash}}/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md index 25cd9a8bf9..9caa02c60d 100644 --- a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md +++ b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md @@ -40,7 +40,7 @@ See [usage docs](https://nf-co.re/{{ cookiecutter.short_name }}/usage) for all o ## Documentation -The {{ cookiecutter.name }} pipeline comes with documentation about the pipeline which you can read at [https://nf-co.re/{{ cookiecutter.short_name }}](https://nf-co.re/{{ cookiecutter.short_name }}) or partly find in the [`docs/` directory](docs). +The {{ cookiecutter.name }} pipeline comes with documentation about the pipeline which you can read at [https://nf-co.re/{{ cookiecutter.short_name }}](https://nf-co.re/{{ cookiecutter.short_name }}). From e4efe6a17ee580fbfb51cd35c93345b2db8d7805 Mon Sep 17 00:00:00 2001 From: ggabernet Date: Mon, 3 Aug 2020 18:33:30 +0200 Subject: [PATCH 06/55] fix awstest command --- .../{{cookiecutter.name_noslash}}/.github/workflows/awstest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/.github/workflows/awstest.yml b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/.github/workflows/awstest.yml index 6a2759edbe..6cedbf3552 100644 --- a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/.github/workflows/awstest.yml +++ b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/.github/workflows/awstest.yml @@ -37,4 +37,4 @@ jobs: --job-name nf-core-{{ cookiecutter.short_name }} \ --job-queue $AWS_JOB_QUEUE \ --job-definition $AWS_JOB_DEFINITION \ - --container-overrides '{"command": ["{{ cookiecutter.name }}", "-r '"${GITHUB_SHA}"' -profile test --outdir s3://'"${AWS_S3_BUCKET}"'/{{ cookiecutter.short_name }}/results-'"${GITHUB_SHA}"' -w s3://'"${AWS_S3_BUCKET}"'/{{ cookiecutter.short_name }}/work-'"${GITHUB_SHA}"' -with-tower"], "environment": [{"name": "TOWER_ACCESS_TOKEN", "value": "'"$TOWER_ACCESS_TOKEN"'"}]}'{{ cookiecutter.short_name }}/work-'"${GITHUB_SHA}"' -with-tower"], "environment": [{"name": "TOWER_ACCESS_TOKEN", "value": "'"$TOWER_ACCESS_TOKEN"'"}]}' + --container-overrides '{"command": ["{{ cookiecutter.name }}", "-r '"${GITHUB_SHA}"' -profile test --outdir s3://'"${AWS_S3_BUCKET}"'/{{ cookiecutter.short_name }}/results-'"${GITHUB_SHA}"' -w s3://'"${AWS_S3_BUCKET}"'/{{ cookiecutter.short_name }}/work-'"${GITHUB_SHA}"' -with-tower"], "environment": [{"name": "TOWER_ACCESS_TOKEN", "value": "'"$TOWER_ACCESS_TOKEN"'"}]}' From 36fc7b590c384cff314deb35075716033788718c Mon Sep 17 00:00:00 2001 From: ggabernet Date: Mon, 3 Aug 2020 20:27:13 +0200 Subject: [PATCH 07/55] update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c07f8ad7cb..16f1e10a31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ ### Template +* Fix command error in `awstest.yml` GitHub Action workflow + ### Linting ### Other From e91f21784704f9df06b3c7854de5a9e46ce7d2dc Mon Sep 17 00:00:00 2001 From: ggabernet Date: Tue, 4 Aug 2020 09:22:42 +0200 Subject: [PATCH 08/55] manual trigger for AWS GitHub actions --- CHANGELOG.md | 3 ++- .../.github/workflows/awsfulltest.yml | 4 +++- .../.github/workflows/awstest.yml | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16f1e10a31..207046a931 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,8 @@ ### Template -* Fix command error in `awstest.yml` GitHub Action workflow +* Fix command error in `awstest.yml` GitHub Action workflow. +* Allow manual triggering of AWS test GitHub Action workflows. ### Linting diff --git a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/.github/workflows/awsfulltest.yml b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/.github/workflows/awsfulltest.yml index 07b164e6bf..3054b61dbf 100644 --- a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/.github/workflows/awsfulltest.yml +++ b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/.github/workflows/awsfulltest.yml @@ -1,10 +1,12 @@ name: nf-core AWS full size tests -# This workflow is triggered on push to the master branch. +# This workflow is triggered on published releases. +# It can be additionally triggered manually with GitHub actions workflow dispatch. # It runs the -profile 'test_full' on AWS batch on: release: types: [published] + workflow_dispatch: jobs: run-awstest: diff --git a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/.github/workflows/awstest.yml b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/.github/workflows/awstest.yml index 6cedbf3552..db1a2a1900 100644 --- a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/.github/workflows/awstest.yml +++ b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/.github/workflows/awstest.yml @@ -1,11 +1,13 @@ name: nf-core AWS test # This workflow is triggered on push to the master branch. -# It runs the -profile 'test' on AWS batch +# It can be additionally triggered manually with GitHub actions workflow dispatch. +# It runs the -profile 'test' on AWS batch. on: push: branches: - master + workflow_dispatch: jobs: run-awstest: From 70c99d58a485ff0de1e245859bc68ae7d639eddd Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Wed, 5 Aug 2020 11:14:18 +0200 Subject: [PATCH 09/55] Fix typo of where -c param is described --- .../{{cookiecutter.name_noslash}}/docs/usage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/docs/usage.md b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/docs/usage.md index b0111a0afd..5941f6cbcb 100644 --- a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/docs/usage.md +++ b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/docs/usage.md @@ -98,7 +98,7 @@ process { See the main [Nextflow documentation](https://www.nextflow.io/docs/latest/config.html) for more information. -If you are likely to be running `nf-core` pipelines regularly it may be a good idea to request that your custom config file is uploaded to the `nf-core/configs` git repository. Before you do this please can you test that the config file works with your pipeline of choice using the `-c` parameter (see definition below). You can then create a pull request to the `nf-core/configs` repository with the addition of your config file, associated documentation file (see examples in [`nf-core/configs/docs`](https://github.com/nf-core/configs/tree/master/docs)), and amending [`nfcore_custom.config`](https://github.com/nf-core/configs/blob/master/nfcore_custom.config) to include your custom profile. +If you are likely to be running `nf-core` pipelines regularly it may be a good idea to request that your custom config file is uploaded to the `nf-core/configs` git repository. Before you do this please can you test that the config file works with your pipeline of choice using the `-c` parameter (see definition above). You can then create a pull request to the `nf-core/configs` repository with the addition of your config file, associated documentation file (see examples in [`nf-core/configs/docs`](https://github.com/nf-core/configs/tree/master/docs)), and amending [`nfcore_custom.config`](https://github.com/nf-core/configs/blob/master/nfcore_custom.config) to include your custom profile. If you have any questions or issues please send us a message on [Slack](https://nf-co.re/join/slack) on the [`#configs` channel](https://nfcore.slack.com/channels/configs). From 9045ebef108163d9c874747359a1514490116e6e Mon Sep 17 00:00:00 2001 From: Lukas Heumos Date: Thu, 6 Aug 2020 23:11:15 +0200 Subject: [PATCH 10/55] fixed typo --- .github/workflows/branch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml index fabf219aea..9463a5130f 100644 --- a/.github/workflows/branch.yml +++ b/.github/workflows/branch.yml @@ -24,7 +24,7 @@ jobs: message: | Hi @${{ github.event.pull_request.user.login }}, - It looks like this pull-request has been made against the ${{github.event.pull_request.head.repo.full_name}} `master` branch. The `master` branch on nf-core repositories should always contain code from the latest release. Beacuse of this, PRs to `master` are only allowed if they come from the ${{github.event.pull_request.head.repo.full_name}} `dev` branch. + It looks like this pull-request has been made against the ${{github.event.pull_request.head.repo.full_name}} `master` branch. The `master` branch on nf-core repositories should always contain code from the latest release. Because of this, PRs to `master` are only allowed if they come from the ${{github.event.pull_request.head.repo.full_name}} `dev` branch. You do not need to close this PR, you can change the target branch to `dev` by clicking the _"Edit"_ button at the top of this page. From 40cf1ccfa27eeb33f035059f8ad91be78f05e3b0 Mon Sep 17 00:00:00 2001 From: matthiasho Date: Fri, 14 Aug 2020 10:09:04 +0200 Subject: [PATCH 11/55] remove outdated TODO in template --- .../{{cookiecutter.name_noslash}}/docs/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/docs/README.md b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/docs/README.md index ef2bb5200a..191f199dc5 100644 --- a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/docs/README.md +++ b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/docs/README.md @@ -2,8 +2,6 @@ The {{ cookiecutter.name }} documentation is split into the following pages: - - * [Usage](usage.md) * An overview of how the pipeline works, how to run it and a description of all of the different command-line flags. * [Output](output.md) From 36cc2eba74fb9b7739827ce07a19d8a7d788387e Mon Sep 17 00:00:00 2001 From: matthiasho Date: Fri, 14 Aug 2020 11:36:40 +0200 Subject: [PATCH 12/55] fix url in readme template --- .../pipeline-template/{{cookiecutter.name_noslash}}/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md index 169587892b..45f859f17a 100644 --- a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md +++ b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md @@ -40,7 +40,7 @@ See [usage docs](docs/usage.md) for all of the available options when running th ## Documentation -The {{ cookiecutter.name }} pipeline comes with documentation about the pipeline which you can read at [https://nf-core/{{ cookiecutter.short_name }}/docs](https://nf-core/{{ cookiecutter.short_name }}/docs) or find in the [`docs/` directory](docs). +The {{ cookiecutter.name }} pipeline comes with documentation about the pipeline which you can read at [https://nf-co.re/{{ cookiecutter.short_name }}/usage](https://nf-co.re/{{ cookiecutter.short_name }}/usage) or find in the [`docs/` directory](docs). From 0c71c1f6a6226aea479f262c16a3bea7046ec760 Mon Sep 17 00:00:00 2001 From: matthiasho Date: Mon, 17 Aug 2020 11:16:14 +0200 Subject: [PATCH 13/55] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 207046a931..e516b21d63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * Fix command error in `awstest.yml` GitHub Action workflow. * Allow manual triggering of AWS test GitHub Action workflows. +* Remove TODO item, which was proposing the usage of additional files beside `usage.md` and `output.md` for documentation. ### Linting From e19d6e48f2c43c06e84f9230672219ecabf3f9c4 Mon Sep 17 00:00:00 2001 From: matthiasho Date: Mon, 17 Aug 2020 13:16:52 +0200 Subject: [PATCH 14/55] fix one more dead docs link --- .../{{cookiecutter.name_noslash}}/.github/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/.github/CONTRIBUTING.md b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/.github/CONTRIBUTING.md index 3836aa7637..8ab3b9bd2e 100644 --- a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/.github/CONTRIBUTING.md +++ b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/.github/CONTRIBUTING.md @@ -54,4 +54,4 @@ These tests are run both with the latest available version of `Nextflow` and als ## Getting help -For further information/help, please consult the [{{ cookiecutter.name }} documentation](https://nf-co.re/{{ cookiecutter.short_name }}/docs) and don't hesitate to get in touch on the nf-core Slack [#{{ cookiecutter.short_name }}](https://nfcore.slack.com/channels/{{ cookiecutter.short_name }}) channel ([join our Slack here](https://nf-co.re/join/slack)). +For further information/help, please consult the [{{ cookiecutter.name }} documentation](https://nf-co.re/{{ cookiecutter.short_name }}/usage) and don't hesitate to get in touch on the nf-core Slack [#{{ cookiecutter.short_name }}](https://nfcore.slack.com/channels/{{ cookiecutter.short_name }}) channel ([join our Slack here](https://nf-co.re/join/slack)). From 06e1b5aa53e7f49a34097de1a3f7562a337904c3 Mon Sep 17 00:00:00 2001 From: drpatelh Date: Tue, 18 Aug 2020 12:04:34 +0100 Subject: [PATCH 15/55] move NOT mov --- .../{{cookiecutter.name_noslash}}/nextflow_schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/nextflow_schema.json b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/nextflow_schema.json index b12212e80b..da7d2bb28b 100644 --- a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/nextflow_schema.json +++ b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/nextflow_schema.json @@ -101,7 +101,7 @@ "link", "copy", "copyNoFollow", - "mov" + "move" ] }, "name": { From 89b95f0239079eeb8eddb1a1eaaf5f77885c1e1b Mon Sep 17 00:00:00 2001 From: MaxUlysse Date: Fri, 4 Sep 2020 13:30:30 +0200 Subject: [PATCH 16/55] remove docs from README Template and simplify Documentation section --- .../pipeline-template/{{cookiecutter.name_noslash}}/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md index fe852f3214..213aa58d0a 100644 --- a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md +++ b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md @@ -40,7 +40,7 @@ See [usage docs](https://nf-co.re/{{ cookiecutter.short_name }}/usage) for all o ## Documentation -The {{ cookiecutter.name }} pipeline comes with documentation about the pipeline which you can read at [https://nf-co.re/{{ cookiecutter.short_name }}/usage](https://nf-co.re/{{ cookiecutter.short_name }}/usage) and [https://nf-co.re/{{ cookiecutter.short_name }}/output](https://nf-co.re/{{ cookiecutter.short_name }}/output) or find in the [`docs/` directory](docs) in the repository. +The {{ cookiecutter.name }} pipeline comes with documentation about the pipeline: [{{ cookiecutter.short_name }}/usage]({{ cookiecutter.short_name }}/usage) and [{{ cookiecutter.short_name }}/output]({{ cookiecutter.short_name }}/output). From e067ed5c7d9233f61c8d13bdefede736da18f7f6 Mon Sep 17 00:00:00 2001 From: MaxUlysse Date: Fri, 4 Sep 2020 13:38:59 +0200 Subject: [PATCH 17/55] simpler links --- .../pipeline-template/{{cookiecutter.name_noslash}}/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md index 213aa58d0a..a398b1c714 100644 --- a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md +++ b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md @@ -40,7 +40,7 @@ See [usage docs](https://nf-co.re/{{ cookiecutter.short_name }}/usage) for all o ## Documentation -The {{ cookiecutter.name }} pipeline comes with documentation about the pipeline: [{{ cookiecutter.short_name }}/usage]({{ cookiecutter.short_name }}/usage) and [{{ cookiecutter.short_name }}/output]({{ cookiecutter.short_name }}/output). +The {{ cookiecutter.name }} pipeline comes with documentation about the pipeline: [docs/usage](docs/usage.md) and [docs/output](docs/output.md). From 596dd40dbc9b25518127bbe423888feaa2e6a725 Mon Sep 17 00:00:00 2001 From: Batool Almarzouq Date: Fri, 2 Oct 2020 10:31:03 +0300 Subject: [PATCH 18/55] corrected the blue part in a part of the nf-core ascii art #736 --- nf_core/__main__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nf_core/__main__.py b/nf_core/__main__.py index be9bdfaac9..fa56fb534e 100755 --- a/nf_core/__main__.py +++ b/nf_core/__main__.py @@ -35,11 +35,11 @@ def run_nf_core(): # Print nf-core header to STDERR stderr = rich.console.Console(file=sys.stderr) - stderr.print("\n[green]{},--.[grey39]/[green],-.".format(" " * 42)) - stderr.print("[blue] ___ __ __ __ ___ [green]/,-._.--~\\") - stderr.print("[blue] |\ | |__ __ / ` / \ |__) |__ [yellow] } {") - stderr.print("[blue] | \| | \__, \__/ | \ |___ [green]\`-._,-`-,") - stderr.print("[green] `._,._,'\n") + stderr.print("\n[green]{},--.[grey39]/[green],-.".format(" " * 42), highlight=False) + stderr.print("[blue] ___ __ __ __ ___ [green]/,-._.--~\\", highlight=False) + stderr.print("[blue] |\ | |__ __ / ` / \ |__) |__ [yellow] } {", highlight=False) + stderr.print("[blue] | \| | \__, \__/ | \ |___ [green]\`-._,-`-,", highlight=False) + stderr.print("[green] `._,._,'\n", highlight=False) stderr.print("[grey39] nf-core/tools version {}".format(nf_core.__version__), highlight=False) try: is_outdated, current_vers, remote_vers = nf_core.utils.check_if_outdated() From 3a38656dc6da32499888fe1f2534ceb7d07cb20e Mon Sep 17 00:00:00 2001 From: Batool Almarzouq Date: Fri, 2 Oct 2020 10:40:10 +0300 Subject: [PATCH 19/55] Code formatting with Black --- nf_core/create.py | 9 +++------ nf_core/download.py | 12 ++++-------- nf_core/licences.py | 6 ++---- nf_core/lint.py | 38 ++++++++++++++++++++++++++++++-------- nf_core/schema.py | 6 +++--- nf_core/sync.py | 22 ++++++++++++---------- nf_core/utils.py | 4 +++- 7 files changed, 57 insertions(+), 40 deletions(-) diff --git a/nf_core/create.py b/nf_core/create.py index 2fdeeecff2..717042b517 100644 --- a/nf_core/create.py +++ b/nf_core/create.py @@ -67,8 +67,7 @@ def init_pipeline(self): ) def run_cookiecutter(self): - """Runs cookiecutter to create a new nf-core pipeline. - """ + """Runs cookiecutter to create a new nf-core pipeline.""" log.info("Creating new nf-core pipeline: {}".format(self.name)) # Check if the output directory exists @@ -113,8 +112,7 @@ def run_cookiecutter(self): shutil.rmtree(self.tmpdir) def make_pipeline_logo(self): - """Fetch a logo for the new pipeline from the nf-core website - """ + """Fetch a logo for the new pipeline from the nf-core website""" logo_url = "https://nf-co.re/logo/{}".format(self.short_name) log.debug("Fetching logo from {}".format(logo_url)) @@ -135,8 +133,7 @@ def make_pipeline_logo(self): fh.write(r.content) def git_init_pipeline(self): - """Initialises the new pipeline as a Git repository and submits first commit. - """ + """Initialises the new pipeline as a Git repository and submits first commit.""" log.info("Initialising pipeline git repository") repo = git.Repo.init(self.outdir) repo.git.add(A=True) diff --git a/nf_core/download.py b/nf_core/download.py index a6b2cfc2d3..db570231e4 100644 --- a/nf_core/download.py +++ b/nf_core/download.py @@ -197,8 +197,7 @@ def fetch_workflow_details(self, wfs): raise LookupError("Not able to find pipeline '{}'".format(self.pipeline)) def download_wf_files(self): - """Downloads workflow files from GitHub to the :attr:`self.outdir`. - """ + """Downloads workflow files from GitHub to the :attr:`self.outdir`.""" log.debug("Downloading {}".format(self.wf_download_url)) # Download GitHub zip file into memory and extract @@ -216,8 +215,7 @@ def download_wf_files(self): os.chmod(os.path.join(dirpath, fname), 0o775) def download_configs(self): - """Downloads the centralised config profiles from nf-core/configs to :attr:`self.outdir`. - """ + """Downloads the centralised config profiles from nf-core/configs to :attr:`self.outdir`.""" configs_zip_url = "https://github.com/nf-core/configs/archive/master.zip" configs_local_dir = "configs-master" log.debug("Downloading {}".format(configs_zip_url)) @@ -236,8 +234,7 @@ def download_configs(self): os.chmod(os.path.join(dirpath, fname), 0o775) def wf_use_local_configs(self): - """Edit the downloaded nextflow.config file to use the local config files - """ + """Edit the downloaded nextflow.config file to use the local config files""" nfconfig_fn = os.path.join(self.outdir, "workflow", "nextflow.config") find_str = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}" repl_str = "../configs/" @@ -294,8 +291,7 @@ def pull_singularity_image(self, container): raise e def compress_download(self): - """Take the downloaded files and make a compressed .tar.gz archive. - """ + """Take the downloaded files and make a compressed .tar.gz archive.""" log.debug("Creating archive: {}".format(self.output_filename)) # .tar.gz and .tar.bz2 files diff --git a/nf_core/licences.py b/nf_core/licences.py index 1637367427..08e3ac8b42 100644 --- a/nf_core/licences.py +++ b/nf_core/licences.py @@ -50,8 +50,7 @@ def run_licences(self): return self.print_licences() def get_environment_file(self): - """Get the conda environment file for the pipeline - """ + """Get the conda environment file for the pipeline""" if os.path.exists(self.pipeline): env_filename = os.path.join(self.pipeline, "environment.yml") if not os.path.exists(self.pipeline): @@ -68,8 +67,7 @@ def get_environment_file(self): self.conda_config = yaml.safe_load(response.text) def fetch_conda_licences(self): - """Fetch package licences from Anaconda and PyPi. - """ + """Fetch package licences from Anaconda and PyPi.""" lint_obj = nf_core.lint.PipelineLint(self.pipeline) lint_obj.conda_config = self.conda_config diff --git a/nf_core/lint.py b/nf_core/lint.py index fcc47ae3d6..6245387dd1 100755 --- a/nf_core/lint.py +++ b/nf_core/lint.py @@ -601,7 +601,10 @@ def check_nextflow_config(self): ) else: self.warned.append( - (4, "Config `manifest.version` should end in `dev`: `{}`".format(self.config["manifest.version"]),) + ( + 4, + "Config `manifest.version` should end in `dev`: `{}`".format(self.config["manifest.version"]), + ) ) elif "manifest.version" in self.config: if "dev" in self.config["manifest.version"]: @@ -660,11 +663,19 @@ def check_actions_branch_protection(self): "PIPELINENAME", self.pipeline_name.lower() ) if has_name and has_if and has_run: - self.passed.append((5, "GitHub Actions 'branch' workflow looks good: `{}`".format(fn),)) + self.passed.append( + ( + 5, + "GitHub Actions 'branch' workflow looks good: `{}`".format(fn), + ) + ) break else: self.failed.append( - (5, "Couldn't find GitHub Actions 'branch' check for PRs to master: `{}`".format(fn),) + ( + 5, + "Couldn't find GitHub Actions 'branch' check for PRs to master: `{}`".format(fn), + ) ) def check_actions_ci(self): @@ -683,7 +694,12 @@ def check_actions_ci(self): # NB: YAML dict key 'on' is evaluated to a Python dict key True assert ciwf[True] == expected except (AssertionError, KeyError, TypeError): - self.failed.append((5, "GitHub Actions CI is not triggered on expected events: `{}`".format(fn),)) + self.failed.append( + ( + 5, + "GitHub Actions CI is not triggered on expected events: `{}`".format(fn), + ) + ) else: self.passed.append((5, "GitHub Actions CI is triggered on expected events: `{}`".format(fn))) @@ -699,7 +715,10 @@ def check_actions_ci(self): assert any([docker_build_cmd in step["run"] for step in steps if "run" in step.keys()]) except (AssertionError, KeyError, TypeError): self.failed.append( - (5, "CI is not building the correct docker image. Should be: `{}`".format(docker_build_cmd),) + ( + 5, + "CI is not building the correct docker image. Should be: `{}`".format(docker_build_cmd), + ) ) else: self.passed.append((5, "CI is building the correct docker image: `{}`".format(docker_build_cmd))) @@ -1299,7 +1318,8 @@ def _s(some_list): if len(self.passed) > 0 and show_passed: table = Table(style="green", box=rich.box.ROUNDED) table.add_column( - "[[\u2714]] {} Test{} Passed".format(len(self.passed), _s(self.passed)), no_wrap=True, + "[[\u2714]] {} Test{} Passed".format(len(self.passed), _s(self.passed)), + no_wrap=True, ) table = format_result(self.passed, table) console.print(table) @@ -1315,7 +1335,8 @@ def _s(some_list): if len(self.failed) > 0: table = Table(style="red", box=rich.box.ROUNDED) table.add_column( - "[[\u2717]] {} Test{} Failed".format(len(self.failed), _s(self.failed)), no_wrap=True, + "[[\u2717]] {} Test{} Failed".format(len(self.failed), _s(self.failed)), + no_wrap=True, ) table = format_result(self.failed, table) console.print(table) @@ -1325,7 +1346,8 @@ def _s(some_list): table = Table(box=rich.box.ROUNDED) table.add_column("[bold green]LINT RESULTS SUMMARY".format(len(self.passed)), no_wrap=True) table.add_row( - "[[\u2714]] {:>3} Test{} Passed".format(len(self.passed), _s(self.passed)), style="green", + "[[\u2714]] {:>3} Test{} Passed".format(len(self.passed), _s(self.passed)), + style="green", ) table.add_row("[[!]] {:>3} Test Warning{}".format(len(self.warned), _s(self.warned)), style="yellow") table.add_row("[[\u2717]] {:>3} Test{} Failed".format(len(self.failed), _s(self.failed)), style="red") diff --git a/nf_core/schema.py b/nf_core/schema.py index 177de0a0f9..a355dfbecf 100644 --- a/nf_core/schema.py +++ b/nf_core/schema.py @@ -23,8 +23,8 @@ class PipelineSchema(object): - """ Class to generate a schema object with - functions to handle pipeline JSON Schema """ + """Class to generate a schema object with + functions to handle pipeline JSON Schema""" def __init__(self): """ Initialise the object """ @@ -127,7 +127,7 @@ def save_schema(self): json.dump(self.schema, fh, indent=4) def load_input_params(self, params_path): - """ Load a given a path to a parameters file (JSON/YAML) + """Load a given a path to a parameters file (JSON/YAML) These should be input parameters used to run a pipeline with the Nextflow -params-file option. diff --git a/nf_core/sync.py b/nf_core/sync.py index 0f48eb5161..97d566b735 100644 --- a/nf_core/sync.py +++ b/nf_core/sync.py @@ -22,15 +22,13 @@ class SyncException(Exception): - """Exception raised when there was an error with TEMPLATE branch synchronisation - """ + """Exception raised when there was an error with TEMPLATE branch synchronisation""" pass class PullRequestException(Exception): - """Exception raised when there was an error creating a Pull-Request on GitHub.com - """ + """Exception raised when there was an error creating a Pull-Request on GitHub.com""" pass @@ -57,7 +55,12 @@ class PipelineSync(object): """ def __init__( - self, pipeline_dir, from_branch=None, make_pr=False, gh_repo=None, gh_username=None, + self, + pipeline_dir, + from_branch=None, + make_pr=False, + gh_repo=None, + gh_username=None, ): """ Initialise syncing object """ @@ -73,8 +76,7 @@ def __init__( self.gh_repo = gh_repo def sync(self): - """ Find workflow attributes, create a new template pipeline on TEMPLATE - """ + """Find workflow attributes, create a new template pipeline on TEMPLATE""" log.info("Pipeline directory: {}".format(self.pipeline_dir)) if self.from_branch: @@ -211,8 +213,7 @@ def make_template_pipeline(self): ).init_pipeline() def commit_template_changes(self): - """If we have any changes with the new template files, make a git commit - """ + """If we have any changes with the new template files, make a git commit""" # Check that we have something to commit if not self.repo.is_dirty(untracked_files=True): log.info("Template contains no changes - no new commit created") @@ -294,7 +295,8 @@ def update_existing_pull_request(self, pr_title, pr_body_text): self.gh_repo, self.from_branch ) r = requests.get( - url=list_prs_url, auth=requests.auth.HTTPBasicAuth(self.gh_username, os.environ.get("GITHUB_AUTH_TOKEN")), + url=list_prs_url, + auth=requests.auth.HTTPBasicAuth(self.gh_username, os.environ.get("GITHUB_AUTH_TOKEN")), ) try: r_json = json.loads(r.content) diff --git a/nf_core/utils.py b/nf_core/utils.py index 87c2a4eba3..c0eb461e33 100644 --- a/nf_core/utils.py +++ b/nf_core/utils.py @@ -142,7 +142,9 @@ def setup_requests_cachedir(): if not os.path.exists(cachedir): os.makedirs(cachedir) requests_cache.install_cache( - os.path.join(cachedir, "github_info"), expire_after=datetime.timedelta(hours=1), backend="sqlite", + os.path.join(cachedir, "github_info"), + expire_after=datetime.timedelta(hours=1), + backend="sqlite", ) From 0bfdc4db416710a33d781bc1210e6342269ca887 Mon Sep 17 00:00:00 2001 From: Batool Almarzouq Date: Fri, 2 Oct 2020 17:47:40 +0300 Subject: [PATCH 20/55] Black formatting --- tests/test_licenses.py | 2 +- tests/test_lint.py | 14 +++++++------- tests/test_list.py | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/test_licenses.py b/tests/test_licenses.py index 70e0ea461a..5458b6b1ce 100644 --- a/tests/test_licenses.py +++ b/tests/test_licenses.py @@ -13,7 +13,7 @@ class WorkflowLicensesTest(unittest.TestCase): - """ A class that performs tests on the workflow license + """A class that performs tests on the workflow license retrieval functionality of nf-core tools.""" def setUp(self): diff --git a/tests/test_lint.py b/tests/test_lint.py index 707c730e71..0624781f6f 100644 --- a/tests/test_lint.py +++ b/tests/test_lint.py @@ -82,7 +82,7 @@ def test_call_lint_pipeline_pass(self): @pytest.mark.xfail(raises=AssertionError, strict=True) def test_call_lint_pipeline_fail(self): """Test the main execution function of PipelineLint (fail) - This should fail after the first test and halt execution """ + This should fail after the first test and halt execution""" lint_obj = nf_core.lint.run_linting(PATH_FAILING_EXAMPLE, False) expectations = {"failed": 4, "warned": 2, "passed": 7} self.assess_lint_status(lint_obj, **expectations) @@ -433,8 +433,8 @@ def test_pip_package_not_latest_warn(self): @mock.patch("requests.get") def test_pypi_timeout_warn(self, mock_get): - """ Tests the PyPi connection and simulates a request timeout, which should - return in an addiional warning in the linting """ + """Tests the PyPi connection and simulates a request timeout, which should + return in an addiional warning in the linting""" # Define the behaviour of the request get mock mock_get.side_effect = requests.exceptions.Timeout() # Now do the test @@ -449,8 +449,8 @@ def test_pypi_timeout_warn(self, mock_get): @mock.patch("requests.get") def test_pypi_connection_error_warn(self, mock_get): - """ Tests the PyPi connection and simulates a connection error, which should - result in an additional warning, as we cannot test if dependent module is latest """ + """Tests the PyPi connection and simulates a connection error, which should + result in an additional warning, as we cannot test if dependent module is latest""" # Define the behaviour of the request get mock mock_get.side_effect = requests.exceptions.ConnectionError() # Now do the test @@ -475,7 +475,7 @@ def test_pip_dependency_fail(self): self.assess_lint_status(lint_obj, **expectations) def test_conda_dependency_fails(self): - """ Tests that linting fails, if conda dependency + """Tests that linting fails, if conda dependency package version is not available on Anaconda. """ lint_obj = nf_core.lint.PipelineLint(PATH_WORKING_EXAMPLE) @@ -488,7 +488,7 @@ def test_conda_dependency_fails(self): self.assess_lint_status(lint_obj, **expectations) def test_pip_dependency_fails(self): - """ Tests that linting fails, if conda dependency + """Tests that linting fails, if conda dependency package version is not available on Anaconda. """ lint_obj = nf_core.lint.PipelineLint(PATH_WORKING_EXAMPLE) diff --git a/tests/test_list.py b/tests/test_list.py index 1b7920475d..97be0771be 100644 --- a/tests/test_list.py +++ b/tests/test_list.py @@ -57,14 +57,14 @@ def test_pretty_datetime(self): @pytest.mark.xfail(raises=AssertionError, strict=True) def test_local_workflows_and_fail(self): - """ Test the local workflow class and try to get local - Nextflow workflow information """ + """Test the local workflow class and try to get local + Nextflow workflow information""" loc_wf = nf_core.list.LocalWorkflow("myWF") loc_wf.get_local_nf_workflow_details() def test_local_workflows_compare_and_fail_silently(self): - """ Test the workflow class and try to compare local - and remote workflows """ + """Test the workflow class and try to compare local + and remote workflows""" wfs = nf_core.list.Workflows() lwf_ex = nf_core.list.LocalWorkflow("myWF") lwf_ex.full_name = "my Workflow" From 82a61de5662c80d23a96be78a5d3ca40a4647425 Mon Sep 17 00:00:00 2001 From: Maxime Garcia Date: Mon, 19 Oct 2020 18:00:13 +0200 Subject: [PATCH 21/55] Update CONTRIBUTING.md `docs` does not exist anymore. I do think either `usage` would be a good idea. cf https://github.com/nf-core/eager/pull/573/files#r501670722 --- .../{{cookiecutter.name_noslash}}/.github/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/.github/CONTRIBUTING.md b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/.github/CONTRIBUTING.md index 3836aa7637..8ab3b9bd2e 100644 --- a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/.github/CONTRIBUTING.md +++ b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/.github/CONTRIBUTING.md @@ -54,4 +54,4 @@ These tests are run both with the latest available version of `Nextflow` and als ## Getting help -For further information/help, please consult the [{{ cookiecutter.name }} documentation](https://nf-co.re/{{ cookiecutter.short_name }}/docs) and don't hesitate to get in touch on the nf-core Slack [#{{ cookiecutter.short_name }}](https://nfcore.slack.com/channels/{{ cookiecutter.short_name }}) channel ([join our Slack here](https://nf-co.re/join/slack)). +For further information/help, please consult the [{{ cookiecutter.name }} documentation](https://nf-co.re/{{ cookiecutter.short_name }}/usage) and don't hesitate to get in touch on the nf-core Slack [#{{ cookiecutter.short_name }}](https://nfcore.slack.com/channels/{{ cookiecutter.short_name }}) channel ([join our Slack here](https://nf-co.re/join/slack)). From 922d96eb8853b1d94a3e03824f0d9060a0981c88 Mon Sep 17 00:00:00 2001 From: Zethson Date: Tue, 20 Oct 2020 19:32:14 +0200 Subject: [PATCH 22/55] fixed #742 Signed-off-by: Zethson --- CHANGELOG.md | 1 + .../{{cookiecutter.name_noslash}}/nextflow.config | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e516b21d63..11e86ceea8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ * Fix command error in `awstest.yml` GitHub Action workflow. * Allow manual triggering of AWS test GitHub Action workflows. * Remove TODO item, which was proposing the usage of additional files beside `usage.md` and `output.md` for documentation. +* Added a Podman profile, which enables Podman as container ### Linting diff --git a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/nextflow.config b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/nextflow.config index 30f5260f67..122a916e24 100644 --- a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/nextflow.config +++ b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/nextflow.config @@ -71,6 +71,9 @@ profiles { singularity.enabled = true singularity.autoMounts = true } + podman { + podman.enabled = true + } test { includeConfig 'conf/test.config' } } From b0b20a393bddf4745fdd7f270f77716d047730ed Mon Sep 17 00:00:00 2001 From: ggabernet Date: Thu, 22 Oct 2020 09:27:58 +0200 Subject: [PATCH 23/55] bump versions --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 6155104034..b32bbf4899 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup, find_packages import sys -version = "1.11dev" +version = "1.11.0" with open("README.md") as f: readme = f.read() From 923492eb98cb3bcdba04e170279a2bc04440b48a Mon Sep 17 00:00:00 2001 From: ggabernet Date: Thu, 22 Oct 2020 09:28:46 +0200 Subject: [PATCH 24/55] bump versions 11.1.0 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e516b21d63..bf69e99be5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # nf-core/tools: Changelog -## v1.11dev +## v1.11.0 ### Template From 4c693a897b5c0c663864de2d90501ce8a0082ea0 Mon Sep 17 00:00:00 2001 From: ggabernet Date: Thu, 22 Oct 2020 09:29:00 +0200 Subject: [PATCH 25/55] Update dockerfile example --- tests/lint_examples/minimalworkingexample/Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/lint_examples/minimalworkingexample/Dockerfile b/tests/lint_examples/minimalworkingexample/Dockerfile index 7f033b0331..708803bbb3 100644 --- a/tests/lint_examples/minimalworkingexample/Dockerfile +++ b/tests/lint_examples/minimalworkingexample/Dockerfile @@ -1,6 +1,5 @@ -FROM nfcore/base:dev -MAINTAINER Phil Ewels -LABEL authors="phil.ewels@scilifelab.se" \ +FROM nfcore/base:1.11.0 +LABEL authors="Phil Ewels phil.ewels@scilifelab.se" \ description="Docker image containing all requirements for the nf-core tools pipeline" COPY environment.yml / From 010497ab7c2fcdf7321e1c429da7b18c6dfccb8a Mon Sep 17 00:00:00 2001 From: ggabernet Date: Thu, 22 Oct 2020 09:51:34 +0200 Subject: [PATCH 26/55] fix link lint errors --- docs/lint_errors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/lint_errors.md b/docs/lint_errors.md index 39794dc29c..f664df3eed 100644 --- a/docs/lint_errors.md +++ b/docs/lint_errors.md @@ -226,7 +226,7 @@ Additionally, we provide the possibility of testing the pipeline on full size da This should ensure that the pipeline runs as expected on AWS and provide a resource estimation. The GitHub Actions workflow is: `awsfulltest.yml`, and it can be found in the `.github/workflows/` directory. This workflow incurrs higher AWS costs, therefore it should only be triggered on `release`. -For tests on full data prior to release, [https://tower.nf](Nextflow Tower's launch feature) can be employed. +For tests on full data prior to release, [Nextflow Tower](https://tower.nf) launch feature can be employed. `awsfulltest.yml`: Triggers full sized tests run on AWS batch after releasing. From 58fbf3dfe5909236285f84442fc2b327b686875d Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Thu, 22 Oct 2020 10:17:13 +0200 Subject: [PATCH 27/55] Update rich to >=9 and update [] escaping --- CHANGELOG.md | 2 ++ nf_core/lint.py | 12 ++++++------ nf_core/schema.py | 10 +++++----- setup.py | 2 +- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf69e99be5..e46d2c401c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ ### Linting +* Update `rich` package dependency and use new markup escaping to change `[[!]]` back to `[!]` again + ### Other * Pipeline sync - fetch full repo when checking out before sync diff --git a/nf_core/lint.py b/nf_core/lint.py index 6245387dd1..5bce5b11c8 100755 --- a/nf_core/lint.py +++ b/nf_core/lint.py @@ -1318,7 +1318,7 @@ def _s(some_list): if len(self.passed) > 0 and show_passed: table = Table(style="green", box=rich.box.ROUNDED) table.add_column( - "[[\u2714]] {} Test{} Passed".format(len(self.passed), _s(self.passed)), + "\[\u2714] {} Test{} Passed".format(len(self.passed), _s(self.passed)), no_wrap=True, ) table = format_result(self.passed, table) @@ -1327,7 +1327,7 @@ def _s(some_list): # Table of warning tests if len(self.warned) > 0: table = Table(style="yellow", box=rich.box.ROUNDED) - table.add_column("[[!]] {} Test Warning{}".format(len(self.warned), _s(self.warned)), no_wrap=True) + table.add_column("\[!] {} Test Warning{}".format(len(self.warned), _s(self.warned)), no_wrap=True) table = format_result(self.warned, table) console.print(table) @@ -1335,7 +1335,7 @@ def _s(some_list): if len(self.failed) > 0: table = Table(style="red", box=rich.box.ROUNDED) table.add_column( - "[[\u2717]] {} Test{} Failed".format(len(self.failed), _s(self.failed)), + "\[\u2717] {} Test{} Failed".format(len(self.failed), _s(self.failed)), no_wrap=True, ) table = format_result(self.failed, table) @@ -1346,11 +1346,11 @@ def _s(some_list): table = Table(box=rich.box.ROUNDED) table.add_column("[bold green]LINT RESULTS SUMMARY".format(len(self.passed)), no_wrap=True) table.add_row( - "[[\u2714]] {:>3} Test{} Passed".format(len(self.passed), _s(self.passed)), + "\[\u2714] {:>3} Test{} Passed".format(len(self.passed), _s(self.passed)), style="green", ) - table.add_row("[[!]] {:>3} Test Warning{}".format(len(self.warned), _s(self.warned)), style="yellow") - table.add_row("[[\u2717]] {:>3} Test{} Failed".format(len(self.failed), _s(self.failed)), style="red") + table.add_row("\[!] {:>3} Test Warning{}".format(len(self.warned), _s(self.warned)), style="yellow") + table.add_row("\[\u2717] {:>3} Test{} Failed".format(len(self.failed), _s(self.failed)), style="red") console.print(table) def get_results_md(self): diff --git a/nf_core/schema.py b/nf_core/schema.py index a355dfbecf..8e235046d4 100644 --- a/nf_core/schema.py +++ b/nf_core/schema.py @@ -79,13 +79,13 @@ def load_lint_schema(self): self.load_schema() num_params = self.validate_schema() self.get_schema_defaults() - log.info("[green][[✓]] Pipeline schema looks valid[/] [dim](found {} params)".format(num_params)) + log.info("[green]\[✓] Pipeline schema looks valid[/] [dim](found {} params)".format(num_params)) except json.decoder.JSONDecodeError as e: error_msg = "[bold red]Could not parse schema JSON:[/] {}".format(e) log.error(error_msg) raise AssertionError(error_msg) except AssertionError as e: - error_msg = "[red][[✗]] Pipeline schema does not follow nf-core specs:\n {}".format(e) + error_msg = "[red]\[✗] Pipeline schema does not follow nf-core specs:\n {}".format(e) log.error(error_msg) raise AssertionError(error_msg) @@ -159,12 +159,12 @@ def validate_params(self): assert self.schema is not None jsonschema.validate(self.input_params, self.schema) except AssertionError: - log.error("[red][[✗]] Pipeline schema not found") + log.error("[red]\[✗] Pipeline schema not found") return False except jsonschema.exceptions.ValidationError as e: - log.error("[red][[✗]] Input parameters are invalid: {}".format(e.message)) + log.error("[red]\[✗] Input parameters are invalid: {}".format(e.message)) return False - log.info("[green][[✓]] Input parameters look valid") + log.info("[green]\[✓] Input parameters look valid") return True def validate_schema(self, schema=None): diff --git a/setup.py b/setup.py index b32bbf4899..ad6c89f94c 100644 --- a/setup.py +++ b/setup.py @@ -40,7 +40,7 @@ "pyyaml", "requests", "requests_cache", - "rich>=4.2.1", + "rich>=9", "tabulate", ], setup_requires=["twine>=1.11.0", "setuptools>=38.6."], From 1587cb3b127779097010b47578eeda799b513d97 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Thu, 22 Oct 2020 10:57:30 +0200 Subject: [PATCH 28/55] Clean up a whole load of warnings in pytest --- nf_core/__main__.py | 14 +++++++------- nf_core/lint.py | 14 +++++++------- .../nextflow_schema.json | 2 +- nf_core/sync.py | 4 ++-- pyproject.toml | 5 +++++ 5 files changed, 22 insertions(+), 17 deletions(-) diff --git a/nf_core/__main__.py b/nf_core/__main__.py index fa56fb534e..66db8af0c8 100755 --- a/nf_core/__main__.py +++ b/nf_core/__main__.py @@ -35,12 +35,12 @@ def run_nf_core(): # Print nf-core header to STDERR stderr = rich.console.Console(file=sys.stderr) - stderr.print("\n[green]{},--.[grey39]/[green],-.".format(" " * 42), highlight=False) - stderr.print("[blue] ___ __ __ __ ___ [green]/,-._.--~\\", highlight=False) - stderr.print("[blue] |\ | |__ __ / ` / \ |__) |__ [yellow] } {", highlight=False) - stderr.print("[blue] | \| | \__, \__/ | \ |___ [green]\`-._,-`-,", highlight=False) - stderr.print("[green] `._,._,'\n", highlight=False) - stderr.print("[grey39] nf-core/tools version {}".format(nf_core.__version__), highlight=False) + stderr.print(r"\n[green]{},--.[grey39]/[green],-.".format(" " * 42), highlight=False) + stderr.print(r"[blue] ___ __ __ __ ___ [green]/,-._.--~\\", highlight=False) + stderr.print(r"[blue] |\ | |__ __ / ` / \ |__) |__ [yellow] } {", highlight=False) + stderr.print(r"[blue] | \| | \__, \__/ | \ |___ [green]\`-._,-`-,", highlight=False) + stderr.print(r"[green] `._,._,'\n", highlight=False) + stderr.print(r"[grey39] nf-core/tools version {}".format(nf_core.__version__), highlight=False) try: is_outdated, current_vers, remote_vers = nf_core.utils.check_if_outdated() if is_outdated: @@ -503,7 +503,7 @@ def lint(schema_path): try: schema_obj.validate_schema_title_description() except AssertionError as e: - log.warn(e) + log.warning(e) except AssertionError as e: sys.exit(1) diff --git a/nf_core/lint.py b/nf_core/lint.py index 5bce5b11c8..b17758c368 100755 --- a/nf_core/lint.py +++ b/nf_core/lint.py @@ -1318,7 +1318,7 @@ def _s(some_list): if len(self.passed) > 0 and show_passed: table = Table(style="green", box=rich.box.ROUNDED) table.add_column( - "\[\u2714] {} Test{} Passed".format(len(self.passed), _s(self.passed)), + r"\[\u2714] {} Test{} Passed".format(len(self.passed), _s(self.passed)), no_wrap=True, ) table = format_result(self.passed, table) @@ -1327,7 +1327,7 @@ def _s(some_list): # Table of warning tests if len(self.warned) > 0: table = Table(style="yellow", box=rich.box.ROUNDED) - table.add_column("\[!] {} Test Warning{}".format(len(self.warned), _s(self.warned)), no_wrap=True) + table.add_column(r"\[!] {} Test Warning{}".format(len(self.warned), _s(self.warned)), no_wrap=True) table = format_result(self.warned, table) console.print(table) @@ -1335,7 +1335,7 @@ def _s(some_list): if len(self.failed) > 0: table = Table(style="red", box=rich.box.ROUNDED) table.add_column( - "\[\u2717] {} Test{} Failed".format(len(self.failed), _s(self.failed)), + r"\[\u2717] {} Test{} Failed".format(len(self.failed), _s(self.failed)), no_wrap=True, ) table = format_result(self.failed, table) @@ -1346,11 +1346,11 @@ def _s(some_list): table = Table(box=rich.box.ROUNDED) table.add_column("[bold green]LINT RESULTS SUMMARY".format(len(self.passed)), no_wrap=True) table.add_row( - "\[\u2714] {:>3} Test{} Passed".format(len(self.passed), _s(self.passed)), + r"\[\u2714] {:>3} Test{} Passed".format(len(self.passed), _s(self.passed)), style="green", ) - table.add_row("\[!] {:>3} Test Warning{}".format(len(self.warned), _s(self.warned)), style="yellow") - table.add_row("\[\u2717] {:>3} Test{} Failed".format(len(self.failed), _s(self.failed)), style="red") + table.add_row(r"\[!] {:>3} Test Warning{}".format(len(self.warned), _s(self.warned)), style="yellow") + table.add_row(r"\[\u2717] {:>3} Test{} Failed".format(len(self.failed), _s(self.failed)), style="red") console.print(table) def get_results_md(self): @@ -1507,7 +1507,7 @@ def github_comment(self): log.info("Posted GitHub comment: {}".format(r_json["html_url"])) log.debug(response_pp) else: - log.warn("Could not post GitHub comment: '{}'\n{}".format(r.status_code, response_pp)) + log.warning("Could not post GitHub comment: '{}'\n{}".format(r.status_code, response_pp)) except Exception as e: log.warning("Could not post GitHub comment: {}\n{}".format(os.environ["GITHUB_COMMENTS_URL"], e)) diff --git a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/nextflow_schema.json b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/nextflow_schema.json index da7d2bb28b..0a6e83a49e 100644 --- a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/nextflow_schema.json +++ b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/nextflow_schema.json @@ -1,5 +1,5 @@ { - "$schema": "https://json-schema.org/draft-07/schema", + "$schema": "http://json-schema.org/draft-07/schema", "$id": "https://raw.githubusercontent.com/{{ cookiecutter.name }}/master/nextflow_schema.json", "title": "{{ cookiecutter.name }} pipeline parameters", "description": "{{ cookiecutter.description }}", diff --git a/nf_core/sync.py b/nf_core/sync.py index 97d566b735..959648ae03 100644 --- a/nf_core/sync.py +++ b/nf_core/sync.py @@ -337,12 +337,12 @@ def update_existing_pull_request(self, pr_title, pr_body_text): return True # Something went wrong else: - log.warn("Could not update PR ('{}'):\n{}\n{}".format(r.status_code, pr_update_api_url, r_pp)) + log.warning("Could not update PR ('{}'):\n{}\n{}".format(r.status_code, pr_update_api_url, r_pp)) return False # Something went wrong else: - log.warn("Could not list open PRs ('{}')\n{}\n{}".format(r.status_code, list_prs_url, r_pp)) + log.warning("Could not list open PRs ('{}')\n{}\n{}".format(r.status_code, list_prs_url, r_pp)) return False def submit_pull_request(self, pr_title, pr_body_text): diff --git a/pyproject.toml b/pyproject.toml index 2d9759a7fb..bd60056e92 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,8 @@ [tool.black] line-length = 120 target_version = ['py36','py37','py38'] + +[tool.pytest.ini_options] +markers = [ + "datafiles: load datafiles" +] From 9faea4a27a7312d71eeefae5f276197f9731bc2d Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Thu, 22 Oct 2020 11:10:54 +0200 Subject: [PATCH 29/55] Pin nf-core version in testing for lints. Fixes nf-core/tools#410 --- nf_core/lint.py | 3 ++- tests/test_lint.py | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/nf_core/lint.py b/nf_core/lint.py index b17758c368..6c03ce3921 100755 --- a/nf_core/lint.py +++ b/nf_core/lint.py @@ -148,6 +148,7 @@ class PipelineLint(object): def __init__(self, path): """ Initialise linting object """ self.release_mode = False + self.version = nf_core.__version__ self.path = path self.git_sha = None self.files = [] @@ -1153,7 +1154,7 @@ def check_conda_dockerfile(self): return expected_strings = [ - "FROM nfcore/base:{}".format("dev" if "dev" in nf_core.__version__ else nf_core.__version__), + "FROM nfcore/base:{}".format("dev" if "dev" in self.version else self.version), "COPY environment.yml /", "RUN conda env create --quiet -f /environment.yml && conda clean -a", "RUN conda env export --name {} > {}.yml".format(self.conda_config["name"], self.conda_config["name"]), diff --git a/tests/test_lint.py b/tests/test_lint.py index 0624781f6f..ce62bca9e8 100644 --- a/tests/test_lint.py +++ b/tests/test_lint.py @@ -75,7 +75,10 @@ def test_call_lint_pipeline_pass(self): """Test the main execution function of PipelineLint (pass) This should not result in any exception for the minimal working example""" + old_nfcore_version = nf_core.__version__ + nf_core.__version__ = '1.11.0' lint_obj = nf_core.lint.run_linting(PATH_WORKING_EXAMPLE, False) + nf_core.__version__ = old_nfcore_version expectations = {"failed": 0, "warned": 5, "passed": MAX_PASS_CHECKS - 1} self.assess_lint_status(lint_obj, **expectations) @@ -90,6 +93,7 @@ def test_call_lint_pipeline_fail(self): def test_call_lint_pipeline_release(self): """Test the main execution function of PipelineLint when running with --release""" lint_obj = nf_core.lint.PipelineLint(PATH_WORKING_EXAMPLE) + lint_obj.version = '1.11.0' lint_obj.lint_pipeline(release_mode=True) expectations = {"failed": 0, "warned": 4, "passed": MAX_PASS_CHECKS + ADD_PASS_RELEASE} self.assess_lint_status(lint_obj, **expectations) @@ -384,6 +388,7 @@ def test_conda_env_skip(self): def test_conda_dockerfile_pass(self): """ Tests the conda Dockerfile test works with a working example """ lint_obj = nf_core.lint.PipelineLint(PATH_WORKING_EXAMPLE) + lint_obj.version = '1.11.0' lint_obj.files = ["environment.yml"] with open(os.path.join(PATH_WORKING_EXAMPLE, "Dockerfile"), "r") as fh: lint_obj.dockerfile = fh.read().splitlines() @@ -395,6 +400,7 @@ def test_conda_dockerfile_pass(self): def test_conda_dockerfile_fail(self): """ Tests the conda Dockerfile test fails with a bad example """ lint_obj = nf_core.lint.PipelineLint(PATH_WORKING_EXAMPLE) + lint_obj.version = '1.11.0' lint_obj.files = ["environment.yml"] lint_obj.conda_config["name"] = "nf-core-tools-0.4" lint_obj.dockerfile = ["fubar"] From e720bc30a6c3c551149c6079c82187fc1c5c4fe2 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Thu, 22 Oct 2020 11:16:47 +0200 Subject: [PATCH 30/55] Fix black (and editor settings for black) --- tests/test_lint.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_lint.py b/tests/test_lint.py index ce62bca9e8..42cf601cb0 100644 --- a/tests/test_lint.py +++ b/tests/test_lint.py @@ -76,7 +76,7 @@ def test_call_lint_pipeline_pass(self): This should not result in any exception for the minimal working example""" old_nfcore_version = nf_core.__version__ - nf_core.__version__ = '1.11.0' + nf_core.__version__ = "1.11.0" lint_obj = nf_core.lint.run_linting(PATH_WORKING_EXAMPLE, False) nf_core.__version__ = old_nfcore_version expectations = {"failed": 0, "warned": 5, "passed": MAX_PASS_CHECKS - 1} @@ -93,7 +93,7 @@ def test_call_lint_pipeline_fail(self): def test_call_lint_pipeline_release(self): """Test the main execution function of PipelineLint when running with --release""" lint_obj = nf_core.lint.PipelineLint(PATH_WORKING_EXAMPLE) - lint_obj.version = '1.11.0' + lint_obj.version = "1.11.0" lint_obj.lint_pipeline(release_mode=True) expectations = {"failed": 0, "warned": 4, "passed": MAX_PASS_CHECKS + ADD_PASS_RELEASE} self.assess_lint_status(lint_obj, **expectations) @@ -388,7 +388,7 @@ def test_conda_env_skip(self): def test_conda_dockerfile_pass(self): """ Tests the conda Dockerfile test works with a working example """ lint_obj = nf_core.lint.PipelineLint(PATH_WORKING_EXAMPLE) - lint_obj.version = '1.11.0' + lint_obj.version = "1.11.0" lint_obj.files = ["environment.yml"] with open(os.path.join(PATH_WORKING_EXAMPLE, "Dockerfile"), "r") as fh: lint_obj.dockerfile = fh.read().splitlines() @@ -400,7 +400,7 @@ def test_conda_dockerfile_pass(self): def test_conda_dockerfile_fail(self): """ Tests the conda Dockerfile test fails with a bad example """ lint_obj = nf_core.lint.PipelineLint(PATH_WORKING_EXAMPLE) - lint_obj.version = '1.11.0' + lint_obj.version = "1.11.0" lint_obj.files = ["environment.yml"] lint_obj.conda_config["name"] = "nf-core-tools-0.4" lint_obj.dockerfile = ["fubar"] From 5f4526e91ff1fbe074b9b096774e7e717a80635e Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Thu, 22 Oct 2020 11:54:12 +0200 Subject: [PATCH 31/55] Update nf_core/lint.py Co-authored-by: Gisela Gabernet --- nf_core/lint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/lint.py b/nf_core/lint.py index 6c03ce3921..994e9016aa 100755 --- a/nf_core/lint.py +++ b/nf_core/lint.py @@ -1345,7 +1345,7 @@ def _s(some_list): # Summary table table = Table(box=rich.box.ROUNDED) - table.add_column("[bold green]LINT RESULTS SUMMARY".format(len(self.passed)), no_wrap=True) + table.add_column(r"\[bold green]LINT RESULTS SUMMARY".format(len(self.passed)), no_wrap=True) table.add_row( r"\[\u2714] {:>3} Test{} Passed".format(len(self.passed), _s(self.passed)), style="green", From e59a2e9b47f9644cf1d6c231438b5c0655821791 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Thu, 22 Oct 2020 12:08:19 +0200 Subject: [PATCH 32/55] Revert r'' raw strings to fix rich syntax output again --- nf_core/__main__.py | 12 ++++++------ nf_core/lint.py | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/nf_core/__main__.py b/nf_core/__main__.py index 66db8af0c8..6eebbe8815 100755 --- a/nf_core/__main__.py +++ b/nf_core/__main__.py @@ -35,12 +35,12 @@ def run_nf_core(): # Print nf-core header to STDERR stderr = rich.console.Console(file=sys.stderr) - stderr.print(r"\n[green]{},--.[grey39]/[green],-.".format(" " * 42), highlight=False) - stderr.print(r"[blue] ___ __ __ __ ___ [green]/,-._.--~\\", highlight=False) - stderr.print(r"[blue] |\ | |__ __ / ` / \ |__) |__ [yellow] } {", highlight=False) - stderr.print(r"[blue] | \| | \__, \__/ | \ |___ [green]\`-._,-`-,", highlight=False) - stderr.print(r"[green] `._,._,'\n", highlight=False) - stderr.print(r"[grey39] nf-core/tools version {}".format(nf_core.__version__), highlight=False) + stderr.print("\n[green]{},--.[grey39]/[green],-.".format(" " * 42), highlight=False) + stderr.print("[blue] ___ __ __ __ ___ [green]/,-._.--~\\", highlight=False) + stderr.print("[blue] |\ | |__ __ / ` / \ |__) |__ [yellow] } {", highlight=False) + stderr.print("[blue] | \| | \__, \__/ | \ |___ [green]\`-._,-`-,", highlight=False) + stderr.print("[green] `._,._,'\n", highlight=False) + stderr.print("[grey39] nf-core/tools version {}".format(nf_core.__version__), highlight=False) try: is_outdated, current_vers, remote_vers = nf_core.utils.check_if_outdated() if is_outdated: diff --git a/nf_core/lint.py b/nf_core/lint.py index 994e9016aa..8ae4f6e496 100755 --- a/nf_core/lint.py +++ b/nf_core/lint.py @@ -1319,7 +1319,7 @@ def _s(some_list): if len(self.passed) > 0 and show_passed: table = Table(style="green", box=rich.box.ROUNDED) table.add_column( - r"\[\u2714] {} Test{} Passed".format(len(self.passed), _s(self.passed)), + "\[\u2714] {} Test{} Passed".format(len(self.passed), _s(self.passed)), no_wrap=True, ) table = format_result(self.passed, table) @@ -1328,7 +1328,7 @@ def _s(some_list): # Table of warning tests if len(self.warned) > 0: table = Table(style="yellow", box=rich.box.ROUNDED) - table.add_column(r"\[!] {} Test Warning{}".format(len(self.warned), _s(self.warned)), no_wrap=True) + table.add_column("\[!] {} Test Warning{}".format(len(self.warned), _s(self.warned)), no_wrap=True) table = format_result(self.warned, table) console.print(table) @@ -1336,7 +1336,7 @@ def _s(some_list): if len(self.failed) > 0: table = Table(style="red", box=rich.box.ROUNDED) table.add_column( - r"\[\u2717] {} Test{} Failed".format(len(self.failed), _s(self.failed)), + "\[\u2717] {} Test{} Failed".format(len(self.failed), _s(self.failed)), no_wrap=True, ) table = format_result(self.failed, table) @@ -1345,13 +1345,13 @@ def _s(some_list): # Summary table table = Table(box=rich.box.ROUNDED) - table.add_column(r"\[bold green]LINT RESULTS SUMMARY".format(len(self.passed)), no_wrap=True) + table.add_column("[bold green]LINT RESULTS SUMMARY".format(len(self.passed)), no_wrap=True) table.add_row( - r"\[\u2714] {:>3} Test{} Passed".format(len(self.passed), _s(self.passed)), + "\[\u2714] {:>3} Test{} Passed".format(len(self.passed), _s(self.passed)), style="green", ) - table.add_row(r"\[!] {:>3} Test Warning{}".format(len(self.warned), _s(self.warned)), style="yellow") - table.add_row(r"\[\u2717] {:>3} Test{} Failed".format(len(self.failed), _s(self.failed)), style="red") + table.add_row("\[!] {:>3} Test Warning{}".format(len(self.warned), _s(self.warned)), style="yellow") + table.add_row("\[\u2717] {:>3} Test{} Failed".format(len(self.failed), _s(self.failed)), style="red") console.print(table) def get_results_md(self): From 3fcc9b44520665bdf641220a79af7bf78222595c Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Thu, 22 Oct 2020 12:13:21 +0200 Subject: [PATCH 33/55] Add back raw strings to fix pytest warnings, more carefully Need to use raw characters instead of ascii codes Only need raw strings in some places - needs care and testing. --- nf_core/lint.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nf_core/lint.py b/nf_core/lint.py index 8ae4f6e496..a4f6788752 100755 --- a/nf_core/lint.py +++ b/nf_core/lint.py @@ -1319,7 +1319,7 @@ def _s(some_list): if len(self.passed) > 0 and show_passed: table = Table(style="green", box=rich.box.ROUNDED) table.add_column( - "\[\u2714] {} Test{} Passed".format(len(self.passed), _s(self.passed)), + r"\[✔] {} Test{} Passed".format(len(self.passed), _s(self.passed)), no_wrap=True, ) table = format_result(self.passed, table) @@ -1328,7 +1328,7 @@ def _s(some_list): # Table of warning tests if len(self.warned) > 0: table = Table(style="yellow", box=rich.box.ROUNDED) - table.add_column("\[!] {} Test Warning{}".format(len(self.warned), _s(self.warned)), no_wrap=True) + table.add_column(r"\[!] {} Test Warning{}".format(len(self.warned), _s(self.warned)), no_wrap=True) table = format_result(self.warned, table) console.print(table) @@ -1336,7 +1336,7 @@ def _s(some_list): if len(self.failed) > 0: table = Table(style="red", box=rich.box.ROUNDED) table.add_column( - "\[\u2717] {} Test{} Failed".format(len(self.failed), _s(self.failed)), + r"\[✗] {} Test{} Failed".format(len(self.failed), _s(self.failed)), no_wrap=True, ) table = format_result(self.failed, table) @@ -1347,11 +1347,11 @@ def _s(some_list): table = Table(box=rich.box.ROUNDED) table.add_column("[bold green]LINT RESULTS SUMMARY".format(len(self.passed)), no_wrap=True) table.add_row( - "\[\u2714] {:>3} Test{} Passed".format(len(self.passed), _s(self.passed)), + r"\[✔] {:>3} Test{} Passed".format(len(self.passed), _s(self.passed)), style="green", ) - table.add_row("\[!] {:>3} Test Warning{}".format(len(self.warned), _s(self.warned)), style="yellow") - table.add_row("\[\u2717] {:>3} Test{} Failed".format(len(self.failed), _s(self.failed)), style="red") + table.add_row(r"\[!] {:>3} Test Warning{}".format(len(self.warned), _s(self.warned)), style="yellow") + table.add_row(r"\[✗] {:>3} Test{} Failed".format(len(self.failed), _s(self.failed)), style="red") console.print(table) def get_results_md(self): From 6baca0af84fd0db270fef20c32bef928c666484b Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Thu, 22 Oct 2020 13:15:30 +0200 Subject: [PATCH 34/55] Lint updates - Dockerfile give a warn, fail for old R script Closes nf-core/tools#367 --- CHANGELOG.md | 2 ++ docs/lint_errors.md | 19 +++++++++++++++---- nf_core/lint.py | 15 ++++++++++----- 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e46d2c401c..799aa8f8c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ ### Linting +* Made a base-level `Dockerfile` a warning instead of failure +* Added a lint failure if the old `bin/markdown_to_html.r` script is found * Update `rich` package dependency and use new markup escaping to change `[[!]]` back to `[!]` again ### Other diff --git a/docs/lint_errors.md b/docs/lint_errors.md index 39794dc29c..111cad64aa 100644 --- a/docs/lint_errors.md +++ b/docs/lint_errors.md @@ -10,8 +10,8 @@ The lint test looks for the following required files: * `nextflow.config` * The main nextflow config file -* `Dockerfile` - * A docker build script to generate a docker image with the required software +* `nextflow_schema.json` + * A JSON schema describing pipeline parameters, generated using `nf-core schema build` * Continuous integration tests with [GitHub Actions](https://github.com/features/actions) * GitHub Actions workflows for CI of your pipeline (`.github/workflows/ci.yml`), branch protection (`.github/workflows/branch.yml`) and nf-core best practice linting (`.github/workflows/linting.yml`) * `LICENSE`, `LICENSE.md`, `LICENCE.md` or `LICENCE.md` @@ -27,8 +27,14 @@ The following files are suggested but not a hard requirement. If they are missin * `main.nf` * It's recommended that the main workflow script is called `main.nf` +* `environment.yml` + * A conda environment file describing the required software +* `Dockerfile` + * A docker build script to generate a docker image with the required software * `conf/base.config` * A `conf` directory with at least one config called `base.config` +* `.github/workflows/awstest.yml` and `.github/workflows/awsfulltest.yml` + * GitHub workflow scripts used for automated tests on AWS The following files will cause a failure if the _are_ present (to fix, delete them): @@ -39,13 +45,18 @@ The following files will cause a failure if the _are_ present (to fix, delete th * `parameters.settings.json` * The syntax for pipeline schema has changed - old `parameters.settings.json` should be deleted and new `nextflow_schema.json` files created instead. +* `bin/markdown_to_html.r` + * The old markdown to HTML conversion script, now replaced by `markdown_to_html.py` ## Error #2 - Docker file check failed ## {#2} -Pipelines should have a files called `Dockerfile` in their root directory. +DSL1 pipelines should have a file called `Dockerfile` in their root directory. The file is used for automated docker image builds. This test checks that the file exists and contains at least the string `FROM` (`Dockerfile`). +Some pipelines, especially DSL2, may not have a `Dockerfile`. In this case a warning +will be generated which can be safely ignored. + ## Error #3 - Licence check failed ## {#3} nf-core pipelines must ship with an open source [MIT licence](https://choosealicense.com/licenses/mit/). @@ -298,7 +309,7 @@ If a workflow has a conda `environment.yml` file (see above), the `Dockerfile` s to create the container. Such `Dockerfile`s can usually be very short, eg: ```Dockerfile -FROM nfcore/base:1.7 +FROM nfcore/base:1.11 MAINTAINER Rocky Balboa LABEL authors="your@email.com" \ description="Docker image containing all requirements for the nf-core mypipeline pipeline" diff --git a/nf_core/lint.py b/nf_core/lint.py index a4f6788752..76969e1008 100755 --- a/nf_core/lint.py +++ b/nf_core/lint.py @@ -254,7 +254,6 @@ def check_files_exist(self): 'nextflow.config', 'nextflow_schema.json', - 'Dockerfile', ['LICENSE', 'LICENSE.md', 'LICENCE', 'LICENCE.md'], # NB: British / American spelling 'README.md', 'CHANGELOG.md', @@ -269,13 +268,16 @@ def check_files_exist(self): 'main.nf', 'environment.yml', + 'Dockerfile', 'conf/base.config', '.github/workflows/awstest.yml', '.github/workflows/awsfulltest.yml' Files that *must not* be present:: - 'Singularity' + 'Singularity', + 'parameters.settings.json', + 'bin/markdown_to_html.r' Files that *should not* be present:: @@ -290,7 +292,6 @@ def check_files_exist(self): files_fail = [ ["nextflow.config"], ["nextflow_schema.json"], - ["Dockerfile"], ["LICENSE", "LICENSE.md", "LICENCE", "LICENCE.md"], # NB: British / American spelling ["README.md"], ["CHANGELOG.md"], @@ -304,13 +305,14 @@ def check_files_exist(self): files_warn = [ ["main.nf"], ["environment.yml"], + ["Dockerfile"], [os.path.join("conf", "base.config")], [os.path.join(".github", "workflows", "awstest.yml")], [os.path.join(".github", "workflows", "awsfulltest.yml")], ] # List of strings. Dails / warns if any of the strings exist. - files_fail_ifexists = ["Singularity", "parameters.settings.json"] + files_fail_ifexists = ["Singularity", "parameters.settings.json", os.path.join("bin", "markdown_to_html.r")] files_warn_ifexists = [".travis.yml"] def pf(file_path): @@ -358,6 +360,9 @@ def pf(file_path): def check_docker(self): """Checks that Dockerfile contains the string ``FROM``.""" + if "Dockerfile" not in self.files: + return + fn = os.path.join(self.path, "Dockerfile") content = "" with open(fn, "r") as fh: @@ -1150,7 +1155,7 @@ def check_conda_dockerfile(self): * dependency versions are pinned * dependency versions are the latest available """ - if "environment.yml" not in self.files or len(self.dockerfile) == 0: + if "environment.yml" not in self.files or "Dockerfile" not in self.files or len(self.dockerfile) == 0: return expected_strings = [ From 83d52359c5a3103fe30172b50dfa9ea17ec05879 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Thu, 22 Oct 2020 13:27:10 +0200 Subject: [PATCH 35/55] Update tests --- tests/test_lint.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/test_lint.py b/tests/test_lint.py index 42cf601cb0..c5632846c9 100644 --- a/tests/test_lint.py +++ b/tests/test_lint.py @@ -45,7 +45,7 @@ def pf(wd, path): ] # The maximum sum of passed tests currently possible -MAX_PASS_CHECKS = 84 +MAX_PASS_CHECKS = 85 # The additional tests passed for releases ADD_PASS_RELEASE = 1 @@ -101,6 +101,7 @@ def test_call_lint_pipeline_release(self): def test_failing_dockerfile_example(self): """Tests for empty Dockerfile""" lint_obj = nf_core.lint.PipelineLint(PATH_FAILING_EXAMPLE) + lint_obj.files = ["Dockerfile"] lint_obj.check_docker() self.assess_lint_status(lint_obj, failed=1) @@ -113,7 +114,7 @@ def test_failing_missingfiles_example(self): """Tests for missing files like Dockerfile or LICENSE""" lint_obj = nf_core.lint.PipelineLint(PATH_FAILING_EXAMPLE) lint_obj.check_files_exist() - expectations = {"failed": 6, "warned": 2, "passed": 12} + expectations = {"failed": 6, "warned": 2, "passed": 13} self.assess_lint_status(lint_obj, **expectations) def test_mit_licence_example_pass(self): @@ -281,6 +282,7 @@ def test_readme_fail(self): def test_dockerfile_pass(self): """Tests if a valid Dockerfile passes the lint checks""" lint_obj = nf_core.lint.PipelineLint(PATH_WORKING_EXAMPLE) + lint_obj.files = ["Dockerfile"] lint_obj.check_docker() expectations = {"failed": 0, "warned": 0, "passed": 1} self.assess_lint_status(lint_obj, **expectations) @@ -389,7 +391,7 @@ def test_conda_dockerfile_pass(self): """ Tests the conda Dockerfile test works with a working example """ lint_obj = nf_core.lint.PipelineLint(PATH_WORKING_EXAMPLE) lint_obj.version = "1.11.0" - lint_obj.files = ["environment.yml"] + lint_obj.files = ["environment.yml", "Dockerfile"] with open(os.path.join(PATH_WORKING_EXAMPLE, "Dockerfile"), "r") as fh: lint_obj.dockerfile = fh.read().splitlines() lint_obj.conda_config["name"] = "nf-core-tools-0.4" @@ -401,7 +403,7 @@ def test_conda_dockerfile_fail(self): """ Tests the conda Dockerfile test fails with a bad example """ lint_obj = nf_core.lint.PipelineLint(PATH_WORKING_EXAMPLE) lint_obj.version = "1.11.0" - lint_obj.files = ["environment.yml"] + lint_obj.files = ["environment.yml", "Dockerfile"] lint_obj.conda_config["name"] = "nf-core-tools-0.4" lint_obj.dockerfile = ["fubar"] lint_obj.check_conda_dockerfile() From 66af55f5ee5cd546d7ccbea785d4b3684fca0c7d Mon Sep 17 00:00:00 2001 From: MaxUlysse Date: Thu, 22 Oct 2020 16:10:47 +0200 Subject: [PATCH 36/55] update PR --- .../pipeline-template/{{cookiecutter.name_noslash}}/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md index a398b1c714..63d97e2066 100644 --- a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md +++ b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md @@ -40,7 +40,7 @@ See [usage docs](https://nf-co.re/{{ cookiecutter.short_name }}/usage) for all o ## Documentation -The {{ cookiecutter.name }} pipeline comes with documentation about the pipeline: [docs/usage](docs/usage.md) and [docs/output](docs/output.md). +The {{ cookiecutter.name }} pipeline comes with documentation about the pipeline: [usage](https://nf-co.re/{{ cookiecutter.short_name }}/usage) and [output](https://nf-co.re/{{ cookiecutter.short_name }}/output). From 52b45b96b0443000f837e0a1a8fe4732abf38b79 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Thu, 22 Oct 2020 23:09:25 +0200 Subject: [PATCH 37/55] GitHub Actions sync - add manual 'workflow' trigger --- .github/workflows/sync.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 1f23a4888b..9e67087def 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -2,6 +2,7 @@ name: Sync template on: release: types: [published] + workflow_dispatch: jobs: get-pipelines: @@ -21,7 +22,6 @@ jobs: matrix: ${{fromJson(needs.get-pipelines.outputs.matrix)}} fail-fast: false steps: - - uses: actions/checkout@v2 name: Check out nf-core/tools @@ -32,7 +32,7 @@ jobs: ref: dev token: ${{ secrets.nf_core_bot_auth_token }} path: nf-core/${{ matrix.pipeline }} - fetch-depth: '0' + fetch-depth: "0" - name: Set up Python 3.8 uses: actions/setup-python@v1 @@ -64,7 +64,6 @@ jobs: --username nf-core-bot \ --repository nf-core/${{ matrix.pipeline }} - - name: Upload sync log file artifact if: ${{ always() }} uses: actions/upload-artifact@v2 From c6edf035f866c98b7f1cfdd45062ade388509da4 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Thu, 22 Oct 2020 23:11:54 +0200 Subject: [PATCH 38/55] Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 799aa8f8c0..d6c29bf959 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ ### Other * Pipeline sync - fetch full repo when checking out before sync +* Sync - Add GitHub actions manual trigger option ## [v1.10.2 - Copper Camel _(brought back from the dead)_](https://github.com/nf-core/tools/releases/tag/1.10.2) - [2020-07-31] From 19071636b5d837397151e9973aa65e7f4359df08 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Thu, 22 Oct 2020 23:33:28 +0200 Subject: [PATCH 39/55] Added notice to top of docs markdown files to use the website. Fixes nf-core/tools#727 --- .../{{cookiecutter.name_noslash}}/docs/output.md | 8 +++++++- .../{{cookiecutter.name_noslash}}/docs/usage.md | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/docs/output.md b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/docs/output.md index 4722747c35..0a93bb156a 100644 --- a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/docs/output.md +++ b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/docs/output.md @@ -1,5 +1,11 @@ # {{ cookiecutter.name }}: Output +## :warning: Please read this documentation on the nf-core website: [https://nf-co.re/{{ cookiecutter.short_name }}](https://nf-co.re/{{ cookiecutter.short_name }}) + +> _Documentation of pipeline parameters is generated automatically from the pipeline schema and can no longer be found in markdown files._ + +## Introduction + This document describes the output produced by the pipeline. Most of the plots are taken from the MultiQC report, which summarises results at the end of the pipeline. The directories listed below will be created in the results directory after the pipeline has finished. All paths are relative to the top-level results directory. @@ -40,7 +46,7 @@ For more information about how to use MultiQC reports, see [https://multiqc.info **Output files:** -* `multiqc/` +* `multiqc/` * `multiqc_report.html`: a standalone HTML file that can be viewed in your web browser. * `multiqc_data/`: directory containing parsed statistics from the different tools used in the pipeline. * `multiqc_plots/`: directory containing static images from the report in various formats. diff --git a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/docs/usage.md b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/docs/usage.md index 5941f6cbcb..5cb185b0b3 100644 --- a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/docs/usage.md +++ b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/docs/usage.md @@ -1,5 +1,9 @@ # {{ cookiecutter.name }}: Usage +## :warning: Please read this documentation on the nf-core website: [https://nf-co.re/{{ cookiecutter.short_name }}](https://nf-co.re/{{ cookiecutter.short_name }}) + +> _Documentation of pipeline parameters is generated automatically from the pipeline schema and can no longer be found in markdown files._ + ## Introduction From 78ac6c18c3ba30896a0d81292c2a5ad73992f2a0 Mon Sep 17 00:00:00 2001 From: Zethson Date: Fri, 23 Oct 2020 09:10:31 +0200 Subject: [PATCH 40/55] fixed #753 Signed-off-by: Zethson --- .gitignore | 3 +++ .../.github/ISSUE_TEMPLATE/bug_report.md | 2 +- .../{{cookiecutter.name_noslash}}/README.md | 6 +++--- .../{{cookiecutter.name_noslash}}/docs/usage.md | 7 +++++-- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index bc2d21a3d5..84ddfd3a08 100644 --- a/.gitignore +++ b/.gitignore @@ -109,3 +109,6 @@ ENV/ # backup files *~ *\? + +# Jetbrains IDEs +.idea diff --git a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/.github/ISSUE_TEMPLATE/bug_report.md b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/.github/ISSUE_TEMPLATE/bug_report.md index 3b98a62ca1..30a5ef8b47 100644 --- a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/.github/ISSUE_TEMPLATE/bug_report.md +++ b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/.github/ISSUE_TEMPLATE/bug_report.md @@ -36,7 +36,7 @@ Steps to reproduce the behaviour: ## Container engine -- Engine: +- Engine: - version: - Image tag: diff --git a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md index 63d97e2066..28a7317990 100644 --- a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md +++ b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/README.md @@ -18,12 +18,12 @@ The pipeline is built using [Nextflow](https://www.nextflow.io), a workflow tool 1. Install [`nextflow`](https://nf-co.re/usage/installation) -2. Install either [`Docker`](https://docs.docker.com/engine/installation/) or [`Singularity`](https://www.sylabs.io/guides/3.0/user-guide/) for full pipeline reproducibility _(please only use [`Conda`](https://conda.io/miniconda.html) as a last resort; see [docs](https://nf-co.re/usage/configuration#basic-configuration-profiles))_ +2. Install any of [`Docker`](https://docs.docker.com/engine/installation/), [`Singularity`](https://www.sylabs.io/guides/3.0/user-guide/) or [`Podman`](https://podman.io/) for full pipeline reproducibility _(please only use [`Conda`](https://conda.io/miniconda.html) as a last resort; see [docs](https://nf-co.re/usage/configuration#basic-configuration-profiles))_ 3. Download the pipeline and test it on a minimal dataset with a single command: ```bash - nextflow run {{ cookiecutter.name }} -profile test, + nextflow run {{ cookiecutter.name }} -profile test, ``` > Please check [nf-core/configs](https://github.com/nf-core/configs#documentation) to see if a custom config file to run nf-core pipelines already exists for your Institute. If so, you can simply use `-profile ` in your command. This will enable either `docker` or `singularity` and set the appropriate execution settings for your local compute environment. @@ -33,7 +33,7 @@ The pipeline is built using [Nextflow](https://www.nextflow.io), a workflow tool ```bash - nextflow run {{ cookiecutter.name }} -profile --input '*_R{1,2}.fastq.gz' --genome GRCh37 + nextflow run {{ cookiecutter.name }} -profile --input '*_R{1,2}.fastq.gz' --genome GRCh37 ``` See [usage docs](https://nf-co.re/{{ cookiecutter.short_name }}/usage) for all of the available options when running the pipeline. diff --git a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/docs/usage.md b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/docs/usage.md index 5941f6cbcb..3162930d3d 100644 --- a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/docs/usage.md +++ b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/docs/usage.md @@ -47,7 +47,7 @@ This version number will be logged in reports when you run the pipeline, so that Use this parameter to choose a configuration profile. Profiles can give configuration presets for different compute environments. -Several generic profiles are bundled with the pipeline which instruct the pipeline to use software packaged using different methods (Docker, Singularity, Conda) - see below. +Several generic profiles are bundled with the pipeline which instruct the pipeline to use software packaged using different methods (Docker, Singularity, Podman, Conda) - see below. > We highly recommend the use of Docker or Singularity containers for full pipeline reproducibility, however when this is not possible, Conda is also supported. @@ -64,8 +64,11 @@ If `-profile` is not specified, the pipeline will run locally and expect all sof * `singularity` * A generic configuration profile to be used with [Singularity](https://sylabs.io/docs/) * Pulls software from Docker Hub: [`{{ cookiecutter.name_docker }}`](https://hub.docker.com/r/{{ cookiecutter.name_docker }}/) +* `podman` + * A generic configuration profile to be used with [Podman](https://podman.io/) + * Pulls software from Docker Hub: [`{{ cookiecutter.name_docker }}`](https://hub.docker.com/r/{{ cookiecutter.name_docker }}/) * `conda` - * Please only use Conda as a last resort i.e. when it's not possible to run the pipeline with Docker or Singularity. + * Please only use Conda as a last resort i.e. when it's not possible to run the pipeline with Docker, Singularity or Podman. * A generic configuration profile to be used with [Conda](https://conda.io/docs/) * Pulls most software from [Bioconda](https://bioconda.github.io/) * `test` From ed428500e98c26693d05f56d86f17f14739b9c9b Mon Sep 17 00:00:00 2001 From: ggabernet Date: Fri, 23 Oct 2020 09:24:30 +0200 Subject: [PATCH 41/55] update linting AWS action wf --- CHANGELOG.md | 3 +- nf_core/lint.py | 29 +++++++------------ .../.github/workflows/awstest.yml | 3 -- .../.github/workflows/awstest.yml | 2 -- .../.github/workflows/awsfulltest.yml | 1 + .../.github/workflows/awstest.yml | 4 +-- 6 files changed, 14 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02391f2e62..68d7ce9c86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,8 @@ * Fix command error in `awstest.yml` GitHub Action workflow. * Allow manual triggering of AWS test GitHub Action workflows. * Remove TODO item, which was proposing the usage of additional files beside `usage.md` and `output.md` for documentation. -* Added a Podman profile, which enables Podman as container +* Added a Podman profile, which enables Podman as container. +* Updated linting for GitHub actions AWS tests workflows. ### Linting diff --git a/nf_core/lint.py b/nf_core/lint.py index 76969e1008..18ccb8e1fc 100755 --- a/nf_core/lint.py +++ b/nf_core/lint.py @@ -815,32 +815,22 @@ def check_actions_awstest(self): with open(fn, "r") as fh: wf = yaml.safe_load(fh) - # Check that the action is only turned on for push + # Check that the action is only turned on for workflow_dispatch try: assert "push" in wf[True] assert "pull_request" not in wf[True] + assert "workflow_dispatch" in wf[True] except (AssertionError, KeyError, TypeError): self.failed.append( - (5, "GitHub Actions AWS test should be triggered on push and not PRs: `{}`".format(fn)) + (5, "GitHub Actions AWS test should be triggered on workflow_dispatch and not on push or PRs: `{}`".format(fn)) ) else: - self.passed.append((5, "GitHub Actions AWS test is triggered on push and not PRs: `{}`".format(fn))) - - # Check that the action is only turned on for push to master - try: - assert "master" in wf[True]["push"]["branches"] - assert "dev" not in wf[True]["push"]["branches"] - except (AssertionError, KeyError, TypeError): - self.failed.append( - (5, "GitHub Actions AWS test should be triggered only on push to master: `{}`".format(fn)) - ) - else: - self.passed.append((5, "GitHub Actions AWS test is triggered only on push to master: `{}`".format(fn))) + self.passed.append((5, "GitHub Actions AWS test is triggered on workflow_dispatch: `{}`".format(fn))) def check_actions_awsfulltest(self): """Checks the GitHub Actions awsfulltest is valid. - Makes sure it is triggered only on ``release``. + Makes sure it is triggered only on ``release`` and workflow_dispatch. """ fn = os.path.join(self.path, ".github", "workflows", "awsfulltest.yml") if os.path.isfile(fn): @@ -855,13 +845,14 @@ def check_actions_awsfulltest(self): assert "published" in wf[True]["release"]["types"] assert "push" not in wf[True] assert "pull_request" not in wf[True] + assert "workflow_dispatch" in wf[True] except (AssertionError, KeyError, TypeError): self.failed.append( - (5, "GitHub Actions AWS full test should be triggered only on published release: `{}`".format(fn)) + (5, "GitHub Actions AWS full test should be triggered only on published release and workflow_dispatch: `{}`".format(fn)) ) else: self.passed.append( - (5, "GitHub Actions AWS full test is triggered only on published release: `{}`".format(fn)) + (5, "GitHub Actions AWS full test is triggered only on published release and workflow_dispatch: `{}`".format(fn)) ) # Warn if `-profile test` is still unchanged @@ -869,9 +860,9 @@ def check_actions_awsfulltest(self): steps = wf["jobs"]["run-awstest"]["steps"] assert any([aws_profile in step["run"] for step in steps if "run" in step.keys()]) except (AssertionError, KeyError, TypeError): - self.passed.append((5, "GitHub Actions AWS full test should test full datasets: `{}`".format(fn))) - else: self.warned.append((5, "GitHub Actions AWS full test should test full datasets: `{}`".format(fn))) + else: + self.passed.append((5, "GitHub Actions AWS full test should test full datasets: `{}`".format(fn))) def check_readme(self): """Checks the repository README file for errors. diff --git a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/.github/workflows/awstest.yml b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/.github/workflows/awstest.yml index db1a2a1900..d261c7878b 100644 --- a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/.github/workflows/awstest.yml +++ b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/.github/workflows/awstest.yml @@ -4,9 +4,6 @@ name: nf-core AWS test # It runs the -profile 'test' on AWS batch. on: - push: - branches: - - master workflow_dispatch: jobs: diff --git a/tests/lint_examples/failing_example/.github/workflows/awstest.yml b/tests/lint_examples/failing_example/.github/workflows/awstest.yml index 8e72d862db..a4bf436da0 100644 --- a/tests/lint_examples/failing_example/.github/workflows/awstest.yml +++ b/tests/lint_examples/failing_example/.github/workflows/awstest.yml @@ -8,8 +8,6 @@ on: - master - dev pull_request: - release: - types: [published] jobs: run-awstest: diff --git a/tests/lint_examples/minimalworkingexample/.github/workflows/awsfulltest.yml b/tests/lint_examples/minimalworkingexample/.github/workflows/awsfulltest.yml index 99c9ab9165..ef81b9cd54 100644 --- a/tests/lint_examples/minimalworkingexample/.github/workflows/awsfulltest.yml +++ b/tests/lint_examples/minimalworkingexample/.github/workflows/awsfulltest.yml @@ -5,6 +5,7 @@ name: nf-core AWS full size tests on: release: types: [published] + workflow_dispatch: jobs: run-awstest: diff --git a/tests/lint_examples/minimalworkingexample/.github/workflows/awstest.yml b/tests/lint_examples/minimalworkingexample/.github/workflows/awstest.yml index 3d39c4505a..2347f7d019 100644 --- a/tests/lint_examples/minimalworkingexample/.github/workflows/awstest.yml +++ b/tests/lint_examples/minimalworkingexample/.github/workflows/awstest.yml @@ -3,9 +3,7 @@ name: nf-core AWS tests # It runs the -profile 'test' on AWS batch on: - push: - branches: - - master + workflow_dispatch: jobs: run-awstest: From e70717901428bd50d61d788fd0b050a5d0f0788b Mon Sep 17 00:00:00 2001 From: ggabernet Date: Fri, 23 Oct 2020 09:34:06 +0200 Subject: [PATCH 42/55] AWS test lint error docs --- docs/lint_errors.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/docs/lint_errors.md b/docs/lint_errors.md index e9281e4e25..d42e85acfb 100644 --- a/docs/lint_errors.md +++ b/docs/lint_errors.md @@ -227,22 +227,25 @@ This test will fail if the following requirements are not met in these files: { [[ ${{github.event.pull_request.head.repo.full_name}} == / ]] && [[ $GITHUB_HEAD_REF = "dev" ]]; } || [[ $GITHUB_HEAD_REF == "patch" ]] ``` -4. `awstest.yml`: Triggers tests on AWS batch. As running tests on AWS incurs costs, they should be only triggered on `push` to `master` and `release`. - * Must be turned on for `push` to `master` and `release`. - * Must not be turned on for `pull_request` or other events. +4. `awstest.yml`: Triggers tests on AWS batch. As running tests on AWS incurs costs, they should be only triggered on `workflow_dispatch`. +This allows for manual triggering of the workflow when testing on AWS is desired. +You can trigger the tests by going to the `Actions` tab on the pipeline GitHub repository and selecting the `nf-core AWS test` workflow on the left. + * Must not be turned on for `push` or `pull_request`. + * Must be turned on for `workflow_dispatch`. ### GitHub Actions AWS full tests Additionally, we provide the possibility of testing the pipeline on full size datasets on AWS. This should ensure that the pipeline runs as expected on AWS and provide a resource estimation. -The GitHub Actions workflow is: `awsfulltest.yml`, and it can be found in the `.github/workflows/` directory. -This workflow incurrs higher AWS costs, therefore it should only be triggered on `release`. +The GitHub Actions workflow is `awsfulltest.yml`, and it can be found in the `.github/workflows/` directory. +This workflow incurrs higher AWS costs, therefore it should only be triggered on `release` and `workflow_dispatch`. +You can trigger the tests by going to the `Actions` tab on the pipeline GitHub repository and selecting the `nf-core AWS full size tests` workflow on the left. For tests on full data prior to release, [Nextflow Tower](https://tower.nf) launch feature can be employed. `awsfulltest.yml`: Triggers full sized tests run on AWS batch after releasing. -* Must be only turned on for `release`. -* Should run the profile `test_full`. If it runs the profile `test` a warning is given. +* Must be only turned on for `release` and `workflow_dispatch`. +* Should run the profile `test_full` that should be edited to provide the links to full-size datasets. If it runs the profile `test` a warning is given. ## Error #6 - Repository `README.md` tests ## {#6} From 9786cd88845a94e28eb81522c6803530effb6cf4 Mon Sep 17 00:00:00 2001 From: ggabernet Date: Fri, 23 Oct 2020 09:50:07 +0200 Subject: [PATCH 43/55] update AWS wf lint test --- nf_core/lint.py | 4 ++-- tests/test_lint.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nf_core/lint.py b/nf_core/lint.py index 18ccb8e1fc..9dbf65c4a6 100755 --- a/nf_core/lint.py +++ b/nf_core/lint.py @@ -860,9 +860,9 @@ def check_actions_awsfulltest(self): steps = wf["jobs"]["run-awstest"]["steps"] assert any([aws_profile in step["run"] for step in steps if "run" in step.keys()]) except (AssertionError, KeyError, TypeError): - self.warned.append((5, "GitHub Actions AWS full test should test full datasets: `{}`".format(fn))) - else: self.passed.append((5, "GitHub Actions AWS full test should test full datasets: `{}`".format(fn))) + else: + self.warned.append((5, "GitHub Actions AWS full test should test full datasets: `{}`".format(fn))) def check_readme(self): """Checks the repository README file for errors. diff --git a/tests/test_lint.py b/tests/test_lint.py index c5632846c9..6fb6debe6f 100644 --- a/tests/test_lint.py +++ b/tests/test_lint.py @@ -215,14 +215,14 @@ def test_actions_wf_awstest_pass(self): """Tests that linting for GitHub Actions AWS test wf works for a good example""" lint_obj = nf_core.lint.PipelineLint(PATH_WORKING_EXAMPLE) lint_obj.check_actions_awstest() - expectations = {"failed": 0, "warned": 0, "passed": 2} + expectations = {"failed": 0, "warned": 0, "passed": 1} self.assess_lint_status(lint_obj, **expectations) def test_actions_wf_awstest_fail(self): """Tests that linting for GitHub Actions AWS test wf fails for a bad example""" lint_obj = nf_core.lint.PipelineLint(PATH_FAILING_EXAMPLE) lint_obj.check_actions_awstest() - expectations = {"failed": 2, "warned": 0, "passed": 0} + expectations = {"failed": 1, "warned": 0, "passed": 0} self.assess_lint_status(lint_obj, **expectations) def test_actions_wf_awsfulltest_pass(self): From 65a6b93da1931eca0f2fd9561fbbb52ba6374809 Mon Sep 17 00:00:00 2001 From: ggabernet Date: Sun, 25 Oct 2020 11:35:15 +0100 Subject: [PATCH 44/55] fix lint awstest --- nf_core/lint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/lint.py b/nf_core/lint.py index 9dbf65c4a6..f0b05a887a 100755 --- a/nf_core/lint.py +++ b/nf_core/lint.py @@ -817,7 +817,7 @@ def check_actions_awstest(self): # Check that the action is only turned on for workflow_dispatch try: - assert "push" in wf[True] + assert "push" not in wf[True] assert "pull_request" not in wf[True] assert "workflow_dispatch" in wf[True] except (AssertionError, KeyError, TypeError): From adcfdf88d6538584d3a96575afee446e149ad236 Mon Sep 17 00:00:00 2001 From: ggabernet Date: Sun, 25 Oct 2020 11:51:30 +0100 Subject: [PATCH 45/55] schema lint title description --- nf_core/schema.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/schema.py b/nf_core/schema.py index 8e235046d4..0df35e3ea3 100644 --- a/nf_core/schema.py +++ b/nf_core/schema.py @@ -225,7 +225,7 @@ def validate_schema_title_description(self, schema=None): return None assert "$schema" in self.schema, "Schema missing top-level `$schema` attribute" - schema_attr = "https://json-schema.org/draft-07/schema" + schema_attr = "http://json-schema.org/draft-07/schema" assert self.schema["$schema"] == schema_attr, "Schema `$schema` should be `{}`\n Found `{}`".format( schema_attr, self.schema["$schema"] ) From a718f7e8563116a1ee9794ea188c40553c68c95b Mon Sep 17 00:00:00 2001 From: ggabernet Date: Sun, 25 Oct 2020 12:04:14 +0100 Subject: [PATCH 46/55] update schema test working example --- tests/lint_examples/minimalworkingexample/nextflow_schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lint_examples/minimalworkingexample/nextflow_schema.json b/tests/lint_examples/minimalworkingexample/nextflow_schema.json index bbf2bbe9eb..9340e60113 100644 --- a/tests/lint_examples/minimalworkingexample/nextflow_schema.json +++ b/tests/lint_examples/minimalworkingexample/nextflow_schema.json @@ -1,5 +1,5 @@ { - "$schema": "https://json-schema.org/draft-07/schema", + "$schema": "http://json-schema.org/draft-07/schema", "$id": "https://raw.githubusercontent.com/nf-core/tools/master/nextflow_schema.json", "title": "nf-core/tools pipeline parameters", "description": "Minimal working example pipeline", From 5ea5d2bd45e97a1801c004bed961ed00de8a0275 Mon Sep 17 00:00:00 2001 From: ggabernet Date: Sun, 25 Oct 2020 12:11:01 +0100 Subject: [PATCH 47/55] black format lint.py --- nf_core/lint.py | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/nf_core/lint.py b/nf_core/lint.py index f0b05a887a..52e6be144b 100755 --- a/nf_core/lint.py +++ b/nf_core/lint.py @@ -822,7 +822,12 @@ def check_actions_awstest(self): assert "workflow_dispatch" in wf[True] except (AssertionError, KeyError, TypeError): self.failed.append( - (5, "GitHub Actions AWS test should be triggered on workflow_dispatch and not on push or PRs: `{}`".format(fn)) + ( + 5, + "GitHub Actions AWS test should be triggered on workflow_dispatch and not on push or PRs: `{}`".format( + fn + ), + ) ) else: self.passed.append((5, "GitHub Actions AWS test is triggered on workflow_dispatch: `{}`".format(fn))) @@ -848,11 +853,21 @@ def check_actions_awsfulltest(self): assert "workflow_dispatch" in wf[True] except (AssertionError, KeyError, TypeError): self.failed.append( - (5, "GitHub Actions AWS full test should be triggered only on published release and workflow_dispatch: `{}`".format(fn)) + ( + 5, + "GitHub Actions AWS full test should be triggered only on published release and workflow_dispatch: `{}`".format( + fn + ), + ) ) else: self.passed.append( - (5, "GitHub Actions AWS full test is triggered only on published release and workflow_dispatch: `{}`".format(fn)) + ( + 5, + "GitHub Actions AWS full test is triggered only on published release and workflow_dispatch: `{}`".format( + fn + ), + ) ) # Warn if `-profile test` is still unchanged From 69388b7fd874964cc05aac37e8c5ff3bee1dca3f Mon Sep 17 00:00:00 2001 From: ggabernet Date: Sun, 25 Oct 2020 12:18:24 +0100 Subject: [PATCH 48/55] update tests max_pass --- tests/test_lint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_lint.py b/tests/test_lint.py index 6fb6debe6f..25d1828b09 100644 --- a/tests/test_lint.py +++ b/tests/test_lint.py @@ -45,7 +45,7 @@ def pf(wd, path): ] # The maximum sum of passed tests currently possible -MAX_PASS_CHECKS = 85 +MAX_PASS_CHECKS = 84 # The additional tests passed for releases ADD_PASS_RELEASE = 1 From 5e95a3dc69a10a7e9a8e82b8d69dd65060159863 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Sun, 25 Oct 2020 15:35:51 +0100 Subject: [PATCH 49/55] Update nf_core/pipeline-template/{{cookiecutter.name_noslash}}/docs/output.md Co-authored-by: Maxime Garcia --- .../{{cookiecutter.name_noslash}}/docs/output.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/docs/output.md b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/docs/output.md index 0a93bb156a..966fefb2a7 100644 --- a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/docs/output.md +++ b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/docs/output.md @@ -1,6 +1,6 @@ # {{ cookiecutter.name }}: Output -## :warning: Please read this documentation on the nf-core website: [https://nf-co.re/{{ cookiecutter.short_name }}](https://nf-co.re/{{ cookiecutter.short_name }}) +## :warning: Please read this documentation on the nf-core website: [https://nf-co.re/{{ cookiecutter.short_name }}/output](https://nf-co.re/{{ cookiecutter.short_name }}/output) > _Documentation of pipeline parameters is generated automatically from the pipeline schema and can no longer be found in markdown files._ From e11a77de14bb77978be04c2f3f8c88c681804541 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Sun, 25 Oct 2020 15:35:58 +0100 Subject: [PATCH 50/55] Update nf_core/pipeline-template/{{cookiecutter.name_noslash}}/docs/usage.md Co-authored-by: Maxime Garcia --- .../{{cookiecutter.name_noslash}}/docs/usage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/docs/usage.md b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/docs/usage.md index 5cb185b0b3..8f3e52a34e 100644 --- a/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/docs/usage.md +++ b/nf_core/pipeline-template/{{cookiecutter.name_noslash}}/docs/usage.md @@ -1,6 +1,6 @@ # {{ cookiecutter.name }}: Usage -## :warning: Please read this documentation on the nf-core website: [https://nf-co.re/{{ cookiecutter.short_name }}](https://nf-co.re/{{ cookiecutter.short_name }}) +## :warning: Please read this documentation on the nf-core website: [https://nf-co.re/{{ cookiecutter.short_name }}/usage](https://nf-co.re/{{ cookiecutter.short_name }}/usage) > _Documentation of pipeline parameters is generated automatically from the pipeline schema and can no longer be found in markdown files._ From f358e072f88c8cb5e2d5d1a0bfdf6117998cbfd0 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Mon, 26 Oct 2020 19:50:51 +0100 Subject: [PATCH 51/55] Update nf_core/lint.py --- nf_core/lint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/lint.py b/nf_core/lint.py index 52e6be144b..82b40898e5 100755 --- a/nf_core/lint.py +++ b/nf_core/lint.py @@ -848,9 +848,9 @@ def check_actions_awsfulltest(self): try: assert "release" in wf[True] assert "published" in wf[True]["release"]["types"] + assert "workflow_dispatch" in wf[True] assert "push" not in wf[True] assert "pull_request" not in wf[True] - assert "workflow_dispatch" in wf[True] except (AssertionError, KeyError, TypeError): self.failed.append( ( From 1e6272ce428710b7f895cca636547d2415bc5857 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Tue, 27 Oct 2020 10:05:52 +0100 Subject: [PATCH 52/55] Added release name and date to v1.11 changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72840828b7..d91c1f5cb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # nf-core/tools: Changelog -## v1.11.0 +## [v1.11 - Iron Tiger](https://github.com/nf-core/tools/releases/tag/1.11) - [2020-10-27] ### Template From 2450baaef563688479c7822188820e9247b7c0a6 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Tue, 27 Oct 2020 10:08:29 +0100 Subject: [PATCH 53/55] v1.11 not v1.11.0 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ad6c89f94c..afe3ae7db6 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup, find_packages import sys -version = "1.11.0" +version = "1.11" with open("README.md") as f: readme = f.read() From e98d8e6f6ed1b3a25a823572718a855deaa342a4 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Tue, 27 Oct 2020 10:10:35 +0100 Subject: [PATCH 54/55] Update nf_core/lint.py Co-authored-by: Gisela Gabernet --- nf_core/lint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/lint.py b/nf_core/lint.py index 82b40898e5..9b62da3209 100755 --- a/nf_core/lint.py +++ b/nf_core/lint.py @@ -817,9 +817,9 @@ def check_actions_awstest(self): # Check that the action is only turned on for workflow_dispatch try: + assert "workflow_dispatch" in wf[True] assert "push" not in wf[True] assert "pull_request" not in wf[True] - assert "workflow_dispatch" in wf[True] except (AssertionError, KeyError, TypeError): self.failed.append( ( From 6da62e1b565037078503f0bde0f26f9ee481f0f6 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Tue, 27 Oct 2020 10:13:52 +0100 Subject: [PATCH 55/55] More 1.11 not 1.11.0 --- tests/lint_examples/minimalworkingexample/Dockerfile | 2 +- tests/test_lint.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/lint_examples/minimalworkingexample/Dockerfile b/tests/lint_examples/minimalworkingexample/Dockerfile index 708803bbb3..d5c8005c47 100644 --- a/tests/lint_examples/minimalworkingexample/Dockerfile +++ b/tests/lint_examples/minimalworkingexample/Dockerfile @@ -1,4 +1,4 @@ -FROM nfcore/base:1.11.0 +FROM nfcore/base:1.11 LABEL authors="Phil Ewels phil.ewels@scilifelab.se" \ description="Docker image containing all requirements for the nf-core tools pipeline" diff --git a/tests/test_lint.py b/tests/test_lint.py index 25d1828b09..c3243018ea 100644 --- a/tests/test_lint.py +++ b/tests/test_lint.py @@ -76,7 +76,7 @@ def test_call_lint_pipeline_pass(self): This should not result in any exception for the minimal working example""" old_nfcore_version = nf_core.__version__ - nf_core.__version__ = "1.11.0" + nf_core.__version__ = "1.11" lint_obj = nf_core.lint.run_linting(PATH_WORKING_EXAMPLE, False) nf_core.__version__ = old_nfcore_version expectations = {"failed": 0, "warned": 5, "passed": MAX_PASS_CHECKS - 1} @@ -93,7 +93,7 @@ def test_call_lint_pipeline_fail(self): def test_call_lint_pipeline_release(self): """Test the main execution function of PipelineLint when running with --release""" lint_obj = nf_core.lint.PipelineLint(PATH_WORKING_EXAMPLE) - lint_obj.version = "1.11.0" + lint_obj.version = "1.11" lint_obj.lint_pipeline(release_mode=True) expectations = {"failed": 0, "warned": 4, "passed": MAX_PASS_CHECKS + ADD_PASS_RELEASE} self.assess_lint_status(lint_obj, **expectations) @@ -390,7 +390,7 @@ def test_conda_env_skip(self): def test_conda_dockerfile_pass(self): """ Tests the conda Dockerfile test works with a working example """ lint_obj = nf_core.lint.PipelineLint(PATH_WORKING_EXAMPLE) - lint_obj.version = "1.11.0" + lint_obj.version = "1.11" lint_obj.files = ["environment.yml", "Dockerfile"] with open(os.path.join(PATH_WORKING_EXAMPLE, "Dockerfile"), "r") as fh: lint_obj.dockerfile = fh.read().splitlines() @@ -402,7 +402,7 @@ def test_conda_dockerfile_pass(self): def test_conda_dockerfile_fail(self): """ Tests the conda Dockerfile test fails with a bad example """ lint_obj = nf_core.lint.PipelineLint(PATH_WORKING_EXAMPLE) - lint_obj.version = "1.11.0" + lint_obj.version = "1.11" lint_obj.files = ["environment.yml", "Dockerfile"] lint_obj.conda_config["name"] = "nf-core-tools-0.4" lint_obj.dockerfile = ["fubar"]