Changelog¶
All notable changes to this project are documented here. Releases follow Semantic Versioning.
[0.5.5]¶
Added¶
OntoEnv.snapshot_as_dataset(backend="auto", store=None)— return a read-onlyrdflib.Datasetview of the environment.backend="rdf5d"is a zero-copy mmap-backed view over the persistent.ontoenv/store.r5tusnapshot;backend="copy"materializes an in-memory copy;backend="auto"picks rdf5d when the snapshot file exists and copy otherwise.New
ontoenv.OntoEnvStorerdflibStore(also registered as the rdflib plugin"ontoenv") that serves SPARQL through the Rust backend, withdataset_from_env/refresh_dataset_from_envhelpers inontoenv.rdflib_store.rdf5d: SPARQL backend (
rdf5d::SparqlDatasetView) and a Brick benchmark comparing it to Oxigraph + RocksDB; rdf5d wins on the tested patterns (≈18% faster on bound-graph queries, ≈2× faster on full scans).
Changed¶
Rdf5dSnapshot::openis now O(graphs) rather than O(triples) — per-logical-graph unique-triple counts are computed lazily viaOnceLock, with a single-gid fast path that trusts the GDIRn_triplesdirectly. Reverse term lookup (find_term_id) memoizes againstR5tuFile::find_decoded_termso repeated SPARQL bindings of the same IRI stop re-scanning the term table.Copy-fallback Dataset construction (the
backend="copy"/backend="auto"fallback path) builds the materializedOxDatasetdirectly from the inner RustOntoEnv, dropping the previous round-trip through an intermediaterdflib.Dataset.
Deprecated¶
OntoEnv.to_rdflib_dataset(mode=...)— useOntoEnv.snapshot_as_dataset(backend=..., store=...)instead. The old method still works (and forwards to the new one) but now emitsDeprecationWarning. The new method renames the parameter (mode→backend) and accepts an optionalstore=to rebind an existing rdflibStore; error messages now referencebackend=accordingly.
[0.5.4]¶
Added¶
Progress reporting for
updatecommand; output suppressed when stderr is not a TTYRDF5D: compact string/literal dictionaries, streaming spill policy, workload profiling, and optimized reader/metadata layout
GitHub badge in README; rdf5d architecture documentation
Changed¶
RocksDB is no longer compiled by default. OntoEnv uses an in-memory Oxigraph store backed by the custom RDF5D on-disk format, so the heavyweight RocksDB C++ dependency was unnecessary. It is now opt-in via
--features rocksdbacross all crates (ontoenv,ontoenv-cli, and the Python bindings). This significantly reduces compile times and binary size for the common case.Store::flush()is gated behind the same feature flag since that method only exists when RocksDB is compiled in.Upgraded reqwest 0.12 → 0.13
Internal
lib/srchelpers extracted and dead code removedRemoved deprecated
tempdirdependency
Fixed¶
ontoenv addnow correctly handles JSON-LD files served with atext/plaincontent-type header (e.g. GitHub raw URLs); URL extension and content sniffing are used when content-type is genericext_to_rdf_formatnow maps.jsonld,.json,.rdf,.owl, and.nqextensions for local file loadingFormat fallback in
load_staging_store_from_bytesnow cycles through all supported formats (NQuads, TriG, JSON-LD) instead of only Turtle/RDF-XML/N-TriplesAll
cargo clippy -D warningserrors resolved across the workspace
[0.5.3] — 2026-04-03¶
Added¶
list_closureandmissing_importsnow accept a transientrdflib.Graphin addition to ontology IRIsgraph_store: newinit_from_storeandrefresh_from_storeconstructors
Changed¶
Updated
.pyistub with all recent API additionsUpdated GitHub Actions versions
[0.5.2] — 2026-04-02¶
Added¶
missing_importsmethod in Python API to list unresolved ontology importsThree-level import chain test for
missing_imports
Changed¶
Improved documentation
[0.5.1] — 2026-03-04¶
Fixed¶
Linux wheel build
Changed¶
Updated license year to 2025
[0.5.0] — 2026-03-03¶
Added¶
In-memory
rdflib.Graphobjects can now be passed directly toOntoEnv.addin PythonExternal Python graph store protocol support (duck-typed; no ABC required)
namespacesCLI command and Python/Rust API methodsh:prefix conflict detection in
rewrite_sh_prefixesontology include/exclude regex and glob filters (
Config.include/Config.exclude)Content hash-based caching to avoid redundant re-parses
Sphinx documentation with GitHub Pages deployment
llms.txtfor LLM-friendly docsoxrdflibintegration
Changed¶
Lazy loading of graphs from RDF5D on first access
get_dependencies_graphrenamed toget_dependenciesSHACL prefix rewrite now correctly targets the root ontology
Python build switched to
abi3wheels (Python 3.12 default)Search directories made explicit in config
Fixed¶
Windows cross-platform path and file URI handling
CI flakes: mtime sleep guards, Windows file IRIs, locked-file skipping
import_graphdepth/cycle handling and QUDT URI updates
[0.4.0] — 2025-11-07¶
Added¶
RDF5D custom storage format (
.r5tu) replaces SQLite-backed Oxigraph on-disk store; zstd-compressed, CRC-verified, with lazy graph loadingInterprocess read/write locking via
fs2(exclusive writer, shared readers)Parallel remote ontology fetching via staged ingestion
New
fetchmodule with layered format detection, content sniffing, Link header following, and extension candidate fallbacksuse_cached_ontologiesoption to skip unchanged ontologiesget_dependencies/get_dependencies_graphmethod (Rust + Python)--allflag forupdateto force-reload all ontologiesONTOENV_LOGenvironment variable for log controlConcurrency tests (Python and Rust)
new_onlineconstructor as the default for Python
Changed¶
Upgraded to oxigraph 0.5
updatecommand gains--allflag;update_allalias addedConfig drops
ConfigBuilderfrom Python API; flags passed directly toOntoEnvimport_graphmerges full closure with SHACL rewriteNamespace prefix map built at ontology init time
RDF5D localized into this repo as a workspace crate
Fixed¶
Failed ontology resolutions tracked to avoid redundant retries
Correct graph-name handling for oxigraph queries
File URI generation and angle bracket stripping in IRIs
[0.3.0] — 2025-07-24¶
Added¶
whycommand andimportersmethod (replacesget_dependents) — explains why an ontology is in the environmentmissing_importsmethod to list unresolvedowl:importslistsubcommand for locations, ontologies, and missing importsconfigsubcommand (replacesset) withget,unset,add,remove,listoperationsadd_no_importsflag to load an ontology without following itsowl:importsrecursion_depthparameter forget_closureandimport_dependenciesRecursive
.ontoenvdirectory search from the current working directoryNamespace prefix extraction and utility functions
ExternalStoreGraphIOfor integrating with other Oxigraph-based packagesComprehensive Python
unittestsuite
Changed¶
refreshcommand renamed toupdateget-closureCLI subcommand renamed toclosureConfigbuilder pattern replaces direct struct constructionimport_dependenciesreturns a list of URIs and modifies graph in-placeaddauto-detects whether the argument is a URL or file path
Fixed¶
Namespace map deserialization robustness
Self-import filtering to prevent recursion
no_searchrespected when loading config from fileGraph content compared (not just mtime) to detect updates
[0.2.1] — 2025-06-06¶
Fixed¶
Improved detection of changed files
[0.2.0] — 2025-05-07¶
Added¶
New
GraphIOtrait abstraction (PersistentGraphIO,MemoryGraphIO,ReadOnlyPersistentGraphIO)UnionGraphstruct returned fromget_union_graphflushmethod for explicit store writessizestats reportingio_typeaccessor onGraphIOSerialization of
EnvironmentstructPython
flushbinding
Changed¶
OntoEnv::newmade private; use named constructorssearch_directoriesmade a positional CLI argumentPoetry replaced with
uvfor Python toolingTemporary environments improved;
--forceflag for reset
Fixed¶
Offline retrieval error propagation
Store initialization and path handling
Stat report accuracy
[0.1.10] — 2025-03-19¶
Added¶
get_dependentsmethodType hints stub file (
.pyi) forConfigandOntoEnvJSON-based ontology URI/file config (
fetchsubcommand)no_searchflag to disable directory walkingRead-only mode for
OntoEnvread_formatfallback logic for ambiguous RDF inputsAccept
text/turtlecontent-type header
Changed¶
Bulk loading of graphs for performance
Mutex lock scope reduced in
get_graphto lower deadlock risk
Fixed¶
Store re-opened unnecessarily on repeated calls — fixed by caching
Mutex unlocking on drop
[0.1.9] — 2024-08-28¶
Added¶
list_closuremethodstatusandversionCLI commandsrdflibgraph conversion method (to_rdflib)Git hash embedded in CLI binary via
build.rs
Changed¶
Build system improvements (musl, zig cross-compilation)
[0.1.8] — 2024-06-15¶
Added¶
Read-only mode fallback in Python
More test coverage
Fixed¶
Strict mode now respected throughout
Resolution of ontology locations
Python state persistence across calls
[0.1.6] — 2024-04-29¶
Changed¶
Switched from OpenSSL to
rustls(no system SSL dependency)Cross-platform build improvements (aarch64, x86 macOS, Linux musl)
[0.1.5] — 2024-04-28¶
Added¶
--recreateflag forinitto force reinitialize an existing environment
[0.1.4] — 2024-04-26¶
Added¶
import_graphmethod (Python)Graph transforms (SHACL prefix rewriting, import removal)
README
Fixed¶
URL handling and path normalization
Detection of removed files
[0.1.2] — 2024-04-13¶
Initial release.
Features¶
Core ontology environment management: discover, load, and resolve
owl:importstransitivelyCLI:
init,add,closure,get,dump,statusPython bindings via PyO3/maturin
Offline mode
Strict mode (require
owl:Ontologydeclarations)Directory walking with glob patterns
CI/CD for Linux, macOS, and Windows wheels