Skip to content
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

sparqlwrapper backend #11

Merged
merged 15 commits into from
Nov 29, 2022
Merged

sparqlwrapper backend #11

merged 15 commits into from
Nov 29, 2022

Conversation

jesper-friis
Copy link
Contributor

@jesper-friis jesper-friis commented Oct 9, 2022

Added initial drat implementation of a SPARQLWrapper backend.

In order to test the backend, This PR builds on top on PR #9.

- documented return value of Triplestore.query() method
- improved documentation of arguments of query() and update() methods
- ensure that the tests runs again
- corredted return value of the query() method (for rdflib backend) and added
  tests
@jesper-friis jesper-friis linked an issue Oct 9, 2022 that may be closed by this pull request
@jesper-friis jesper-friis marked this pull request as draft October 9, 2022 22:04
@codecov-commenter
Copy link

codecov-commenter commented Nov 4, 2022

Codecov Report

Base: 72.94% // Head: 72.27% // Decreases project coverage by -0.67% ⚠️

Coverage data is based on head (26099e4) compared to base (f51b605).
Patch coverage: 61.53% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #11      +/-   ##
==========================================
- Coverage   72.94%   72.27%   -0.68%     
==========================================
  Files          10       11       +1     
  Lines         621      660      +39     
==========================================
+ Hits          453      477      +24     
- Misses        168      183      +15     
Impacted Files Coverage Δ
tripper/triplestore.py 77.77% <ø> (ø)
tripper/backends/sparqlwrapper.py 61.53% <61.53%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jesper-friis jesper-friis marked this pull request as ready for review November 4, 2022 16:04
@CasperWA CasperWA self-assigned this Nov 29, 2022
@CasperWA CasperWA merged commit 1052fe0 into main Nov 29, 2022
@CasperWA CasperWA deleted the 10-sparqlwrapper-backend branch November 29, 2022 13:54
@@ -168,7 +168,7 @@ def serialize(
self._check_method("serialize")
return self.backend.serialize(destination=destination, format=format, **kwargs)

def query(self, query_object, **kwargs) -> "List[Tuple[str, ...]]":
def query(self, query_object, **kwargs) -> "List[Triple]":
Copy link
Contributor Author

@jesper-friis jesper-friis Nov 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually not fully correct. The return value of query() depends on the sparql query. It just returns a list of tuples for each match. The tuple is not a triple but contains as many fields as the query asks for.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so the original return value is correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SPARQLWrapper backend
3 participants