From e9cde5910a6ebd3e8bccef91a84ee9a47a56381a Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 10 Dec 2024 12:17:54 +0100 Subject: [PATCH 01/63] set default_branch to master for now --- nf_core/pipeline-template/nextflow.config | 2 +- nf_core/pipelines/create/create.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nf_core/pipeline-template/nextflow.config b/nf_core/pipeline-template/nextflow.config index 000d7cd66..36018b106 100644 --- a/nf_core/pipeline-template/nextflow.config +++ b/nf_core/pipeline-template/nextflow.config @@ -327,7 +327,7 @@ validation { https://doi.org/10.1038/s41587-020-0439-x * Software dependencies - https://github.com/{{ name }}/blob/master/CITATIONS.md + https://github.com/{{ name }}/blob/{{ default_branch }}/CITATIONS.md """{% endif %} }{% if is_nfcore %} summary { diff --git a/nf_core/pipelines/create/create.py b/nf_core/pipelines/create/create.py index 8855f2dae..ae5bea57d 100644 --- a/nf_core/pipelines/create/create.py +++ b/nf_core/pipelines/create/create.py @@ -57,7 +57,7 @@ def __init__( template_config: Optional[Union[CreateConfig, str, Path]] = None, organisation: str = "nf-core", from_config_file: bool = False, - default_branch: str = "main", + default_branch: str = "master", is_interactive: bool = False, ) -> None: if isinstance(template_config, CreateConfig): @@ -431,8 +431,8 @@ def get_default_branch(self) -> None: """Gets the default branch name from the Git configuration.""" try: self.default_branch = ( - str(git.config.GitConfigParser().get_value("init", "defaultBranch")) or "main" - ) # default to main + str(git.config.GitConfigParser().get_value("init", "defaultBranch")) or "master" + ) # default to master except configparser.Error: log.debug("Could not read init.defaultBranch") if self.default_branch in ["dev", "TEMPLATE"]: From 7110fff5287cdeb2e5e769d7cf18bd725436f0ad Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 10 Dec 2024 12:20:01 +0100 Subject: [PATCH 02/63] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9015ac6da..4eef49da4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -81,6 +81,7 @@ - Parallelize pipeline GHA tests over docker/conda/singularity ([#3214](https://github.com/nf-core/tools/pull/3214)) - Fix `template_version_comment.yml` github action ([#3212](https://github.com/nf-core/tools/pull/3212)) - Fix pre-commit linting on pipeline template ([#3218](https://github.com/nf-core/tools/pull/3218)) +- set default_branch to master for now ([#3335](https://github.com/nf-core/tools/issues/3335)) ### Linting From de00162797ddd833a592b918e6405d7f87d26f15 Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 10 Dec 2024 13:20:46 +0100 Subject: [PATCH 03/63] set git defaultBranch to master in sync action --- .github/workflows/sync.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 625f00d24..c1d14d634 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -87,6 +87,10 @@ jobs: with: version: "latest-everything" + - name: Set git defaultBranch to master + run: | + git config --global init.defaultBranch master + - name: Run synchronisation if: github.repository == 'nf-core/tools' env: From 60ae1afaa7e568806602f579ee63577f5c0e4832 Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 10 Dec 2024 13:26:07 +0100 Subject: [PATCH 04/63] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4eef49da4..73760131f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,6 +65,7 @@ - Don't break gitpod.yml with template string ([#3332](https://github.com/nf-core/tools/pull/3332)) - rocrate: remove duplicated entries for name and version ([#3333](https://github.com/nf-core/tools/pull/3333)) - rocrate: Update crate with version bump and handle new contributor field ([#3334](https://github.com/nf-core/tools/pull/3334)) +- Set git defaultBranch to master in sync action ([#3337](https://github.com/nf-core/tools/pull/3337)) ### Version updates From 5ee2d52d5ef6a2ffe6e6970b65fbde7e7f7539c8 Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 10 Dec 2024 14:30:14 +0100 Subject: [PATCH 05/63] use nextflow.config to set defaultBranch --- .github/workflows/sync.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index c1d14d634..b0464d274 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -87,9 +87,13 @@ jobs: with: version: "latest-everything" - - name: Set git defaultBranch to master + - name: Set Git default branch from nextflow.config and set git default branch to that or "master" run: | - git config --global init.defaultBranch master + defaultBranch=$(grep -B5 -A5 "nextflowVersion" nextflow.config | grep "defaultBranch" | cut -d"=" -f2) + if [ -z "$defaultBranch" ]; then + defaultBranch="master" + fi + git config --global init.defaultBranch $defaultBranch - name: Run synchronisation if: github.repository == 'nf-core/tools' From 666fc9f522f8dc94d314758a36bbd260271df7b1 Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 10 Dec 2024 14:44:12 +0100 Subject: [PATCH 06/63] fix path for nextflow.config grep --- .github/workflows/sync.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index b0464d274..2a5066397 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -89,7 +89,7 @@ jobs: - name: Set Git default branch from nextflow.config and set git default branch to that or "master" run: | - defaultBranch=$(grep -B5 -A5 "nextflowVersion" nextflow.config | grep "defaultBranch" | cut -d"=" -f2) + defaultBranch=$(grep -B5 -A5 "nextflowVersion" nf-core/${{ matrix.pipeline }}/nextflow.config | grep "defaultBranch" | cut -d"=" -f2) if [ -z "$defaultBranch" ]; then defaultBranch="master" fi From 15b044d1b3a1a29b2406d42b5c791fd40e96ce9b Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 10 Dec 2024 15:15:26 +0100 Subject: [PATCH 07/63] change working dir when setting defaultBranch --- .github/workflows/sync.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 2a5066397..c315fdb14 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -89,10 +89,12 @@ jobs: - name: Set Git default branch from nextflow.config and set git default branch to that or "master" run: | - defaultBranch=$(grep -B5 -A5 "nextflowVersion" nf-core/${{ matrix.pipeline }}/nextflow.config | grep "defaultBranch" | cut -d"=" -f2) + cd nf-core/${{ matrix.pipeline }} + defaultBranch=$(grep -B5 -A5 "nextflowVersion" nextflow.config | grep "defaultBranch" | cut -d"=" -f2) if [ -z "$defaultBranch" ]; then defaultBranch="master" fi + echo "Default branch: $defaultBranch" git config --global init.defaultBranch $defaultBranch - name: Run synchronisation From 1a22106771d3c6b468e4d3cfb2046157188564cb Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 10 Dec 2024 15:17:06 +0100 Subject: [PATCH 08/63] fix Changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 73760131f..3e1140b65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,6 +65,7 @@ - Don't break gitpod.yml with template string ([#3332](https://github.com/nf-core/tools/pull/3332)) - rocrate: remove duplicated entries for name and version ([#3333](https://github.com/nf-core/tools/pull/3333)) - rocrate: Update crate with version bump and handle new contributor field ([#3334](https://github.com/nf-core/tools/pull/3334)) +- set default_branch to master for now ([#3335](https://github.com/nf-core/tools/issues/3335)) - Set git defaultBranch to master in sync action ([#3337](https://github.com/nf-core/tools/pull/3337)) ### Version updates @@ -82,7 +83,6 @@ - Parallelize pipeline GHA tests over docker/conda/singularity ([#3214](https://github.com/nf-core/tools/pull/3214)) - Fix `template_version_comment.yml` github action ([#3212](https://github.com/nf-core/tools/pull/3212)) - Fix pre-commit linting on pipeline template ([#3218](https://github.com/nf-core/tools/pull/3218)) -- set default_branch to master for now ([#3335](https://github.com/nf-core/tools/issues/3335)) ### Linting From 0b7fe501992f288c8e5164f46ac8fd63d95ddb99 Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 10 Dec 2024 15:40:28 +0100 Subject: [PATCH 09/63] 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 45c2a0e55..2a3663bda 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 10/63] 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 2a3663bda..cd3912490 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 11/63] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e1140b65..7d31390ba 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 fa4e07424bf60a42559f4fa756495d7f326eea3c Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 10 Dec 2024 17:17:02 +0100 Subject: [PATCH 12/63] add verbose mode to sync action --- .github/workflows/sync.yml | 6 +++++- nf_core/pipelines/create/create.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index c315fdb14..0e28ece8a 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -88,6 +88,7 @@ jobs: version: "latest-everything" - name: Set Git default branch from nextflow.config and set git default branch to that or "master" + run: | cd nf-core/${{ matrix.pipeline }} defaultBranch=$(grep -B5 -A5 "nextflowVersion" nextflow.config | grep "defaultBranch" | cut -d"=" -f2) @@ -95,6 +96,7 @@ jobs: defaultBranch="master" fi echo "Default branch: $defaultBranch" + echo "defaultBranch=$defaultBranch" >> GITHUB_OUTPUT git config --global init.defaultBranch $defaultBranch - name: Run synchronisation @@ -104,7 +106,9 @@ jobs: run: | git config --global user.email "core@nf-co.re" git config --global user.name "nf-core-bot" - nf-core --log-file sync_log_${{ matrix.pipeline }}.txt pipelines sync -d nf-core/${{ matrix.pipeline }} \ + nf-core --log-file sync_log_${{ matrix.pipeline }}.txt + ${{ github.event.inputs.debug == 'true' && '--verbose' || '' }} + pipelines sync -d nf-core/${{ matrix.pipeline }} \ --from-branch dev \ --pull-request \ --username nf-core-bot \ diff --git a/nf_core/pipelines/create/create.py b/nf_core/pipelines/create/create.py index ae5bea57d..0e2c683e6 100644 --- a/nf_core/pipelines/create/create.py +++ b/nf_core/pipelines/create/create.py @@ -298,7 +298,6 @@ def render_template(self) -> None: template_dir = Path(nf_core.__file__).parent / "pipeline-template" object_attrs = self.jinja_params object_attrs["nf_core_version"] = nf_core.__version__ - # Can't use glob.glob() as need recursive hidden dotfiles - https://stackoverflow.com/a/58126417/713980 template_files = list(Path(template_dir).glob("**/*")) template_files += list(Path(template_dir).glob("*")) @@ -433,6 +432,7 @@ def get_default_branch(self) -> None: self.default_branch = ( str(git.config.GitConfigParser().get_value("init", "defaultBranch")) or "master" ) # default to master + log.debug(f"Default branch name: {self.default_branch}") except configparser.Error: log.debug("Could not read init.defaultBranch") if self.default_branch in ["dev", "TEMPLATE"]: From 5c8937e38b406f5748ebf3ed936de9b1ed0ddaa6 Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 10 Dec 2024 17:19:32 +0100 Subject: [PATCH 13/63] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e1140b65..c23bd9644 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -67,6 +67,7 @@ - rocrate: Update crate with version bump and handle new contributor field ([#3334](https://github.com/nf-core/tools/pull/3334)) - set default_branch to master for now ([#3335](https://github.com/nf-core/tools/issues/3335)) - Set git defaultBranch to master in sync action ([#3337](https://github.com/nf-core/tools/pull/3337)) +- Add verbose mode to sync action ([#3339](https://github.com/nf-core/tools/pull/3339)) ### Version updates From bb3a25294af0326cbbc81857f623bca50a12acc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlia=20Mir=20Pedrol?= Date: Wed, 11 Dec 2024 10:42:54 +0100 Subject: [PATCH 14/63] Apply suggestions from code review --- .github/workflows/sync.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 0e28ece8a..15ac0cb00 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -106,8 +106,8 @@ jobs: run: | git config --global user.email "core@nf-co.re" git config --global user.name "nf-core-bot" - nf-core --log-file sync_log_${{ matrix.pipeline }}.txt - ${{ github.event.inputs.debug == 'true' && '--verbose' || '' }} + nf-core --log-file sync_log_${{ matrix.pipeline }}.txt \ + ${{ github.event.inputs.debug == 'true' && '--verbose' || '' }} \ pipelines sync -d nf-core/${{ matrix.pipeline }} \ --from-branch dev \ --pull-request \ From 379bad0e97a6a1ec407cd9a0705cf5be06557873 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlia=20Mir=20Pedrol?= Date: Wed, 11 Dec 2024 10:03:37 +0000 Subject: [PATCH 15/63] add input debug for workflow_dispatch sync action --- .github/workflows/sync.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 15ac0cb00..9a1158c3e 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -23,6 +23,10 @@ on: description: "Pipeline to sync" type: string default: "all" + debug: + description: "Enable debug/verbose mode (true or false)" + type: boolean + default: false # Cancel if a newer run is started concurrency: From 6148983c8469149cda6e834998cc01c78102f418 Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Wed, 11 Dec 2024 11:44:22 +0100 Subject: [PATCH 16/63] go back to original directory after configuring git defaultBranch --- .github/workflows/sync.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 9a1158c3e..b45333114 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -94,7 +94,7 @@ jobs: - name: Set Git default branch from nextflow.config and set git default branch to that or "master" run: | - cd nf-core/${{ matrix.pipeline }} + pushd nf-core/${{ matrix.pipeline }} defaultBranch=$(grep -B5 -A5 "nextflowVersion" nextflow.config | grep "defaultBranch" | cut -d"=" -f2) if [ -z "$defaultBranch" ]; then defaultBranch="master" @@ -102,6 +102,7 @@ jobs: echo "Default branch: $defaultBranch" echo "defaultBranch=$defaultBranch" >> GITHUB_OUTPUT git config --global init.defaultBranch $defaultBranch + popd - name: Run synchronisation if: github.repository == 'nf-core/tools' From df5b3233a38b6732b9f45946fbe6493b8bc73151 Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Wed, 11 Dec 2024 14:51:17 +0100 Subject: [PATCH 17/63] add more debugging on sync GHA --- .github/workflows/sync.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index b45333114..ea2c6283d 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -111,6 +111,8 @@ jobs: run: | git config --global user.email "core@nf-co.re" git config --global user.name "nf-core-bot" + setBranch=$(git config --global init.defaultBranch) + echo "set default branch: $setBranch" >> GITHUB_OUTPUT nf-core --log-file sync_log_${{ matrix.pipeline }}.txt \ ${{ github.event.inputs.debug == 'true' && '--verbose' || '' }} \ pipelines sync -d nf-core/${{ matrix.pipeline }} \ From 1de1034c0888f515bc26c32559707b24e835890c Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Wed, 11 Dec 2024 15:34:37 +0100 Subject: [PATCH 18/63] echo message to sync GHA --- .github/workflows/sync.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index ea2c6283d..26c11c827 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -112,7 +112,7 @@ jobs: git config --global user.email "core@nf-co.re" git config --global user.name "nf-core-bot" setBranch=$(git config --global init.defaultBranch) - echo "set default branch: $setBranch" >> GITHUB_OUTPUT + echo "set default branch: $setBranch" nf-core --log-file sync_log_${{ matrix.pipeline }}.txt \ ${{ github.event.inputs.debug == 'true' && '--verbose' || '' }} \ pipelines sync -d nf-core/${{ matrix.pipeline }} \ From 3858e38a5410684bfd58a1f6a27bcc4dc65fa81a Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Wed, 11 Dec 2024 16:03:12 +0100 Subject: [PATCH 19/63] try exiting pipeline directory before saving defaultBranch --- .github/workflows/sync.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 26c11c827..23e89c26c 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -99,10 +99,10 @@ jobs: if [ -z "$defaultBranch" ]; then defaultBranch="master" fi + popd echo "Default branch: $defaultBranch" echo "defaultBranch=$defaultBranch" >> GITHUB_OUTPUT git config --global init.defaultBranch $defaultBranch - popd - name: Run synchronisation if: github.repository == 'nf-core/tools' From 380be6c2c20cd8306bd73089b3999bea21440e89 Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Wed, 11 Dec 2024 16:10:05 +0100 Subject: [PATCH 20/63] cleanup debugging echo --- .github/workflows/sync.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 23e89c26c..4d7c496ed 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -111,8 +111,6 @@ jobs: run: | git config --global user.email "core@nf-co.re" git config --global user.name "nf-core-bot" - setBranch=$(git config --global init.defaultBranch) - echo "set default branch: $setBranch" nf-core --log-file sync_log_${{ matrix.pipeline }}.txt \ ${{ github.event.inputs.debug == 'true' && '--verbose' || '' }} \ pipelines sync -d nf-core/${{ matrix.pipeline }} \ From be38c157038786f6e1ae60ce82ffa666674d9d0e Mon Sep 17 00:00:00 2001 From: mashehu Date: Wed, 11 Dec 2024 20:06:58 +0100 Subject: [PATCH 21/63] use same ref in checkout as triggered the workflow --- .github/workflows/sync.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 4d7c496ed..706129478 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -66,6 +66,8 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 name: Check out nf-core/tools + with: + ref: ${{ github.ref_name }} - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 name: Check out nf-core/${{ matrix.pipeline }} From e92f327cdc75e93253524b4e1c277e9ea8d91149 Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Thu, 12 Dec 2024 10:00:43 +0100 Subject: [PATCH 22/63] don't set up loggin level to error --- 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 781b4f5f0..a75ddef33 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 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 23/63] 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 a75ddef33..781b4f5f0 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 24/63] 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 cd3912490..6805c83a2 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 62ebfc1af318b3bdc749fe75ad1bce407273ae54 Mon Sep 17 00:00:00 2001 From: Matthias Zepper Date: Thu, 12 Dec 2024 11:35:57 +0100 Subject: [PATCH 25/63] Replace Github environment usage in Download Action. --- .../.github/workflows/download_pipeline.yml | 43 +++++++++++-------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/nf_core/pipeline-template/.github/workflows/download_pipeline.yml b/nf_core/pipeline-template/.github/workflows/download_pipeline.yml index 05397358c..b828d84be 100644 --- a/nf_core/pipeline-template/.github/workflows/download_pipeline.yml +++ b/nf_core/pipeline-template/.github/workflows/download_pipeline.yml @@ -28,10 +28,14 @@ env: NXF_ANSI_LOG: false jobs: - download: - runs-on: ubuntu-latest + configure: + runs-on: ubuntu-latest{% raw %} + outputs: + REPO_LOWERCASE: ${{ steps.get_repo_properties.outputs.REPO_LOWERCASE }} + REPOTITLE_LOWERCASE: ${{ steps.get_repo_properties.outputs.REPOTITLE_LOWERCASE }} + REPO_BRANCH: ${{ steps.get_repo_properties.outputs.REPO_BRANCH }} steps: - - name: Install Nextflow + - name: Install Nextflow{% endraw %} uses: nf-core/setup-nextflow@v2 - name: Disk space cleanup @@ -53,22 +57,27 @@ jobs: pip install git+https://github.com/nf-core/tools.git@dev - name: Get the repository name and current branch set as environment variable + id: get_repo_properties run: | - echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV} - echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> ${GITHUB_ENV} - echo "{% raw %}REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> ${GITHUB_ENV} + echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT" + echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> "$GITHUB_OUTPUT" + echo "{% raw %}REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> "$GITHUB_OUTPUT" - name: Make a cache directory for the container images run: | mkdir -p ./singularity_container_images + download: + runs-on: ubuntu-latest + needs: configure + steps: - name: Download the pipeline env: NXF_SINGULARITY_CACHEDIR: ./singularity_container_images run: | - nf-core pipelines download ${{ env.REPO_LOWERCASE }} \ - --revision ${{ env.REPO_BRANCH }} \ - --outdir ./${{ env.REPOTITLE_LOWERCASE }} \ + nf-core pipelines download ${{ needs.configure.outputs.REPO_LOWERCASE }} \ + --revision ${{ needs.configure.outputs.REPO_BRANCH }} \ + --outdir ./${{ needs.configure.outputs.REPOTITLE_LOWERCASE }} \ --compress "none" \ --container-system 'singularity' \ --container-library "quay.io" -l "docker.io" -l "community.wave.seqera.io/library/" \ @@ -76,14 +85,14 @@ jobs: --download-configuration 'yes' - name: Inspect download - run: tree ./${{ env.REPOTITLE_LOWERCASE }}{% endraw %}{% if test_config %}{% raw %} + run: tree ./${{ needs.configure.outputs.REPOTITLE_LOWERCASE }}{% endraw %}{% if test_config %}{% raw %} - name: Count the downloaded number of container images id: count_initial run: | image_count=$(ls -1 ./singularity_container_images | wc -l | xargs) echo "Initial container image count: $image_count" - echo "IMAGE_COUNT_INITIAL=$image_count" >> ${GITHUB_ENV} + echo "IMAGE_COUNT_INITIAL=$image_count" >> "$GITHUB_OUTPUT" - name: Run the downloaded pipeline (stub) id: stub_run_pipeline @@ -91,27 +100,27 @@ jobs: env: NXF_SINGULARITY_CACHEDIR: ./singularity_container_images NXF_SINGULARITY_HOME_MOUNT: true - run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results + run: nextflow run ./${{needs.configure.outputs.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ needs.configure.outputs.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results - name: Run the downloaded pipeline (stub run not supported) id: run_pipeline if: ${{ job.steps.stub_run_pipeline.status == failure() }} env: NXF_SINGULARITY_CACHEDIR: ./singularity_container_images NXF_SINGULARITY_HOME_MOUNT: true - run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -profile test,singularity --outdir ./results + run: nextflow run ./${{ needs.configure.outputs.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ needs.configure.outputs.REPO_BRANCH }}) -profile test,singularity --outdir ./results - name: Count the downloaded number of container images id: count_afterwards run: | image_count=$(ls -1 ./singularity_container_images | wc -l | xargs) echo "Post-pipeline run container image count: $image_count" - echo "IMAGE_COUNT_AFTER=$image_count" >> ${GITHUB_ENV} + echo "IMAGE_COUNT_AFTER=$image_count" >> "$GITHUB_OUTPUT" - name: Compare container image counts run: | - if [ "${{ env.IMAGE_COUNT_INITIAL }}" -ne "${{ env.IMAGE_COUNT_AFTER }}" ]; then - initial_count=${{ env.IMAGE_COUNT_INITIAL }} - final_count=${{ env.IMAGE_COUNT_AFTER }} + if [ "${{ steps.count_initial.outputs.IMAGE_COUNT_INITIAL }}" -ne "${{ steps.count_afterwards.outputs.IMAGE_COUNT_AFTER }}" ]; then + initial_count=${{ steps.count_initial.outputs.IMAGE_COUNT_INITIAL }} + final_count=${{ steps.count_afterwards.outputs.IMAGE_COUNT_AFTER }} difference=$((final_count - initial_count)) echo "$difference additional container images were \n downloaded at runtime . The pipeline has no support for offline runs!" tree ./singularity_container_images From d65da79dc24adb9c36f6d114eef9279f4c55b07c Mon Sep 17 00:00:00 2001 From: mashehu Date: Thu, 12 Dec 2024 15:04:39 +0100 Subject: [PATCH 26/63] 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 db31d01be..d5948695b 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 603fa77e2..bacef3b10 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 6b68973a6..b5c5de9a4 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 27/63] 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 de0342c7f..664d7a22a 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 28/63] 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 30b074349..dc208c0a7 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 29/63] 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 36018b106..05a9599eb 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 30/63] [automated] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bacef3b10..9c9af42a9 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 31/63] 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 05a9599eb..9db8f3bfe 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 %} From 060eff51c3562fef14f188678f2a8eea2a8a05a7 Mon Sep 17 00:00:00 2001 From: Matthias Zepper <6963520+MatthiasZepper@users.noreply.github.com> Date: Fri, 13 Dec 2024 10:58:08 +0100 Subject: [PATCH 32/63] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Matthias Hörtenhuber --- .../pipeline-template/.github/workflows/download_pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nf_core/pipeline-template/.github/workflows/download_pipeline.yml b/nf_core/pipeline-template/.github/workflows/download_pipeline.yml index b828d84be..d6b9e78d2 100644 --- a/nf_core/pipeline-template/.github/workflows/download_pipeline.yml +++ b/nf_core/pipeline-template/.github/workflows/download_pipeline.yml @@ -61,7 +61,7 @@ jobs: run: | echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT" echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> "$GITHUB_OUTPUT" - echo "{% raw %}REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> "$GITHUB_OUTPUT" + echo "{% raw %}REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> "$GITHUB_OUTPUT"{% endraw %} - name: Make a cache directory for the container images run: | @@ -103,7 +103,7 @@ jobs: run: nextflow run ./${{needs.configure.outputs.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ needs.configure.outputs.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results - name: Run the downloaded pipeline (stub run not supported) id: run_pipeline - if: ${{ job.steps.stub_run_pipeline.status == failure() }} + if: ${{ steps.stub_run_pipeline.outcome == 'failure' }} env: NXF_SINGULARITY_CACHEDIR: ./singularity_container_images NXF_SINGULARITY_HOME_MOUNT: true From a8065da8a87bcc888530e03bb645d12909803f96 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 33/63] 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 a75ddef33..781b4f5f0 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 4958cf0135b6257d14bd4ef7c84c0e21f12497dc Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 10 Dec 2024 15:40:28 +0100 Subject: [PATCH 34/63] 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 45c2a0e55..2a3663bda 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 4c32e4795214f847760a4e91482f682fa769dd5f Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 10 Dec 2024 16:00:03 +0100 Subject: [PATCH 35/63] 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 2a3663bda..cd3912490 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 e32293d1508ae1590183a16b70e9aedbc964ee59 Mon Sep 17 00:00:00 2001 From: mashehu Date: Tue, 10 Dec 2024 16:01:04 +0100 Subject: [PATCH 36/63] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c23bd9644..603fa77e2 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 f02d6bb5f96cee457a2fa2526808875349c6afb5 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 37/63] 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 cd3912490..6805c83a2 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 edd29e0fc02d9d34528a48c244c2b18880acb94b Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Fri, 13 Dec 2024 13:07:30 +0100 Subject: [PATCH 38/63] Add missing p --- nf_core/pipeline-template/docs/usage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/docs/usage.md b/nf_core/pipeline-template/docs/usage.md index 85f119e04..fb7f8557c 100644 --- a/nf_core/pipeline-template/docs/usage.md +++ b/nf_core/pipeline-template/docs/usage.md @@ -138,7 +138,7 @@ Several generic profiles are bundled with the pipeline which instruct the pipeli {%- if nf_core_configs %} -The pipeline also dynamically loads configurations from [https://github.com/nf-core/configs](https://github.com/nf-core/configs) when it runs, making multiple config profiles for various institutional clusters available at run time. For more information and to check if your system is suported, please see the [nf-core/configs documentation](https://github.com/nf-core/configs#documentation). +The pipeline also dynamically loads configurations from [https://github.com/nf-core/configs](https://github.com/nf-core/configs) when it runs, making multiple config profiles for various institutional clusters available at run time. For more information and to check if your system is supported, please see the [nf-core/configs documentation](https://github.com/nf-core/configs#documentation). {% else %} {% endif %} Note that multiple profiles can be loaded, for example: `-profile test,docker` - the order of arguments is important! From 4db108c90e3b3816f2237669505f628e7461ee9d Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Fri, 13 Dec 2024 12:08:36 +0000 Subject: [PATCH 39/63] [automated] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c9af42a9..779b57d5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ ### General +- Add missing p ([#3357](https://github.com/nf-core/tools/pull/3357)) + ### Version updates ## [v3.1.0 - Brass Boxfish](https://github.com/nf-core/tools/releases/tag/3.1.0) - [2024-12-09] From 059473c2e138aecfb451f2f848265767761d798a Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Fri, 13 Dec 2024 13:21:09 +0100 Subject: [PATCH 40/63] fix pre-commit linting failures --- nf_core/pipeline-template/.gitpod.yml | 2 +- .../subworkflows/local/utils_nfcore_pipeline_pipeline/main.nf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nf_core/pipeline-template/.gitpod.yml b/nf_core/pipeline-template/.gitpod.yml index c02b93834..c6a2e40b8 100644 --- a/nf_core/pipeline-template/.gitpod.yml +++ b/nf_core/pipeline-template/.gitpod.yml @@ -3,7 +3,7 @@ tasks: - name: Update Nextflow and setup pre-commit command: | pre-commit install --install-hooks - nextflow self-update {% if code_linters %} + nextflow self-update {%- if code_linters %} vscode: extensions: diff --git a/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_pipeline/main.nf b/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_pipeline/main.nf index 06692f1dc..3d540600b 100644 --- a/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_pipeline/main.nf +++ b/nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_pipeline/main.nf @@ -143,7 +143,7 @@ workflow PIPELINE_COMPLETION { {%- if multiqc %} def multiqc_reports = multiqc_report.toList() {%- endif %} - + // // Completion email and summary // From f6159c99490b7530bf3cbe081c78d71a828482a2 Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Fri, 13 Dec 2024 13:29:17 +0100 Subject: [PATCH 41/63] don't run prettier on ro-crate json file --- nf_core/pipeline-template/.prettierignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nf_core/pipeline-template/.prettierignore b/nf_core/pipeline-template/.prettierignore index 7ecc9b61c..02ba84c00 100644 --- a/nf_core/pipeline-template/.prettierignore +++ b/nf_core/pipeline-template/.prettierignore @@ -16,3 +16,6 @@ testing/ testing* *.pyc bin/ +{%- if rocrate %} +ro-crate-metadata.json +{%- endif %} From 9f61e8584ffc2f7a8417c226c04d8e15fc4dc2a4 Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Fri, 13 Dec 2024 13:30:05 +0100 Subject: [PATCH 42/63] run pre-commit from a git repo --- nf_core/pipelines/create/create.py | 8 +++++--- nf_core/pipelines/lint_utils.py | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/nf_core/pipelines/create/create.py b/nf_core/pipelines/create/create.py index 0e2c683e6..9c3db544f 100644 --- a/nf_core/pipelines/create/create.py +++ b/nf_core/pipelines/create/create.py @@ -266,6 +266,11 @@ def init_pipeline(self): # Init the git repository and make the first commit if not self.no_git: self.git_init_pipeline() + # Run prettier on files + current_dir = Path.cwd() + os.chdir(self.outdir) + run_prettier_on_file([str(f) for f in self.outdir.glob("**/*")]) + os.chdir(current_dir) if self.config.is_nfcore and not self.is_interactive: log.info( @@ -378,9 +383,6 @@ def render_template(self) -> None: yaml.safe_dump(config_yml.model_dump(exclude_none=True), fh) log.debug(f"Dumping pipeline template yml to pipeline config file '{config_fn.name}'") - # Run prettier on files - run_prettier_on_file([str(f) for f in self.outdir.glob("**/*")]) - def fix_linting(self): """ Updates the .nf-core.yml with linting configurations diff --git a/nf_core/pipelines/lint_utils.py b/nf_core/pipelines/lint_utils.py index b4c56c600..a6b98b189 100644 --- a/nf_core/pipelines/lint_utils.py +++ b/nf_core/pipelines/lint_utils.py @@ -97,7 +97,7 @@ def run_prettier_on_file(file: Union[Path, str, List[str]]) -> None: all_lines = [line for line in e.stdout.decode().split("\n")] files = "\n".join(all_lines[3:]) log.debug(f"The following files were modified by prettier:\n {files}") - elif e.stderr.decode(): + else: log.warning( "There was an error running the prettier pre-commit hook.\n" f"STDOUT: {e.stdout.decode()}\nSTDERR: {e.stderr.decode()}" From 1fbd0119b561d32dfef7c6cbc618567ff8feb95c Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Fri, 13 Dec 2024 12:44:24 +0000 Subject: [PATCH 43/63] [automated] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c9af42a9..391467c4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ ### Template +- Fix pre commit template ([#3358](https://github.com/nf-core/tools/pull/3358)) + ### Download ### Linting From 76ac617b291caa37a53017c8758a0dc938f4c8b1 Mon Sep 17 00:00:00 2001 From: Matthias Zepper Date: Fri, 13 Dec 2024 14:11:56 +0100 Subject: [PATCH 44/63] Remove endraw statement that 'nf-core pipelines' create does not like. --- CHANGELOG.md | 2 ++ .../pipeline-template/.github/workflows/download_pipeline.yml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c9af42a9..587ba99fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ ### Template +- Use outputs instead of the environment to pass around values between steps in the Download Test Action ([#3351](https://github.com/nf-core/tools/pull/3351)) + ### Download ### Linting diff --git a/nf_core/pipeline-template/.github/workflows/download_pipeline.yml b/nf_core/pipeline-template/.github/workflows/download_pipeline.yml index d6b9e78d2..f270dc541 100644 --- a/nf_core/pipeline-template/.github/workflows/download_pipeline.yml +++ b/nf_core/pipeline-template/.github/workflows/download_pipeline.yml @@ -61,7 +61,7 @@ jobs: run: | echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT" echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> "$GITHUB_OUTPUT" - echo "{% raw %}REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> "$GITHUB_OUTPUT"{% endraw %} + echo "{% raw %}REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> "$GITHUB_OUTPUT" - name: Make a cache directory for the container images run: | From 2b2b4359a9af852e8204d223659ae79b946a4864 Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Mon, 16 Dec 2024 11:34:30 +0100 Subject: [PATCH 45/63] prettify template and printing .nf-core.yml --- .../pipeline-template/.github/ISSUE_TEMPLATE/bug_report.yml | 1 - nf_core/pipeline-template/README.md | 2 +- nf_core/pipeline-template/nextflow.config | 2 +- nf_core/pipelines/bump_version.py | 4 ++-- nf_core/pipelines/create/create.py | 6 +++--- tests/utils.py | 4 ++-- 6 files changed, 9 insertions(+), 10 deletions(-) diff --git a/nf_core/pipeline-template/.github/ISSUE_TEMPLATE/bug_report.yml b/nf_core/pipeline-template/.github/ISSUE_TEMPLATE/bug_report.yml index 412f5bd3b..f3624afc9 100644 --- a/nf_core/pipeline-template/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/nf_core/pipeline-template/.github/ISSUE_TEMPLATE/bug_report.yml @@ -11,7 +11,6 @@ body: - [nf-core website: troubleshooting](https://nf-co.re/usage/troubleshooting) - [{{ name }} pipeline documentation](https://nf-co.re/{{ short_name }}/usage) {%- endif %} - - type: textarea id: description attributes: diff --git a/nf_core/pipeline-template/README.md b/nf_core/pipeline-template/README.md index a8f2e6054..2552a6481 100644 --- a/nf_core/pipeline-template/README.md +++ b/nf_core/pipeline-template/README.md @@ -7,7 +7,7 @@ -{% else %} +{%- else -%} # {{ name }} diff --git a/nf_core/pipeline-template/nextflow.config b/nf_core/pipeline-template/nextflow.config index 9db8f3bfe..3325af4e0 100644 --- a/nf_core/pipeline-template/nextflow.config +++ b/nf_core/pipeline-template/nextflow.config @@ -306,7 +306,7 @@ validation { command = "nextflow run {{ name }} -profile --input samplesheet.csv --outdir " fullParameter = "help_full" showHiddenParameter = "show_hidden" - {% if is_nfcore -%} + {%- if is_nfcore %} beforeText = """ -\033[2m----------------------------------------------------\033[0m- \033[0;32m,--.\033[0;30m/\033[0;32m,-.\033[0m diff --git a/nf_core/pipelines/bump_version.py b/nf_core/pipelines/bump_version.py index 664d7a22a..d8346e086 100644 --- a/nf_core/pipelines/bump_version.py +++ b/nf_core/pipelines/bump_version.py @@ -12,7 +12,7 @@ import nf_core.utils from nf_core.pipelines.rocrate import ROCrate -from nf_core.utils import Pipeline +from nf_core.utils import Pipeline, custom_yaml_dumper log = logging.getLogger(__name__) stderr = rich.console.Console(stderr=True, force_terminal=nf_core.utils.rich_force_colors()) @@ -257,7 +257,7 @@ def update_yaml_file(fn: Path, patterns: List[Tuple[str, str]], yaml_key: List[s if new_value != current_value: target[last_key] = new_value with open(fn, "w") as file: - yaml.dump(yaml_content, file) + yaml.dump(yaml_content, file, Dumper=custom_yaml_dumper()) log.info(f"Updated version in YAML file '{fn}'") log_change(str(current_value), str(new_value)) except KeyError as e: diff --git a/nf_core/pipelines/create/create.py b/nf_core/pipelines/create/create.py index 9c3db544f..62df45304 100644 --- a/nf_core/pipelines/create/create.py +++ b/nf_core/pipelines/create/create.py @@ -22,7 +22,7 @@ from nf_core.pipelines.create_logo import create_logo from nf_core.pipelines.lint_utils import run_prettier_on_file from nf_core.pipelines.rocrate import ROCrate -from nf_core.utils import NFCoreTemplateConfig, NFCoreYamlLintConfig +from nf_core.utils import NFCoreTemplateConfig, NFCoreYamlLintConfig, custom_yaml_dumper log = logging.getLogger(__name__) @@ -380,7 +380,7 @@ def render_template(self) -> None: if config_fn is not None and config_yml is not None: with open(str(config_fn), "w") as fh: config_yml.template = NFCoreTemplateConfig(**self.config.model_dump(exclude_none=True)) - yaml.safe_dump(config_yml.model_dump(exclude_none=True), fh) + yaml.dump(config_yml.model_dump(exclude_none=True), fh, Dumper=custom_yaml_dumper()) log.debug(f"Dumping pipeline template yml to pipeline config file '{config_fn.name}'") def fix_linting(self): @@ -410,7 +410,7 @@ def fix_linting(self): if config_fn is not None and nf_core_yml is not None: nf_core_yml.lint = NFCoreYamlLintConfig(**lint_config) with open(self.outdir / config_fn, "w") as fh: - yaml.dump(nf_core_yml.model_dump(exclude_none=True), fh, default_flow_style=False, sort_keys=False) + yaml.dump(nf_core_yml.model_dump(exclude_none=True), fh, Dumper=custom_yaml_dumper()) def make_pipeline_logo(self): """Fetch a logo for the new pipeline from the nf-core website""" diff --git a/tests/utils.py b/tests/utils.py index 022b91227..4c1c620ad 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -14,7 +14,7 @@ import nf_core.modules import nf_core.pipelines.create.create from nf_core import __version__ -from nf_core.utils import NFCoreTemplateConfig, NFCoreYamlConfig +from nf_core.utils import NFCoreTemplateConfig, NFCoreYamlConfig, custom_yaml_dumper TEST_DATA_DIR = Path(__file__).parent / "data" OLD_TRIMGALORE_SHA = "9b7a3bdefeaad5d42324aa7dd50f87bea1b04386" @@ -136,7 +136,7 @@ def create_tmp_pipeline(no_git: bool = False) -> Tuple[Path, Path, str, Path]: bump_version=None, ) with open(str(Path(pipeline_dir, ".nf-core.yml")), "w") as fh: - yaml.dump(nf_core_yml.model_dump(), fh) + yaml.dump(nf_core_yml.model_dump(), fh, Dumper=custom_yaml_dumper()) nf_core.pipelines.create.create.PipelineCreate( pipeline_name, "it is mine", "me", no_git=no_git, outdir=pipeline_dir, force=True From 709e67ff4e395419b3de91dcf1b9b242f7689241 Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Mon, 16 Dec 2024 11:46:35 +0100 Subject: [PATCH 46/63] Remove Dumpler from ruamel yaml --- nf_core/pipelines/bump_version.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nf_core/pipelines/bump_version.py b/nf_core/pipelines/bump_version.py index d8346e086..664d7a22a 100644 --- a/nf_core/pipelines/bump_version.py +++ b/nf_core/pipelines/bump_version.py @@ -12,7 +12,7 @@ import nf_core.utils from nf_core.pipelines.rocrate import ROCrate -from nf_core.utils import Pipeline, custom_yaml_dumper +from nf_core.utils import Pipeline log = logging.getLogger(__name__) stderr = rich.console.Console(stderr=True, force_terminal=nf_core.utils.rich_force_colors()) @@ -257,7 +257,7 @@ def update_yaml_file(fn: Path, patterns: List[Tuple[str, str]], yaml_key: List[s if new_value != current_value: target[last_key] = new_value with open(fn, "w") as file: - yaml.dump(yaml_content, file, Dumper=custom_yaml_dumper()) + yaml.dump(yaml_content, file) log.info(f"Updated version in YAML file '{fn}'") log_change(str(current_value), str(new_value)) except KeyError as e: From ac703bfed375f14c1c00798a9eba7260b0c57355 Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Mon, 16 Dec 2024 11:58:43 +0100 Subject: [PATCH 47/63] don't create rocrate file when we skip the feature --- nf_core/pipelines/create/create.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipelines/create/create.py b/nf_core/pipelines/create/create.py index 62df45304..1c1821793 100644 --- a/nf_core/pipelines/create/create.py +++ b/nf_core/pipelines/create/create.py @@ -367,7 +367,7 @@ def render_template(self) -> None: # Make a logo and save it, if it is a nf-core pipeline self.make_pipeline_logo() - if self.config.skip_features is None or "ro-crate" not in self.config.skip_features: + if self.config.skip_features is None or "rocrate" not in self.config.skip_features: # Create the RO-Crate metadata file rocrate_obj = ROCrate(self.outdir) rocrate_obj.create_rocrate(json_path=self.outdir / "ro-crate-metadata.json") From 13e553fca62efd06c810363625787396fe0e387c Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Mon, 16 Dec 2024 12:08:20 +0100 Subject: [PATCH 48/63] fix more prettier modifications form the template --- nf_core/pipeline-template/README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/nf_core/pipeline-template/README.md b/nf_core/pipeline-template/README.md index 2552a6481..4cd41de36 100644 --- a/nf_core/pipeline-template/README.md +++ b/nf_core/pipeline-template/README.md @@ -48,13 +48,13 @@ workflows use the "tube map" design for that. See https://nf-co.re/docs/contributing/design_guidelines#examples for examples. --> -{% if fastqc %}1. Read QC ([`FastQC`](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/)){% endif %} -{% if multiqc %}2. Present QC for raw reads ([`MultiQC`](http://multiqc.info/)){% endif %} +{%- if fastqc %}1. Read QC ([`FastQC`](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/)){% endif %} +{%- if multiqc %}2. Present QC for raw reads ([`MultiQC`](http://multiqc.info/)){% endif %} ## Usage > [!NOTE] -> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. {% if test_config %}Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data.{% endif %} +> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. {%- if test_config %}Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data.{% endif %} -{% if citations %} +{%- if citations %} An extensive list of references for the tools used by the pipeline can be found in the [`CITATIONS.md`](CITATIONS.md) file. -{% endif %} +{%- endif %} + {% if is_nfcore -%} You can cite the `nf-core` publication as follows: From d19e3e071e7a792354221664f0b0b0ba4e409625 Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Mon, 16 Dec 2024 12:11:49 +0100 Subject: [PATCH 49/63] don't try running pre-commit if code-linters or github are not used in the template --- nf_core/pipeline-template/nextflow_schema.json | 4 ++-- nf_core/pipelines/create/create.py | 13 +++++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/nf_core/pipeline-template/nextflow_schema.json b/nf_core/pipeline-template/nextflow_schema.json index 97359a1f9..e2aac58cc 100644 --- a/nf_core/pipeline-template/nextflow_schema.json +++ b/nf_core/pipeline-template/nextflow_schema.json @@ -243,10 +243,10 @@ { "$ref": "#/$defs/input_output_options" }, - {% if igenomes %}{ + {%- if igenomes %}{ "$ref": "#/$defs/reference_genome_options" },{% endif %} - {% if nf_core_configs %}{ + {%- if nf_core_configs %}{ "$ref": "#/$defs/institutional_config_options" },{% endif %} { diff --git a/nf_core/pipelines/create/create.py b/nf_core/pipelines/create/create.py index 1c1821793..bcc0fbd6b 100644 --- a/nf_core/pipelines/create/create.py +++ b/nf_core/pipelines/create/create.py @@ -267,10 +267,15 @@ def init_pipeline(self): if not self.no_git: self.git_init_pipeline() # Run prettier on files - current_dir = Path.cwd() - os.chdir(self.outdir) - run_prettier_on_file([str(f) for f in self.outdir.glob("**/*")]) - os.chdir(current_dir) + if ( + self.config.skip_features is None + or "code_linters" not in self.config.skip_features + or "github" not in self.config.skip_features + ): + current_dir = Path.cwd() + os.chdir(self.outdir) + run_prettier_on_file([str(f) for f in self.outdir.glob("**/*")]) + os.chdir(current_dir) if self.config.is_nfcore and not self.is_interactive: log.info( From 2c78c5ebc5fec773649e1f00ec5cc71f4c0f06a0 Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Mon, 16 Dec 2024 12:28:59 +0100 Subject: [PATCH 50/63] more template prittier fixing --- nf_core/pipeline-template/nextflow_schema.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nf_core/pipeline-template/nextflow_schema.json b/nf_core/pipeline-template/nextflow_schema.json index e2aac58cc..c28929b47 100644 --- a/nf_core/pipeline-template/nextflow_schema.json +++ b/nf_core/pipeline-template/nextflow_schema.json @@ -243,10 +243,12 @@ { "$ref": "#/$defs/input_output_options" }, - {%- if igenomes %}{ + {%- if igenomes %} + { "$ref": "#/$defs/reference_genome_options" },{% endif %} - {%- if nf_core_configs %}{ + {%- if nf_core_configs %} + { "$ref": "#/$defs/institutional_config_options" },{% endif %} { From d44bcdf7e2065bd3ac281b27bcb33800e9af602d Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Mon, 16 Dec 2024 13:06:36 +0100 Subject: [PATCH 51/63] more prettier fixes --- nf_core/pipeline-template/CITATIONS.md | 2 +- nf_core/pipeline-template/docs/output.md | 11 +++++------ nf_core/pipeline-template/docs/usage.md | 2 +- nf_core/pipelines/create/create.py | 14 +++++++++----- nf_core/pipelines/create/template_features.yml | 6 ++++++ 5 files changed, 22 insertions(+), 13 deletions(-) diff --git a/nf_core/pipeline-template/CITATIONS.md b/nf_core/pipeline-template/CITATIONS.md index 16da9a420..c355fd612 100644 --- a/nf_core/pipeline-template/CITATIONS.md +++ b/nf_core/pipeline-template/CITATIONS.md @@ -18,7 +18,7 @@ {%- endif %} -{% if multiqc %}- [MultiQC](https://pubmed.ncbi.nlm.nih.gov/27312411/) +{%- if multiqc %}- [MultiQC](https://pubmed.ncbi.nlm.nih.gov/27312411/) > Ewels P, Magnusson M, Lundin S, Käller M. MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics. 2016 Oct 1;32(19):3047-8. doi: 10.1093/bioinformatics/btw354. Epub 2016 Jun 16. PubMed PMID: 27312411; PubMed Central PMCID: PMC5039924. diff --git a/nf_core/pipeline-template/docs/output.md b/nf_core/pipeline-template/docs/output.md index 83d5d23fe..a9be6620e 100644 --- a/nf_core/pipeline-template/docs/output.md +++ b/nf_core/pipeline-template/docs/output.md @@ -2,7 +2,7 @@ ## Introduction -This document describes the output produced by the pipeline. {% if multiqc %}Most of the plots are taken from the MultiQC report, which summarises results at the end of the pipeline.{% endif %} +This document describes the output produced by the pipeline.{% if multiqc %} Most of the plots are taken from the MultiQC report, which summarises results at the end of the pipeline.{% endif %} 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. @@ -14,9 +14,8 @@ The pipeline is built using [Nextflow](https://www.nextflow.io/) and processes d {% if fastqc -%} -- [FastQC](#fastqc) - Raw read QC - {%- endif %} - {%- if multiqc %} +- [FastQC](#fastqc) - Raw read QC{% endif %} + {%- if multiqc -%} - [MultiQC](#multiqc) - Aggregate report describing results and QC from the whole pipeline {%- endif %} - [Pipeline information](#pipeline-information) - Report metrics generated during the workflow execution @@ -35,7 +34,7 @@ The pipeline is built using [Nextflow](https://www.nextflow.io/) and processes d [FastQC](http://www.bioinformatics.babraham.ac.uk/projects/fastqc/) gives general quality metrics about your sequenced reads. It provides information about the quality score distribution across your reads, per base sequence content (%A/T/G/C), adapter contamination and overrepresented sequences. For further reading and documentation see the [FastQC help pages](http://www.bioinformatics.babraham.ac.uk/projects/fastqc/Help/). -{%- endif %} +{%- endif -%} {% if multiqc -%} @@ -54,7 +53,7 @@ The pipeline is built using [Nextflow](https://www.nextflow.io/) and processes d [MultiQC](http://multiqc.info) is a visualization tool that generates a single HTML report summarising all samples in your project. Most of the pipeline QC results are visualised in the report and further statistics are available in the report data directory. Results generated by MultiQC collate pipeline QC from supported tools e.g. FastQC. The pipeline has special steps which also allow the software versions to be reported in the MultiQC output for future traceability. For more information about how to use MultiQC reports, see . -{%- endif %} +{%- endif -%} ### Pipeline information diff --git a/nf_core/pipeline-template/docs/usage.md b/nf_core/pipeline-template/docs/usage.md index fb7f8557c..bbc8a828c 100644 --- a/nf_core/pipeline-template/docs/usage.md +++ b/nf_core/pipeline-template/docs/usage.md @@ -115,7 +115,7 @@ It is a good idea to specify the pipeline version when running the pipeline on y First, go to the [{{ name }} releases page](https://github.com/{{ name }}/releases) and find the latest pipeline version - numeric only (eg. `1.3.1`). Then specify this when running the pipeline with `-r` (one hyphen) - eg. `-r 1.3.1`. Of course, you can switch to another version by changing the number after the `-r` flag. -This version number will be logged in reports when you run the pipeline, so that you'll know what you used when you look back in the future. {% if multiqc %}For example, at the bottom of the MultiQC reports.{% endif %} +This version number will be logged in reports when you run the pipeline, so that you'll know what you used when you look back in the future.{% if multiqc %} For example, at the bottom of the MultiQC reports.{% endif %} To further assist in reproducibility, you can use share and reuse [parameter files](#running-the-pipeline) to repeat pipeline runs with the same settings without having to write out a command with every single parameter. diff --git a/nf_core/pipelines/create/create.py b/nf_core/pipelines/create/create.py index bcc0fbd6b..4f90ca17f 100644 --- a/nf_core/pipelines/create/create.py +++ b/nf_core/pipelines/create/create.py @@ -267,10 +267,8 @@ def init_pipeline(self): if not self.no_git: self.git_init_pipeline() # Run prettier on files - if ( - self.config.skip_features is None - or "code_linters" not in self.config.skip_features - or "github" not in self.config.skip_features + if self.config.skip_features is None or not ( + "code_linters" in self.config.skip_features or "github" in self.config.skip_features ): current_dir = Path.cwd() os.chdir(self.outdir) @@ -415,7 +413,13 @@ def fix_linting(self): if config_fn is not None and nf_core_yml is not None: nf_core_yml.lint = NFCoreYamlLintConfig(**lint_config) with open(self.outdir / config_fn, "w") as fh: - yaml.dump(nf_core_yml.model_dump(exclude_none=True), fh, Dumper=custom_yaml_dumper()) + yaml.dump( + nf_core_yml.model_dump(exclude_none=True), + fh, + sort_keys=False, + default_flow_style=False, + Dumper=custom_yaml_dumper(), + ) def make_pipeline_logo(self): """Fetch a logo for the new pipeline from the nf-core website""" diff --git a/nf_core/pipelines/create/template_features.yml b/nf_core/pipelines/create/template_features.yml index 9841879e8..fa24debff 100644 --- a/nf_core/pipelines/create/template_features.yml +++ b/nf_core/pipelines/create/template_features.yml @@ -148,6 +148,10 @@ is_nfcore: - "docs/images/nf-core-{{short_name}}_logo_light.png" - "docs/images/nf-core-{{short_name}}_logo_dark.png" - ".github/ISSUE_TEMPLATE/bug_report.yml" + - ".github/CONTRIBUTING.md" + - ".github/PULL_REQUEST_TEMPLATE.md" + - "assets/email_template.txt" + - "docs/README.md" nextflow_config: - "manifest.name" - "manifest.homePage" @@ -445,6 +449,8 @@ rocrate: linting: files_warn: - "ro-crate-metadata.json" + files_unchanged: + - ".prettierignore" vscode: skippable_paths: - ".vscode" From 745df4deff2cf42fd6f2c2ba11e6911765684d99 Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Tue, 17 Dec 2024 14:33:17 +0100 Subject: [PATCH 52/63] use manifest.contributors names if available, otherwise default to manifest.author --- nf_core/utils.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/nf_core/utils.py b/nf_core/utils.py index dc208c0a7..e2b61329c 100644 --- a/nf_core/utils.py +++ b/nf_core/utils.py @@ -1327,13 +1327,20 @@ def load_tools_config(directory: Union[str, Path] = ".") -> Tuple[Optional[Path] # Retrieve information if template from config file is empty template = tools_config.get("template") config_template_keys = template.keys() if template is not None else [] + # Get author names from contributors first, then fallback to author + if "manifest.contributors" in wf_config: + contributors = wf_config["manifest.contributors"] + names = re.findall(r"name:'([^']+)'", contributors) + author_names = ", ".join(names) + else: + author_names = wf_config["manifest.author"].strip("'\"") if nf_core_yaml_config.template is None: # The .nf-core.yml file did not contain template information nf_core_yaml_config.template = NFCoreTemplateConfig( org="nf-core", name=wf_config["manifest.name"].strip("'\"").split("/")[-1], description=wf_config["manifest.description"].strip("'\""), - author=wf_config["manifest.author"].strip("'\""), + author=author_names, version=wf_config["manifest.version"].strip("'\""), outdir=str(directory), is_nfcore=True, @@ -1344,7 +1351,7 @@ def load_tools_config(directory: Union[str, Path] = ".") -> Tuple[Optional[Path] org=tools_config["template"].get("prefix", tools_config["template"].get("org", "nf-core")), name=tools_config["template"].get("name", wf_config["manifest.name"].strip("'\"").split("/")[-1]), description=tools_config["template"].get("description", wf_config["manifest.description"].strip("'\"")), - author=tools_config["template"].get("author", wf_config["manifest.author"].strip("'\"")), + author=tools_config["template"].get("author", author_names), version=tools_config["template"].get("version", wf_config["manifest.version"].strip("'\"")), outdir=tools_config["template"].get("outdir", str(directory)), skip_features=tools_config["template"].get("skip", tools_config["template"].get("skip_features")), From ac7fd48f61fd2eb712c86dfea839834353a5181d Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Tue, 17 Dec 2024 13:35:21 +0000 Subject: [PATCH 53/63] [automated] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 603dd664c..01abde0a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ ### General - Add missing p ([#3357](https://github.com/nf-core/tools/pull/3357)) +- Use `manifest.contributors` names if available, otherwise default to `manifest.author` ([#3362](https://github.com/nf-core/tools/pull/3362)) ### Version updates From 767618c3ed54b6a88f28332b85a406866af5c703 Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Tue, 17 Dec 2024 15:05:44 +0100 Subject: [PATCH 54/63] properly parse the names form manifest.contributors --- nf_core/pipelines/rocrate.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/nf_core/pipelines/rocrate.py b/nf_core/pipelines/rocrate.py index bc868273c..f87cc7d8d 100644 --- a/nf_core/pipelines/rocrate.py +++ b/nf_core/pipelines/rocrate.py @@ -270,20 +270,16 @@ def add_main_authors(self, wf_file: rocrate.model.entity.Entity) -> None: authors = [] if "manifest.author" in self.pipeline_obj.nf_config: authors.extend([a.strip() for a in self.pipeline_obj.nf_config["manifest.author"].split(",")]) - if "manifest.contributor" in self.pipeline_obj.nf_config: - authors.extend( - [ - c.get("name", "").strip() - for c in self.pipeline_obj.nf_config["manifest.contributor"] - if "name" in c - ] - ) + if "manifest.contributors" in self.pipeline_obj.nf_config: + contributors = self.pipeline_obj.nf_config["manifest.contributors"] + names = re.findall(r"name:'([^']+)'", contributors) + authors.extend(names) if not authors: raise KeyError("No authors found") # add manifest authors as maintainer to crate except KeyError: - log.error("No author or contributor fields found in manifest of nextflow.config") + log.error("No author or contributors fields found in manifest of nextflow.config") return # remove duplicates authors = list(set(authors)) From 5ecf5837f497ad7b30e98f1a286f28ae99c23988 Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Tue, 17 Dec 2024 16:09:46 +0100 Subject: [PATCH 55/63] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01abde0a6..3365226de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ - Add missing p ([#3357](https://github.com/nf-core/tools/pull/3357)) - Use `manifest.contributors` names if available, otherwise default to `manifest.author` ([#3362](https://github.com/nf-core/tools/pull/3362)) +- Properly parse the names form `manifest.contributors` ([#3364](https://github.com/nf-core/tools/pull/3364)) ### Version updates From dc369ac03ba658bae7ce155e6e3b0366b0c01853 Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Thu, 19 Dec 2024 15:36:45 +0100 Subject: [PATCH 56/63] LICENSE copyright to nf-core community, lint LICENSE file is a warning instead of a failure --- nf_core/pipeline-template/LICENSE | 2 +- nf_core/pipelines/lint/files_unchanged.py | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/nf_core/pipeline-template/LICENSE b/nf_core/pipeline-template/LICENSE index 9fc4e61c3..306087456 100644 --- a/nf_core/pipeline-template/LICENSE +++ b/nf_core/pipeline-template/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) {{ author }} +Copyright (c) The nf-core community Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/nf_core/pipelines/lint/files_unchanged.py b/nf_core/pipelines/lint/files_unchanged.py index 300b3674b..8f936acb9 100644 --- a/nf_core/pipelines/lint/files_unchanged.py +++ b/nf_core/pipelines/lint/files_unchanged.py @@ -62,6 +62,7 @@ def files_unchanged(self) -> Dict[str, Union[List[str], bool]]: passed: List[str] = [] failed: List[str] = [] + warned: List[str] = [] ignored: List[str] = [] fixed: List[str] = [] could_fix: bool = False @@ -173,6 +174,12 @@ def _tf(file_path: Union[str, Path]) -> Path: shutil.copy(_tf(f), _pf(f)) passed.append(f"`{f}` matches the template") fixed.append(f"`{f}` overwritten with template file") + elif f.name in ["LICENSE", "LICENSE.md", "LICENCE", "LICENCE.md"]: + # Report LICENSE as a warning since we are not using the mainfest.author names + # TODO: Lint the content of the LICENSE file except the line containing author names + # to allow for people to opt-in listing author/maintainer names instead of using the "nf-core community" + warned.append(f"`{f}` does not match the template") + could_fix = True else: failed.append(f"`{f}` does not match the template") could_fix = True @@ -217,4 +224,11 @@ def _tf(file_path: Union[str, Path]) -> Path: # cleaning up temporary dir shutil.rmtree(tmp_dir) - return {"passed": passed, "failed": failed, "ignored": ignored, "fixed": fixed, "could_fix": could_fix} + return { + "passed": passed, + "failed": failed, + "warned": warned, + "ignored": ignored, + "fixed": fixed, + "could_fix": could_fix, + } From 05b1f846960bcd43b3bdf3f0065101362df95b1e Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Thu, 19 Dec 2024 14:50:33 +0000 Subject: [PATCH 57/63] [automated] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01abde0a6..d5480f570 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Use outputs instead of the environment to pass around values between steps in the Download Test Action ([#3351](https://github.com/nf-core/tools/pull/3351)) - Fix pre commit template ([#3358](https://github.com/nf-core/tools/pull/3358)) +- set LICENSE copyright to nf-core community ([#3366](https://github.com/nf-core/tools/pull/3366)) ### Download From e00679f1d1ee47fdbe29e30cb57fe780c1555cfe Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Thu, 19 Dec 2024 15:52:57 +0100 Subject: [PATCH 58/63] update changelog --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d5480f570..a281ba959 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,12 +6,14 @@ - Use outputs instead of the environment to pass around values between steps in the Download Test Action ([#3351](https://github.com/nf-core/tools/pull/3351)) - Fix pre commit template ([#3358](https://github.com/nf-core/tools/pull/3358)) -- set LICENSE copyright to nf-core community ([#3366](https://github.com/nf-core/tools/pull/3366)) +- Set LICENSE copyright to nf-core community ([#3366](https://github.com/nf-core/tools/pull/3366)) ### Download ### Linting +- Linting of pipeline LICENSE file is a warning to allow for autor/maintainer names ([#3366](https://github.com/nf-core/tools/pull/3366)) + ### Modules - fix including modules.config ([#3356](https://github.com/nf-core/tools/pull/3356)) From 136418f0fd844a77c9aeb6f36f8f14f77bcf8bba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlia=20Mir=20Pedrol?= Date: Fri, 20 Dec 2024 10:06:27 +0100 Subject: [PATCH 59/63] Apply suggestions from code review Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> --- CHANGELOG.md | 2 +- nf_core/pipelines/lint/files_unchanged.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a281ba959..39b937943 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ ### Linting -- Linting of pipeline LICENSE file is a warning to allow for autor/maintainer names ([#3366](https://github.com/nf-core/tools/pull/3366)) +- Linting of pipeline LICENSE file is a warning to allow for author/maintainer names ([#3366](https://github.com/nf-core/tools/pull/3366)) ### Modules diff --git a/nf_core/pipelines/lint/files_unchanged.py b/nf_core/pipelines/lint/files_unchanged.py index 8f936acb9..c1c3acd31 100644 --- a/nf_core/pipelines/lint/files_unchanged.py +++ b/nf_core/pipelines/lint/files_unchanged.py @@ -175,7 +175,7 @@ def _tf(file_path: Union[str, Path]) -> Path: passed.append(f"`{f}` matches the template") fixed.append(f"`{f}` overwritten with template file") elif f.name in ["LICENSE", "LICENSE.md", "LICENCE", "LICENCE.md"]: - # Report LICENSE as a warning since we are not using the mainfest.author names + # Report LICENSE as a warning since we are not using the manifest.author names # TODO: Lint the content of the LICENSE file except the line containing author names # to allow for people to opt-in listing author/maintainer names instead of using the "nf-core community" warned.append(f"`{f}` does not match the template") From 304728c3ce41b7c932b8f4b2058868a1d165ece2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlia=20Mir=20Pedrol?= Date: Fri, 20 Dec 2024 09:15:53 +0000 Subject: [PATCH 60/63] use pipeline team in license for non-nf-core pipelines --- nf_core/pipeline-template/LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/LICENSE b/nf_core/pipeline-template/LICENSE index 306087456..29e40a04d 100644 --- a/nf_core/pipeline-template/LICENSE +++ b/nf_core/pipeline-template/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) The nf-core community +Copyright (c) {% if is_nfcore %} The nf-core community {% else %} The {{ short_name }} team {% endif %} Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From a8578f0c2586a40b1cc1998a49ede1d3bca94aef Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Fri, 20 Dec 2024 10:49:53 +0100 Subject: [PATCH 61/63] bump to 3.1.1 for release --- .gitpod.yml | 2 +- CHANGELOG.md | 13 ++----------- setup.py | 2 +- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index d5948695b..db31d01be 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,4 +1,4 @@ -image: nfcore/gitpod:dev +image: nfcore/gitpod:latest tasks: - name: install current state of nf-core/tools and setup pre-commit command: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 49386c783..926535077 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,33 +1,24 @@ # nf-core/tools: Changelog -## v3.1.1dev +## [v3.1.1 - Brass Boxfish Patch](https://github.com/nf-core/tools/releases/tag/3.1.1) - [2024-12-20] ### Template - Use outputs instead of the environment to pass around values between steps in the Download Test Action ([#3351](https://github.com/nf-core/tools/pull/3351)) - Fix pre commit template ([#3358](https://github.com/nf-core/tools/pull/3358)) - Set LICENSE copyright to nf-core community ([#3366](https://github.com/nf-core/tools/pull/3366)) - -### Download +- fix including modules.config ([#3356](https://github.com/nf-core/tools/pull/3356)) ### Linting - Linting of pipeline LICENSE file is a warning to allow for author/maintainer names ([#3366](https://github.com/nf-core/tools/pull/3366)) -### Modules - -- fix including modules.config ([#3356](https://github.com/nf-core/tools/pull/3356)) - -### Subworkflows - ### General - Add missing p ([#3357](https://github.com/nf-core/tools/pull/3357)) - Use `manifest.contributors` names if available, otherwise default to `manifest.author` ([#3362](https://github.com/nf-core/tools/pull/3362)) - Properly parse the names form `manifest.contributors` ([#3364](https://github.com/nf-core/tools/pull/3364)) -### 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 b5c5de9a4..5617520e9 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import find_packages, setup -version = "3.1.1dev" +version = "3.1.1" with open("README.md") as f: readme = f.read() From 8aeb62970ae5e7c49d03d5422e287f02b7dd7d8c Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Fri, 20 Dec 2024 11:01:51 +0100 Subject: [PATCH 62/63] small modification of license, adding pipeline team --- nf_core/pipeline-template/LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/LICENSE b/nf_core/pipeline-template/LICENSE index 29e40a04d..97fe7b2d3 100644 --- a/nf_core/pipeline-template/LICENSE +++ b/nf_core/pipeline-template/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) {% if is_nfcore %} The nf-core community {% else %} The {{ short_name }} team {% endif %} +Copyright (c) The {{ name }} team Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 82eccbe48efa99b5a659b4e00b7a6e90b58edd71 Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Fri, 20 Dec 2024 13:10:55 +0100 Subject: [PATCH 63/63] don't lint ro-crate file --- nf_core/pipeline-template/.editorconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nf_core/pipeline-template/.editorconfig b/nf_core/pipeline-template/.editorconfig index c78ec8e96..eccca026e 100644 --- a/nf_core/pipeline-template/.editorconfig +++ b/nf_core/pipeline-template/.editorconfig @@ -35,3 +35,7 @@ indent_size = unset # ignore python and markdown [*.{py,md}] indent_style = unset + +# ignore ro-crate metadata files +[**/ro-crate-metadata.json] +insert_final_newline = unset