Commit b71e2ae
feat: RDF4J Client (#3306)
* 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]>1 parent d1391f2 commit b71e2ae
File tree
60 files changed
+6099
-4
lines changed- .github/workflows
- rdflib
- contrib
- graphdb
- rdf4j
- plugins/stores
- test/test_rdf4j
- data
- test_e2e
- docker
- repo-configs
- test_graphdb
- test_unit
- repository
- util
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
60 files changed
+6099
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
55 | | - | |
| 54 | + | |
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
| |||
84 | 83 | | |
85 | 84 | | |
86 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
87 | 93 | | |
88 | 94 | | |
89 | 95 | | |
| |||
97 | 103 | | |
98 | 104 | | |
99 | 105 | | |
100 | | - | |
| 106 | + | |
101 | 107 | | |
102 | 108 | | |
103 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| 67 | + | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| |||
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
| 90 | + | |
88 | 91 | | |
89 | 92 | | |
90 | 93 | | |
| |||
207 | 210 | | |
208 | 211 | | |
209 | 212 | | |
| 213 | + | |
| 214 | + | |
210 | 215 | | |
211 | 216 | | |
212 | 217 | | |
| |||
218 | 223 | | |
219 | 224 | | |
220 | 225 | | |
| 226 | + | |
221 | 227 | | |
222 | 228 | | |
223 | 229 | | |
| |||
Whitespace-only changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
0 commit comments