Repository navigation
Release 1.6.0 #574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release 1.6.0 #574
Changes from all commits
938d85e
f046a29
e7d68b5
808893e
c4aa9be
adc69be
55d6e35
ccb7db2
9e96dc0
a909212
284680a
5fecb19
b99a4f8
2ffd146
40c1968
3673508
e161e06
aa5d738
2e3af55
eee9941
79a0118
e30115c
c99940b
1ca60d6
e0feb1f
8bc8f9b
c99963c
2c5d148
c439836
a60b95a
980dc2f
bd04ccd
c3489c2
18f6bca
b1c6ede
a1797df
ef25efe
acd056e
fe2ab83
bf52325
123f1c5
a5980cc
0b00cb3
3ab49c8
73b737b
164b855
fa2710f
1bc9d79
312d569
868264d
e058299
d93d4a7
df49f93
fb3070b
7b9d069
98a04ff
f2d0c42
b159b77
e1362db
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| name: "Get number of shards" | ||
| description: "Get the number of nf-test shards for the current CI job" | ||
| inputs: | ||
| max_shards: | ||
| description: "Maximum number of shards allowed" | ||
| required: true | ||
| paths: | ||
| description: "Component paths to test" | ||
| required: false | ||
| tags: | ||
| description: "Tags to pass as argument for nf-test --tag parameter" | ||
| required: false | ||
| outputs: | ||
| shard: | ||
| description: "Array of shard numbers" | ||
| value: ${{ steps.shards.outputs.shard }} | ||
| total_shards: | ||
| description: "Total number of shards" | ||
| value: ${{ steps.shards.outputs.total_shards }} | ||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: Install nf-test | ||
| uses: nf-core/setup-nf-test@v1 | ||
| with: | ||
| version: ${{ env.NFT_VER }} | ||
| - name: Get number of shards | ||
| id: shards | ||
| shell: bash | ||
| run: | | ||
| # Run nf-test with dynamic parameter | ||
| 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 | ||
|
|
||
| # Write to GitHub Actions outputs | ||
| echo "shard=$shard" >> $GITHUB_OUTPUT | ||
| echo "total_shards=$total_shards" >> $GITHUB_OUTPUT | ||
|
|
||
| # Debugging output | ||
| echo "Final shard array: $shard" | ||
| echo "Total number of shards: $total_shards" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,109 @@ | ||
| name: "nf-test Action" | ||
| description: "Runs nf-test with common setup steps" | ||
| inputs: | ||
| profile: | ||
| description: "Profile to use" | ||
| required: true | ||
| shard: | ||
| description: "Shard number for this CI job" | ||
| required: true | ||
| total_shards: | ||
| description: "Total number of test shards(NOT the total number of matrix jobs)" | ||
| required: true | ||
| paths: | ||
| description: "Test paths" | ||
| required: true | ||
| tags: | ||
| description: "Tags to pass as argument for nf-test --tag parameter" | ||
| required: false | ||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: Setup Nextflow | ||
| uses: nf-core/setup-nextflow@v2 | ||
| with: | ||
| version: "${{ env.NXF_VERSION }}" | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 | ||
| with: | ||
| python-version: "3.13" | ||
|
|
||
| - name: Install nf-test | ||
| uses: nf-core/setup-nf-test@v1 | ||
| with: | ||
| version: "${{ env.NFT_VER }}" | ||
| install-pdiff: true | ||
|
|
||
| - name: Setup apptainer | ||
| if: contains(inputs.profile, 'singularity') | ||
| uses: eWaterCycle/setup-apptainer@main | ||
|
|
||
|
ypriverol marked this conversation as resolved.
Resolved
|
||
| - name: Set up Singularity | ||
| if: contains(inputs.profile, 'singularity') | ||
| shell: bash | ||
| run: | | ||
| mkdir -p $NXF_SINGULARITY_CACHEDIR | ||
| mkdir -p $NXF_SINGULARITY_LIBRARYDIR | ||
|
|
||
|
ypriverol marked this conversation as resolved.
Resolved
|
||
| - name: Conda setup | ||
| if: contains(inputs.profile, 'conda') | ||
| uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3 | ||
| with: | ||
| auto-update-conda: true | ||
| conda-solver: libmamba | ||
| conda-remove-defaults: true | ||
|
|
||
| - name: Run nf-test | ||
| shell: bash | ||
| env: | ||
| NFT_WORKDIR: ${{ env.NFT_WORKDIR }} | ||
| run: | | ||
| nf-test test \ | ||
| --profile=+${{ inputs.profile }} \ | ||
| $(if [ -n "${{ inputs.tags }}" ]; then echo "--tag ${{ inputs.tags }}"; fi) \ | ||
| --ci \ | ||
| --changed-since HEAD^ \ | ||
| --verbose \ | ||
| --tap=test.tap \ | ||
| --shard ${{ inputs.shard }}/${{ inputs.total_shards }} | ||
|
|
||
| # Save the absolute path of the test.tap file to the output | ||
| echo "tap_file_path=$(realpath test.tap)" >> $GITHUB_OUTPUT | ||
|
|
||
|
ypriverol marked this conversation as resolved.
Resolved
|
||
| - name: Generate test summary | ||
| if: always() | ||
| shell: bash | ||
| run: | | ||
| # Add header if it doesn't exist (using a token file to track this) | ||
| if [ ! -f ".summary_header" ]; then | ||
| echo "# 🚀 nf-test results" >> $GITHUB_STEP_SUMMARY | ||
| echo "" >> $GITHUB_STEP_SUMMARY | ||
| echo "| Status | Test Name | Profile | Shard |" >> $GITHUB_STEP_SUMMARY | ||
| echo "|:------:|-----------|---------|-------|" >> $GITHUB_STEP_SUMMARY | ||
| touch .summary_header | ||
| fi | ||
|
|
||
| if [ -f test.tap ]; then | ||
| while IFS= read -r line; do | ||
| if [[ $line =~ ^ok ]]; then | ||
| test_name="${line#ok }" | ||
| # Remove the test number from the beginning | ||
| test_name="${test_name#* }" | ||
| echo "| ✅ | ${test_name} | ${{ inputs.profile }} | ${{ inputs.shard }}/${{ inputs.total_shards }} |" >> $GITHUB_STEP_SUMMARY | ||
| elif [[ $line =~ ^not\ ok ]]; then | ||
| test_name="${line#not ok }" | ||
| # Remove the test number from the beginning | ||
| test_name="${test_name#* }" | ||
| echo "| ❌ | ${test_name} | ${{ inputs.profile }} | ${{ inputs.shard }}/${{ inputs.total_shards }} |" >> $GITHUB_STEP_SUMMARY | ||
| fi | ||
| done < test.tap | ||
| else | ||
| echo "| ⚠️ | No test results found | ${{ inputs.profile }} | ${{ inputs.shard }}/${{ inputs.total_shards }} |" >> $GITHUB_STEP_SUMMARY | ||
| fi | ||
|
|
||
| - name: Clean up | ||
| if: always() | ||
| shell: bash | ||
| run: | | ||
| sudo rm -rf /home/ubuntu/tests/ | ||
|
ypriverol marked this conversation as resolved.
Resolved
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,9 +3,6 @@ name: nf-core linting | |
| # It runs the `nf-core pipelines lint` and markdown lint tests to ensure | ||
| # that the code meets the nf-core guidelines. | ||
| on: | ||
| push: | ||
| branches: | ||
| - dev | ||
| pull_request: | ||
| release: | ||
| types: [published] | ||
|
|
@@ -16,10 +13,10 @@ jobs: | |
| steps: | ||
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
|
|
||
| - name: Set up Python 3.12 | ||
| uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5 | ||
| - name: Set up Python 3.13 | ||
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 | ||
| with: | ||
| python-version: "3.12" | ||
| python-version: "3.13" | ||
|
|
||
| - name: Install pre-commit | ||
| run: pip install pre-commit | ||
|
|
@@ -36,13 +33,13 @@ jobs: | |
| - name: Install Nextflow | ||
| uses: nf-core/setup-nextflow@v2 | ||
|
|
||
| - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5 | ||
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 | ||
| with: | ||
| python-version: "3.12" | ||
| python-version: "3.13" | ||
| architecture: "x64" | ||
|
Comment on lines
+36
to
39
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Release gating likely broken on release runs (base_ref not set) On release events, Proposed gating adjustments (outside this hunk): # Run non-release lint only for PRs
- if: ${{ github.event_name == 'pull_request' && github.base_ref != 'master' }}
# Run release lint for release events (and optionally for PRs to master)
- if: ${{ github.event_name == 'release' || (github.event_name == 'pull_request' && github.base_ref == 'master') }}Additionally, guard PR-only contexts:
🤖 Prompt for AI Agents |
||
|
|
||
| - name: read .nf-core.yml | ||
| uses: pietrobolcato/[email protected] | ||
| uses: pietrobolcato/action-read-yaml@9f13718d61111b69f30ab4ac683e67a56d254e1d # 1.1.0 | ||
| id: read_yml | ||
| with: | ||
| config: ${{ github.workspace }}/.nf-core.yml | ||
|
|
@@ -74,7 +71,7 @@ jobs: | |
|
|
||
| - name: Upload linting log file artifact | ||
| if: ${{ always() }} | ||
| uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4 | ||
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | ||
| with: | ||
| name: linting-logs | ||
| path: | | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ jobs: | |
| ref: ${{ github.event.pull_request.head.sha }} | ||
|
|
||
| - name: Read template version from .nf-core.yml | ||
| uses: nichmor/[email protected] | ||
| uses: nichmor/minimal-read-yaml@1f7205277e25e156e1f63815781db80a6d490b8f # v0.0.2 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Pinning the action is good; however, sanitize PR-controlled input before shell interpolation (command injection risk).
Example hardening (add a validation step before install and use the env var): - name: Validate nf-core version
run: |
version="${{ steps.read_yml.outputs['nf_core_version'] }}"
if [[ ! "$version" =~ ^[0-9]+(\.[0-9]+){1,2}$ ]]; then
echo "Invalid nf_core_version: $version"
exit 1
fi
echo "NF_CORE_VERSION=$version" >> "$GITHUB_ENV"
- name: Install nf-core
run: |
python -m pip install --upgrade pip
pip install "nf-core==${NF_CORE_VERSION}"Additionally, set minimal permissions (GITHUB_TOKEN not needed beyond read): jobs:
template_version:
permissions:
contents: read🤖 Prompt for AI Agents |
||
| id: read_yml | ||
| with: | ||
| config: ${{ github.workspace }}/.nf-core.yml | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ lint: | |
| - .github/workflows/awsfulltest.yml | ||
| - .github/workflows/ci.yml | ||
| - .github/workflows/download_pipeline.yml | ||
| - .github/workflows/nf-test.yml | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainEnsure the referenced workflow exists and path is correct You added .github/workflows/nf-test.yml to lint.files_exist. Verify the file exists with the exact name/path to avoid lint failures. Run this script to confirm presence: 🏁 Script executed: #!/bin/bash
set -euo pipefail
test -f ".github/workflows/nf-test.yml" && echo "OK: .github/workflows/nf-test.yml exists" || { echo "Missing: .github/workflows/nf-test.yml"; exit 1; }Length of output: 155 Missing referenced workflow The
Please either add the missing workflow at 🤖 Prompt for AI Agents |
||
| - .gitignore | ||
| - conf/modules.config | ||
| - conf/igenomes_ignored.config | ||
|
|
@@ -23,7 +24,7 @@ lint: | |
| multiqc_config: false | ||
| nextflow_config: false | ||
| modules_config: false | ||
| nf_core_version: 3.2.1 | ||
| nf_core_version: 3.3.2 | ||
| repository_type: pipeline | ||
| template: | ||
| author: Yasset Perez-Riverol | ||
|
|
@@ -33,4 +34,4 @@ template: | |
| name: quantms | ||
| org: bigbio | ||
| outdir: . | ||
| version: 1.5.0 | ||
| version: 1.6.0 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,10 +4,24 @@ repos: | |
| hooks: | ||
| - id: prettier | ||
| additional_dependencies: | ||
| - [email protected] | ||
|
|
||
| - repo: https://github.com/editorconfig-checker/editorconfig-checker.python | ||
| rev: "3.1.2" | ||
| - [email protected] | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v5.0.0 | ||
| hooks: | ||
| - id: editorconfig-checker | ||
| alias: ec | ||
| - id: trailing-whitespace | ||
| args: [--markdown-linebreak-ext=md] | ||
| exclude: | | ||
| (?x)^( | ||
| .*ro-crate-metadata.json$| | ||
| modules/nf-core/.*| | ||
| subworkflows/nf-core/.*| | ||
| .*\.snap$ | ||
| )$ | ||
| - id: end-of-file-fixer | ||
| exclude: | | ||
| (?x)^( | ||
| .*ro-crate-metadata.json$| | ||
| modules/nf-core/.*| | ||
| subworkflows/nf-core/.*| | ||
| .*\.snap$ | ||
| )$ | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1 +1,6 @@ | ||||||||||||||||||
| printWidth: 120 | ||||||||||||||||||
| tabWidth: 4 | ||||||||||||||||||
| overrides: | ||||||||||||||||||
| - files: "*.{md,yml,yaml,html,css,scss,js,cff}" | ||||||||||||||||||
| options: | ||||||||||||||||||
| tabWidth: 2 | ||||||||||||||||||
|
Comment on lines
+3
to
+6
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion CITATION.cff won’t be formatted unless you set the parser to YAML Prettier won’t infer a parser for .cff. Add a separate override entry targeting CITATION.cff with parser: yaml (don’t set parser on the broader override). Append this entry to the existing overrides list: - files: "CITATION.cff"
options:
parser: yaml
tabWidth: 2🤖 Prompt for AI AgentsOverride glob only matches root-level files; use a recursive pattern Current pattern ".{...}" won’t apply to files in subdirectories (e.g., docs/.md). Switch to "**/*.{...}" to ensure overrides apply repo-wide. While at it, include JSON variants to avoid 4-space JSON reformatting churn, and remove "cff" here (see next comment). Apply this diff: overrides:
- - files: "*.{md,yml,yaml,html,css,scss,js,cff}"
+ - files: "**/*.{md,yml,yaml,html,css,scss,js,json,json5,jsonc}"
options:
tabWidth: 2📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.