From 03da0ce8e58b14775a99cfeaa60165f6d4517c1a Mon Sep 17 00:00:00 2001 From: Till Englert Date: Fri, 3 May 2024 14:17:49 +0200 Subject: [PATCH 1/7] update subworkflow utils --- modules.json | 2 +- subworkflows/nf-core/utils_nfcore_pipeline/main.nf | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/modules.json b/modules.json index 09fbeec0..324935cb 100644 --- a/modules.json +++ b/modules.json @@ -27,7 +27,7 @@ }, "utils_nfcore_pipeline": { "branch": "master", - "git_sha": "5caf7640a9ef1d18d765d55339be751bb0969dfa", + "git_sha": "92de218a329bfc9a9033116eb5f65fd270e72ba3", "installed_by": ["subworkflows"] }, "utils_nfvalidation_plugin": { diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf index a8b55d6f..14558c39 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf +++ b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf @@ -65,9 +65,15 @@ def checkProfileProvided(nextflow_cli_args) { // Citation string for pipeline // def workflowCitation() { + def temp_doi_ref = "" + String[] manifest_doi = workflow.manifest.doi.tokenize(",") + // Using a loop to handle multiple DOIs + // Removing `https://doi.org/` to handle pipelines using DOIs vs DOI resolvers + // Removing ` ` since the manifest.doi is a string and not a proper list + for (String doi_ref: manifest_doi) temp_doi_ref += " https://doi.org/${doi_ref.replace('https://doi.org/', '').replace(' ', '')}\n" return "If you use ${workflow.manifest.name} for your analysis please cite:\n\n" + "* The pipeline\n" + - " ${workflow.manifest.doi}\n\n" + + temp_doi_ref + "\n" + "* The nf-core framework\n" + " https://doi.org/10.1038/s41587-020-0439-x\n\n" + "* Software dependencies\n" + From d6abf0021d9f8506e1467488fc54a2d3f3c79f1c Mon Sep 17 00:00:00 2001 From: Till Englert Date: Wed, 8 May 2024 10:21:18 +0200 Subject: [PATCH 2/7] update nf-test to latest version --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 32712ef2..495ea303 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ on: env: NXF_ANSI_LOG: false - NFTEST_VER: "0.7.3" + NFTEST_VER: "0.8.4" concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} From 5300d5a969d736c462443e389c29f9ec4b338f83 Mon Sep 17 00:00:00 2001 From: Till Englert Date: Wed, 8 May 2024 10:28:09 +0200 Subject: [PATCH 3/7] code review --- .github/workflows/ci.yml | 44 ++++++++++++---------------------------- .nf-core.yml | 1 - 2 files changed, 13 insertions(+), 32 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 495ea303..4c76f50a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,47 +3,30 @@ name: nf-core CI on: push: branches: - - "dev" + - dev pull_request: - branches: - - "dev" - - "master" release: - types: - - "published" + types: [published] env: NXF_ANSI_LOG: false NFTEST_VER: "0.8.4" concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + group: "{% raw %}${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}{% endraw %}" cancel-in-progress: true jobs: - define_nxf_versions: - name: Choose nextflow versions to test against depending on target branch - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.nxf_versions.outputs.matrix }} - steps: - - id: nxf_versions - run: | - if [[ "${{ github.event_name }}" == "pull_request" && "${{ github.base_ref }}" == "dev" && "${{ matrix.NXF_VER }}" != "latest-everything" ]]; then - echo matrix='["latest-everything"]' | tee -a $GITHUB_OUTPUT - else - echo matrix='["latest-everything", "23.04.0"]' | tee -a $GITHUB_OUTPUT - fi - test_profile_standard: name: nf-test with standard profiles - needs: define_nxf_versions runs-on: ubuntu-latest strategy: fail-fast: false matrix: - NXF_VER: ${{ fromJson(needs.define_nxf_versions.outputs.matrix) }} - tags: + NXF_VER: + - "23.04.0" + - "latest-everything" + profile: - "test" - "test_model_information" - "test_mouse_all_pep_lengths" @@ -53,8 +36,6 @@ jobs: - "test_mhcflurry" - "test_mhcnuggets_1" - "test_mhcnuggets_2" - profile: - - "docker" steps: - name: Check out pipeline code @@ -92,7 +73,7 @@ jobs: - name: Run nf-test run: | - nf-test test --tag ${{ matrix.tags }} --profile ${{ matrix.tags }},${{ matrix.profile }} --junitxml=test.xml + nf-test test --tag ${{ matrix.profile }} --profile ${{ matrix.profile }},docker --junitxml=test.xml - name: Output log on failure if: failure() @@ -110,13 +91,14 @@ jobs: name: nf-test with profiles needing entrez downloads # Only run on PRs from branches of nf-core/metapep repository or on push if this is the nf-core dev branch (merged PRs) # (GitHub secrets are not accessible for workflows from forks) - if: ${{ github.event.pull_request.head.repo.full_name == 'nf-core/metapep' || (github.event_name == 'push' && github.repository == 'nf-core/metapep') }} - needs: define_nxf_versions + if: "{% raw %}${{ github.event.pull_request.head.repo.full_name == 'nf-core/metapep' || (github.event_name == 'push' && github.repository == 'nf-core/metapep') }}{% endraw %}" runs-on: ubuntu-latest strategy: fail-fast: false matrix: - NXF_VER: ${{ fromJson(needs.define_nxf_versions.outputs.matrix) }} + NXF_VER: + - "23.04.0" + - "latest-everything" tags: - "test_all" - "test_mouse" @@ -164,7 +146,7 @@ jobs: NCBI_EMAIL: ${{ secrets.NCBI_EMAIL }} NCBI_KEY: ${{ secrets.NCBI_KEY }} run: | - nf-test test --tag ${{ matrix.tags }} --profile ${{ matrix.tags }},${{ matrix.profile }} --junitxml=test.xml + nf-test test --tag ${{ matrix.profile }} --profile ${{ matrix.profile }},docker --junitxml=test.xml - name: Output log on failure if: failure() diff --git a/.nf-core.yml b/.nf-core.yml index 6078dcf6..778ae193 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -2,4 +2,3 @@ repository_type: pipeline lint: files_exist: - conf/igenomes.config - actions_ci: False From f711619a7e60d75feeb273cec8b2b9cbb1519231 Mon Sep 17 00:00:00 2001 From: Till E <64961761+tillenglert@users.noreply.github.com> Date: Wed, 8 May 2024 10:28:35 +0200 Subject: [PATCH 4/7] Update .github/workflows/ci.yml Co-authored-by: Sabrina Krakau --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4c76f50a..dc3ea936 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -87,7 +87,7 @@ jobs: with: report_paths: "*.xml" - profile_download: + test_profile_download: name: nf-test with profiles needing entrez downloads # Only run on PRs from branches of nf-core/metapep repository or on push if this is the nf-core dev branch (merged PRs) # (GitHub secrets are not accessible for workflows from forks) From 34759b44dcc5752ef0e834386605fdfe2df64747 Mon Sep 17 00:00:00 2001 From: Till Englert Date: Wed, 8 May 2024 10:30:11 +0200 Subject: [PATCH 5/7] forgot to change tag to profile --- .github/workflows/ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dc3ea936..bac626f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,13 +99,11 @@ jobs: NXF_VER: - "23.04.0" - "latest-everything" - tags: + profile: - "test_all" - "test_mouse" - "test_taxa_only" - "test_taxa_specific_assembly" - profile: - - "docker" steps: - name: Check out pipeline code From 7045007cec31e0943f1d0c7bcc69a0a27495d8e2 Mon Sep 17 00:00:00 2001 From: Till Englert Date: Wed, 8 May 2024 10:36:10 +0200 Subject: [PATCH 6/7] Remove the checking out of test data --- .github/workflows/ci.yml | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bac626f0..7f99df7e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,23 +41,6 @@ jobs: - name: Check out pipeline code uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - - name: Check out test data - uses: actions/checkout@v3 - with: - repository: nf-core/test-datasets - ref: metapep - path: test-datasets/ - fetch-depth: 1 - - - name: Replace remote paths in samplesheets - run: | - for f in ${{ github.workspace }}/test-datasets/samplesheets/v1.0/*.csv; do - sed -i "s=https://github.com/nf-core/test-datasets/tree/metapep/testdata/=${{ github.workspace }}/test-datasets/=g" $f - echo "========== $f ============" - cat $f - echo "========================================" - done; - - name: Install Nextflow uses: nf-core/setup-nextflow@v1 with: @@ -109,23 +92,6 @@ jobs: - name: Check out pipeline code uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - - name: Check out test data - uses: actions/checkout@v3 - with: - repository: nf-core/test-datasets - ref: metapep - path: test-datasets/ - fetch-depth: 1 - - - name: Replace remote paths in samplesheets - run: | - for f in ${{ github.workspace }}/test-datasets/samplesheets/v1.0/*.csv; do - sed -i "s=https://github.com/nf-core/test-datasets/tree/metapep/testdata/=${{ github.workspace }}/test-datasets/=g" $f - echo "========== $f ============" - cat $f - echo "========================================" - done; - - name: Install Nextflow uses: nf-core/setup-nextflow@v1 with: From 44e2b0700a3103411c828845bc6443c5d331de4b Mon Sep 17 00:00:00 2001 From: Till Englert Date: Wed, 8 May 2024 10:50:17 +0200 Subject: [PATCH 7/7] remove "raw"/"endraw" --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f99df7e..bac6d81d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ env: NFTEST_VER: "0.8.4" concurrency: - group: "{% raw %}${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}{% endraw %}" + group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}" cancel-in-progress: true jobs: @@ -74,7 +74,7 @@ jobs: name: nf-test with profiles needing entrez downloads # Only run on PRs from branches of nf-core/metapep repository or on push if this is the nf-core dev branch (merged PRs) # (GitHub secrets are not accessible for workflows from forks) - if: "{% raw %}${{ github.event.pull_request.head.repo.full_name == 'nf-core/metapep' || (github.event_name == 'push' && github.repository == 'nf-core/metapep') }}{% endraw %}" + if: "${{ github.event.pull_request.head.repo.full_name == 'nf-core/metapep' || (github.event_name == 'push' && github.repository == 'nf-core/metapep') }}" runs-on: ubuntu-latest strategy: fail-fast: false