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.

Usage

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.62.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.62-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rdf_rules-2026.8.62.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.62.tar.gz
Algorithm Hash digest
SHA256 ffd611b626ba717c9f1234a4c741fc750b4eef56c7be8913f07b977fa6019307
MD5 27bfa33ee2d95f02a8a12278e145d69f
BLAKE2b-256 f262668a08e0520b6c5bd4eca3e700ec2198d2dcfe1e6c0ce9a00edc7715977b

See more details on using hashes here.

Provenance

The following attestation bundles were made for rdf_rules-2026.8.62.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.62-py3-none-any.whl.

File metadata

  • Download URL: rdf_rules-2026.8.62-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.62-py3-none-any.whl
Algorithm Hash digest
SHA256 74b9d3cf4d32acfb1c4bec94c46c05f4ad516cb26e09a3d1cd9d87b8aaa6d30d
MD5 1df833b49d3dc68925a2369182df0857
BLAKE2b-256 a0b3ea6fb065174eb92a3d53a426b7a2be48fd50e9ee8e9a9239472b86ebbb2b

See more details on using hashes here.

Provenance

The following attestation bundles were made for rdf_rules-2026.8.62-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