ArcCommander Argument design
Closed this issue · 5 comments
This issue is meant as a place for discussing possible argument design choices
Argument Query (Asking for fields via text editor prompt)
- Add basic query functionality
- Allow user to set preferred text editor (#8)
- For Unix systems, infer editor via EDITOR (or less often, VISUAL) environment variable
Top-level
arc init - create an arc directory structure below the current directory (as git init)
arc push - push all changes to the specified "upstream" (t.b.d.)
arc pull - ...
arc check - validate that the current directory is an arc, and output helpful messages towards compliance
arc register - (re-)register all assays and workflows
arc help
arc run - run all workflows
Investigation
arc investigation or arc i subcmd
arc i edit - open editor to edit ISA in YAML (yay!)
Assay
arc assay [c|create] - create a directory assays/, prepopulate it with defaults
arc assay [rregister]
| --updatearc assay [a|add] - create plus register
arc assay [a|move] ...
arc assay [rm|remove]
arc assay edit -- edit assay metadata in Excel or
Some arguments are required and some are not. If required arguments are left out by the user a prompt should be opened where the user can input the missing arguments. Ideally required arguments should be marked (e.g. by an attribute).
Also it would be good
- if the texteditor could be opened on a stream instead of a file (check if possible)
- if the texteditor of choice could be set in a config file
via #13 and #14 we now have the following structure of the arc cli.
arc <top-level-command> <top-level-command-args>
e.g.
arc init
or
arc <object> <subcommand-verb> <subcommand-verb-args>
where <object>
is one of the following:
assay
study
investigation
and <subcommand-verb>
models what to do with the object, e.g
arc study init
will initialize a new empty study in the ARC.
Subcommand verbs
while not all object subcommands support all verbs, here is a list of the verbs and what to expect when they are applicable for an <object>
:
- arc
<object>
init : will initialize a new empty<object>
in the ARC. - arc
<object>
create will create a new<object>
with the passed arguments in the ARC. - arc
<object>
update will update an existing<object>
with the passed arguments. - arc
<object>
edit will open an existing<object>
with a text editor. Arguments passed for this verb will be pre-set in the editor. - arc
<object>
register will register an existing<object>
in the ARC with the passed arguments. - arc
<object>
add is the combination of create/init+update and register, meaning it will create a new<object>
in the ARC and subsequently register it with the passed arguments - arc
<object>
remove will remove the<object>
from the ARC's register. - arc
<object>
move will move the<object>
from source to target register. - arc
<object>
list will print all<object>s
registered in the ARC. - arc
<object>
Delete will delete the<object>
.
Will close this for now, as the argument structure seems to have stabilized