Skip to content

Commit 22f9c21

Browse files
nf-core-botmashehu
authored andcommitted
[automated] Update nf-core/tools API docs for dev
1 parent b4a57bd commit 22f9c21

15 files changed

Lines changed: 327 additions & 144 deletions

sites/docs/src/content/api_reference/dev/module_lint_tests/environment_yml.md

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,35 @@ is sorted alphabetically.
1010

1111
The following checks are performed:
1212

13-
- `environment_yml_exists`: The `environment.yml` file must exist, unless the
14-
module has a Dockerfile. If neither `environment.yml` nor a Dockerfile is
15-
present, the test fails.
16-
- `environment_yml_dockerfile_conflict`: A module must not have both an
17-
`environment.yml` and a Dockerfile; Remove the Dockerfile if present.
18-
- `environment_yml_valid`: The `environment.yml` must be valid according to
19-
the JSON schema defined at <https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json>.
20-
- `environment_yml_sorted`: The dependencies listed in `environment.yml`
21-
must be sorted alphabetically. If they are not, they will be sorted
22-
automatically.
23-
- `bioconda_version`: The version specified for each bioconda package must
24-
be a valid, known version available in the bioconda channel.
25-
- `bioconda_latest`: Each bioconda package should be pinned to the latest
26-
available version. A warning is raised (or the version updated if
27-
`fix_version` is set) when a newer version exists.
13+
## environment\_yml\_exists
14+
15+
The `environment.yml` file must exist, unless the
16+
module has a Dockerfile. If neither `environment.yml` nor a Dockerfile is
17+
present, the test fails.
18+
19+
## environment\_yml\_dockerfile\_conflict
20+
21+
A module must not have both an
22+
`environment.yml` and a Dockerfile; Remove the Dockerfile if present.
23+
24+
## environment\_yml\_valid
25+
26+
The `environment.yml` must be valid according to
27+
the JSON schema defined at <https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json>.
28+
29+
## environment\_yml\_sorted
30+
31+
The dependencies listed in `environment.yml`
32+
must be sorted alphabetically. If they are not, they will be sorted
33+
automatically.
34+
35+
## bioconda\_version
36+
37+
The version specified for each bioconda package must
38+
be a valid, known version available in the bioconda channel.
39+
40+
## bioconda\_latest
41+
42+
Each bioconda package should be pinned to the latest
43+
available version. A warning is raised (or the version updated if
44+
`fix_version` is set) when a newer version exists.

sites/docs/src/content/api_reference/dev/module_lint_tests/main_nf.md

Lines changed: 68 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,71 @@ in which case failures will be reported as warnings.
99

1010
The following checks are performed:
1111

