Skip to content

Ensure that SPARQL queries with the rdflib backend behaves similar to sparqlwrapper#456

Merged
jesper-friis merged 3 commits intomasterfrom
test_rdflib_sparql
Nov 3, 2025
Merged

Ensure that SPARQL queries with the rdflib backend behaves similar to sparqlwrapper#456
jesper-friis merged 3 commits intomasterfrom
test_rdflib_sparql

Conversation

@jesper-friis
Copy link
Contributor

@jesper-friis jesper-friis commented Oct 31, 2025

Description

Align the rdflib backend with sparqlwrapper.

The following was done:

  • Ensure that literals returned by Triplestore.query() with the rdflib backend are converted to tripper.Literal and not strings. This will make rdflib behaving similar to sparqlwrapper.
  • Deprecated Triplestore.available() and replaced it with the new Triplestore.is_available() that works for all backends.
  • For consistency with base_iri and update_iri, renamed check_url to check_iri. Deprecated the use of check_url .

@codecov
Copy link

codecov bot commented Oct 31, 2025

Codecov Report

❌ Patch coverage is 91.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.04%. Comparing base (c71f765) to head (8848476).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
tripper/backends/sparqlwrapper.py 85.71% 1 Missing ⚠️
tripper/triplestore.py 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #456      +/-   ##
==========================================
- Coverage   84.06%   84.04%   -0.03%     
==========================================
  Files          30       30              
  Lines        4167     4186      +19     
==========================================
+ Hits         3503     3518      +15     
- Misses        664      668       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jesper-friis jesper-friis merged commit 1f7fbe3 into master Nov 3, 2025
40 of 41 checks passed
@jesper-friis jesper-friis deleted the test_rdflib_sparql branch November 3, 2025 10:21
@jesper-friis jesper-friis linked an issue Nov 5, 2025 that may be closed by this pull request
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.

Consistent return value of Triplestore.query()

2 participants