Skip to content

Conversation

@edmondchuc
Copy link
Contributor

@edmondchuc edmondchuc commented Nov 14, 2025

Summary of changes

This PR builds on the RDF4J Client work introduced in #3306 and adds a new RDF4J Store backend.

Note that the end-to-end tests using testcontainers only run on the Linux runners in GitHub Actions. Additionally, testcontainers is only installed on python 3.9+.

Checklist

  • Checked that there aren't other open pull requests for
    the same change.
  • Checked that all tests and type checking passes.
  • If the change adds new features or changes the RDFLib public API:
    • Created an issue to discuss the change and get in-principle agreement.
    • Considered adding an example in ./examples.
  • If the change has a potential impact on users of this project:
    • Added or updated tests that fail without the change.
    • Updated relevant documentation to avoid inaccuracies.
    • Considered adding additional documentation.
  • Considered granting push permissions to the PR branch,
    so maintainers can fix minor issues and keep your PR up to date.

@edmondchuc edmondchuc changed the title V7/feat/rdf4j store feat: rdf4j store Nov 14, 2025
@edmondchuc edmondchuc changed the title feat: rdf4j store feat: RDF4J store Nov 14, 2025
@edmondchuc edmondchuc mentioned this pull request Nov 14, 2025
8 tasks
@edmondchuc edmondchuc merged commit 38b3141 into v7/feat/rdf4j Nov 14, 2025
29 checks passed
@edmondchuc edmondchuc deleted the v7/feat/rdf4j-store branch November 14, 2025 07:35
nicholascar added a commit that referenced this pull request Nov 14, 2025
* feat: add RDF4JClient, RepositoryManager, and initial Repository implementation

Also set up and add tests

* test: add test for repo listing format error and repo not healthy error

* chore: add testcontainers comment

* docs: add google style docstring for mkdocs

* test: add rdf4j client test

* chore: add todo to only run rdf4j tests on python 3.9 or greater

* chore: add todo to only run rdf4j tests on python 3.9 or greater

* refactor: organise rdf4j package into rdflib.contrib

* feat: add http_client property

* feat: bootstrap a minimal graphdb client

* chore: remove unused rdf4j testcontainer

* chore: add testcontainer pytest marker, refactor rdf4j test structure, add overwrite and get methods on Repository class and add tests for them

* test: rearrange unit tests

* feat: Repository get method

* feat: Repository delete method

* feat: Repository size method

* test: add e2e tests for the new Repository methods

* feat: add Repository upload and graphs method

* test: fix up and improve existing tests

* test: add tests for Repository.graphs

* chore: add docstring to overwrite and upload methods

* feat: defer repository manager creation until accessed, and also amend some docstring content

* feat: add RDF4J NamespaceManager

* chore: fix mypy issues

* test: add e2e tests for RDF4J Repository NamespaceManager

* chore: doc improvements

* feat: the repository's namespace prefixes are now bound to the return object of Repository.get() method

* feat: add Repository GraphStoreManager

* test: add e2e test for Repository GraphStoreManager

Also fixes a httpx limitation with key-only query params.

* chore: remove redundant re-raise of httpx exceptions

* docs: add docstring to protocol method

* style: formatting

* feat: add Repository.query method

* feat: add Repository.update method

* feat: add Repository Transaction with ping and commit

* refactor: prep Repository.size method to be used by transactions as well

* test: refactor e2e test file names to avoid clash

* test: fix test

* Revert "refactor: prep Repository.size method to be used by transactions as well"

This reverts commit 323f303.

* test: fix test

* feat: Add Transaction.size method

* feat: Add Transaction rollback, add, and query methods

* feat: Add Transaction delete, and also Transaction upload test

* feat: Add Transaction update

* feat: Add Transaction get

* test: update transaction tests for upload and delete

* fix: improve error handling

* feat: dynamically import httpx by checking its existence with find_spec. Update tests to skip if httpx is not available

* test: put httpx import behind has_httpx condition

* test: fix test annotations

* fix: add conditional import for GraphDBClient

* test: ignore rdf4j and graphdb client.py for docstring tests

* feat: RDF4J store (#3316)

* fix: handle graph_name when it's a str

* feat: wip RDF4JStore

Implements:

- init/open
- close
- add
- addN
- contexts
- add_graph
- remove_graph
- __len__

* feat: RDF4J Store now supports handling namespaces and prefixes

* feat: RDF4J Store triples and quads querying

* feat: ensure no bnodes are used to cross document/query boundaries

* chore: formatting

* test: improve e2e test speed by reusing the same container and cleaning up the repo between each tests

* feat: add RDF4JStore remove

* feat: add RDF4JStore triples_choices tests

* feat: add RDF4JStore SPARQL query and update tests

* chore: fix mypy issues

* test: error handling on client fixture

* test: mark testcontainer tests and put test imports behind the has_httpx flag

* build: remove upper python bound, bump testcontainers, and revert back to stable v7 poetry.lock

* test: put testcontainer tests behind a flag for unsupported python versions

* test: install rdf4j extras for python 3.9 and above

* ci: skip testcontainer tests on non-linux runners

* chore: rename RDF4J's NamespaceManager class

---------

Co-authored-by: Nicholas Car <[email protected]>
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.

2 participants