From 0b7fe501992f288c8e5164f46ac8fd63d95ddb99 Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 10 Dec 2024 15:40:28 +0100 Subject: [PATCH 01/11] Be more verbose in approval check action --- .../.github/workflows/awsfulltest.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/nf_core/pipeline-template/.github/workflows/awsfulltest.yml b/nf_core/pipeline-template/.github/workflows/awsfulltest.yml index 45c2a0e555..2a3663bdad 100644 --- a/nf_core/pipeline-template/.github/workflows/awsfulltest.yml +++ b/nf_core/pipeline-template/.github/workflows/awsfulltest.yml @@ -19,19 +19,29 @@ jobs: if: github.repository == '{{ name }}' && github.event.review.state == 'approved' && github.event.pull_request.base.ref == 'master' || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest steps: - - uses: octokit/request-action@v2.x + - name: Get PR reviews + uses: octokit/request-action@v2.x if: github.event_name != 'workflow_dispatch' id: check_approvals with: route: GET /repos/{%- raw -%}${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews?per_page=100 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - id: test_variables - if: github.event_name != 'workflow_dispatch' + + - name: Check for approvals + if: steps.check_approvals.outputs == '' + run: | + echo "No approvals found" + exit 1 + + - name: Check for enough approvals (>=2) + id: test_variables + if: github.event_name != 'workflow_dispatch' && steps.check_approvals.outputs != '' run: | JSON_RESPONSE='${{ steps.check_approvals.outputs.data }}'{% endraw %} CURRENT_APPROVALS_COUNT=$(echo $JSON_RESPONSE | jq -c '[.[] | select(.state | contains("APPROVED")) ] | length') test $CURRENT_APPROVALS_COUNT -ge 2 || exit 1 # At least 2 approvals are required + - name: Launch workflow via Seqera Platform uses: seqeralabs/action-tower-launch@v2 # TODO nf-core: You can customise AWS full pipeline tests as required From f7ced6bcd6e07baf89e6ee7f67d7f8f8c532ab0e Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 10 Dec 2024 16:00:03 +0100 Subject: [PATCH 02/11] fix if clause --- nf_core/pipeline-template/.github/workflows/awsfulltest.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nf_core/pipeline-template/.github/workflows/awsfulltest.yml b/nf_core/pipeline-template/.github/workflows/awsfulltest.yml index 2a3663bdad..cd39124900 100644 --- a/nf_core/pipeline-template/.github/workflows/awsfulltest.yml +++ b/nf_core/pipeline-template/.github/workflows/awsfulltest.yml @@ -29,14 +29,14 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Check for approvals - if: steps.check_approvals.outputs == '' + if: ${{ failure() && github.event_name != 'workflow_dispatch' }} run: | - echo "No approvals found" + echo "No review approvals found. At least 2 approvals are required to run this action automatically." exit 1 - name: Check for enough approvals (>=2) id: test_variables - if: github.event_name != 'workflow_dispatch' && steps.check_approvals.outputs != '' + if: github.event_name != 'workflow_dispatch' run: | JSON_RESPONSE='${{ steps.check_approvals.outputs.data }}'{% endraw %} CURRENT_APPROVALS_COUNT=$(echo $JSON_RESPONSE | jq -c '[.[] | select(.state | contains("APPROVED")) ] | length') From 174861324f70c243c71484d3216c5edfb8f78013 Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 10 Dec 2024 16:01:04 +0100 Subject: [PATCH 03/11] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e1140b65a..7d31390ba9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ - Add `manifest.contributors` to `nextflow.config` ([#3311](https://github.com/nf-core/tools/pull/3311)) - Update template components ([#3328](https://github.com/nf-core/tools/pull/3328)) - Template: Remove mention of GRCh37 if igenomes is skipped ([#3330](https://github.com/nf-core/tools/pull/3330)) +- Be more verbose in approval check action ([#3338](https://github.com/nf-core/tools/pull/3338)) ### Download From 8f00659ca4c54144eee4415a98dedad1eaf87d67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20H=C3=B6rtenhuber?= Date: Thu, 12 Dec 2024 10:59:54 +0100 Subject: [PATCH 04/11] Revert "don't set up loggin level to error [no changelog]" --- nf_core/pipelines/sync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipelines/sync.py b/nf_core/pipelines/sync.py index a75ddef33b..781b4f5f00 100644 --- a/nf_core/pipelines/sync.py +++ b/nf_core/pipelines/sync.py @@ -261,7 +261,7 @@ def make_template_pipeline(self): log.info("Making a new template pipeline using pipeline variables") # Only show error messages from pipeline creation - # logging.getLogger("nf_core.pipelines.create").setLevel(logging.ERROR) + logging.getLogger("nf_core.pipelines.create").setLevel(logging.ERROR) assert self.config_yml_path is not None assert self.config_yml is not None From c2a9dee17bc981f0b20bcea7dc167a620d409bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlia=20Mir=20Pedrol?= Date: Thu, 12 Dec 2024 11:14:52 +0100 Subject: [PATCH 05/11] Update nf_core/pipeline-template/.github/workflows/awsfulltest.yml --- nf_core/pipeline-template/.github/workflows/awsfulltest.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/nf_core/pipeline-template/.github/workflows/awsfulltest.yml b/nf_core/pipeline-template/.github/workflows/awsfulltest.yml index cd39124900..6805c83a27 100644 --- a/nf_core/pipeline-template/.github/workflows/awsfulltest.yml +++ b/nf_core/pipeline-template/.github/workflows/awsfulltest.yml @@ -23,6 +23,7 @@ jobs: uses: octokit/request-action@v2.x if: github.event_name != 'workflow_dispatch' id: check_approvals + continue-on-error: true with: route: GET /repos/{%- raw -%}${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews?per_page=100 env: From d65da79dc24adb9c36f6d114eef9279f4c55b07c Mon Sep 17 00:00:00 2001 From: mashehu Date: Thu, 12 Dec 2024 15:04:39 +0100 Subject: [PATCH 06/11] bump version to 3.1.1dev --- .gitpod.yml | 2 +- CHANGELOG.md | 16 ++++++++++++++++ setup.py | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index db31d01bed..d5948695bf 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,4 +1,4 @@ -image: nfcore/gitpod:latest +image: nfcore/gitpod:dev tasks: - name: install current state of nf-core/tools and setup pre-commit command: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 603fa77e24..bacef3b106 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # nf-core/tools: Changelog +## v3.1.1dev + +### Template + +### Download + +### Linting + +### Modules + +### Subworkflows + +### General + +### Version updates + ## [v3.1.0 - Brass Boxfish](https://github.com/nf-core/tools/releases/tag/3.1.0) - [2024-12-09] **Highlights** diff --git a/setup.py b/setup.py index 6b68973a6a..b5c5de9a4f 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import find_packages, setup -version = "3.1.0" +version = "3.1.1dev" with open("README.md") as f: readme = f.read() From 307d0d4b91729ba9d708f6fbd761414559c45e45 Mon Sep 17 00:00:00 2001 From: mashehu Date: Thu, 12 Dec 2024 16:09:53 +0100 Subject: [PATCH 07/11] only bump ro-crate if it already exists --- nf_core/pipelines/bump_version.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nf_core/pipelines/bump_version.py b/nf_core/pipelines/bump_version.py index de0342c7f9..664d7a22a3 100644 --- a/nf_core/pipelines/bump_version.py +++ b/nf_core/pipelines/bump_version.py @@ -128,8 +128,9 @@ def bump_pipeline_version(pipeline_obj: Pipeline, new_version: str) -> None: yaml_key=["template", "version"], ) - # update rocrate - ROCrate(pipeline_obj.wf_path).update_rocrate() + # update rocrate if ro-crate is present + if Path(pipeline_obj.wf_path, "ro-crate-metadata.json").exists(): + ROCrate(pipeline_obj.wf_path).update_rocrate() def bump_nextflow_version(pipeline_obj: Pipeline, new_version: str) -> None: From 8c5855f19a12bad41d8db15dc9238b6e89d634d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlia=20Mir=20Pedrol?= Date: Fri, 13 Dec 2024 08:19:50 +0000 Subject: [PATCH 08/11] get max of 100 branch names --- nf_core/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/utils.py b/nf_core/utils.py index 30b0743493..dc208c0a78 100644 --- a/nf_core/utils.py +++ b/nf_core/utils.py @@ -1083,7 +1083,7 @@ def get_repo_releases_branches(pipeline, wfs): raise AssertionError(f"Not able to find pipeline '{pipeline}'") # Get branch information from github api - should be no need to check if the repo exists again - branch_response = gh_api.safe_get(f"https://api.github.com/repos/{pipeline}/branches") + branch_response = gh_api.safe_get(f"https://api.github.com/repos/{pipeline}/branches?per_page=100") for branch in branch_response.json(): if ( branch["name"] != "TEMPLATE" From 4cf860785d5735d4cd5b026b93653e67533b88c9 Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Fri, 13 Dec 2024 10:36:28 +0100 Subject: [PATCH 09/11] fix including modules.config --- nf_core/pipeline-template/nextflow.config | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nf_core/pipeline-template/nextflow.config b/nf_core/pipeline-template/nextflow.config index 36018b1062..05a9599eb4 100644 --- a/nf_core/pipeline-template/nextflow.config +++ b/nf_core/pipeline-template/nextflow.config @@ -77,11 +77,6 @@ params { includeConfig 'conf/base.config' {%- else %} -{% if modules -%} -// Load modules.config for DSL2 module specific options -includeConfig 'conf/modules.config' -{%- endif %} - process { // TODO nf-core: Check the defaults for all processes cpus = { 1 * task.attempt } @@ -94,6 +89,11 @@ process { } {%- endif %} +{% if modules -%} +// Load modules.config for DSL2 module specific options +includeConfig 'conf/modules.config' +{%- endif %} + profiles { debug { dumpHashes = true From eed09ba43a0b85924bb3f8526f02dbdf12d85588 Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Fri, 13 Dec 2024 09:38:20 +0000 Subject: [PATCH 10/11] [automated] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bacef3b106..9c9af42a9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ ### Modules +- fix including modules.config ([#3356](https://github.com/nf-core/tools/pull/3356)) + ### Subworkflows ### General From a2c2339d4a2e89215b25e7f549721bc94c23f566 Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Fri, 13 Dec 2024 10:47:18 +0100 Subject: [PATCH 11/11] revert #3301 until we add linting from #2508 --- nf_core/pipeline-template/nextflow.config | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nf_core/pipeline-template/nextflow.config b/nf_core/pipeline-template/nextflow.config index 05a9599eb4..9db8f3bfe6 100644 --- a/nf_core/pipeline-template/nextflow.config +++ b/nf_core/pipeline-template/nextflow.config @@ -89,11 +89,6 @@ process { } {%- endif %} -{% if modules -%} -// Load modules.config for DSL2 module specific options -includeConfig 'conf/modules.config' -{%- endif %} - profiles { debug { dumpHashes = true @@ -336,3 +331,8 @@ validation { }{% endif %} } {%- endif %} + +{% if modules -%} +// Load modules.config for DSL2 module specific options +includeConfig 'conf/modules.config' +{%- endif %}