-
-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial implementation for RDF-based tests QueryEvaluationTest #249
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for moving this forward!
I have found why the Oxigraph tests are ignored (see my inline comment inrdflib_tools.py
). I also allowed myself to comment about some problems I found while quickly trying the code.
By the way, Oxigraph does not pass all official SPARQL tests. This is mostly due to the fact that Oxigraph storage normalizes literals like numbers. For example |
Is there any straightforward way of making or what is the given way of testing the result of an rdflib query to a given ttl file? @ceteri |
RDFlib provides a parser for SPARQL results encoded in RDF. I tried in Oxigraph to compare results set encoded in RDF using the graph isomorphism algorithm. It was very slow because results sets encoded in RDF contains a lot of blank nodes only connected to other blank nodes, making the hash based alogirthms not very efficient... |
In some tests |
In terms of graph isomorphism algorithms, I wish there was more open source available for graph sketch algorithms. That might help with the costs. I've only found one https://github.com/kenkoooo/graph-sketch-fractality although it's based on a CLI and not quite the similarity measures that we'd need. |
From #248
This is the first draft for implementing automated RDF tests.
The first batch of test from
RDF-tests
(basic) can be run withpytest tests/rdf_tests/test_rdf_basic.py -k test_rdf_runner -s
from the project directory; tests are intests/rdf_tests/dat
. For the moment the only assertion implemented is a check on the length of returned results. This is already interesting as some kg query outputs return more or less bindings compared to the expected ones.The script should work also on
oxigraph-tests
but it doesn't, it seems theread_manifest
file provided withrdflib
cannot parse the oxigraph manifest, maybe a discrepancy in the XML structure? @Tpt please provide some feedback.Currently the tests are cut-pasted.
Tests with anomalies:
The ones resulting in "False" mean length discrepancies between expected and actual output, the one with errors are exceptions raised.