Skip to content

Commit e1eb311

Browse files
authored
Merge pull request #444 from nf-core/nf-core-template-merge-3.0.2
Important! Template update for nf-core/tools v3.0.2
2 parents c293787 + a0edbe6 commit e1eb311

Some content is hidden

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

53 files changed

+1631
-1082
lines changed

.github/CONTRIBUTING.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ If you'd like to write some code for nf-core/viralrecon, the standard workflow i
1919
1. Check that there isn't already an issue about your idea in the [nf-core/viralrecon issues](https://github.com/nf-core/viralrecon/issues) to avoid duplicating work. If there isn't one already, please create one so that others know you're working on this
2020
2. [Fork](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) the [nf-core/viralrecon repository](https://github.com/nf-core/viralrecon) to your GitHub account
2121
3. Make the necessary changes / additions within your forked repository following [Pipeline conventions](#pipeline-contribution-conventions)
22-
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).
22+
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).
2323
5. Submit a Pull Request against the `dev` branch and wait for the code to be reviewed and merged
2424

2525
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/).
@@ -40,7 +40,7 @@ There are typically two types of tests that run:
4040
### Lint tests
4141

4242
`nf-core` has a [set of guidelines](https://nf-co.re/developers/guidelines) which all pipelines must adhere to.
43-
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.
43+
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.
4444

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

@@ -75,7 +75,7 @@ If you wish to contribute a new step, please use the following coding standards:
7575
2. Write the process block (see below).
7676
3. Define the output channel if needed (see below).
7777
4. Add any new parameters to `nextflow.config` with a default (see below).
78-
5. Add any new parameters to `nextflow_schema.json` with help text (via the `nf-core schema build` tool).
78+
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.
8181
8. If applicable, add a new test command in `.github/workflow/ci.yml`.
@@ -86,11 +86,11 @@ If you wish to contribute a new step, please use the following coding standards:
8686

8787
Parameters should be initialised / defined with default values in `nextflow.config` under the `params` scope.
8888

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

9191
### Default processes resource requirements
9292

93-
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.
93+
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.
9494

9595
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.
9696

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

104104
### Nextflow version bumping
105105

106-
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]`
106+
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]`
107107

108108
### Images and figures
109109

.github/PULL_REQUEST_TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/vira
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/nf-core/viralrecon/tree/master/.github/CONTRIBUTING.md)
1919
- [ ] If necessary, also make a PR on the nf-core/viralrecon _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository.
20-
- [ ] Make sure your code lints (`nf-core lint`).
20+
- [ ] Make sure your code lints (`nf-core pipelines lint`).
2121
- [ ] Ensure the test suite passes (`nextflow run . -profile test,docker --outdir <OUTDIR>`).
2222
- [ ] Check for unexpected warnings in debug mode (`nextflow run . -profile debug,test,docker --outdir <OUTDIR>`).
2323
- [ ] Usage Documentation in `docs/usage.md` is updated.

.github/workflows/awsfulltest.yml

+21-4
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,39 @@
11
name: nf-core AWS full size tests
2-
# This workflow is triggered on published releases.
2+
# This workflow is triggered on PRs opened against the master branch.
33
# It can be additionally triggered manually with GitHub actions workflow dispatch button.
44
# It runs the -profile 'test_full' on AWS batch
55

66
on:
7-
release:
8-
types: [published]
7+
pull_request:
8+
branches:
9+
- master
910
workflow_dispatch:
11+
pull_request_review:
12+
types: [submitted]
13+
1014
jobs:
1115
run-platform:
1216
name: Run AWS full tests
13-
if: github.repository == 'nf-core/viralrecon'
17+
# run only if the PR is approved by at least 2 reviewers and against the master branch or manually triggered
18+
if: github.repository == 'nf-core/viralrecon' && github.event.review.state == 'approved' && github.event.pull_request.base.ref == 'master' || github.event_name == 'workflow_dispatch'
1419
runs-on: ubuntu-latest
1520
# Do a full-scale run with data from each sequencing platform
1621
strategy:
1722
matrix:
1823
platform: ["illumina", "nanopore"]
1924
steps:
25+
- uses: octokit/[email protected]
26+
id: check_approvals
27+
with:
28+
route: GET /repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
- id: test_variables
32+
if: github.event_name != 'workflow_dispatch'
33+
run: |
34+
JSON_RESPONSE='${{ steps.check_approvals.outputs.data }}'
35+
CURRENT_APPROVALS_COUNT=$(echo $JSON_RESPONSE | jq -c '[.[] | select(.state | contains("APPROVED")) ] | length')
36+
test $CURRENT_APPROVALS_COUNT -ge 2 || exit 1 # At least 2 approvals are required
2037
- name: Launch workflow via Seqera Platform
2138
uses: seqeralabs/action-tower-launch@v2
2239
with:

0 commit comments

Comments
 (0)