Skip to content

Commit a66f441

Browse files
authored
Merge pull request #472 from jonasscheid/merge-template-410
2 parents 7ee36d4 + ac53644 commit a66f441

37 files changed

Lines changed: 409 additions & 278 deletions

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ runs:
2020
using: "composite"
2121
steps:
2222
- name: Setup Nextflow
23-
uses: nf-core/setup-nextflow@b4ec1bc7c16a94435159de94a05253542fddf6ef # v3
23+
uses: nf-core/setup-nextflow@893c28b667aedeba26e37f296d260ccc5bc4d914 # v3
2424
with:
2525
version: "${{ env.NXF_VERSION }}"
2626

2727
- name: Set up Python
28-
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
28+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
2929
with:
3030
python-version: "3.14"
3131

@@ -37,7 +37,7 @@ runs:
3737

3838
- name: Setup apptainer
3939
if: contains(inputs.profile, 'singularity')
40-
uses: eWaterCycle/setup-apptainer@4bb22c52d4f63406c49e94c804632975787312b3 # v2.0.0
40+
uses: eWaterCycle/setup-apptainer@3f706d898c9db585b1d741b4692e66755f3a1b40 # v2.0.0
4141

4242
- name: Set up Singularity
4343
if: contains(inputs.profile, 'singularity')

.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@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10
13+
- uses: actions/stale@4391f3da665fdf50b6810c1a66712fb9ba21aa93 # v11
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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ jobs:
3939
needs: configure
4040
steps:
4141
- name: Check out pipeline code
42-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
42+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
4343

4444
- name: Install Nextflow
45-
uses: nf-core/setup-nextflow@b4ec1bc7c16a94435159de94a05253542fddf6ef # v3
45+
uses: nf-core/setup-nextflow@893c28b667aedeba26e37f296d260ccc5bc4d914 # v3
4646

4747
- name: Disk space cleanup
4848
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
4949

50-
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
50+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
5151
with:
5252
python-version: "3.14"
5353
architecture: "x64"

.github/workflows/fix_linting.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
# Use the @nf-core-bot token to check out so we can push later
16-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
16+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
1717
with:
1818
token: ${{ secrets.nf_core_bot_auth_token }}
1919

@@ -32,12 +32,12 @@ jobs:
3232
GITHUB_TOKEN: ${{ secrets.nf_core_bot_auth_token }}
3333

3434
- name: Install Nextflow
35-
uses: nf-core/setup-nextflow@b4ec1bc7c16a94435159de94a05253542fddf6ef # v3
35+
uses: nf-core/setup-nextflow@893c28b667aedeba26e37f296d260ccc5bc4d914 # v3
3636

3737
# Install and run prek
3838
- name: Run prek
3939
id: prek
40-
uses: j178/prek-action@6ad80277337ad479fe43bd70701c3f7f8aa74db3 # v2
40+
uses: j178/prek-action@5337cb91e0fa35a7ff31b9ca345126d8bbbcdf16 # v2
4141
continue-on-error: true
4242

4343
# indication that the linting has finished

.github/workflows/linting.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,30 @@ jobs:
1111
pre-commit:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
14+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
1515

1616
- name: Install Nextflow
17-
uses: nf-core/setup-nextflow@b4ec1bc7c16a94435159de94a05253542fddf6ef # v3
17+
uses: nf-core/setup-nextflow@893c28b667aedeba26e37f296d260ccc5bc4d914 # v3
1818

1919
- name: Run prek
20-
uses: j178/prek-action@6ad80277337ad479fe43bd70701c3f7f8aa74db3 # v2
20+
uses: j178/prek-action@5337cb91e0fa35a7ff31b9ca345126d8bbbcdf16 # v2
2121

2222
nf-core:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- name: Check out pipeline code
26-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
26+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
2727

2828
- name: Install Nextflow
29-
uses: nf-core/setup-nextflow@b4ec1bc7c16a94435159de94a05253542fddf6ef # v3
29+
uses: nf-core/setup-nextflow@893c28b667aedeba26e37f296d260ccc5bc4d914 # v3
3030

31-
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
31+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
3232
with:
3333
python-version: "3.14"
3434
architecture: "x64"
3535

3636
- name: Setup uv
37-
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
37+
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
3838

3939
- name: read .nf-core.yml
4040
uses: pietrobolcato/action-read-yaml@9f13718d61111b69f30ab4ac683e67a56d254e1d # 1.1.0
@@ -46,7 +46,7 @@ jobs:
4646
run: uv tool install nf-core==${{ steps.read_yml.outputs['nf_core_version'] }}
4747

