Skip to content

Commit e4a4751

Browse files
committed
Merge branch 'TEMPLATE' into dev
2 parents 8f825ad + 41b6e48 commit e4a4751

34 files changed

+654
-261
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,6 @@ indent_size = unset
6262
# ignore bin/genepal_report
6363
[bin/genepal_report*]
6464
indent_size = unset
65+
# ignore ro-crate metadata files
66+
[**/ro-crate-metadata.json]
67+
insert_final_newline = unset

.github/CONTRIBUTING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# plant-food-research-open/genepal: Contributing Guidelines
1+
# `plant-food-research-open/genepal`: Contributing Guidelines
22

33
Hi there!
44
Many thanks for taking an interest in improving plant-food-research-open/genepal.
@@ -52,19 +52,19 @@ These tests are run both with the latest available version of `Nextflow` and als
5252

5353
:warning: Only in the unlikely and regretful event of a release happening with a bug.
5454

55-
- On your own fork, make a new branch `patch` based on `upstream/master`.
55+
- On your own fork, make a new branch `patch` based on `upstream/main` or `upstream/master`.
5656
- Fix the bug, and bump version (X.Y.Z+1).
57-
- A PR should be made on `master` from patch to directly this particular bug.
57+
- Open a pull-request from `patch` to `main`/`master` with the changes.
5858

5959
## Pipeline contribution conventions
6060

61-
To make the plant-food-research-open/genepal code and processing logic more understandable for new contributors and to ensure quality, we semi-standardise the way the code and other contributions are written.
61+
To make the `plant-food-research-open/genepal` code and processing logic more understandable for new contributors and to ensure quality, we semi-standardise the way the code and other contributions are written.
6262

6363
### Adding a new step
6464

6565
If you wish to contribute a new step, please use the following coding standards:
6666

67-
1. Define the corresponding input channel into your new process from the expected previous process channel
67+
1. Define the corresponding input channel into your new process from the expected previous process channel.
6868
2. Write the process block (see below).
6969
3. Define the output channel if needed (see below).
7070
4. Add any new parameters to `nextflow.config` with a default (see below).
@@ -77,7 +77,7 @@ If you wish to contribute a new step, please use the following coding standards:
7777

7878
### Default values
7979

80-
Parameters should be initialised / defined with default values in `nextflow.config` under the `params` scope.
80+
Parameters should be initialised / defined with default values within the `params` scope in `nextflow.config`.
8181

8282
Once there, use `nf-core pipelines schema build` to add to `nextflow_schema.json`.
8383

.github/workflows/branch.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
name: nf-core branch protection
2-
# This workflow is triggered on PRs to main branch on the repository
3-
# It fails when someone tries to make a PR against the Plant-Food-Research-Open `main` branch instead of `dev`
2+
# This workflow is triggered on PRs to `main`/`master` branch on the repository
3+
# It fails when someone tries to make a PR against the `main`/`master` branch instead of `dev`
44
on:
55
pull_request_target:
6-
branches: [main]
6+
branches:
7+
- main
8+
- master
79

