Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
017fde2
feat(maplibr): scaffold R package with savvy-based Model wrapper
novica Sep 12, 2026
f04bda4
feat(maplibr): add RModel reads()/writes()
novica Sep 12, 2026
49fc22f
refactor(maplibr): split lib.rs into model.rs/arrow_bridge.rs
novica Sep 12, 2026
839e5fb
feat(maplibr): add RModel add_graph()/detach_graph()
novica Sep 12, 2026
ca2cad7
feat(maplibr): add RModel compact()/serialize()/deserialize()
novica Sep 12, 2026
bb13793
feat(maplibr): add RModel infer_rdfs(), init embedded Python
novica Sep 12, 2026
fb4642d
feat(maplibr): wrap RModel in an R6 Model class
novica Sep 13, 2026
033accd
feat(maplibr): prototype DataFrame<->R Arrow bridge
novica Sep 13, 2026
6db30ba
feat(maplibr): add S7 RDF term value classes
novica Sep 13, 2026
f5c3c89
feat(maplibr): add Template/Instance/Parameter/Argument OTTR classes
novica Sep 13, 2026
50dbd79
feat(maplibr): add xsd/rdf/rdfs/owl vocab IRI constants
novica Sep 13, 2026
3d6003c
feat(maplibr): add RDFType, complete Parameter's rdf_type argument
novica Sep 13, 2026
1f4a7e4
fix(maplibr): recover from Mutex poison instead of panicking forever
novica Sep 13, 2026
5c2d404
feat(maplibr): map MaplibError to typed, catchable R conditions
novica Sep 13, 2026
edbfab1
test(maplibr): add testthat scaffold, port query()-free py_maplib tests
novica Sep 13, 2026
552f9f5
test(maplibr): add direct unit tests for error reclassification
novica Sep 13, 2026
4c5d891
feat(maplibr): add Model query() for SPARQL SELECT
novica Sep 13, 2026
cb1d678
docs(maplibr): clarify infer_rdfs() return value and coalesce assumption
novica Sep 13, 2026
ae14dfa
feat(maplibr): implement Model map()/add_template(), add size(graph)
novica Sep 13, 2026
ca46374
fix(maplibr): fix doc-string/IRI misclassification in template resolu…
novica Sep 13, 2026
ab42c04
test(maplibr): add regression test for IRI-containing-'::' misclassif…
novica Sep 13, 2026
8ac9273
fix(maplibr): prevent add_graph() deadlock on a self-aliased Model
novica Sep 13, 2026
9161964
test(maplibr): cover the aliased-wrapper case in the add_graph deadlo…
novica Sep 13, 2026
5838d7f
fix(maplibr): disable Model's default R6 clone()
novica Sep 13, 2026
529eed3
docs(maplibr): fix stale comment referencing a hypothetical future cl…
novica Sep 13, 2026
802ceda
feat: add include_transient to write_triples for inferred triples
novica Sep 13, 2026
ce7db1d
revert: drop include_transient support in writes()
novica Sep 13, 2026
0cba63d
chore(maplibr): fill in DESCRIPTION metadata
novica Sep 13, 2026
7318380
chore(maplibr): pull polars-arrow's version from the shared workspace…
novica Sep 13, 2026
98362f8
fix(maplibr): default serialize()/deserialize() path to "./serialized…
novica Sep 13, 2026
858d790
fix(maplibr): rename xsd$int to xsd$int_ for exact naming parity
novica Sep 13, 2026
1a37ba6
feat(maplibr): support CONSTRUCT in query()
novica Sep 13, 2026
305dbb7
fix(maplibr): flatten multi-typed CONSTRUCT predicate variables too
novica Sep 13, 2026
35b00ab
docs(maplibr): add a getting-started vignette
novica Sep 13, 2026
1752787
refactor(maplibr): move Instance()'s raw-pointer escape hatch to a pr…
novica Sep 13, 2026
c8854f6
feat(maplibr): add Model update()/insert() for SPARQL UPDATE/INSERT
novica Sep 14, 2026
23bc487
feat(maplibr): add Model read()/write() for file-based RDF I/O
novica Sep 14, 2026
4514ba0
fix(maplibr): fix Model read() aborting the R session on an unguessab…
novica Sep 14, 2026
08d6f8b
feat(maplibr): add Model query(bindings=) to pre-bind SPARQL variables
novica Sep 14, 2026
7f23bfb
feat(maplibr): add direct-to-triples mapping entry points
novica Sep 14, 2026
62902c9
fix(maplibr): don't skip validation/root-triple on zero-row map_df/ma…
novica Sep 14, 2026
eea8488
docs(maplibr): update getting-started vignette for new methods
novica Sep 14, 2026
409ef0f
feat(maplibr): add pipe-friendly model_*() functional wrappers
novica Sep 14, 2026
30742ce
docs(maplibr): switch getting-started vignette to pipe-first style
novica Sep 14, 2026
11cd2a1
docs(maplibr): drop the "what doesn't work yet" table from the vignette
novica Sep 14, 2026
b1b96ff
docs(maplibr): package readme
novica Sep 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