12-
- `main_nf_module_granularity`: The module must represent a single command
13-
as `<tool>` or single subcommand with distinct functionality as
14-
`<tool/subtool>`.
15-
- `main_nf_exists`: The `main.nf` file must exist.
16-
- `deprecated_dsl2`: The file must not contain deprecated DSL2 identifiers
17-
(`initOptions`, `saveFiles`, `getSoftwareName`, `getProcessName`,
18-
`publishDir`).
19-
- `main_nf_script_outputs`: The process must have an `output:` block.
20-
- `main_nf_container`: When both a `singularity` and a `docker` container
21-
are specified, their tags must reference the same software version. A warning
22-
is issued if they do not match. Modules using the newer docker-only format
23-
(no singularity container) skip this check.
24-
- `singularity_tag`: A Singularity container must be resolvable via
25-
`nextflow inspect -profile singularity`. The check fails if none can be
26-
resolved or if it falls back to a docker container that has an automatic
27-
singularity equivalent, i.e., `quay.io/biocontainers/` or
28-
`community.wave.seqera.io/`.
29-
It is skipped for modules listed under `singularity` in `.github/skip_nf_test.json`.
30-
- `oras_singularity_tag`: The resolved Singularity container must not be
31-
served over the `oras://` scheme; it should be a plain `https://` URL.
32-
The check fails if an `oras://` container is used.
33-
- `main_nf_script_shell`: Exactly one of `script:`, `shell:`, or `exec:`
34-
blocks must be present.
35-
- `main_nf_shell_template`: If a `shell:` block is used, it must call
36-
a `template`.
37-
- `main_nf_meta_output`: If `meta` is present in the module inputs, it
38-
must also appear in at least one output channel.
39-
- `main_nf_version_topic`: The module should emit software versions using
40-
a `topic: versions` output. A warning is issued if no such topic is found.
41-
- `main_nf_version_emit`: The number of `topic: versions` outputs must
42-
equal the number of `emit:` outputs whose name starts with `versions`.
43-
A warning is issued if a legacy YAML-based `versions` emit is used instead
44-
of a topic output.
12+
## main\_nf\_module\_granularity
13+
14+
The module must represent a single command
15+
as `<tool>` or single subcommand with distinct functionality as
16+
`<tool/subtool>`.
17+
18+
## main\_nf\_exists
19+
20+
The `main.nf` file must exist.
21+
22+
## deprecated\_dsl2
23+
24+
The file must not contain deprecated DSL2 identifiers
25+
(`initOptions`, `saveFiles`, `getSoftwareName`, `getProcessName`,
26+
`publishDir`).
27+
28+
## main\_nf\_script\_outputs
29+
30+
The process must have an `output:` block.
31+
32+
## main\_nf\_container
33+
34+
When both a `singularity` and a `docker` container
35+
are specified, their tags must reference the same software version. A warning
36+
is issued if they do not match. Modules using the newer docker-only format
37+
(no singularity container) skip this check.
38+
39+
## singularity\_tag
40+
41+
A Singularity container must be resolvable via
42+
`nextflow inspect -profile singularity`. The check fails if none can be
43+
resolved or if it falls back to a docker container that has an automatic
44+
singularity equivalent, i.e., `quay.io/biocontainers/` or
45+
`community.wave.seqera.io/`.
46+
It is skipped for modules listed under `singularity` in `.github/skip_nf_test.json`.
47+
48+
## oras\_singularity\_tag
49+
50+
The resolved Singularity container must not be
51+
served over the `oras://` scheme; it should be a plain `https://` URL.
52+
The check fails if an `oras://` container is used.
53+
54+
## main\_nf\_script\_shell
55+
56+
Exactly one of `script:`, `shell:`, or `exec:`
57+
blocks must be present.
58+
59+
## main\_nf\_shell\_template
60+
61+
If a `shell:` block is used, it must call
62+
a `template`.
63+
64+
## main\_nf\_meta\_output
65+
66+
If `meta` is present in the module inputs, it
67+
must also appear in at least one output channel.
68+
69+
## main\_nf\_version\_topic
70+
71+
The module should emit software versions using
72+
a `topic: versions` output. A warning is issued if no such topic is found.
73+
74+
## main\_nf\_version\_emit
75+
76+
The number of `topic: versions` outputs must
77+
equal the number of `emit:` outputs whose name starts with `versions`.
78+
A warning is issued if a legacy YAML-based `versions` emit is used instead
79+
of a topic output.

sites/docs/src/content/api_reference/dev/module_lint_tests/meta_yml.md

Lines changed: 60 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,66 @@ to the nf-core JSON schema, and that its contents are consistent with
1010

1111
The following checks are performed:
1212

