Allowing backends to indicate whether they prefer the sparql interface#255
Allowing backends to indicate whether they prefer the sparql interface#255jesper-friis merged 9 commits intomasterfrom
Conversation
…they prefer the sparql query() or triples() interface
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #255 +/- ##
==========================================
+ Coverage 79.11% 79.21% +0.09%
==========================================
Files 18 18
Lines 1719 1727 +8
==========================================
+ Hits 1360 1368 +8
Misses 359 359 ☔ View full report in Codecov by Sentry. |
francescalb
left a comment
There was a problem hiding this comment.
Do we have any documentation anywhere on what is needed to create a new backend? If so we should add there that the prefer_sparql attribute should be set. If not, we should have an issue on making such a template/documentation.
Furthermore, have you tested this with PyBackTrip? I guess this is not backwards compatible?
Co-authored-by: Francesca L. Bleken <48128015+francescalb@users.noreply.github.com>
The best documentation is the interface.py file. I have already added the |
Great, then I think it would be very good to add a sentence about looking into this file if one wants to make a new backend. (In the documentation for developers part). It is enough with one sentence for now |
done |
Description
Allow backends to add a class attribute
prefer_sparqlattribute, indicating whether they prefer calls to the SPARQLquery()method instead of thetriples()method.Added the
Triplestore.prefer_sparqlproperty for easy access to this attribute.Also renamed TriplestoreError to TripperError and some additional cleanup of warnings.
Type of change
Checklist for the reviewer
This checklist should be used as a help for the reviewer.