Skip to content

Commit cdf1732

Browse files
authored
Merge pull request #78 from seqeralabs/nf-core-template-merge-3.2.0
Important! Template update for nf-core/tools v3.2.0
2 parents ef73064 + 2966417 commit cdf1732

File tree

40 files changed

+970
-612
lines changed

40 files changed

+970
-612
lines changed

.github/CONTRIBUTING.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# seqeralabs/nf-aggregate: Contributing Guidelines
1+
# `seqeralabs/nf-aggregate`: Contributing Guidelines
22

33
Hi there!
44
Many thanks for taking an interest in improving seqeralabs/nf-aggregate.
@@ -16,7 +16,7 @@ If you'd like to write some code for seqeralabs/nf-aggregate, the standard workf
1616
1. Check that there isn't already an issue about your idea in the [seqeralabs/nf-aggregate issues](https://github.com/seqeralabs/nf-aggregate/issues) to avoid duplicating work. If there isn't one already, please create one so that others know you're working on this
1717
2. [Fork](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) the [seqeralabs/nf-aggregate repository](https://github.com/seqeralabs/nf-aggregate) to your GitHub account
1818
3. Make the necessary changes / additions within your forked repository following [Pipeline conventions](#pipeline-contribution-conventions)
19-
4. Use `nf-core schema build` and add any new parameters to the pipeline JSON schema (requires [nf-core tools](https://github.com/nf-core/tools) >= 1.10).
19+
4. Use `nf-core pipelines schema build` and add any new parameters to the pipeline JSON schema (requires [nf-core tools](https://github.com/nf-core/tools) >= 1.10).
2020
5. Submit a Pull Request against the `dev` branch and wait for the code to be reviewed and merged
2121

2222
If you're not used to this workflow with git, you can start with some [docs from GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests) or even their [excellent `git` resources](https://try.github.io/).
@@ -37,7 +37,7 @@ There are typically two types of tests that run:
3737
### Lint tests
3838

3939
`nf-core` has a [set of guidelines](https://nf-co.re/developers/guidelines) which all pipelines must adhere to.
40-
To enforce these and ensure that all pipelines stay in sync, we have developed a helper tool which runs checks on the pipeline code. This is in the [nf-core/tools repository](https://github.com/nf-core/tools) and once installed can be run locally with the `nf-core lint <pipeline-directory>` command.
40+
To enforce these and ensure that all pipelines stay in sync, we have developed a helper tool which runs checks on the pipeline code. This is in the [nf-core/tools repository](https://github.com/nf-core/tools) and once installed can be run locally with the `nf-core pipelines lint <pipeline-directory>` command.
4141

4242
If any failures or warnings are encountered, please follow the listed URL for more documentation.
4343

@@ -52,23 +52,23 @@ 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 seqeralabs/nf-aggregate 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 `seqeralabs/nf-aggregate` 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).
71-
5. Add any new parameters to `nextflow_schema.json` with help text (via the `nf-core schema build` tool).
71+
5. Add any new parameters to `nextflow_schema.json` with help text (via the `nf-core pipelines schema build` tool).
7272
6. Add sanity checks and validation for all relevant parameters.
7373
7. Perform local tests to validate that the new code works as expected.
7474
8. If applicable, add a new test command in `.github/workflow/ci.yml`.
@@ -77,13 +77,13 @@ 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

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

8484
### Default processes resource requirements
8585

86-
Sensible defaults for process resource requirements (CPUs / memory / time) for a process should be defined in `conf/base.config`. These should generally be specified generic with `withLabel:` selectors so they can be shared across multiple processes/steps of the pipeline. A nf-core standard set of labels that should be followed where possible can be seen in the [nf-core pipeline template](https://github.com/nf-core/tools/blob/master/nf_core/pipeline-template/conf/base.config), which has the default process as a single core-process, and then different levels of multi-core configurations for increasingly large memory requirements defined with standardised labels.
86+
Sensible defaults for process resource requirements (CPUs / memory / time) for a process should be defined in `conf/base.config`. These should generally be specified generic with `withLabel:` selectors so they can be shared across multiple processes/steps of the pipeline. A nf-core standard set of labels that should be followed where possible can be seen in the [nf-core pipeline template](https://github.com/nf-core/tools/blob/main/nf_core/pipeline-template/conf/base.config), which has the default process as a single core-process, and then different levels of multi-core configurations for increasingly large memory requirements defined with standardised labels.
8787

8888
The process resources can be passed on to the tool dynamically within the process with the `${task.cpus}` and `${task.memory}` variables in the `script:` block.
8989

@@ -96,7 +96,7 @@ Please use the following naming schemes, to make it easy to understand what is g
9696

9797
### Nextflow version bumping
9898

99-
If you are using a new feature from core Nextflow, you may bump the minimum required version of nextflow in the pipeline with: `nf-core bump-version --nextflow . [min-nf-version]`
99+
If you are using a new feature from core Nextflow, you may bump the minimum required version of nextflow in the pipeline with: `nf-core pipelines bump-version --nextflow . [min-nf-version]`
100100

101101
### Images and figures
102102

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,46 +9,34 @@ body:
99
description: A clear and concise description of what the bug is.
1010
validations:
1111
required: true
12+
1213
- type: textarea
1314
id: command_used
1415
attributes:
1516
label: Command used and terminal output
16-
description: Steps to reproduce the behaviour. Please paste the command you used
17-
to launch the pipeline and the output from your terminal.
17+
description: Steps to reproduce the behaviour. Please paste the command you used to launch the pipeline and the output from your terminal.
1818
render: console
19-
placeholder: "$ nextflow run ...
20-
19+
placeholder: |
20+
$ nextflow run ...
2121
2222
Some output where something broke
2323
24-
"
2524
- type: textarea
2625
id: files
2726
attributes:
2827
label: Relevant files
29-
description: "Please drag and drop the relevant files here. Create a `.zip` archive
30-
if the extension is not allowed.
31-
32-
Your verbose log file `.nextflow.log` is often useful _(this is a hidden file
33-
in the directory where you launched the pipeline)_ as well as custom Nextflow
34-
configuration files.
28+
description: |
29+
Please drag and drop the relevant files here. Create a `.zip` archive if the extension is not allowed.
30+
Your verbose log file `.nextflow.log` is often useful _(this is a hidden file in the directory where you launched the pipeline)_ as well as custom Nextflow configuration files.
3531
36-
"
3732
- type: textarea
3833
id: system
3934
attributes:
4035
label: System information
41-
description: "* Nextflow version _(eg. 23.04.0)_
42-
36+
description: |
37+
* Nextflow version _(eg. 23.04.0)_
4338
* Hardware _(eg. HPC, Desktop, Cloud)_
44-
4539
* Executor _(eg. slurm, local, awsbatch)_
46-
47-
* Container engine: _(e.g. Docker, Singularity, Conda, Podman, Shifter, Charliecloud,
48-
or Apptainer)_
49-
40+
* Container engine: _(e.g. Docker, Singularity, Conda, Podman, Shifter, Charliecloud, or Apptainer)_
5041
* OS _(eg. CentOS Linux, macOS, Linux Mint)_
51-
5242
* Version of seqeralabs/nf-aggregate _(eg. 1.1, 1.5, 1.8.2)_
53-
54-
"

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Learn more about contributing: [CONTRIBUTING.md](https://github.com/seqeralabs/n
1616
- [ ] This comment contains a description of changes (with reason).
1717
- [ ] If you've fixed a bug or added code that should be tested, add tests!
1818
- [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/seqeralabs/nf-aggregate/tree/master/.github/CONTRIBUTING.md)
19-
- [ ] Make sure your code lints (`nf-core lint`).
19+
- [ ] Make sure your code lints (`nf-core pipelines lint`).
2020
- [ ] Ensure the test suite passes (`nextflow run . -profile test,docker --outdir <OUTDIR>`).
2121
- [ ] Check for unexpected warnings in debug mode (`nextflow run . -profile debug,test,docker --outdir <OUTDIR>`).
2222
- [ ] Usage Documentation in `docs/usage.md` is updated.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313

1414
env:
1515
NXF_ANSI_LOG: false
16-
NFT_VER: "0.8.4"
16+
NFT_VER: "0.9.2"
1717
NFT_WORKDIR: "~"
1818
NFT_DIFF: "pdiff"
1919
NFT_DIFF_ARGS: "--line-numbers --expand-tabs=2"

.github/workflows/linting.yml

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
name: nf-aggregate linting
1+
name: nf-core linting
22
# This workflow is triggered on pushes and PRs to the repository.
3-
# It runs markdown lint tests to ensure
3+
# It runs the `nf-core pipelines lint` and markdown lint tests to ensure
44
# that the code meets the nf-core guidelines.
55
on:
66
push:
@@ -31,35 +31,50 @@ jobs:
3131
runs-on: ubuntu-latest
3232
steps:
3333
- name: Check out pipeline code
34-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
34+
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
3535

3636
- name: Install Nextflow
37-
uses: nf-core/setup-nextflow@v1
37+
uses: nf-core/setup-nextflow@v2
3838

39-
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5
39+
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5
4040
with:
41-
python-version: "3.11"
41+
python-version: "3.12"
4242
architecture: "x64"
4343

44+
- name: read .nf-core.yml
45+
uses: pietrobolcato/action-read-yaml@1.1.0
46+
id: read_yml
47+
with:
48+
config: ${{ github.workspace }}/.nf-core.yml
49+
4450
- name: Install dependencies
4551
run: |
4652
python -m pip install --upgrade pip
47-
pip install git+https://github.com/nf-core/tools.git@2.14.1
53+
pip install nf-core==${{ steps.read_yml.outputs['nf_core_version'] }}
54+
55+
- name: Run nf-core pipelines lint
56+
if: ${{ github.base_ref != 'master' }}
57+
env:
58+
GITHUB_COMMENTS_URL: ${{ github.event.pull_request.comments_url }}
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
GITHUB_PR_COMMIT: ${{ github.event.pull_request.head.sha }}
61+
run: nf-core -l lint_log.txt pipelines lint --dir ${GITHUB_WORKSPACE} --markdown lint_results.md
4862

49-
- name: Run nf-core lint
63+
- name: Run nf-core pipelines lint --release
64+
if: ${{ github.base_ref == 'master' }}
5065
env:
5166
GITHUB_COMMENTS_URL: ${{ github.event.pull_request.comments_url }}
5267
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5368
GITHUB_PR_COMMIT: ${{ github.event.pull_request.head.sha }}
54-
run: nf-core -l lint_log.txt lint --dir ${GITHUB_WORKSPACE} --markdown lint_results.md
69+
run: nf-core -l lint_log.txt pipelines lint --release --dir ${GITHUB_WORKSPACE} --markdown lint_results.md
5570

5671
- name: Save PR number
5772
if: ${{ always() }}
5873
run: echo ${{ github.event.pull_request.number }} > PR_number.txt
5974

6075
- name: Upload linting log file artifact
6176
if: ${{ always() }}
62-
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
77+
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4
6378
with:
6479
name: linting-logs
6580
path: |

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ results/
66
testing/
77
testing*
88
*.pyc
9+
null/
910
.nf-test*
1011
test.tap
1112
test.xml

.gitpod.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,7 @@ tasks:
44
command: |
55
pre-commit install --install-hooks
66
nextflow self-update
7-
- name: unset JAVA_TOOL_OPTIONS
8-
command: |
9-
unset JAVA_TOOL_OPTIONS
107
118
vscode:
12-
extensions: # based on nf-core.nf-core-extensionpack
13-
- esbenp.prettier-vscode # Markdown/CommonMark linting and style checking for Visual Studio Code
14-
- EditorConfig.EditorConfig # override user/workspace settings with settings found in .editorconfig files
15-
- Gruntfuggly.todo-tree # Display TODO and FIXME in a tree view in the activity bar
16-
- mechatroner.rainbow-csv # Highlight columns in csv files in different colors
17-
# - nextflow.nextflow # Nextflow syntax highlighting
18-
- oderwat.indent-rainbow # Highlight indentation level
19-
- streetsidesoftware.code-spell-checker # Spelling checker for source code
20-
- 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: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
repository_type: pipeline
2-
nf_core_version: 2.14.1
31
lint:
4-
actions_ci: False
5-
base_config: False
2+
actions_ci: false
3+
base_config: false
64
files_exist:
75
- .github/.dockstore.yml
86
- .github/ISSUE_TEMPLATE/config.yml
@@ -34,20 +32,30 @@ lint:
3432
- assets/nf-aggregate_logo_light.png
3533
- docs/images/nf-aggregate_logo_dark.png
3634
- docs/images/nf-aggregate_logo_light.png
37-
modules_config: False
38-
multiqc_config: False
35+
modules_config: false
36+
multiqc_config: false
3937
nextflow_config:
4038
- custom_config
4139
- manifest.homePage
4240
- manifest.name
4341
- process.cpus
4442
- process.memory
4543
- process.time
46-
schema_lint: False
47-
pipeline_name_conventions: False
44+
pipeline_name_conventions: false
45+
schema_lint: false
46+
nf_core_version: 3.2.0
47+
repository_type: pipeline
4848
template:
49-
prefix: seqeralabs
50-
skip:
49+
author: SciDev Team
50+
description: Pipeline to aggregate pertinent metrics across pipeline runs on the
51+
Seqera Platform.
52+
force: false
53+
is_nfcore: false
54+
name: nf-aggregate
55+
org: seqeralabs
56+
outdir: .
57+
skip_features:
5158
- ci
5259
- igenomes
5360
- nf_core_configs
61+
version: 0.6.0

.pre-commit-config.yaml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,24 @@ repos:
44
hooks:
55
- id: prettier
66
additional_dependencies:
7-
- prettier@3.2.5
8-
9-
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
10-
rev: "2.7.3"
7+
- prettier@3.5.0
8+
- repo: https://github.com/pre-commit/pre-commit-hooks
9+
rev: v5.0.0
1110
hooks:
12-
- id: editorconfig-checker
13-
alias: ec
11+
- id: trailing-whitespace
12+
args: [--markdown-linebreak-ext=md]
13+
exclude: |
14+
(?x)^(
15+
.*ro-crate-metadata.json$|
16+
modules/nf-core/.*|
17+
subworkflows/nf-core/.*|
18+
.*\.snap$
19+
)$
20+
- id: end-of-file-fixer
21+
exclude: |
22+
(?x)^(
23+
.*ro-crate-metadata.json$|
24+
modules/nf-core/.*|
25+
subworkflows/nf-core/.*|
26+
.*\.snap$
27+
)$

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ testing/
1010
testing*
1111
*.pyc
1212
bin/
13+
ro-crate-metadata.json
1314
*.html

0 commit comments

Comments
 (0)