4848
- name: Run nf-core pipelines lint
49-
if: ${{ github.base_ref != 'master' || github.base_ref != 'main' }}
49+
if: ${{ github.base_ref != 'master' && github.base_ref != 'main' }}
5050
env:
5151
GITHUB_COMMENTS_URL: ${{ github.event.pull_request.comments_url }}
5252
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/nf-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
rm -rf ./* || true
4141
rm -rf ./.??* || true
4242
ls -la ./
43-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
43+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
4444
with:
4545
fetch-depth: 0
4646

@@ -93,7 +93,7 @@ jobs:
9393
rm -rf ./* || true
9494
rm -rf ./.??* || true
9595
ls -la ./
96-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
96+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
9797
with:
9898
fetch-depth: 0
9999

.github/workflows/template-version-comment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Check out pipeline code
15-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
15+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
1616
with:
1717
ref: ${{ github.event.pull_request.head.sha }}
1818

.hooks/block_pipeline_outdir.sh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/usr/bin/env bash
2+
# This hook is used to block commits if they include staged files inside a directory
3+
# which also contains a subdirectory called `pipeline_info`. The purpose of this is to
4+
# prevent users from inadvertently committing output from pipeline test runs inside the
5+
# development directory.
6+
7+
set -e
8+
9+
status=0
10+
seen_dirs=""
11+
12+
while IFS= read -r file; do
13+
# The offending output bundle's root is the ancestor directory that has
14+
# `pipeline_info` as an immediate child, so callers can restore it in one go.
15+
if [[ "$file" == pipeline_info/* ]]; then
16+
top_dir="pipeline_info"
17+
elif [[ "$file" == */pipeline_info/* ]]; then
18+
top_dir="${file%%/pipeline_info/*}"
19+
else
20+
top_dir=""
21+
dir=$(dirname "$file")
22+
while [[ "$dir" != "." && "$dir" != "/" ]]; do
23+
if [[ -d "$dir/pipeline_info" ]]; then
24+
top_dir="$dir"
25+
break
26+
fi
27+
dir=$(dirname "$dir")
28+
done
29+
fi
30+
31+
if [[ -n "$top_dir" ]]; then
32+
echo "❌ Commit blocked: Please do not commit output from pipeline test runs to the pipeline code itself: $file"
33+
status=1
34+
case "$seen_dirs" in
35+
*"|$top_dir|"*) ;;
36+
*)
37+
echo "Run 'git restore --staged $top_dir' to remove the whole output folder from the staging area."
38+
seen_dirs="$seen_dirs|$top_dir|"
39+
;;
40+
esac
41+
fi
42+
done < <(git diff --cached --name-only)
43+
44+
exit "$status"

.nf-core.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
lint:
22
files_unchanged:
33
- .vscode/settings.json
4-
nf_core_version: 4.0.3
4+
nf_core_version: 4.1.0
55
repository_type: pipeline
66
template:
77
author: Jonas Scheid, Steffen Lemke, Leon Bichmann, Marissa Dubbelaar

.pre-commit-config.yaml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ repos:
44
hooks:
55
- id: prettier
66
additional_dependencies:
7-
- prettier@3.8.3
7+
- prettier@3.9.6
88
- repo: https://github.com/pre-commit/pre-commit-hooks
99
rev: v6.0.0
1010
hooks:
@@ -25,9 +25,26 @@ repos:
2525
subworkflows/(?!local/).*|
2626
.*\.snap$
2727
)$
28+
- id: check-added-large-files
29+
args: [--maxkb=5000]
30+
exclude: |
31+
(?x)^(
32+
.*ro-crate-metadata.json$|
33+
.*\.snap$|
34+
lib/nfcore_external_java_deps.jar$|
35+
docs/.*\.(svg|pdf)$|
36+
assets/.*$
37+
)$
38+
- id: check-merge-conflict
2839
- repo: https://github.com/seqeralabs/nf-lint-pre-commit
2940
rev: v0.3.0
3041
hooks:
3142
- id: nextflow-lint
3243
files: '\.nf$|nextflow\.config$'
3344
args: ["-output", "json"]
45+
- repo: local
46+
hooks:
47+
- id: block-pipeline-outdir
48+
name: Prevent committing output from pipeline test runs to the pipeline code itself
49+
entry: ./.hooks/block_pipeline_outdir.sh
50+
language: script

0 commit comments

Comments
 (0)