Skip to content

Commit 571d7eb

Browse files
authored
Merge pull request #410 from nf-core/dev
Release PR for 2.0.0
2 parents 2a5c32a + 09f61d1 commit 571d7eb

File tree

370 files changed

+20865
-3895
lines changed

Some content is hidden

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

370 files changed

+20865
-3895
lines changed

.devcontainer/devcontainer.json

+1-9
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

+10-1
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

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

@@ -27,6 +26,12 @@ If you're not used to this workflow with git, you can start with some [docs from
2726

2827
## Tests
2928

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+
```
34+
3035
When you create a pull request with changes, [GitHub Actions](https://github.com/features/actions) will run automatic tests.
3136
Typically, pull-requests are only fully reviewed when these tests are passing, though of course we can help out before then.
3237

@@ -87,7 +92,7 @@ Once there, use `nf-core schema build` to add to `nextflow_schema.json`.
8792

8893
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.
8994

90-
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.
9196

9297
### Naming schemes
9398

.github/PULL_REQUEST_TEMPLATE.md

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/func
1919
- [ ] If necessary, also make a PR on the nf-core/funcscan _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository.
2020
- [ ] Make sure your code lints (`nf-core lint`).
2121
- [ ] Ensure the test suite passes (`nextflow run . -profile test,docker --outdir <OUTDIR>`).
22+
- [ ] Check for unexpected warnings in debug mode (`nextflow run . -profile debug,test,docker --outdir <OUTDIR>`).
2223
- [ ] Usage Documentation in `docs/usage.md` is updated.
2324
- [ ] Output Documentation in `docs/output.md` is updated.
2425
- [ ] `CHANGELOG.md` is updated.

.github/workflows/awsfulltest.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ on:
88
types: [published]
99
workflow_dispatch:
1010
jobs:
11-
run-tower:
11+
run-platform:
1212
name: Run AWS full tests
1313
if: github.repository == 'nf-core/funcscan'
1414
runs-on: ubuntu-latest
1515
steps:
16-
- name: Launch workflow via tower
16+
- name: Launch workflow via Seqera Platform
1717
uses: seqeralabs/action-tower-launch@v2
1818
with:
1919
workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }}
@@ -28,9 +28,9 @@ jobs:
2828
}
2929
profiles: test_full
3030

31-
- uses: actions/upload-artifact@v3
31+
- uses: actions/upload-artifact@v4
3232
with:
33-
name: Tower debug log file
33+
name: Seqera Platform debug log file
3434
path: |
35-
tower_action_*.log
36-
tower_action_*.json
35+
seqera_platform_action_*.log
36+
seqera_platform_action_*.json

.github/workflows/awstest.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ 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/funcscan'
1111
runs-on: ubuntu-latest
1212
steps:
13-
# Launch workflow using Tower CLI tool action
14-
- name: Launch workflow via tower
13+
# Launch workflow using Seqera Platform CLI tool action
14+
- name: Launch workflow via Seqera Platform
1515
uses: seqeralabs/action-tower-launch@v2
1616
with:
1717
workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }}
@@ -25,9 +25,9 @@ jobs:
2525
}
2626
profiles: test
2727

28-
- uses: actions/upload-artifact@v3
28+
- uses: actions/upload-artifact@v4
2929
with:
30-
name: Tower debug log file
30+
name: Seqera Platform debug log file
3131
path: |
32-
tower_action_*.log
33-
tower_action_*.json
32+
seqera_platform_action_*.log
33+
seqera_platform_action_*.json

.github/workflows/branch.yml

+1-1
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:

.github/workflows/ci.yml

+66-67
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,101 @@
1-
name: nf-core CI
21
# This workflow runs the pipeline with the minimal test dataset to check that it completes without any syntax errors
2+
name: nf-core CI
33
on:
44
push:
55
branches:
6-
- dev
6+
- "dev"
77
pull_request:
8+
branches:
9+
- "dev"
10+
- "master"
811
release:
9-
types: [published]
12+
types:
13+
- "published"
1014

1115
env:
1216
NXF_ANSI_LOG: false
17+
NFTEST_VER: "0.8.4"
1318

1419
concurrency:
15-
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}"
20+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1621
cancel-in-progress: true
1722

1823
jobs:
19-
test:
20-
name: Run pipeline with test data (AMP and ARG workflows)
21-
# Only run on push if this is the nf-core dev branch (merged PRs)
22-
if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/funcscan') }}"
24+
define_nxf_versions:
25+
name: Choose nextflow versions to test against depending on target branch
2326
runs-on: ubuntu-latest
24-
strategy:
25-
matrix:
26-
NXF_VER:
27-
- "23.04.0"
28-
- "latest-everything"
29-
parameters:
30-
- "--annotation_tool prodigal"
31-
- "--annotation_tool prokka"
32-
- "--annotation_tool bakta --annotation_bakta_db_downloadtype light"
33-
27+
outputs:
28+
matrix: ${{ steps.nxf_versions.outputs.matrix }}
3429
steps:
35-
- name: Check out pipeline code
36-
uses: actions/checkout@v3
37-
38-
- name: Install Nextflow
39-
uses: nf-core/setup-nextflow@v1
40-
with:
41-
version: "${{ matrix.NXF_VER }}"
42-
43-
- name: Run pipeline with test data (AMP and ARG workflows)
30+
- id: nxf_versions
4431
run: |
45-
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results ${{ matrix.parameters }}
32+
if [[ "${{ github.event_name }}" == "pull_request" && "${{ github.base_ref }}" == "dev" && "${{ matrix.NXF_VER }}" != "latest-everything" ]]; then
33+
echo matrix='["latest-everything"]' | tee -a $GITHUB_OUTPUT
34+
else
35+
echo matrix='["latest-everything", "23.10.0"]' | tee -a $GITHUB_OUTPUT
36+
fi
4637
47-
test_bgc:
48-
name: Run pipeline with test data (BGC workflow)
49-
# Only run on push if this is the nf-core dev branch (merged PRs)
50-
if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/funcscan') }}"
38+
test:
39+
name: nf-test
40+
needs: define_nxf_versions
5141
runs-on: ubuntu-latest
5242
strategy:
43+
fail-fast: false
5344
matrix:
54-
NXF_VER:
55-
- "23.04.0"
56-
- "latest-everything"
57-
parameters:
58-
- "--annotation_tool prodigal"
59-
- "--annotation_tool prokka"
60-
- "--annotation_tool bakta --annotation_bakta_db_downloadtype light"
45+
NXF_VER: ${{ fromJson(needs.define_nxf_versions.outputs.matrix) }}
46+
tags:
47+
- "test"
48+
- "test_nothing"
49+
- "test_bakta"
50+
- "test_prokka"
51+
- "test_bgc_pyrodigal"
52+
- "test_bgc_bakta"
53+
- "test_bgc_prokka"
54+
- "test_taxonomy_pyrodigal"
55+
- "test_taxonomy_bakta"
56+
- "test_taxonomy_prokka"
57+
- "test_preannotated"
58+
- "test_preannotated_bgc"
59+
profile:
60+
- "docker"
6161

6262
steps:
6363
- name: Check out pipeline code
64-
uses: actions/checkout@v2
64+
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
65+
66+
- name: Check out test data
67+
uses: actions/checkout@v3
68+
with:
69+
repository: nf-core/test-datasets
70+
ref: funcscan
71+
path: test-datasets/
72+
fetch-depth: 1
6573

6674
- name: Install Nextflow
6775
uses: nf-core/setup-nextflow@v1
6876
with:
6977
version: "${{ matrix.NXF_VER }}"
7078

71-
- name: Run pipeline with test data (BGC workflow)
79+
- name: Disk space cleanup
80+
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
81+
82+
- name: Install nf-test
7283
run: |
73-
nextflow run ${GITHUB_WORKSPACE} -profile test_bgc,docker --outdir ./results ${{ matrix.parameters }} --bgc_skip_deepbgc
84+
wget -qO- https://code.askimed.com/install/nf-test | bash -s $NFTEST_VER
85+
sudo mv nf-test /usr/local/bin/
7486
75-
test_deeparg:
76-
name: Run pipeline with test data (DeepARG only workflow)
77-
# Only run on push if this is the nf-core dev branch (merged PRs)
78-
if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/funcscan') }}"
79-
runs-on: ubuntu-latest
80-
strategy:
81-
matrix:
82-
NXF_VER:
83-
- "23.04.0"
84-
- "latest-everything"
85-
parameters:
86-
- "--annotation_tool bakta --annotation_bakta_db_downloadtype light"
87-
- "--annotation_tool pyrodigal"
87+
- name: Run nf-test
88+
run: |
89+
nf-test test --tag ${{ matrix.tags }} --profile ${{ matrix.tags }},${{ matrix.profile }} --junitxml=test.xml
8890
89-
steps:
90-
- name: Check out pipeline code
91-
uses: actions/checkout@v2
91+
- name: Output log on failure
92+
if: failure()
93+
run: |
94+
sudo apt install bat > /dev/null
95+
batcat --decorations=always --color=always ${{ github.workspace }}/.nf-test/*/tests/output/pipeline_info/software_versions.yml
9296
93-
- name: Install Nextflow
94-
uses: nf-core/setup-nextflow@v1
97+
- name: Publish Test Report
98+
uses: mikepenz/action-junit-report@v3
99+
if: always() # always run even if the previous step fails
95100
with:
96-
version: "${{ matrix.NXF_VER }}"
97-
98-
- name: Run pipeline with test data (DeepARG workflow)
99-
run: |
100-
wget https://zenodo.org/record/8280582/files/deeparg.zip ## download from zenodo due to instability of deepARG server
101-
unzip deeparg.zip
102-
nextflow run ${GITHUB_WORKSPACE} -profile test_deeparg,docker --outdir ./results ${{ matrix.parameters }} --arg_deeparg_data 'deeparg/'
101+
report_paths: "*.xml"

.github/workflows/clean-up.yml

+1-1
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@v7
13+
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9
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."

0 commit comments

Comments
 (0)