Skip to content

Commit c0caaa5

Browse files
authored
Merge pull request #172 from nextflow-io/docs/faq-page
Add troubleshooting and FAQ pages
2 parents fcaafd3 + 8e2c703 commit c0caaa5

File tree

9 files changed

+57
-9
lines changed

9 files changed

+57
-9
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
1. Added a new configuration option: `validation.help.enumLength` which sets the maximum length of enum values in the help message. The default is set to the value in the `COLUMNS` environment variable or 100 character if that variable isn't set.
88
2. Added top-level schema description for detailed help `--help <args>`. If `<args>` is associated with a schema, then the top-level fields will be shown similarly to `--help` for the main schema (#146).
9+
3. Added a Troubleshooting and FAQ page to the documentation.
910

1011
## Changes
1112

docs/contributing/setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ To preview the docs, open the URL provided by mkdocs in your browser.
6666
- `github_username`: The GitHub username granting access to the plugin repository.
6767
- `github_access_token`: The GitHub access token required to upload and commit changes to the plugin repository.
6868
- `github_commit_email`: The email address associated with your GitHub account.
69-
3. Update the [changelog](./CHANGELOG.md).
69+
3. Update the [changelog](https://github.com/nextflow-io/nf-schema/blob/master/CHANGELOG.md).
7070
4. Build and publish the plugin to your GitHub repository:
7171
```bash
7272
make release

docs/extras/faq.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Frequently Asked Questions
2+
3+
## What pipelines are great examples of nf-schema usage?
4+
5+
Here's a list of pipelines that are considered great examples of nf-schema usage:
6+
7+
1. [nf-core pipelines](https://nf-co.re/pipelines/)
8+
2. [Joon-Klaps/viralgenie](https://github.com/Joon-Klaps/viralgenie)
9+
3. [genomic-medicine-sweden/nallo](https://github.com/genomic-medicine-sweden/nallo)
10+
4. [nf-cmgg/smallvariants](https://github.com/nf-cmgg/smallvariants)
11+
5. And many more...
12+
13+
Feel free to open a pull request to add more examples!
14+
15+
## How can I contribute to nf-schema?
16+
17+
Take a look at the [contribution instruction](../contributing/setup.md) to get started with contributing to nf-schema.
18+
19+
## Where can I ask other questions?
20+
21+
If you have a question that is not addressed in this FAQ, feel free to create an issue on the nf-schema repository [here](https://github.com/nextflow-io/nf-schema/issues) or ask your question in the `#nf-schema` Slack channel on the [Nextflow Slack](https://www.nextflow.io/slack-invite.html) or the [nf-core Slack](https://nf-co.re/join/slack)

docs/extras/troubleshooting.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Troubleshooting
2+
3+
This section of the documentation contains a couple of common errors encountered while implementing nf-schema or using pipelines with the plugin and how to solve them.
4+
5+
## An integer value is failing because a string value was expected
6+
7+
Pipelines often use some kind of identifier field in their sample sheet, that usually gets `string` as the expected input. This can cause some issues when using CSV and TSV sample sheets since the types of all values are automatically inferred for these file types. Meaning that a value in the `sample` field that has `123` as the value would result in an integer instead of a string. Following error would be shown in this case:
8+
9+
```
10+
-> Entry 1: Error for field 'sample' (123): Value is [integer] but should be [string]
11+
```
12+
13+
There are multiple ways to solve this issue as pipeline developers and as pipeline users. The solutions will be listed from best options to worst:
14+
15+
### Pipeline user
16+
17+
- Option 1: Use a YAML or JSON file as sample sheet if that is allowed by the pipeline and make sure to quote the value. (`'123'` in the case of the example above)
18+
- Option 2: Activate [lenient validation mode](../configuration/configuration.md#lenientmode). Keep in mind that this will enable lenient validation for **ALL** validations in the pipeline.
19+
20+
### Pipeline developer
21+
22+
- Option 1: Modify `"type": "string"` in the affected JSON schema to `"type": ["string", "integer"]`. Make sure that integer values don't break anything in your pipeline. The easiest way to ensure compatibility is to cast the value to a string after converting the sample sheet to a list.
23+
- Option 2: Enforce usage of JSON and YAML sample sheets by only allowing files ending in `.yml`, `.yaml` or `.json` to be used.

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ description: Nextflow plugin for sample sheet validation
1515

1616
nf-schema is the new version of the now deprecated [nf-validation](https://github.com/nextflow-io/nf-validation). Please follow the [migration guide](https://nextflow-io.github.io/nf-schema/latest/migration_guide/) to migrate your code to this new version.
1717

18-
[Parameter schema specs](nextflow_schema/nextflow_schema_specification/){ .md-button .md-button--primary }
19-
[Sample sheet schema specs](nextflow_schema/sample_sheet_schema_specification/){ .md-button }
18+
[Parameter schema specs](nextflow_schema/nextflow_schema_specification.md){ .md-button .md-button--primary }
19+
[Sample sheet schema specs](nextflow_schema/sample_sheet_schema_specification.md){ .md-button }
2020

2121
## Introduction
2222

docs/migration_guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Updating your pipeline can be done in a couple simple steps.
3636

3737
### Updating the name and version of the plugin
3838

39-
The name and the version of the plugin should be updated from `nf-validation` to `nf-schema@2.0.0`:
39+
The name and the version of the plugin should be updated from `nf-validation` to any version of `nf-schema@2.x.x`:
4040

4141
=== "nf-validation"
4242

@@ -50,7 +50,7 @@ The name and the version of the plugin should be updated from `nf-validation` to
5050

5151
```groovy
5252
plugins {
53-
id 'nf-schema@2.0.0'
53+
id 'nf-schema@2.x.x'
5454
}
5555
```
5656

docs/nextflow_schema/nextflow_schema_examples.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ It is used as a test fixture in the nf-schema package [here](https://github.com/
1313

1414
!!! note
1515

16-
More examples can be found in the plugin [`testResources` directory](https://github.com/nextflow-io/nf-schema/master/plugins/nf-schema/testResources/).
16+
More examples can be found in the plugin [`testResources` directory](https://github.com/nextflow-io/nf-schema/tree/master/src/testResources).
1717

1818
```json
1919
--8<-- "src/testResources/nextflow_schema.json"
2020
```
2121

22-
Even more examples can be found in the plugin [`examples` directory](../../examples) in the GitHub repository.
22+
Even more examples can be found in the plugin [`examples` directory](https://github.com/nextflow-io/nf-schema/tree/master/examples) in the GitHub repository.

docs/nextflow_schema/sample_sheet_schema_examples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ It is used as a test fixture in the nf-schema package [here](https://github.com/
6363
--8<-- "src/testResources/schema_input.json"
6464
```
6565

66-
Even more examples can be found in the plugin [`examples` directory](../../examples) in the GitHub repository.
66+
Even more examples can be found in the plugin [`examples` directory](https://github.com/nextflow-io/nf-schema/tree/master/examples) in the GitHub repository.

mkdocs.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ nav:
1313
- nextflow_schema/sample_sheet_schema_examples.md
1414
- Tutorials:
1515
- nextflow_schema/create_schema.md
16-
- migration_guide.md
16+
- Nf-validation migration guide: migration_guide.md
1717
- Reference:
1818
- nextflow_schema/nextflow_schema_specification.md
1919
- nextflow_schema/sample_sheet_schema_specification.md
@@ -25,6 +25,9 @@ nav:
2525
- Samplesheet parsing: samplesheets/samplesheetToList.md
2626
- Samplesheet examples: samplesheets/examples.md
2727
- Other validation: validate/validate.md
28+
- Extras:
29+
- FAQ: extras/faq.md
30+
- extras/troubleshooting.md
2831
- Contributing:
2932
- contributing/setup.md
3033

0 commit comments

Comments
 (0)