13-
- `meta_yml_exists`: The `meta.yml` file must exist.
14-
- `meta_yml_valid`: The `meta.yml` must be valid according to the JSON
15-
schema defined in `modules/meta-schema.json` in the nf-core/modules
16-
repository.
17-
- `meta_name`: The `name` field in `meta.yml` must match (case-insensitive)
18-
the process name declared in `main.nf`.
19-
- `meta_input`: If `main.nf` declares inputs, they must be listed under
20-
the `input:` key in `meta.yml`.
21-
- `correct_meta_inputs`: The inputs listed in `meta.yml` must exactly
22-
match those parsed from `main.nf`. Run `nf-core modules lint --fix`
23-
to auto-correct.
24-
- `meta_output`: If `main.nf` declares outputs, they must be listed under
25-
the `output:` key in `meta.yml`.
26-
- `correct_meta_outputs`: The outputs listed in `meta.yml` must exactly
27-
match those parsed from `main.nf`. Run `nf-core modules lint --fix`
28-
to auto-correct.
29-
- `has_meta_topics`: If `main.nf` declares topics, `meta.yml` must
30-
also contain a non-empty `topics:` block. Run
31-
`nf-core modules lint --fix` to auto-correct.
32-
- `correct_meta_topics`: The topics listed in `meta.yml` must exactly
33-
match those parsed from `main.nf`. Run `nf-core modules lint --fix`
34-
to auto-correct.
35-
- `has_meta_containers`: If `main.nf` declares containers, `meta.yml`
36-
must also contain a non-empty `containers:` block. Run
37-
`nf-core modules lint --fix` to auto-correct.
38-
- `correct_meta_containers`: The containers listed in `meta.yml` must
39-
exactly match those parsed from `main.nf`. Run
40-
`nf-core modules lint --fix` to auto-correct.
13+
## meta\_yml\_exists
14+
15+
The `meta.yml` file must exist.
16+
17+
## meta\_yml\_valid
18+
19+
The `meta.yml` must be valid according to the JSON
20+
schema defined in `modules/meta-schema.json` in the nf-core/modules
21+
repository.
22+
23+
## meta\_name
24+
25+
The `name` field in `meta.yml` must match (case-insensitive)
26+
the process name declared in `main.nf`.
27+
28+
## meta\_input
29+
30+
If `main.nf` declares inputs, they must be listed under
31+
the `input:` key in `meta.yml`.
32+
33+
## correct\_meta\_inputs
34+
35+
The inputs listed in `meta.yml` must exactly
36+
match those parsed from `main.nf`. Run `nf-core modules lint --fix`
37+
to auto-correct.
38+
39+
## meta\_output
40+
41+
If `main.nf` declares outputs, they must be listed under
42+
the `output:` key in `meta.yml`.
43+
44+
## correct\_meta\_outputs
45+
46+
The outputs listed in `meta.yml` must exactly
47+
match those parsed from `main.nf`. Run `nf-core modules lint --fix`
48+
to auto-correct.
49+
50+
## has\_meta\_topics
51+
52+
If `main.nf` declares topics, `meta.yml` must
53+
also contain a non-empty `topics:` block. Run
54+
`nf-core modules lint --fix` to auto-correct.
55+
56+
## correct\_meta\_topics
57+
58+
The topics listed in `meta.yml` must exactly
59+
match those parsed from `main.nf`. Run `nf-core modules lint --fix`
60+
to auto-correct.
61+
62+
## has\_meta\_containers
63+
64+
If `main.nf` declares containers, `meta.yml`
65+
must also contain a non-empty `containers:` block. Run
66+
`nf-core modules lint --fix` to auto-correct.
67+
68+
## correct\_meta\_containers
69+
70+
The containers listed in `meta.yml` must
71+
exactly match those parsed from `main.nf`. Run
72+
`nf-core modules lint --fix` to auto-correct.
4173

4274
If the module has inputs or outputs, they are expected to be formatted as:
4375

sites/docs/src/content/api_reference/dev/module_lint_tests/module_changes.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,7 @@ Only runs when linting a pipeline, not the modules repository
1515

1616
The following checks are performed:
1717

18-
- `check_local_copy`: Each module file must be identical to the corresponding
19-
file in the remote repository at the pinned commit SHA.
18+
## check\_local\_copy
19+
20+
Each module file must be identical to the corresponding
21+
file in the remote repository at the pinned commit SHA.

sites/docs/src/content/api_reference/dev/module_lint_tests/module_deprecations.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@ Check that the modules are up to the latest nf-core standard
66

77
The following checks are performed:
88

9-
- `module_deprecations`: Deprecated files (e.g. `functions.nf`) must not
10-
be present in the module directory.
9+
## module\_deprecations
10+
11+
Deprecated files (e.g. `functions.nf`) must not
12+
be present in the module directory.

sites/docs/src/content/api_reference/dev/module_lint_tests/module_tests.md

Lines changed: 40 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,43 @@ validates snapshot content, and verifies that nf-test tags follow guidelines.
99

1010
The following checks are performed:
1111

