Skip to content

Commit dc7219d

Browse files
authored
Merge pull request #708 from nf-core/dev
Release v2.6.0
2 parents 46afe31 + 390389f commit dc7219d

File tree

100 files changed

+4083
-1056
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+4083
-1056
lines changed

.editorconfig

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ If you wish to contribute a new step, please use the following coding standards:
7878
5. Add any new parameters to `nextflow_schema.json` with help text (via the `nf-core pipelines schema build` tool).
7979
6. Add sanity checks and validation for all relevant parameters.
8080
7. Perform local tests to validate that the new code works as expected.
81-
8. If applicable, add a new test command in `.github/workflow/ci.yml`.
81+
8. If applicable, add a new test in the `tests` directory.
8282
9. Update MultiQC config `assets/multiqc_config.yml` so relevant suffixes, file name clean up and module plots are in the appropriate order. If applicable, add a [MultiQC](https://https://multiqc.info/) module.
8383
10. Add a description of the output files and if relevant any appropriate images from the MultiQC report to `docs/output.md`.
8484

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/rare
1919
- [ ] If necessary, also make a PR on the nf-core/raredisease _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository.
2020
- [ ] Make sure your code lints (`nf-core pipelines lint`).
2121
- [ ] Ensure the test suite passes (`nextflow run . -profile test,docker --outdir <OUTDIR>`).
22-
- [ ] Ensure the test suite passes (`nextflow run . -profile test_one_sample,docker --outdir <OUTDIR>`).
22+
- [ ] Ensure the test suite passes (`nextflow run . -profile test_singleton,docker --outdir <OUTDIR>`).
2323
- [ ] Check for unexpected warnings in debug mode (`nextflow run . -profile debug,test,docker --outdir <OUTDIR>`).
2424
- [ ] Usage Documentation in `docs/usage.md` is updated.
2525
- [ ] Output Documentation in `docs/output.md` is updated.

.github/actions/get-shards/action.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: "Get number of shards"
2+
description: "Get the number of nf-test shards for the current CI job"
3+
inputs:
4+
max_shards:
5+
description: "Maximum number of shards allowed"
6+
required: true
7+
paths:
8+
description: "Component paths to test"
9+
required: false
10+
tags:
11+
description: "Tags to pass as argument for nf-test --tag parameter"
12+
required: false
13+
outputs:
14+
shard:
15+
description: "Array of shard numbers"
16+
value: ${{ steps.shards.outputs.shard }}
17+
total_shards:
18+
description: "Total number of shards"
19+
value: ${{ steps.shards.outputs.total_shards }}
20+
runs:
21+
using: "composite"
22+
steps:
23+
- name: Install nf-test
24+
uses: nf-core/setup-nf-test@v1
25+
with:
26+
version: ${{ env.NFT_VER }}
27+
- name: Get number of shards
28+
id: shards
29+
shell: bash
30+
run: |
31+
# Run nf-test with dynamic parameter
32+
nftest_output=$(nf-test test \
33+
--profile +docker \
34+
$(if [ -n "${{ inputs.tags }}" ]; then echo "--tag ${{ inputs.tags }}"; fi) \
35+
--dry-run \
36+
--ci \
37+
--changed-since HEAD^) || {
38+
echo "nf-test command failed with exit code $?"
39+
echo "Full output: $nftest_output"
40+
exit 1
41+
}
42+
echo "nf-test dry-run output: $nftest_output"
43+
44+
# Default values for shard and total_shards
45+
shard="[]"
46+
total_shards=0
47+
48+
# Check if there are related tests
49+
if echo "$nftest_output" | grep -q 'No tests to execute'; then
50+
echo "No related tests found."
51+
else
52+
# Extract the number of related tests
53+
number_of_shards=$(echo "$nftest_output" | sed -n 's|.*Executed \([0-9]*\) tests.*|\1|p')
54+
if [[ -n "$number_of_shards" && "$number_of_shards" -gt 0 ]]; then
55+
shards_to_run=$(( $number_of_shards < ${{ inputs.max_shards }} ? $number_of_shards : ${{ inputs.max_shards }} ))
56+
shard=$(seq 1 "$shards_to_run" | jq -R . | jq -c -s .)
57+
total_shards="$shards_to_run"
58+
else
59+
echo "Unexpected output format. Falling back to default values."
60+
fi
61+
fi
62+
63+
# Write to GitHub Actions outputs
64+
echo "shard=$shard" >> $GITHUB_OUTPUT
65+
echo "total_shards=$total_shards" >> $GITHUB_OUTPUT
66+
67+
# Debugging output
68+
echo "Final shard array: $shard"
69+
echo "Total number of shards: $total_shards"

.github/actions/nf-test/action.yml

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
name: "nf-test Action"
2+
description: "Runs nf-test with common setup steps"
3+
inputs:
4+
profile:
5+
description: "Profile to use"
6+
required: true
7+
shard:
8+
description: "Shard number for this CI job"
9+
required: true
10+
total_shards:
11+
description: "Total number of test shards(NOT the total number of matrix jobs)"
12+
required: true
13+
paths:
14+
description: "Test paths"
15+
required: true
16+
tags:
17+
description: "Tags to pass as argument for nf-test --tag parameter"
18+
required: false
19+
runs:
20+
using: "composite"
21+
steps:
22+
- name: Setup Nextflow
23+
uses: nf-core/setup-nextflow@v2
24+
with:
25+
version: "${{ env.NXF_VERSION }}"
26+
27+
- name: Set up Python
28+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
29+
with:
30+
python-version: "3.13"
31+
32+
- name: Install pdiff
33+
shell: bash
34+
run: |
35+
python -m pip install pdiff
36+
37+
- name: Install nf-test
38+
uses: nf-core/setup-nf-test@v1
39+
with:
40+
version: "${{ env.NFT_VER }}"
41+
install-pdiff: true
42+
43+
- name: Setup apptainer
44+
if: contains(inputs.profile, 'singularity')
45+
uses: eWaterCycle/setup-apptainer@main
46+
47+
- name: Set up Singularity
48+
if: contains(inputs.profile, 'singularity')
49+
shell: bash
50+
run: |
51+
mkdir -p $NXF_SINGULARITY_CACHEDIR
52+
mkdir -p $NXF_SINGULARITY_LIBRARYDIR
53+
54+
- name: Conda setup
55+
if: contains(inputs.profile, 'conda')
56+
uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3
57+
with:
58+
auto-update-conda: true
59+
conda-solver: libmamba
60+
conda-remove-defaults: true
61+
62+
# TODO Skip failing conda tests and document their failures
63+
# https://github.com/nf-core/modules/issues/7017
64+
- name: Run nf-test
65+
shell: bash
66+
env:
67+
NFT_DIFF: ${{ env.NFT_DIFF }}
68+
NFT_DIFF_ARGS: ${{ env.NFT_DIFF_ARGS }}
69+
NFT_WORKDIR: ${{ env.NFT_WORKDIR }}
70+
run: |
71+
nf-test test \
72+
--profile=+${{ inputs.profile }} \
73+
$(if [ -n "${{ inputs.tags }}" ]; then echo "--tag ${{ inputs.tags }}"; fi) \
74+
--ci \
75+
--changed-since HEAD^ \
76+
--verbose \
77+
--tap=test.tap \
78+
--shard ${{ inputs.shard }}/${{ inputs.total_shards }}
79+
80+
# Save the absolute path of the test.tap file to the output
81+
echo "tap_file_path=$(realpath test.tap)" >> $GITHUB_OUTPUT
82+
83+
- name: Generate test summary
84+
if: always()
85+
shell: bash
86+
run: |
87+
# Add header if it doesn't exist (using a token file to track this)
88+
if [ ! -f ".summary_header" ]; then
89+
echo "# 🚀 nf-test results" >> $GITHUB_STEP_SUMMARY
90+
echo "" >> $GITHUB_STEP_SUMMARY
91+
echo "| Status | Test Name | Profile | Shard |" >> $GITHUB_STEP_SUMMARY
92+
echo "|:------:|-----------|---------|-------|" >> $GITHUB_STEP_SUMMARY
93+
touch .summary_header
94+
fi
95+
96+
if [ -f test.tap ]; then
97+
while IFS= read -r line; do
98+
if [[ $line =~ ^ok ]]; then
99+
test_name="${line#ok }"
100+
# Remove the test number from the beginning
101+
test_name="${test_name#* }"
102+
echo "| ✅ | ${test_name} | ${{ inputs.profile }} | ${{ inputs.shard }}/${{ inputs.total_shards }} |" >> $GITHUB_STEP_SUMMARY
103+
elif [[ $line =~ ^not\ ok ]]; then
104+
test_name="${line#not ok }"
105+
# Remove the test number from the beginning
106+
test_name="${test_name#* }"
107+
echo "| ❌ | ${test_name} | ${{ inputs.profile }} | ${{ inputs.shard }}/${{ inputs.total_shards }} |" >> $GITHUB_STEP_SUMMARY
108+
fi
109+
done < test.tap
110+
else
111+
echo "| ⚠️ | No test results found | ${{ inputs.profile }} | ${{ inputs.shard }}/${{ inputs.total_shards }} |" >> $GITHUB_STEP_SUMMARY
112+
fi
113+
114+
- name: Clean up
115+
if: always()
116+
shell: bash
117+
run: |
118+
sudo rm -rf /home/ubuntu/tests/

.github/workflows/awsfulltest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
run-platform:
1515
name: Run AWS full tests
1616
# run only if the PR is approved by at least 2 reviewers and against the master/main branch or manually triggered
17-
if: github.repository == 'nf-core/raredisease' && github.event.review.state == 'approved' && (github.event.pull_request.base.ref == 'master' || github.event.pull_request.base.ref == 'main') || github.event_name == 'workflow_dispatch'
17+
if: github.repository == 'nf-core/raredisease' && github.event.review.state == 'approved' && (github.event.pull_request.base.ref == 'master' || github.event.pull_request.base.ref == 'main') || github.event_name == 'workflow_dispatch' || github.event_name == 'release'
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: Set revision variable
@@ -39,7 +39,7 @@ jobs:
3939
}
4040
profiles: test_full
4141

