Clap: Consider supporting the CWL standard CommandLineTool for YAML specification of a CLI interface

Created on 5 Sep 2018  路  11Comments  路  Source: clap-rs/clap

Bug or Feature Request Summary

Specification: https://www.commonwl.org/v1.0/CommandLineTool.html
User guide: https://www.commonwl.org/user_guide/

CWL project homepage: https://www.commonwl.org/

If some properties that you have aren't yet in CWL you can add them as "vendor extensions" and retain compatibility. We'd want to study your extensions for possible future inclusion.

RFC / question

Most helpful comment

I'd like to consider this in the future. Let's keep it open.

All 11 comments

I haven't read the spec completely but looks pretty interesting. cc @clap-rs/admins What do you think?

So, I looked over the spec and I am really hesitant to support it. It will have too much noise compared to clap's yaml which will make it harder for users to use.

@pksunkara What do you think about CWL export from clap-using apps?

I don't mind that, but it will have to go clap_generate crate and even then, I am not sure this is not niche.

@mr-c The main goal of clap is to provide a flexible an feature-full parser for command line arguments, but the full scope of CWL is way beyond this goal. I don't think we'll ever consider supporting all of it.

About CLI part only - well, if it's all about building clap::App from corresponding cwl.yaml file it can be seen as "yet another format akin to YAML and TOML". We are considering to make use of serde (#1630). If/when we manage to implement it, you will be free to make your own implementation of it , like serde_json or serde_yaml.

Even if we decide not to support it, you are still free to make your own "converter" crate that reads cwl.yaml and builds the corresponding clap::App.

I'm closing this because I'm almost sure we don't want to maintain such an implementation in this repo.

I'd like to consider this in the future. Let's keep it open.

@Dylan-DPC @CreepySkeleton I am happy to write a Google Summer of Code proposal and co-mentor alongside a rust person to work on CWL export from clap applications.

This is pretty much exactly why I used the YAML feature to write my CLI. I had previously handwritten the equivalent command (compute) in CWL, and I think it would be extremely useful to have both more Rust CLIs in bioinformatics and larger adoption of CWL tool descriptions.

@codesections Could this come under documentation crate? Can one of the generators be CWL?

I would absolutely love this feature set, would make our biofx tools more powerful and easier to add to workflows.

Let's discuss this once we are done with the 3.0.0 release

Was this page helpful?
0 / 5 - 0 ratings

Related issues

CAD97 picture CAD97  路  21Comments

kbknapp picture kbknapp  路  22Comments

jojva picture jojva  路  18Comments

pickfire picture pickfire  路  21Comments

neysofu picture neysofu  路  41Comments