Skip to content

Template update 3.3.2 of nf-core an other minor updates - #566

Merged
ypriverol merged 12 commits into
bigbio:devfrom
ypriverol:dev
Jul 18, 2025
Merged

ypriverol merged 12 commits into
bigbio:devfrom
ypriverol:dev

Conversation

@ypriverol

@ypriverol ypriverol commented Jul 17, 2025 •

Copy link
Copy Markdown
Contributor

User description

PR checklist

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the pipeline conventions in the contribution docs
  • If necessary, also make a PR on the bigbio/quantms branch on the nf-core/test-datasets repository.
  • Make sure your code lints (nf-core pipelines lint).
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
  • Check for unexpected warnings in debug mode (nextflow run . -profile debug,test,docker --outdir <OUTDIR>).
  • Usage Documentation in docs/usage.md is updated.
  • Output Documentation in docs/output.md is updated.
  • CHANGELOG.md is updated.
  • README.md is updated (including new tool citations and authors/contributors).

PR Type

Enhancement


Description

  • Update nf-core template to version 3.3.2

  • Add nf-test framework for testing infrastructure

  • Set default DIA precursor/fragment mass limits

  • Update GitHub Actions workflows and dependencies


Changes diagram

flowchart LR
  A["Template 3.2.1"] --> B["Template 3.3.2"]
  B --> C["nf-test Framework"]
  B --> D["Updated Workflows"]
  B --> E["DIA Mass Limits"]
  C --> F["Test Infrastructure"]
  D --> G["GitHub Actions"]
  E --> H["Default Parameters"]
Loading

Changes walkthrough 📝

