Tools: Automatically build CLI help using JSON Schema

Created on 2 Mar 2020  路  8Comments  路  Source: nf-core/tools

Once JSON Schema files are present in pipelines, we can start to use these files to automatically generate the command-line help outputted by pipelines with the --help parameter.

Requires parsing in Groovy in the pipeline code, then writing a function to output nicely formatted text.

template

All 8 comments

Assuming this would be similar to the code use in the hlatyping pipeline

Yes, but I'd advise to have this as an external small library that can be synced more easily across pipelines :-)

Sarek had/has some script in groovy that are kept externally, to keep these separated from the main.nf - which makes sense I think :-)

Aha yeah - I think this was back from when we started with the custom nf-core metaschema? Looks like we can build on that code for sure though 馃憤

I'll try to get to this soon, it's basically at the top of my list once I get some more talk slides finished.

Yes, but I'd advise to have this as an external small library that can be synced more easily across pipelines :-)

It would be great to do this generally - see https://github.com/nf-core/tools/issues/634 (will also help / become more relevant with DSL2 file imports).

Initial implementation added in https://github.com/nf-core/tools/pull/665

~As discussed on slack, it would be good to run this function also in the output_documentation step (together with a copyTo for output.md and usage.md) and put the output into a parameters.md, so that every result directory comes bundled with the complete, version specific docs.~

Moved to #741

Think we should have a separate issue for this @mashehu as the original proposal has been solved already.

However, @ewels mentioned that the code added in #665 , the latest of which is currently sitting in the rnaseq pipeline doesn't factor in some nesting/grouping that is possible to use with the JSON schema?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ewels picture ewels  路  8Comments

matq007 picture matq007  路  7Comments

MaxUlysse picture MaxUlysse  路  6Comments

apeltzer picture apeltzer  路  5Comments

drpatelh picture drpatelh  路  6Comments