177 changes: 81 additions & 96 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,96 +1,81 @@
[workspace]
resolver = "2"
members = [
"lib/in_memory",
"lib/disk",
"lib/utils",
"lib/representation",
"lib/maplib",
"lib/triplestore",
"lib/file_io",
"lib/query_processing",
"lib/spargebra",
"lib/shacl",
"lib/fts",
"lib/datalog",
"lib/cimxml_export",
"lib/cimxml_import",
"lib/chrontext",
"lib/virtualized_query",
"lib/virtualization",
"lib/opc_ua",
"lib/external_sparql",
"py_maplib",
]

[workspace.package]
rust-version = "1.88.0"
edition = "2021"

[workspace.dependencies]
pyo3 = { version = "0.29.0", features = ["py-clone", "rust_decimal"] }
#Moment is there to work around a feature toggle bug
polars = { version = "0.54.4", features = [
"simd",
"nightly",
"performant",
"cse",
"fmt",
"parquet",
"moment",
"timezones",
"lazy",
] }
polars-arrow = { version = "0.54.4" }
polars-core = { version = "0.54.4" }
rayon = "1.10.0"
regex = "1.11.1"
oxrdf = { version = "0.3.3" }
oxrdfio = { version = "0.2.5" }
oxttl = { version = "0.2.3" }
oxjsonld = { version = "0.2.5" }
oxiri = "0.2.11"
sparesults = "0.3.3"
oxsdatatypes = "0.2.2"
chrono = "0.4.41"
chrono-tz = "0.10.3"
uuid = { version = "1.16.0", features = [
"v4", # Lets you generate random UUIDs
"v5",
"fast-rng", # Use a faster (but still sufficiently random) RNG
] }
thiserror = "2.0.12"
peg = "0.8"
rand = "0.10.1"
oxilangtag = "0.1.5"
fundu = "2.0.1"
hdt = { version = "0.7.2", default-features = false, features = ["nt"] }
memmap2 = "0.9.5"
sprs = "0.11.3"
walkdir = "2.5.0"
aho-corasick = "1.1.4"
simd-json = { version = "0.17.0", features = ["serde_json"] }
serde_json = { version = "1.0.149" }
serde = {version = "1.0.228"}
urlencoding = "2.1.3"
md-5 = "0.11.0"
sha1 = "0.11.0"
hex = "0.4.3"
memchr = "2.8.0"
quick-xml = { version = "0.41.0", features = ["arbitrary"] }
tracing = { version = "0.1", features = ["log"] }
tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }
tracing-log = "0.2"
itoa = "1.0.15"
ryu = "1.0.20"
#dev-dependencies
nohash-hasher = "0.2.0"
arrow = "58"
ordered-float = "5.1.0"
rust_decimal = "1.42.1"
range-set-blaze = "0.5.0"
reqwest = { version = "0.13.4", features = ["query", "json", "rustls-no-provider"] }

[patch.crates-io]
#polars = { git = 'https://github.com/pola-rs/polars', rev="0df0c25d4db895ec8cad773bedc4e98400e3135e" }
#polars-core = { git = 'https://github.com/pola-rs/polars', rev="0df0c25d4db895ec8cad773bedc4e98400e3135e" }
[workspace]
resolver = "2"
members = ["lib/chrontext", "lib/cimxml_export", "lib/cimxml_import", "lib/datalog", "lib/disk", "lib/external_sparql", "lib/file_io", "lib/fts", "lib/in_memory", "lib/maplib", "lib/opc_ua", "lib/query_processing", "lib/representation", "lib/shacl", "lib/spargebra", "lib/triplestore", "lib/utils", "lib/virtualization", "lib/virtualized_query", "py_maplib", "maplibr/src/rust"]

[workspace.package]
edition = "2021"
rust-version = "1.88.0"

[workspace.dependencies]
aho-corasick = "1.1.4"
arrow = "58"
chrono = "0.4.41"
chrono-tz = "0.10.3"
fundu = "2.0.1"
hdt = { version = "0.7.2", default-features = false, features = ["nt"] }
hex = "0.4.3"
itoa = "1.0.15"
md-5 = "0.11.0"
memchr = "2.8.0"
memmap2 = "0.9.5"
# dev-dependencies
nohash-hasher = "0.2.0"
ordered-float = "5.1.0"
oxilangtag = "0.1.5"
oxiri = "0.2.11"
oxjsonld = { version = "0.2.5" }
oxrdf = { version = "0.3.3" }
oxrdfio = { version = "0.2.5" }
oxsdatatypes = "0.2.2"
oxttl = { version = "0.2.3" }
peg = "0.8"
# Moment is there to work around a feature toggle bug
polars = {
version = "0.54.4",
features = [
"cse",
"fmt",
"lazy",
"moment",
"nightly",
"parquet",
"performant",
"simd",
"timezones",
]
}
polars-arrow = { version = "0.54.4" }
polars-core = { version = "0.54.4" }
pyo3 = { version = "0.29.0", features = ["py-clone", "rust_decimal"] }
quick-xml = { version = "0.41.0", features = ["arbitrary"] }
rand = "0.10.1"
range-set-blaze = "0.5.0"
rayon = "1.10.0"
regex = "1.11.1"
reqwest = { version = "0.13.4", features = ["json", "query", "rustls-no-provider"] }
rust_decimal = "1.42.1"
ryu = "1.0.20"
serde = { version = "1.0.228" }
serde_json = { version = "1.0.149" }
sha1 = "0.11.0"
simd-json = { version = "0.17.0", features = ["serde_json"] }
sparesults = "0.3.3"
sprs = "0.11.3"
thiserror = "2.0.12"
tracing = { version = "0.1", features = ["log"] }
tracing-log = "0.2"
tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }
urlencoding = "2.1.3"
uuid = {
version = "1.16.0",
features = [
"fast-rng", # Use a faster (but still sufficiently random) RNG
"v4", # Lets you generate random UUIDs
"v5",
]
}
walkdir = "2.5.0"

