Add pyoxigraph support, bump rdflib version, bump OWL-RL version for release#79
Open
ashleysommer wants to merge 2 commits intomasterfrom
Open
Add pyoxigraph support, bump rdflib version, bump OWL-RL version for release#79ashleysommer wants to merge 2 commits intomasterfrom
ashleysommer wants to merge 2 commits intomasterfrom
Conversation
…ded support for optional PyOxigraph integration. Updated dependencies in poetry.lock and adjusted .gitignore to exclude virtual environment. Enhanced README with installation instructions for optional features and added tests for Oxigraph compatibility.
There was a problem hiding this comment.
Pull request overview
This PR adds an abstraction layer to allow OWL-RL inference to run against a PyOxigraph Store, updates the minimum RDFLib version for the upcoming release, and migrates packaging metadata to a newer pyproject.toml layout.
Changes:
- Add
DataGraphabstraction to support running closure expansion on a PyOxigraph store (including writing inferred triples to a named graph viadestination). - Bump project version and minimum RDFLib requirement; update documentation accordingly.
- Migrate packaging metadata to PEP 621
[project]layout and update lockfile; add an Oxigraph-focused test.
Reviewed changes
Copilot reviewed 15 out of 17 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
owlrl/graph_abstraction.py |
Introduces the RDFLib-like wrapper over a PyOxigraph store and term conversion helpers. |
owlrl/Closure.py |
Integrates the abstraction layer into closure execution and destination handling. |
test/test_dataset_oxigraph.py |
Adds test coverage for dataset-style inference over a PyOxigraph store with a destination named graph. |
pyproject.toml |
Migrates to [project] metadata, bumps versions, adds optional oxigraph extra, and defines scripts. |
poetry.lock |
Updates locked dependency set consistent with the new project/dependency constraints. |
setup.py |
Updates Python version classifiers (drops 3.6–3.8, adds 3.11–3.12). |
owlrl/__init__.py |
Updates stated RDFLib requirement and package __version__. |
owlrl/OWLRL.py |
Updates docstring minimum RDFLib requirement. |
owlrl/RDFSClosure.py |
Updates docstring minimum RDFLib requirement. |
owlrl/CombinedClosure.py |
Updates docstring minimum RDFLib requirement. |
owlrl/OWLRLExtras.py |
Updates docstring minimum RDFLib requirement. |
owlrl/DatatypeHandling.py |
Updates docstring minimum RDFLib requirement. |
owlrl/RestrictedDatatype.py |
Updates docstring minimum RDFLib requirement. |
owlrl/XsdDatatypes.py |
Updates docstring minimum RDFLib requirement. |
owlrl/AxiomaticTriples.py |
Updates docstring minimum RDFLib requirement. |
README.rst |
Updates installation requirements and documents optional Oxigraph support and its tradeoffs. |
.gitignore |
Ignores local virtualenv directory /.venv/. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Collaborator
Author
|
@copilot review again after latest commit with fixes |
All 8 review comments have been addressed in commit
All 20 tests pass. |
Collaborator
Author
|
@nicholascar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@nicholascar
This is a set of changes I need merged into OWL-RL, to support a big update to PySHACL.
The major addition is the support in OWL-RL to perform inference on a PyOxigraph store.
This is not for performance reasons, instead it is for compatibility. This code uses a thin abstraction layer over the PyOxigraph store to make it appear to the OWL-RL reasoner as if it was a rdflib Graph. The conversion between Rust + Python objects, as well as the abstraction wrapper around the store for compability do remove the performance benefit of using PyOxigraph.
This is needed to support the new upcoming feature in PySHACL, that essentially does the same thing, it will be able to perform full SHACL shapes validation on a PyOxigraph store. The one missing piece is the pre-validation inferencing step, that requires this support in OWL-RL.
Other changes in this PR:
bump minimum RDFlib to v7.5.0. This not only brings newer RDFLib features and fixes, but also allows us to finally remove the annoying
<4restriction that needed to be on the requires-python version in this codebase, that older versions of RDFlib enforced.Fianlly, also switched to the newer layout of the pyproject.toml file, that is supported by Poetry v2.0+. Bumped poetry requirement for that format capability.