Relevant files
Configuration changes
4 files
.nf-core.yml
Update nf-core version to 3.3.2                                                   
+1/-1     
nextflow.config
Set DIA mass limits and update plugins                                     
+20/-8   
.pre-commit-config.yaml
Update pre-commit hooks configuration                                       
+20/-6   
.editorconfig
Remove ro-crate metadata configuration                                     
+0/-4     
Tests
8 files
nf-test.yml
Add nf-test workflow for testing                                                 
+143/-0 
action.yml
Create nf-test action for CI                                                         
+109/-0 
action.yml
Add test sharding functionality                                                   
+69/-0   
nf-test.config
Configure nf-test framework settings                                         
+24/-0   
default.nf.test
Add default pipeline test                                                               
+35/-0   
nextflow.config
Configure test environment                                                             
+14/-0   
.nftignore
Define test ignore patterns                                                           
+11/-0   
tags.yml
Add fastqc test tags                                                                         
+2/-0     
Enhancement
9 files
ci.yml
Update CI workflow dependencies                                                   
+1/-1     
linting.yml
Update linting workflow configuration                                       
+7/-10   
fix-linting.yml
Update fix-linting workflow                                                           
+2/-2     
fix_linting.yml
Add duplicate fix-linting workflow                                             
+89/-0   
clean-up.yml
Update clean-up workflow dependencies                                       
+1/-1     
linting_comment.yml
Update linting comment workflow                                                   
+2/-2     
template-version-comment.yml
Add template version comment workflow                                       
+46/-0   
template_version_comment.yml
Update existing template version workflow                               
+1/-1     
base.config
Add GPU support and error handling                                             
+5/-1     
Formatting
2 files
.prettierrc.yml
Add prettier configuration file                                                   
+5/-0     
main.nf
Remove trailing whitespace                                                             
+0/-1     
Documentation
3 files
CONTRIBUTING.md
Update contributing guidelines                                                     
+1/-1     
output.md
Update output documentation formatting                                     
+0/-3     
meta.yml
Update multiqc metadata format                                                     
+62/-48 
Dependencies
4 files
modules.json
Update module versions                                                                     
+2/-2     
environment.yml
Update multiqc version to 1.29                                                     
+3/-1     
main.nf
Update multiqc container version                                                 
+2/-2     
nextflow.config
Update nf-schema plugin version                                                   
+1/-1     
Miscellaneous
1 files
ro-crate-metadata.json
Update metadata and workflow references                                   
+9/-9     

Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • @coderabbitai

    coderabbitai Bot commented Jul 17, 2025

    Copy link
    Copy Markdown
    Contributor

    Important

    Review skipped

    Auto reviews are disabled on base/target branches other than the default branch.

    Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

    You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


    Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

    ❤️ Share
    🪧 Tips

    Chat

    There are 3 ways to chat with CodeRabbit:

    • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
      • I pushed a fix in commit <commit_id>, please review it.
      • Explain this complex logic.
      • Open a follow-up GitHub issue for this discussion.
    • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
      • @coderabbitai explain this code block.
      • @coderabbitai modularize this function.
    • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
      • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
      • @coderabbitai read src/utils.ts and explain its main purpose.
      • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
      • @coderabbitai help me debug CodeRabbit configuration file.

    Support

    Need help? Create a ticket on our support page for assistance with any issues or questions.

    Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

    CodeRabbit Commands (Invoked using PR comments)

    • @coderabbitai pause to pause the reviews on a PR.
    • @coderabbitai resume to resume the paused reviews.
    • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
    • @coderabbitai full review to do a full review from scratch and review all the files again.
    • @coderabbitai summary to regenerate the summary of the PR.
    • @coderabbitai generate docstrings to generate docstrings for this PR.
    • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
    • @coderabbitai resolve resolve all the CodeRabbit review comments.
    • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
    • @coderabbitai help to get help.

    Other keywords and placeholders

    • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
    • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
    • Add @coderabbitai anywhere in the PR title to generate the title automatically.

    CodeRabbit Configuration File (.coderabbit.yaml)

    • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
    • Please see the configuration documentation for more information.
    • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

    Documentation and Community

    • Visit our Documentation for detailed information on how to use CodeRabbit.
    • Join our Discord Community to get help, request features, and share feedback.
    • Follow us on X/Twitter for updates and announcements.

    @qodo-code-review

    Copy link
    Copy Markdown
    Contributor

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 4 🔵🔵🔵🔵⚪
    🧪 PR contains tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Duplicate Configuration

    The manifest section contains duplicate version and nextflowVersion entries with different values, which could cause configuration conflicts.

    version         = '1.4.0dev'
    doi             = ''
    nextflowVersion = '!>=24.10.5'
    version         = '1.6.0dev'
    doi             = '10.5281/zenodo.7754148'
    Duplicate Steps

    The workflow contains duplicate steps for handling linting error reactions, which could cause unexpected behavior or workflow failures.

    - name: react if linting errors were not fixed
      if: steps.commit-and-push.outcome  == 'failure'
      uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
      with:
        issue-number: ${{ github.event.issue.number }}
        body: |
          @${{ github.actor }} I tried to fix the linting errors, but it didn't work. Please fix them manually.
          See [CI log](https://github.com/bigbio/quantms/actions/runs/${{ github.run_id }}) for more details.
    Error Handling

    The shell script has potential issues with error handling and variable parsing that could cause CI failures in edge cases.

    nftest_output=$(nf-test test \
      --profile +docker \
      $(if [ -n "${{ inputs.tags }}" ]; then echo "--tag ${{ inputs.tags }}"; fi) \
      --dry-run \
      --ci \
      --changed-since HEAD^) || {
        echo "nf-test command failed with exit code $?"
        echo "Full output: $nftest_output"
        exit 1
    }
    echo "nf-test dry-run output: $nftest_output"
    
    # Default values for shard and total_shards
    shard="[]"
    total_shards=0
    
    # Check if there are related tests
    if echo "$nftest_output" | grep -q 'No tests to execute'; then
      echo "No related tests found."
    else
      # Extract the number of related tests
      number_of_shards=$(echo "$nftest_output" | sed -n 's|.*Executed \([0-9]*\) tests.*|\1|p')
      if [[ -n "$number_of_shards" && "$number_of_shards" -gt 0 ]]; then
        shards_to_run=$(( $number_of_shards < ${{ inputs.max_shards }} ? $number_of_shards : ${{ inputs.max_shards }} ))
        shard=$(seq 1 "$shards_to_run" | jq -R . | jq -c -s .)
        total_shards="$shards_to_run"
      else
        echo "Unexpected output format. Falling back to default values."
      fi
    fi

    @qodo-code-review

    qodo-code-review Bot commented Jul 17, 2025 •

    Copy link
    Copy Markdown
    Contributor

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Impact
    Possible issue
    Fix duplicate step names

    There's a duplicate step with the same name "react if linting errors were not
    fixed" which will cause workflow parsing issues. The second step should have a
    unique name like "comment if linting errors were not fixed".

    .github/workflows/fix_linting.yml [82-89]

    -- name: react if linting errors were not fixed
    +- name: comment if linting errors were not fixed
       if: steps.commit-and-push.outcome  == 'failure'
       uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
       with:
         issue-number: ${{ github.event.issue.number }}
         body: |
           @${{ github.actor }} I tried to fix the linting errors, but it didn't work. Please fix them manually.
           See [CI log](https://github.com/bigbio/quantms/actions/runs/${{ github.run_id }}) for more details.
    • Apply / Chat
    Suggestion importance[1-10]: 9

    __

    Why: The suggestion correctly identifies duplicate step names within the same job, which would cause a GitHub Actions workflow parsing error, and provides a valid fix.

    High
    Remove duplicate manifest entries

    There are duplicate entries for nextflowVersion, version, and doi parameters in
    the manifest block. This creates ambiguity and the second set of values will
    override the first ones.

    nextflow.config [505-510]

    -nextflowVersion = '!>=24.10.5'
    -version         = '1.4.0dev'
    -doi             = ''
     nextflowVersion = '!>=24.10.5'
     version         = '1.6.0dev'
     doi             = '10.5281/zenodo.7754148'
    • Apply / Chat
    Suggestion importance[1-10]: 7

    __

    Why: The suggestion correctly identifies duplicate keys in the manifest block, which is poor practice and can lead to confusion, and proposes a correct cleanup.

    Medium
    General
    Improve error handling robustness

    The variable nftest_output may not be properly captured if the command fails
    before assignment. Consider using a temporary file or restructuring the error
    handling to ensure the output is always available for debugging.

    .github/actions/get-shards/action.yml [32-41]

    +set +e
     nftest_output=$(nf-test test \
       --profile +docker \
       $(if [ -n "${{ inputs.tags }}" ]; then echo "--tag ${{ inputs.tags }}"; fi) \
       --dry-run \
       --ci \
    -  --changed-since HEAD^) || {
    -    echo "nf-test command failed with exit code $?"
    -    echo "Full output: $nftest_output"
    -    exit 1
    -}
    +  --changed-since HEAD^ 2>&1)
    +exit_code=$?
    +set -e
    +if [ $exit_code -ne 0 ]; then
    +  echo "nf-test command failed with exit code $exit_code"
    +  echo "Full output: $nftest_output"
    +  exit 1
    +fi
    • Apply / Chat
    Suggestion importance[1-10]: 7

    __

    Why: The suggestion correctly points out a potential issue where command output might be lost on failure, and proposes a more robust error handling pattern to ensure debug information is always captured.

    Medium
    • Update

    @ypriverol ypriverol changed the title TEmplate update 3.3.2 of nf-core an other minor updates Template update 3.3.2 of nf-core an other minor updates Jul 17, 2025
    @ypriverol
    ypriverol requested review from daichengxin and enryH July 17, 2025 19:47
    @ypriverol
    ypriverol merged commit e30115c into bigbio:dev Jul 18, 2025
    Comment thread conf/base.config Resolved

    Copy link
    Copy Markdown
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    It looks like you have two files now and forgot to delete one

    Copy link
    Copy Markdown
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Same here?

    Comment thread nextflow.config
    mainScript = 'main.nf'
    defaultBranch = 'master'
    nextflowVersion = '!>=24.10.5'
    version = '1.4.0dev'

    Copy link
    Copy Markdown
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Doi duplicated

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Development

    Successfully merging this pull request may close these issues.

    4 participants