Schema: Support conditional subschemas
Open
Nobody has claimed this yet.
schema
- Dominant language
- Python
- Stars
- 322
- Forks
- 255
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 5
Description
Description of feature
It is quite common to want to have conditional validation for pipeline parameters. Currently, this is not supported and must be done purely within the pipeline code. However, native JSON schema can support it with two properties:
dependentSchemas- If
params.foois defined at all, then additional validation rules / required parameters forparams.barshould apply. - Typical use case: if
--do_thisis enabled, then--this_optionmust be set
- If
- If-Then-Else
- If
params.foomatches a specific set of rules, then additional validation rules / required parameters forparams.barshould apply. - Typical use case: if
--methodis set to--foo, then--foo_method_optionmust be set
- If
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the conditional-schema requirements in the issue and the linked JSON Schema references. Trace how nf-core/tools currently validates pipeline parameters; done means dependentSchemas and if/then/else rules work for the described cases and are covered by validation tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json, python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100