Open goodb opened 4 years ago
+1 for this I can't find this either. Explanations are needed to provide a reasonable report. @goodb will you share your code to help others out?
@tholiebig caveat emptor - this is all very application specific and I was learning as I was going with it... But, always happy to share anyway: https://github.com/geneontology/minerva/blob/dev/minerva-core/src/main/java/org/geneontology/minerva/validation/ShexValidator.java and very welcome to improvements at any level..
If y'all want to take a stab and standardizing error reporting, you'll find a receptive audience in the ShEX CG. I implemented one in ShEx.js which ties the report back to the abstract(ish) syntax, but:
@ericprud is there like an issue thread or something to follow for this topic? I'm interested and may be able to contribute something in the future but can't really do much now. Not really even keeping up with normal job these days...
validation.addFailureReportsCollector(new FailureAnalyzerSimple());
This documentation corresponds to an old version. Failure analysis has been externalized since: the validator provides validation information to a registered MatchingCollector, which can generate failure reports. Currently however there is no implementation of a MatchingCollector that could be useful for you. I'm planning to write a simple one as example (when I find enough time to do it).
@ericprud is there like an issue thread or something to follow for this topic? I'm interested and may be able to contribute something in the future but can't really do much now. Not really even keeping up with normal job these days...
https://github.com/shexSpec/shex/issues?q=is%3Aissue+is%3Aopen+error
suggests there is no such issue. I know that Harold and maybe Labra were interested in the past.
Currently however there is no implementation of a MatchingCollector that could be useful for you. I'm planning to write a simple one as example (when I find enough time to do it).
Checking in on this - @iovka has there been any recent progress in creating an example along these lines?
On the readme, I see this:
validation.addFailureReportsCollector(new FailureAnalyzerSimple());
but I can't find that anywhere in the code. Does it exist? I'd love to try it out.
I have implemented my own hack for explaining why a given shape did not match a given node, but I'm sure that something native to the library is going to perform better.