Skip to content

Commit aac172d

Browse files
authored
Merge pull request #420 from nf-core/dev
Dev -> Master 2.7.0
2 parents 54f823e + cd1a02f commit aac172d

File tree

321 files changed

+22458
-4713
lines changed

Some content is hidden

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

321 files changed

+22458
-4713
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,7 @@
1010
"vscode": {
1111
// Set *default* container specific settings.json values on container create.
1212
"settings": {
13-
"python.defaultInterpreterPath": "/opt/conda/bin/python",
14-
"python.linting.enabled": true,
15-
"python.linting.pylintEnabled": true,
16-
"python.formatting.autopep8Path": "/opt/conda/bin/autopep8",
17-
"python.formatting.yapfPath": "/opt/conda/bin/yapf",
18-
"python.linting.flake8Path": "/opt/conda/bin/flake8",
19-
"python.linting.pycodestylePath": "/opt/conda/bin/pycodestyle",
20-
"python.linting.pydocstylePath": "/opt/conda/bin/pydocstyle",
21-
"python.linting.pylintPath": "/opt/conda/bin/pylint"
13+
"python.defaultInterpreterPath": "/opt/conda/bin/python"
2214
},
2315

2416
// Add the IDs of extensions you want installed when the container is created.

.editorconfig

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,16 @@ end_of_line = unset
1818
insert_final_newline = unset
1919
trim_trailing_whitespace = unset
2020
indent_style = unset
21-
indent_size = unset
21+
[/subworkflows/nf-core/**]
22+
charset = unset
23+
end_of_line = unset
24+
insert_final_newline = unset
25+
trim_trailing_whitespace = unset
26+
indent_style = unset
2227

2328
[/assets/email*]
2429
indent_size = unset
30+
31+
# ignore python and markdown
32+
[*.{py,md}]
33+
indent_style = unset

.github/CONTRIBUTING.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ Please use the pre-filled template to save time.
99
However, don't be put off by this template - other more general issues and suggestions are welcome!
1010
Contributions to the code are even more welcome ;)
1111

12-
:::info
13-
If you need help using or modifying nf-core/methylseq then the best place to ask is on the nf-core Slack [#methylseq](https://nfcore.slack.com/channels/methylseq) channel ([join our Slack here](https://nf-co.re/join/slack)).
14-
:::
12+
> [!NOTE]
13+
> If you need help using or modifying nf-core/methylseq then the best place to ask is on the nf-core Slack [#methylseq](https://nfcore.slack.com/channels/methylseq) channel ([join our Slack here](https://nf-co.re/join/slack)).
1514
1615
## Contribution workflow
1716

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

2625
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/).
2726

2827
## Tests
2928

30-
You can optionally test your changes by running the pipeline locally. Then it is recommended to use the `debug` profile to
31-
receive warnings about process selectors and other debug info. Example: `nextflow run . -profile debug,test,docker --outdir <OUTDIR>`.
29+
You have the option to test your changes locally by running the pipeline. For receiving warnings about process selectors and other `debug` information, it is recommended to use the debug profile. Execute all the tests with the following command:
30+
31+
```bash
32+
nf-test test --profile debug,test,docker --verbose
33+
```
3234

3335
When you create a pull request with changes, [GitHub Actions](https://github.com/features/actions) will run automatic tests.
3436
Typically, pull-requests are only fully reviewed when these tests are passing, though of course we can help out before then.
@@ -38,7 +40,7 @@ There are typically two types of tests that run:
3840
### Lint tests
3941

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

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

@@ -73,7 +75,7 @@ If you wish to contribute a new step, please use the following coding standards:
7375
2. Write the process block (see below).
7476
3. Define the output channel if needed (see below).
7577
4. Add any new parameters to `nextflow.config` with a default (see below).
76-
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).
7779
6. Add sanity checks and validation for all relevant parameters.
7880
7. Perform local tests to validate that the new code works as expected.
7981
8. If applicable, add a new test command in `.github/workflow/ci.yml`.
@@ -84,13 +86,13 @@ If you wish to contribute a new step, please use the following coding standards:
8486

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

87-
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`.
8890

8991
### Default processes resource requirements
9092

91-
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.
9294

93-
The process resources can be passed on to the tool dynamically within the process with the `${task.cpu}` and `${task.memory}` variables in the `script:` block.
95+
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.
9496

9597
### Naming schemes
9698

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

102104
### Nextflow version bumping
103105

104-
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]`
105107

106108
### Images and figures
107109

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/meth
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/methylseq/tree/master/.github/CONTRIBUTING.md)
1919
- [ ] If necessary, also make a PR on the nf-core/methylseq _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

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,40 @@
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:
11-
run-tower:
15+
run-platform:
1216
name: Run AWS full tests
13-
if: github.repository == 'nf-core/methylseq'
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/methylseq' && github.event.review.state == 'approved' && github.event.pull_request.base.ref == 'master' || github.event_name == 'workflow_dispatch'
1419
runs-on: ubuntu-latest
1520
strategy:
1621
matrix:
1722
aligner: ["bismark", "bismark_hisat", "bwameth"]
1823
steps:
19-
- name: Launch workflow via tower
24+
- uses: octokit/request-action@v2.x
25+
if: github.event_name != 'workflow_dispatch'
26+
id: check_approvals
27+
with:
28+
route: GET /repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews?per_page=100
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
37+
- name: Launch workflow via Seqera Platform
2038
uses: seqeralabs/action-tower-launch@v2
2139
with:
2240
workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }}
@@ -27,14 +45,14 @@ jobs:
2745
parameters: |
2846
{
2947
"hook_url": "${{ secrets.MEGATESTS_ALERTS_SLACK_HOOK_URL }}",
30-
"outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/methylseq/results-${{ github.sha }}/${{matrix.aligner}}"
48+
"outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/methylseq/results-${{ github.sha }}/${{matrix.aligner}}",
3149
"aligner": "${{ matrix.aligner }}",
3250
}
3351
profiles: test_full
3452

35-
- uses: actions/upload-artifact@v3
53+
- uses: actions/upload-artifact@v4
3654
with:
37-
name: Tower debug log file
55+
name: Seqera Platform debug log file
3856
path: |
39-
tower_action_*.log
40-
tower_action_*.json
57+
seqera_platform_action_*.log
58+
seqera_platform_action_*.json

.github/workflows/awstest.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ name: nf-core AWS test
55
on:
66
workflow_dispatch:
77
jobs:
8-
run-tower:
8+
run-platform:
99
name: Run AWS tests
1010
if: github.repository == 'nf-core/methylseq'
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
1414
aligner: ["bismark", "bismark_hisat", "bwameth"]
1515
steps:
16-
# Launch workflow using Tower CLI tool action
17-
- name: Launch workflow via tower
16+
# Launch workflow using Seqera Platform CLI tool action
17+
- name: Launch workflow via Seqera Platform
1818
uses: seqeralabs/action-tower-launch@v2
1919
with:
2020
workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }}
@@ -29,9 +29,9 @@ jobs:
2929
}
3030
profiles: test
3131

32-
- uses: actions/upload-artifact@v3
32+
- uses: actions/upload-artifact@v4
3333
with:
34-
name: Tower debug log file
34+
name: Seqera Platform debug log file
3535
path: |
36-
tower_action_*.log
37-
tower_action_*.json
36+
seqera_platform_action_*.log
37+
seqera_platform_action_*.json

.github/workflows/branch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
# NOTE - this doesn't currently work if the PR is coming from a fork, due to limitations in GitHub actions secrets
2020
- name: Post PR comment
2121
if: failure()
22-
uses: mshick/add-pr-comment@v1
22+
uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2
2323
with:
2424
message: |
2525
## This PR is against the `master` branch :x:

0 commit comments

Comments
 (0)