12-
- `test_dir_exists`: The nf-test directory `tests/` must exist.
13-
- `test_main_nf_exists`: The file `tests/main.nf.test` must exist.
14-
- `test_snapshot_exists`: If `snapshot()` is called in `main.nf.test`,
15-
the snapshot file `tests/main.nf.test.snap` must exist and be valid JSON.
16-
- `test_snap_md5sum`: The snapshot must not contain md5sums for empty files
17-
(`d41d8cd98f00b204e9800998ecf8427e`) or empty compressed files
18-
(`7029066c27ac6f5ef18d660d5741979a`), unless the test name contains `stub`.
19-
- `test_snap_versions`: The snapshot must contain a `versions` key.
20-
- `test_main_tags`: The `main.nf.test` file must declare the required tags:
21-
`modules`, `modules_<org>`, the full component name, and (for `tool/subtool`
22-
modules) the tool name alone. Tags for any chained components included via
23-
`include` statements must also be present.
24-
- `test_old_test_dir`: The legacy pytest directory
25-
`tests/modules/<component_name>/` must not exist.
12+
## test\_dir\_exists
13+
14+
The nf-test directory `tests/` must exist.
15+
16+
## test\_main\_nf\_exists
17+
18+
The file `tests/main.nf.test` must exist.
19+
20+
## test\_snapshot\_exists
21+
22+
If `snapshot()` is called in `main.nf.test`,
23+
the snapshot file `tests/main.nf.test.snap` must exist and be valid JSON.
24+
25+
## test\_snap\_md5sum
26+
27+
The snapshot must not contain md5sums for empty files
28+
(`d41d8cd98f00b204e9800998ecf8427e`) or empty compressed files
29+
(`7029066c27ac6f5ef18d660d5741979a`), unless the test name contains `stub`.
30+
31+
## test\_snap\_versions
32+
33+
The snapshot must contain a `versions` key.
34+
35+
## test\_main\_tags
36+
37+
The `main.nf.test` file must declare the required tags:
38+
`modules`, `modules_<org>`, the full component name, and (for `tool/subtool`
39+
modules) the tool name alone. Tags for any chained components included via
40+
`include` statements must also be present.
41+
42+
## test\_old\_test\_dir
43+
44+
The legacy pytest directory
45+
`tests/modules/<component_name>/` must not exist.
46+
47+
## test\_stub\_gzip\_syntax
48+
49+
Stub blocks with gzip output files must use the proper syntax. Stub files
50+
ending in `.gz` must use `echo "" | gzip > file.gz`. Simply touching or
51+
creating empty `.gz` files will break nf-test’s gzip parser.

sites/docs/src/content/api_reference/dev/module_lint_tests/module_todos.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ They typically have the following format:
2121
This lint test runs through all files in the module and searches for these lines.
2222
If any are found they will throw a warning.
2323

24-
- `module_todo`: A warning is issued for each TODO comment found in the
25-
module files.
24+
## module\_todo
25+
26+
A warning is issued for each TODO comment found in the
27+
module files.
2628

2729
:::note
2830
Note that many GUI code editors have plugins to list all instances of _TODO_

sites/docs/src/content/api_reference/dev/module_lint_tests/module_version.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ newer version of the module available.
1010

1111
The following checks are performed:
1212

13-
- `git_sha`: The module must have a `git_sha` entry in `modules.json`.
14-
- `module_version`: The module version must match the latest commit in the
15-
remote repository. A warning is issued if a newer version is available.
13+
## git\_sha
14+
15+
The module must have a `git_sha` entry in `modules.json`.
16+
17+
## module\_version
18+
19+
The module version must match the latest commit in the
20+
remote repository. A warning is issued if a newer version is available.

sites/docs/src/content/api_reference/dev/subworkflow_lint_tests/main_nf.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,16 @@ The test checks for the following:
1717

1818
The following checks are performed:
1919

20-
- `main_nf_exists`: The `main.nf` file must exist.
21-
- `main_nf_script_outputs`: The workflow must have an `emit:` block.
22-
- `main_nf_version_emitted`: The subworkflow should emit a software version
23-
channel. A warning is issued if no `versions` output is found (can be
24-
ignored if the subworkflow uses topic channels).
20+
## main\_nf\_exists
21+
22+
The `main.nf` file must exist.
23+
24+
## main\_nf\_script\_outputs
25+
26+
The workflow must have an `emit:` block.
27+
28+
## main\_nf\_version\_emitted
29+
30+
The subworkflow should emit a software version
31+
channel. A warning is issued if no `versions` output is found (can be
32+
ignored if the subworkflow uses topic channels).

0 commit comments

Comments
 (0)