42-
- uses: actions/upload-artifact@v4
42+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
4343
with:
4444
name: Seqera Platform debug log file
4545
path: |

.github/workflows/awstest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
}
2626
profiles: test
2727

28-
- uses: actions/upload-artifact@v4
28+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
2929
with:
3030
name: Seqera Platform debug log file
3131
path: |

.github/workflows/ci.yml

Lines changed: 0 additions & 71 deletions
This file was deleted.

.github/workflows/clean-up.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
issues: write
1111
pull-requests: write
1212
steps:
13-
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9
13+
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9
1414
with:
1515
stale-issue-message: "This issue has been tagged as awaiting-changes or awaiting-feedback by an nf-core contributor. Remove stale label or add a comment otherwise this issue will be closed in 20 days."
1616
stale-pr-message: "This PR has been tagged as awaiting-changes or awaiting-feedback by an nf-core contributor. Remove stale label or add a comment if it is still useful."

.github/workflows/download_pipeline.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,6 @@ on:
1212
required: true
1313
default: "dev"
1414
pull_request:
15-
types:
16-
- opened
17-
- edited
18-
- synchronize
19-
branches:
20-
- main
21-
- master
22-
pull_request_target:
2315
branches:
2416
- main
2517
- master
@@ -52,9 +44,9 @@ jobs:
5244
- name: Disk space cleanup
5345
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
5446

55-
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
47+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
5648
with:
57-
python-version: "3.12"
49+
python-version: "3.13"
5850
architecture: "x64"
5951

6052
- name: Setup Apptainer
@@ -120,6 +112,7 @@ jobs:
120112
echo "IMAGE_COUNT_AFTER=$image_count" >> "$GITHUB_OUTPUT"
121113
122114
- name: Compare container image counts
115+
id: count_comparison
123116
run: |
124117
if [ "${{ steps.count_initial.outputs.IMAGE_COUNT_INITIAL }}" -ne "${{ steps.count_afterwards.outputs.IMAGE_COUNT_AFTER }}" ]; then
125118
initial_count=${{ steps.count_initial.outputs.IMAGE_COUNT_INITIAL }}
@@ -132,3 +125,10 @@ jobs:
132125
else
133126
echo "The pipeline can be downloaded successfully!"
134127
fi
128+
129+
- name: Upload Nextflow logfile for debugging purposes
130+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
131+
with:
132+
name: nextflow_logfile.txt
133+
path: .nextflow.log*
134+
include-hidden-files: true

0 commit comments

Comments
 (0)