Skip to main content

A Spec By Example framework for RDF and SPARQL, Inspired by Cucumber.

Project description

== Mustrd

// tag::body[]

image::https://github.com/Semantic-partners/mustrd/raw/python-coverage-comment-action-data/badge.svg[Coverage badge,link="https://github.com/Semantic-partners/mustrd/tree/python-coverage-comment-action-data"]

=== Why?

How do you know your SPARQL, whether it's in a pipeline, or a query, is doing what you intend?

As much as we love RDF and SPARQL and Semantic Tech in general, we found a small gap in tooling which would give us that certainty.

We missed the powerful testing frameworks that have evolved in imperative languages that help ensure you've written code that does what you think it should.

We wanted to be able to:

* setup data scenarios and ensure queries worked as expected
* setup edge cases for queries and ensure they still work
* isolate small sparql enrichment / transformation steps and to know we're only INSERTing what we intend

Enter MustRD.

=== What?

MustRD is a Spec-By-Example ontology, with a reference python implementation, inspired by the likes of Cucumber.

It's designed to be triplestore/SPARQL engine agnostic (aren't open standards *wonderful*!).

=== What it is NOT
MustRD is nothing to do with SHACL, or an alternative to it. In fact, we use SHACL for some of our features.

SHACL provides validation around data.

MustRD provides validation around data transformations.

=== How?
You define your specs in ttl, or trig files.
We use the SBE approach of *Given*, *When*, *Then* to define starting dataset, an action, and a set of expectations. We build up a set of data.
Then, depending on whether your SPARQL is a CONSTRUCT, SELECT or a INSERT/DELETE, we run it, and compare results against a set of expectations (*Then*) that are defined in the same way as a *Given* .
Alternatively, you could define your *Then*

* as an explicit ASK, or
* select; or
* in a higher-order expectation language like you will be used to in various platforms, a set of expectations.


=== When?

Soon. It's a work in progress, and we're building the things *we* need for the projects we work on at multiple clients, with multiple vendor stacks.
We already think it's useful, but it might not meet *your* needs, out of the box.

We invite you to try it, see where it doesn't fit, and raise an issue, or even better, a PR! If you need something custom, please check out our consultancy rates, and we might be able to prioritise a new feature for you.

== Support
We're a specialist consultancy in Semantic Tech, we're putting this out in case it's useful, but if you need more support, kindly contact our business team on info@semanticpartners.com

// tag::body[]

include::GETSTARTED.adoc[Get started]

Developer doc:
include::mustrd/README.adoc[tags=body]

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

mustrd-0.2.3.tar.gz (37.6 kB view details)

Uploaded Source

Built Distribution

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

mustrd-0.2.3-py3-none-any.whl (49.6 kB view details)

Uploaded Python 3

File details

Details for the file mustrd-0.2.3.tar.gz.

File metadata

  • Download URL: mustrd-0.2.3.tar.gz
  • Upload date:
  • Size: 37.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.7 Darwin/23.6.0

File hashes

Hashes for mustrd-0.2.3.tar.gz
Algorithm Hash digest
SHA256 7aea1dcfd4979510b9ff9a7a2c36b2309fda4aa6719795aa3d8d4a1a96d2b86e
MD5 3c2f54ac423a3a593db39a732f4cea34
BLAKE2b-256 3905cbaeb8802889b6444ae89a8e1b65d8b33cbefdfe3b9aaf06e10aef807229

See more details on using hashes here.

File details

Details for the file mustrd-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: mustrd-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 49.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.7 Darwin/23.6.0

File hashes

Hashes for mustrd-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c27d00261cad7125bd2fd143ccb7ae9d9c3bd82cdfca624a9304ebf647eb95a8
MD5 2ef690d6ca9c4302e884b00059f99859
BLAKE2b-256 2ca54df6d98d04bcb3d1921be7798222fa29dec2f847a31ca6d1ffc72326f779

See more details on using hashes here.

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