810
jobs:
911
test:
1012
runs-on: ubuntu-latest
1113
steps:
12-
# PRs to the nf-core repo main branch are only ok if coming from the nf-core repo `dev` or any `patch` branches
14+
# PRs to the nf-core repo main branch are only ok if coming from the repo `dev` or any `patch` branches
1315
- name: Check PRs
1416
if: github.repository == 'Plant-Food-Research-Open/genepal'
1517
run: |
@@ -22,7 +24,7 @@ jobs:
2224
uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2
2325
with:
2426
message: |
25-
## This PR is against the `main` branch :x:
27+
## This PR is against the `${{github.event.pull_request.base.ref}}` branch :x:
2628
2729
* Do not close this PR
2830
* Click _Edit_ and change the `base` to `dev`
@@ -32,9 +34,9 @@ jobs:
3234
3335
Hi @${{ github.event.pull_request.user.login }},
3436
35-
It looks like this pull-request is has been made against the [${{github.event.pull_request.head.repo.full_name }}](https://github.com/${{github.event.pull_request.head.repo.full_name }}) `main` branch.
36-
The `main` branch should always contain code from the latest release.
37-
Because of this, PRs to `main` are only allowed if they come from the [${{github.event.pull_request.head.repo.full_name }}](https://github.com/${{github.event.pull_request.head.repo.full_name }}) `dev` branch.
37+
It looks like this pull-request is has been made against the [${{github.event.pull_request.head.repo.full_name }}](https://github.com/${{github.event.pull_request.head.repo.full_name }}) ${{github.event.pull_request.base.ref}} branch.
38+
The ${{github.event.pull_request.base.ref}} branch should always contain code from the latest release.
39+
Because of this, PRs to ${{github.event.pull_request.base.ref}} are only allowed if they come from the [${{github.event.pull_request.head.repo.full_name }}](https://github.com/${{github.event.pull_request.head.repo.full_name }}) `dev` branch.
3840
3941
You do not need to close this PR, you can change the target branch to `dev` by clicking the _"Edit"_ button at the top of this page.
4042
Note that even after this, the test will continue to show as failing until you push a new commit.

.github/workflows/download_pipeline.yml

Lines changed: 45 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Test successful pipeline download with 'nf-core pipelines download'
22

33
# Run the workflow when:
44
# - dispatched manually
5-
# - when a PR is opened or reopened to main branch
5+
# - when a PR is opened or reopened to main/master branch
66
# - the head branch of the pull request is updated, i.e. if fixes for a release are pushed last minute to dev.
77
on:
88
workflow_dispatch:
@@ -18,24 +18,41 @@ on:
1818
- synchronize
1919
branches:
2020
- main
21+
- master
2122
pull_request_target:
2223
branches:
2324
- main
25+
- master
2426

2527
env:
2628
NXF_ANSI_LOG: false
2729

2830
jobs:
31+
configure:
32+
runs-on: ubuntu-latest
33+
outputs:
34+
REPO_LOWERCASE: ${{ steps.get_repo_properties.outputs.REPO_LOWERCASE }}
35+
REPOTITLE_LOWERCASE: ${{ steps.get_repo_properties.outputs.REPOTITLE_LOWERCASE }}
36+
REPO_BRANCH: ${{ steps.get_repo_properties.outputs.REPO_BRANCH }}
37+
steps:
38+
- name: Get the repository name and current branch
39+
id: get_repo_properties
40+
run: |
41+
echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT"
42+
echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> "$GITHUB_OUTPUT"
43+
echo "REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> "$GITHUB_OUTPUT"
44+
2945
download:
3046
runs-on: ubuntu-latest
47+
needs: configure
3148
steps:
3249
- name: Install Nextflow
3350
uses: nf-core/[email protected]
3451

3552
- name: Disk space cleanup
3653
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
3754

38-
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5
55+
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
3956
with:
4057
python-version: "3.12"
4158
architecture: "x64"
@@ -50,11 +67,9 @@ jobs:
5067
python -m pip install --upgrade pip
5168
pip install git+https://github.com/nf-core/tools.git@dev
5269
53-
- name: Get the repository name and current branch set as environment variable
70+
- name: Make a cache directory for the container images
5471
run: |
55-
echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV}
56-
echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> ${GITHUB_ENV}
57-
echo "REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> ${GITHUB_ENV}
72+
mkdir -p ./singularity_container_images
5873
5974
- name: Make a cache directory for the container images
6075
run: |
@@ -64,17 +79,27 @@ jobs:
6479
env:
6580
NXF_SINGULARITY_CACHEDIR: ./singularity_container_images
6681
run: |
67-
nf-core pipelines download ${{ env.REPO_LOWERCASE }} \
68-
--revision ${{ env.REPO_BRANCH }} \
69-
--outdir ./${{ env.REPOTITLE_LOWERCASE }} \
82+
nf-core pipelines download ${{ needs.configure.outputs.REPO_LOWERCASE }} \
83+
--revision ${{ needs.configure.outputs.REPO_BRANCH }} \
84+
--outdir ./${{ needs.configure.outputs.REPOTITLE_LOWERCASE }} \
7085
--compress "none" \
7186
--container-system 'singularity' \
72-
--container-library "quay.io" -l "docker.io" -l "community.wave.seqera.io" \
87+
--container-library "quay.io" -l "docker.io" -l "community.wave.seqera.io/library/" \
7388
--container-cache-utilisation 'amend' \
7489
--download-configuration 'yes'
7590
7691
- name: Inspect download
77-
run: tree ./${{ env.REPOTITLE_LOWERCASE }}
92+
run: tree ./${{ needs.configure.outputs.REPOTITLE_LOWERCASE }}
93+
94+
- name: Inspect container images
95+
run: tree ./singularity_container_images | tee ./container_initial
96+
97+
- name: Count the downloaded number of container images
98+
id: count_initial
99+
run: |
100+
image_count=$(ls -1 ./singularity_container_images | wc -l | xargs)
101+
echo "Initial container image count: $image_count"
102+
echo "IMAGE_COUNT_INITIAL=$image_count" >> "$GITHUB_OUTPUT"
78103
79104
- name: Count the downloaded number of container images
80105
id: count_initial
@@ -89,30 +114,31 @@ jobs:
89114
env:
90115
NXF_SINGULARITY_CACHEDIR: ./singularity_container_images
91116
NXF_SINGULARITY_HOME_MOUNT: true
92-
run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results
117+
run: nextflow run ./${{needs.configure.outputs.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ needs.configure.outputs.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results
93118
- name: Run the downloaded pipeline (stub run not supported)
94119
id: run_pipeline
95-
if: ${{ job.steps.stub_run_pipeline.status == failure() }}
120+
if: ${{ steps.stub_run_pipeline.outcome == 'failure' }}
96121
env:
97122
NXF_SINGULARITY_CACHEDIR: ./singularity_container_images
98123
NXF_SINGULARITY_HOME_MOUNT: true
99-
run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -profile test,singularity --outdir ./results
124+
run: nextflow run ./${{ needs.configure.outputs.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ needs.configure.outputs.REPO_BRANCH }}) -profile test,singularity --outdir ./results
100125

101126
- name: Count the downloaded number of container images
102127
id: count_afterwards
103128
run: |
104129
image_count=$(ls -1 ./singularity_container_images | wc -l | xargs)
105130
echo "Post-pipeline run container image count: $image_count"
106-
echo "IMAGE_COUNT_AFTER=$image_count" >> ${GITHUB_ENV}
131+
echo "IMAGE_COUNT_AFTER=$image_count" >> "$GITHUB_OUTPUT"
107132
108133
- name: Compare container image counts
109134
run: |
110-
if [ "${{ env.IMAGE_COUNT_INITIAL }}" -ne "${{ env.IMAGE_COUNT_AFTER }}" ]; then
111-
initial_count=${{ env.IMAGE_COUNT_INITIAL }}
112-
final_count=${{ env.IMAGE_COUNT_AFTER }}
135+
if [ "${{ steps.count_initial.outputs.IMAGE_COUNT_INITIAL }}" -ne "${{ steps.count_afterwards.outputs.IMAGE_COUNT_AFTER }}" ]; then
136+
initial_count=${{ steps.count_initial.outputs.IMAGE_COUNT_INITIAL }}
137+
final_count=${{ steps.count_afterwards.outputs.IMAGE_COUNT_AFTER }}
113138
difference=$((final_count - initial_count))
114139
echo "$difference additional container images were \n downloaded at runtime . The pipeline has no support for offline runs!"
115-
tree ./singularity_container_images
140+
tree ./singularity_container_images > ./container_afterwards
141+
diff ./container_initial ./container_afterwards
116142
exit 1
117143
else
118144
echo "The pipeline can be downloaded successfully!"

.github/workflows/fix-linting.yml

Lines changed: 2 additions & 2 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@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
16+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
1717
with:
1818
token: ${{ secrets.nf_core_bot_auth_token }}
1919

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

3434
# Install and run pre-commit
35-
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5
35+
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
3636
with:
3737
python-version: "3.12"
3838

.github/workflows/linting.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
pre-commit:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
17+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
1818

1919
- name: Set up Python 3.12
20-
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5
20+
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
2121
with:
2222
python-version: "3.12"
2323

@@ -31,12 +31,12 @@ jobs:
3131
runs-on: ubuntu-latest
3232
steps:
3333
- name: Check out pipeline code
34-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
34+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
3535

3636
- name: Install Nextflow
3737
uses: nf-core/[email protected]
3838

39-
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5
39+
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
4040
with:
4141
python-version: "3.12"
4242
architecture: "x64"
@@ -74,7 +74,7 @@ jobs:
7474

7575
- name: Upload linting log file artifact
7676
if: ${{ always() }}
77-
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4
77+
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
7878
with:
7979
name: linting-logs
8080
path: |

.github/workflows/linting_comment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Download lint results
14-
uses: dawidd6/action-download-artifact@bf251b5aa9c2f7eeb574a96ee720e24f801b7c11 # v6
14+
uses: dawidd6/action-download-artifact@20319c5641d495c8a52e688b7dc5fada6c3a9fbc # v8
1515
with:
1616
workflow: linting.yml
1717
workflow_conclusion: completed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: nf-core template version comment
2+
# This workflow is triggered on PRs to check if the pipeline template version matches the latest nf-core version.
3+
# It posts a comment to the PR, even if it comes from a fork.
4+
5+
on: pull_request_target
6+
7+
jobs:
8+
template_version:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check out pipeline code
12+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
13+
with:
14+
ref: ${{ github.event.pull_request.head.sha }}
15+
16+
- name: Read template version from .nf-core.yml
17+
uses: nichmor/[email protected]
18+
id: read_yml
19+
with:
20+
config: ${{ github.workspace }}/.nf-core.yml
21+
22+
- name: Install nf-core
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install nf-core==${{ steps.read_yml.outputs['nf_core_version'] }}
26+
27+
- name: Check nf-core outdated
28+
id: nf_core_outdated
29+
run: echo "OUTPUT=$(pip list --outdated | grep nf-core)" >> ${GITHUB_ENV}
30+
31+
- name: Post nf-core template version comment
32+
uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2
33+
if: |
34+
contains(env.OUTPUT, 'nf-core')
35+
with:
36+
repo-token: ${{ secrets.NF_CORE_BOT_AUTH_TOKEN }}
37+
allow-repeats: false
38+
message: |
39+
> [!WARNING]
40+
> Newer version of the nf-core template is available.
41+
>
42+
> Your pipeline is using an old version of the nf-core template: ${{ steps.read_yml.outputs['nf_core_version'] }}.
43+
> Please update your pipeline to the latest version.
44+
>
45+
> For more documentation on how to update your pipeline, please see the [nf-core documentation](https://github.com/nf-core/tools?tab=readme-ov-file#sync-a-pipeline-with-the-template) and [Synchronisation documentation](https://nf-co.re/docs/contributing/sync).
46+
#

.gitpod.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,5 @@ tasks:
66
nextflow self-update
77
88
vscode:
9-
extensions: # based on nf-core.nf-core-extensionpack
10-
#- esbenp.prettier-vscode # Markdown/CommonMark linting and style checking for Visual Studio Code
11-
- EditorConfig.EditorConfig # override user/workspace settings with settings found in .editorconfig files
12-
- Gruntfuggly.todo-tree # Display TODO and FIXME in a tree view in the activity bar
13-
- mechatroner.rainbow-csv # Highlight columns in csv files in different colors
14-
- nextflow.nextflow # Nextflow syntax highlighting
15-
- oderwat.indent-rainbow # Highlight indentation level
16-
- streetsidesoftware.code-spell-checker # Spelling checker for source code
17-
- charliermarsh.ruff # Code linter Ruff
9+
extensions:
10+
- nf-core.nf-core-extensionpack # https://github.com/nf-core/vscode-extensionpack

.nf-core.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ lint:
1717
- docs/README.md
1818
multiqc_config:
1919
- report_comment
20-
nf_core_version: 3.0.2
21-
org_path: null
20+
nf_core_version: 3.2.0
2221
repository_type: pipeline
2322
template:
2423
author: Usman Rashid, Jason Shiller
@@ -31,4 +30,3 @@ template:
3130
skip_features:
3231
- igenomes
3332
version: 0.6.1dev
34-
update: null

0 commit comments

Comments
 (0)