Open cmungall opened 2 years ago
If we follow this we can get rid of the remaining all-X commands and unify in an X command
agreed, better
Other quick thoughts:
add-
pattern. I like apply
so we don't need separate commands for remove and update (change). Consider also consolidating with migrate-
?Some more thinking on the add- pattern. I like apply so we don't need separate commands for remove and update (change). Consider also consolidating with migrate-?
We can do this but then we end up with either many generic options for one command or having the user construct kgcl objects on the command line... good to think about though, there is some ideal balance to be had
check and validate seem slightly overlapping without looking in too deep
Yes, this should be addressed at the API level as well, there isn't really so much of a reason to split these other than sometimes it's useful to take common patterns and provide a simplified convenience method, rather than over-parameterizing a generic one. It's hard to do this in a non ad-hoc way
I like how robot has a very predictable pattern for commands/operations, with most named as a single verb
This is the current set of commands:
(this may change, to get the current list go to https://incatools.github.io/ontology-access-kit/cli.html)
There are a few redundancies that will be tidied up before the 0.2.0 milestone. There is a general unifying theme to all these commands
With a few exceptions (e.g. set-apikey) these take as arguments term lists which are lists of CURIEs or search terms or directives or boolean combinators of these. They always evaluate to a list of ontology element curies, e.g list of classes, and the command operates on these.
E.g. to see info on all terms matching a union of search terms:
or to intersect these:
.all
is also a valid search term that yields all terms, so to list every term:you can also explode things like this (NOT RECOMMENDED):
This search language will be the subject of another ticket. This ticket is about harmonizing the commands themselves
Previously there was more redundancy - e.g. we had
relationships
which took terms as arguments and showed relationships for all these terms and alsoall-relationships
which listed every edge in an ontology.This has since been unified to a single
relationships
command, if this is passed without any arguments then it will show all relationships, otherwise it will show all relationships where any of the input terms is a subjectThis suggests a general pattern that can be used, with the name of the command being some kind of statement type, with the default behavior being to show all statements of this type, or just statements for the input terms
E.g. to see a table of all ID-label tuples:
(note most commands also allow selection of different output types but this is not covered here)
or just the labels for specific terms:
the general pattern applies for: aliases, definitions, ancestors, relationships, descendants, (arbitrary) owl axioms, ...
It can also apply to computed n-ary relationships, e.g. similarity
If we follow this we can get rid of the remaining
all-X
commands and unify in anX
commandThen the only hyphenated commands should be do commands - apply a change, make a term obsolete, set an API key