[patch.crates-io]
# polars = { git = 'https://github.com/pola-rs/polars', rev="0df0c25d4db895ec8cad773bedc4e98400e3135e" }
# polars-core = { git = 'https://github.com/pola-rs/polars', rev="0df0c25d4db895ec8cad773bedc4e98400e3135e" }
4 changes: 4 additions & 0 deletions maplibr/.Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
^src/rust/\.cargo$
^src/rust/target$
^src/Makevars$
^src/Makevars\.win$
41 changes: 41 additions & 0 deletions maplibr/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Package: maplibr
Title: R Interface to the 'maplib' Knowledge Graph Engine
Version: 0.0.0.9000
Authors@R: c(
person("Novica", "Nakov", , "nnovica@gmail.com", role = c("aut", "cre", "cph"),
comment = c(ORCID = "0009-0005-7773-7718")))
Description: Build, query, and reason over RDF knowledge graphs backed by the
'maplib' Rust engine. Graphs are constructed from tabular data using OTTR
mapping templates, queried with SPARQL, and returned as ordinary R
data frames via the Arrow C Stream Interface. Also supports RDFS
inference and reading/writing common RDF serializations (Turtle,
N-Triples, RDF/XML).
License: Apache License (>= 2.0)
Encoding: UTF-8
Depends:
R (>= 4.1)
Imports:
R6,
S7,
nanoarrow,
jsonlite
Roxygen: list(markdown = TRUE)
RoxygenNote: 8.0.0
SystemRequirements: Cargo (Rust's package manager), rustc
Collate:
'000-wrappers.R'
'errors.R'
'terms.R'
'vocab.R'
'rdf_type.R'
'templates.R'
'model.R'
'model-verbs.R'
'zzz.R'
Suggests:
testthat (>= 3.0.0),
knitr,
rmarkdown,
igraph
Config/testthat/edition: 3
VignetteBuilder: knitr
76 changes: 76 additions & 0 deletions maplibr/NAMESPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Generated by roxygen2: do not edit by hand

S3method("$<-",savvy_maplibr__sealed)
S3method("[[<-",savvy_maplibr__sealed)
S3method(print,"maplibr::RArgument__bundle")
S3method(print,"maplibr::RConstantTerm__bundle")
S3method(print,"maplibr::RGroundTerm__bundle")
S3method(print,"maplibr::RInstance__bundle")
S3method(print,"maplibr::RModel__bundle")
S3method(print,"maplibr::RParameter__bundle")
S3method(print,"maplibr::RTemplate__bundle")
export(Argument)
export(BlankNode)
export(IRI)
export(Instance)
export(Literal)
export(Model)
export(Parameter)
export(Prefix)
export(RArgument)
export(RConstantTerm)
export(RDFType)
export(RGroundTerm)
export(RInstance)
export(RModel)
export(RParameter)
export(RTemplate)
export(Template)
export(Triple)
export(Variable)
export(export_test_series)
export(export_test_solution_mappings)
export(import_test_series)
export(import_test_solution_mappings)
export(instance_template_iri)
export(instantiate)
export(make_triple)
export(model_add_graph)
export(model_add_prefixes)
export(model_add_template)
export(model_compact)
export(model_create_index)
export(model_deserialize)
export(model_detach_graph)
export(model_infer_rdfs)
export(model_insert)
export(model_map)
export(model_map_df)
export(model_map_json)
export(model_map_json_string)
export(model_map_triples)
export(model_map_xml)
export(model_map_xml_string)
export(model_query)
export(model_read)
export(model_reads)
export(model_serialize)
export(model_size)
export(model_truncate_graph)
export(model_update)
export(model_write)
export(model_writes)
export(owl)
export(rdf)
export(rdf_type_blank_node)
export(rdf_type_iri)
export(rdf_type_literal)
export(rdf_type_multi)
export(rdf_type_unknown)
export(rdfs)
export(suf)
export(validate_blank_node_id)
export(validate_iri)
export(validate_variable_name)
export(xsd)
useDynLib(maplibr, .registration = TRUE)
Loading