This repository has been archived by the owner on Aug 20, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This Draft PR demonstrates the feasibility of adding limited support for simple array fields to the
fromSamplesheet
method (they is already undocumented support for fulljsonschema
spec in thevalidateFile
method).The proposal for what to support would be:
meta
The code so far has no tests in the plugin but has been demonstrated to work almost as it does for flat files with one major exception:
There is currently no support forexists
checking with file/directory format fields within an array.Array file/directory existence is now supported.
The following
samplesheet.yaml
:With the following
schema.json
:Gives the following in
nextflow
:Things to consider:
"type": "array"
(we don't currently do this and it technically is supported for validation)"type": "array"
with"prefixItems"
(this is the tuple-type validation)N.B.: I tried to use polymorphism (is this the right term) to have different methods depending on the input type, but everything just went to the method declared for
Object
(the fallback) so if anyone can help me understand that I would appreciate it