Skip to main content

Add your description here

Project description

A slightly opinionated, common set of 'rules' for creating rdf data using 'rdf-engine':

  • Data Rules: for loading tables (csv), hierarchical (json), and rdf (ttl).
  • Mapping rule: SPARQL construct
  • Ontology rules: Inference and validation using TopQuadrant

These rules come together in the 'engine'.

Development

Develop with uv sync --all-packages --all-extras.

Run python tasks.py stamp_ver before pypi publishing.

Design Choices

These are choices given the common use case of mapping data to an ontology. They are somewhat firm.

  • RDF1.2 annotates tripes with metadata as <<?s ?p ?o>> ?mp ?mo where ?mp and ?mo correspond to simple (key,value) pairs of metadata.
  • Mappings are in the form of SPARQL constructs stored as files with a .mapping.rq extension (can also be .mapping.sparql).
  • Each (specified) ontology will be processed separately.

Quick Start

Examine how rules are fed into an engine in the tests. The common workflow is:

  1. Specify rules. Each rule is constructed by providing arguments to mkrule. mkrule processes objects such as file paths and data objects. A distinction is made for 'data rules'; These are only triggered once in the beginning.

  2. Specify engine run parameters. See run function documentation.

  3. Extract data subsets with queries. 'System' queries are mapped_and_inferred and validation (results). It's best to extract these using the query function as they slightly depend on configuration.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rdf_rules-2026.8.61.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rdf_rules-2026.8.61-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file rdf_rules-2026.8.61.tar.gz.

File metadata

  • Download URL: rdf_rules-2026.8.61.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rdf_rules-2026.8.61.tar.gz
Algorithm Hash digest
SHA256 53f780d1cc446053cd894c20b9e3128860197194c307db636495bb534f87d879
MD5 385d4764bc579128883e4c05ac6e0972
BLAKE2b-256 0b068ed02e1ed66952a8673b3a378e62f785f8b23fa53aab9635c7efe125fc6b

See more details on using hashes here.

Provenance

The following attestation bundles were made for rdf_rules-2026.8.61.tar.gz:

Publisher: python-publish.yaml on pnnl/rdf-rules

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rdf_rules-2026.8.61-py3-none-any.whl.

File metadata

  • Download URL: rdf_rules-2026.8.61-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rdf_rules-2026.8.61-py3-none-any.whl
Algorithm Hash digest
SHA256 4d057ea5f2aa73401f8d3fe72b0458a1cf964982c47716fa9d458e0266a0a535
MD5 44053a53442fae29b57545af80d7c3e1
BLAKE2b-256 b56ae6a6851374d1b9e96b59d8ce1ef67dfdc1472d8ef729680fb21c962dd8c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for rdf_rules-2026.8.61-py3-none-any.whl:

Publisher: python-publish.yaml on pnnl/rdf-rules

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page