Open cmungall opened 7 years ago
I'm ok with it.
Or what about a diff option to the reason subcommand?
Or what about a diff option to the reason subcommand?
no, the purpose of the two commands are completely different
A common scenario is diffing between the same file in different branches, looking in particular at the entailment diff
one hacky script I use is:
#!/bin/sh
robot reason -r elk -i $1 -o /tmp/MAIN.obo
git co $2
robot reason -r elk -i $1 -o /tmp/BRANCH.obo
obo-simple-diff.pl -l /tmp/MAIN.obo /tmp/BRANCH.obo
While this kind of thing could be brought into the robot diff command, it feels wrong for robot to be messing around with git. This feels like something that could be distributed in a separate 'ontology hacks' repo? Or maybe with the OSK?
See also https://github.com/OBOFoundry/OBOFoundry.github.io/issues/500
I agree that it would be really convenient to be able to diff and reason between branches (or staged changes), and I also agree that it would get messy to build this into ROBOT. If we could assume the the OSK conventions then it would all be easier, but none of my projects fit that pattern exactly (yet).
Maybe we should think of this in layers:
Diffing between branches seems outside of the scope of ROBOT, like @cmungall said. That said, do we still want to add a --reasoner
option to diff
?
+1
Just chatting about this with @matentzn. We think the branch case may be solvable elegantly with gh-actions (similar to @balhoff's ontobot). But just having a simple reasoner diff that operates on two files still super-useful
Here is the gh-actions workflow that does this for GO: https://github.com/geneontology/go-ontology/blob/master/.github/workflows/inference_diff.yml
Tool-level improvements would be marking/filtering which changes are not really changes because they were formerly indirect subsumptions (for example).
Motivation: we want to be able to see the effect of making changes on inferences. This would be accomplished by diffing the inferences between two ontologies.
This operation would be trivially the same as:
It can't be expressed as a chain since it's not a linear chain of operations.
There is a strong argument against complicating robot by doing this and instead just providing a dumb shell wrapper.