mustrd 0.2.7a0__py3-none-any.whl → 0.3.1a0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,96 @@
1
+ Metadata-Version: 2.3
2
+ Name: mustrd
3
+ Version: 0.3.1a0
4
+ Summary: A Spec By Example framework for RDF and SPARQL, Inspired by Cucumber.
5
+ License: MIT
6
+ Author: John Placek
7
+ Author-email: john.placek@semanticpartners.com
8
+ Requires-Python: >=3.11,<4.0
9
+ Classifier: Framework :: Pytest
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Natural Language :: English
12
+ Classifier: Programming Language :: Python
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Topic :: Software Development :: Quality Assurance
18
+ Classifier: Topic :: Software Development :: Testing
19
+ Classifier: Topic :: Utilities
20
+ Requires-Dist: Jinja2 (==3.1.5)
21
+ Requires-Dist: beautifulsoup4 (>=4.11.1,<5.0.0)
22
+ Requires-Dist: colorama (==0.4.6)
23
+ Requires-Dist: colorlog (>=6.7.0,<7.0.0)
24
+ Requires-Dist: coverage (==7.4.3)
25
+ Requires-Dist: edn-format (>=0.7.5,<0.8.0)
26
+ Requires-Dist: flake8 (==7.0.0)
27
+ Requires-Dist: multimethods-py (>=0.5.3,<0.6.0)
28
+ Requires-Dist: numpy (>=1.26.0,<1.27.0)
29
+ Requires-Dist: openpyxl (>=3.1.2,<4.0.0)
30
+ Requires-Dist: pandas (>=2.0,<3.0)
31
+ Requires-Dist: pyshacl (>=0.30.0,<0.31.0)
32
+ Requires-Dist: pytest (>=7.2.0,<8.0.0)
33
+ Requires-Dist: rdflib (>=7.1.3,<8.0.0)
34
+ Requires-Dist: requests (>=2.28.2,<3.0.0)
35
+ Requires-Dist: tabulate (>=0.9.0,<0.10.0)
36
+ Requires-Dist: toml (>=0.10.2,<0.11.0)
37
+ Requires-Dist: tomli (>=2.0.1,<3.0.0)
38
+ Requires-Dist: urllib3 (==1.26.19)
39
+ Project-URL: Repository, https://github.com/Semantic-partners/mustrd
40
+ Description-Content-Type: text/markdown
41
+
42
+ # mustrd
43
+
44
+ **"MustRD: Validate your SPARQL queries and transformations with precision and confidence, using BDD and Given-When-Then principles."**
45
+
46
+ [<img src="https://github.com/Semantic-partners/mustrd/raw/python-coverage-comment-action-data/badge.svg?sanitize=true" alt="coverage badge">](https://github.com/Semantic-partners/mustrd/tree/python-coverage-comment-action-data)
47
+
48
+ ### Why?
49
+
50
+ SPARQL is a powerful query language for RDF data, but how can you ensure your queries and transformations are doing what you intend? Whether you're working on a pipeline or a standalone query, certainty is key.
51
+
52
+ While RDF and SPARQL offer great flexibility, we noticed a gap in tooling to validate their behavior. We missed the robust testing frameworks available in imperative programming languages that help ensure your code works as expected.
53
+
54
+ With MustRD, you can:
55
+
56
+ * Define data scenarios and verify that queries produce the expected results.
57
+ * Test edge cases to ensure your queries remain reliable.
58
+ * Isolate small SPARQL enrichment or transformation steps and confirm you're only inserting what you intend.
59
+
60
+ ### What?
61
+
62
+ MustRD is a Spec-By-Example ontology with a reference Python implementation, inspired by tools like Cucumber. It uses the Given-When-Then approach to define and validate SPARQL queries and transformations.
63
+
64
+ MustRD is designed to be triplestore/SPARQL engine agnostic, leveraging open standards to ensure compatibility across different platforms.
65
+
66
+ ### What it is NOT
67
+
68
+ MustRD is not an alternative to SHACL. While SHACL validates data structures, MustRD focuses on validating data transformations and query results.
69
+
70
+ ### How?
71
+
72
+ You define your specs in Turtle (`.ttl`) or TriG (`.trig`) files using the Given-When-Then approach:
73
+
74
+ * **Given**: Define the starting dataset.
75
+ * **When**: Specify the action (e.g., a SPARQL query).
76
+ * **Then**: Outline the expected results.
77
+
78
+ Depending on the type of SPARQL query (CONSTRUCT, SELECT, INSERT/DELETE), MustRD runs the query and compares the results against the expectations defined in the spec.
79
+
80
+ Expectations can also be defined as:
81
+
82
+ * INSERT queries.
83
+ * SELECT queries.
84
+ * Higher-order expectation languages, similar to those used in various platforms.
85
+
86
+ ### When?
87
+
88
+ MustRD is a work in progress, built to meet the needs of our projects across multiple clients and vendor stacks. While we find it useful, it may not meet your needs out of the box.
89
+
90
+ We invite you to try it, raise issues, or contribute via pull requests. If you need custom features, contact us for consultancy rates, and we may prioritize your request.
91
+
92
+ ## Support
93
+
94
+ Semantic Partners is a specialist consultancy in Semantic Technology. If you need more support, contact us at info@semanticpartners.com or mustrd@semanticpartners.com.
95
+
96
+
@@ -1,32 +1,32 @@
1
1
  mustrd/README.adoc,sha256=E5KuShPEl2U6NmRzEAwZtAhBoyJsOvjGS1CM2UsbSQ4,1394
2
- mustrd/README.md,sha256=CR08uZ4eNELHBdDRXAVKkRZ4hgQB9OXA7tFRy4ER-LI,1364
2
+ mustrd/README.md,sha256=uyg4Pn1JkYic_H5WcWn7llL_m4gBsIl02rIEikKa_2A,1609
3
3
  mustrd/TestResult.py,sha256=K4yth-rYrK6Pl7SFiTAZkUStBIzHlgq0oxSSpq5F34M,4849
4
4
  mustrd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- mustrd/anzo_utils.py,sha256=4DXtdZo504Llzmc2fyhe13rLfJXk1mDUnUNDHA8N5YI,4483
6
- mustrd/logger_setup.py,sha256=6Z3E5_h8vZFn4PZUyJVFdkgwFjDWthWEQVJsI9wQVVU,1720
5
+ mustrd/anzo_utils.py,sha256=CKNSF_oTFKc4v64EDXJzeirP1GxOIOCUKNfaJKk0oEc,4677
6
+ mustrd/logger_setup.py,sha256=kuzrFaW8Ar-q5Bvjg1OqKn9l4U5MVDyfOQF13SYk8nQ,1780
7
7
  mustrd/model/catalog-v001.xml,sha256=IEtaw3FK4KGQWKancEe1HqzUQTrKdk89vNxnoLKGF4o,381
8
- mustrd/model/mustrdShapes.ttl,sha256=6-W8onQBWOwAvsIYLRGOk2FePSp4SPFfWd7dSuNC5ho,9456
8
+ mustrd/model/mustrdShapes.ttl,sha256=Qw99dIakGEra-vcENs3Oc9pJ33yYBZ0GEZJa2dLI3xo,10107
9
9
  mustrd/model/mustrdTestOntology.ttl,sha256=W7IRbPKrhpYFweZvc9QH8gdjBiuZMHKETIuHBepLnYw,2034
10
10
  mustrd/model/mustrdTestShapes.ttl,sha256=5PUpU9AzPSeLpF_UzNBVnACLOhs3hfoQpiz-ybsrbj8,818
11
- mustrd/model/ontology.ttl,sha256=AK27qyT8GW_SwJDwTFvtfxndBPEfYT6Y1jiW26Hyjg0,16809
11
+ mustrd/model/ontology.ttl,sha256=orb8VgPiVrmzp3dKHc53hgkq_9ic9SbqIAyLZ_cHv38,17079
12
12
  mustrd/model/test-resources/resources.ttl,sha256=1Dsp1nuNxauj9bxeX-HShQsiO-CVy5Irwm2y2x0cdjI,1498
13
13
  mustrd/model/triplestoreOntology.ttl,sha256=9K5gj0hDOolRYjHc58UT4igex8cUnq9h7SUe4ToYbdw,5834
14
14
  mustrd/model/triplestoreshapes.ttl,sha256=G1kdgASdPa8s5JVGXL4KM2ewp-F5Vmbdist0f77VTBc,1706
15
- mustrd/mustrd.py,sha256=8xPjdHyGA692zyThCILm8VYuxkSF1ATEf35zXSmLVRU,37750
16
- mustrd/mustrdAnzo.py,sha256=Fg1mCkuGiVywSt5HJ0KCVJUFuTxNMrsPtt45y_fqSII,8292
15
+ mustrd/mustrd.py,sha256=Ac42FUVY_6u1rt8uQmmIRo6-lV1vmOTy5fNu1CqPEIQ,41021
16
+ mustrd/mustrdAnzo.py,sha256=0XhLkfagW_HManfZ3iGAf_K2_d-pLVTAOT-0pX8hhM4,8352
17
17
  mustrd/mustrdGraphDb.py,sha256=Ro_fxDPFl64r-FAM18awhZydydEY1-IXO0zdKpvZD3U,5405
18
- mustrd/mustrdRdfLib.py,sha256=CvrzEl1-lEPugYVe3y_Ip8JMzUxv6IeWauLOa_WA-XI,2073
19
- mustrd/mustrdTestPlugin.py,sha256=Xy7I7yJNwAatzrU13FkBs0ateWQ96w3MDte8gt8Ykto,15548
20
- mustrd/namespace.py,sha256=xGfH-nRP3t_I4rmoGJPqlSGbI0G5HUMlUeAl7l_yW-s,3622
18
+ mustrd/mustrdRdfLib.py,sha256=1dYoyohjDhonKItYMNkFybySFt9lgez3zYN2kU9mW-I,2369
19
+ mustrd/mustrdTestPlugin.py,sha256=hbYo8i1j4uFuRekXGd4Mnjt9wkSgQrS5o809xtbcLgs,19664
20
+ mustrd/namespace.py,sha256=1l8RJDFI7rYkWvmRokaTvSvqrDJEdRNIkq3lmPb0xpI,3854
21
21
  mustrd/run.py,sha256=5xZUgKPMBQ-03cWROAnwtbOs2Nb0Vat6n8Fi6EyfS-k,4257
22
- mustrd/spec_component.py,sha256=7BmMjJMy0ACbVBAEZpe5ZprnDZYs6h5f7-fI38l3jAk,31483
23
- mustrd/steprunner.py,sha256=YKrMSYhethWCAQEI63hK6jXh3ljyoM87w7eHyoRd8rc,7389
22
+ mustrd/spec_component.py,sha256=FQPLX5W0wGOLUOJgPxf-9YpyNhMYnV3xU2nJch99NOI,38452
23
+ mustrd/steprunner.py,sha256=BHY4UhN7oqHVoXYPk4ROnv0nCqy4-NXfbzFzOyb3G4k,10032
24
24
  mustrd/templates/md_ResultList_leaf_template.jinja,sha256=IzwZjliCx7-viipATDQK6MQg_5q1kLMKdeNSZg1sXXY,508
25
25
  mustrd/templates/md_ResultList_template.jinja,sha256=_8joJ7vtw_qoqxv3HhUtBgRfhOeqmgfaRFwEo4MROvQ,203
26
26
  mustrd/templates/md_stats_template.jinja,sha256=96W62cMWu9UGLNv65ZQ8RYLjkxKHhJy-FlUtXgud6XY,155
27
27
  mustrd/utils.py,sha256=OGdLvw7GvjrFgTJo0J97Xwdh-_ZgSmapmOistrEchO0,1387
28
- mustrd-0.2.7a0.dist-info/LICENSE,sha256=r8nmh5fUct9h2w8_RDl13EIscvmwCLoarPr1kg35MnA,1078
29
- mustrd-0.2.7a0.dist-info/METADATA,sha256=G7prJE0-fM5tfkmtvCXWdJz6LEo6FxvrZQ5t4EnY9zk,4204
30
- mustrd-0.2.7a0.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
31
- mustrd-0.2.7a0.dist-info/entry_points.txt,sha256=v7V7sN0_L1aB4Ug_9io5axlQSeJ1C0tNrQWwdXdV58s,50
32
- mustrd-0.2.7a0.dist-info/RECORD,,
28
+ mustrd-0.3.1a0.dist-info/LICENSE,sha256=r8nmh5fUct9h2w8_RDl13EIscvmwCLoarPr1kg35MnA,1078
29
+ mustrd-0.3.1a0.dist-info/METADATA,sha256=Kf--ygg87njQLL6YTu-Prt63nMrj0aMwpSAoya_FtDk,4361
30
+ mustrd-0.3.1a0.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
31
+ mustrd-0.3.1a0.dist-info/entry_points.txt,sha256=v7V7sN0_L1aB4Ug_9io5axlQSeJ1C0tNrQWwdXdV58s,50
32
+ mustrd-0.3.1a0.dist-info/RECORD,,
@@ -1,96 +0,0 @@
1
- Metadata-Version: 2.3
2
- Name: mustrd
3
- Version: 0.2.7a0
4
- Summary: A Spec By Example framework for RDF and SPARQL, Inspired by Cucumber.
5
- License: MIT
6
- Author: John Placek
7
- Author-email: john.placek@semanticpartners.com
8
- Requires-Python: >=3.11,<4.0
9
- Classifier: Framework :: Pytest
10
- Classifier: License :: OSI Approved :: MIT License
11
- Classifier: Natural Language :: English
12
- Classifier: Programming Language :: Python
13
- Classifier: Programming Language :: Python :: 3
14
- Classifier: Programming Language :: Python :: 3.11
15
- Classifier: Programming Language :: Python :: 3.12
16
- Classifier: Programming Language :: Python :: 3.13
17
- Classifier: Topic :: Software Development :: Quality Assurance
18
- Classifier: Topic :: Software Development :: Testing
19
- Classifier: Topic :: Utilities
20
- Requires-Dist: Jinja2 (==3.1.5)
21
- Requires-Dist: beautifulsoup4 (>=4.11.1,<5.0.0)
22
- Requires-Dist: colorama (==0.4.6)
23
- Requires-Dist: colorlog (>=6.7.0,<7.0.0)
24
- Requires-Dist: coverage (==7.4.3)
25
- Requires-Dist: flake8 (==7.0.0)
26
- Requires-Dist: multimethods-py (>=0.5.3,<0.6.0)
27
- Requires-Dist: numpy (>=1.26.0,<1.27.0)
28
- Requires-Dist: openpyxl (>=3.1.2,<4.0.0)
29
- Requires-Dist: pandas (>=2.0,<3.0)
30
- Requires-Dist: pyshacl (>=0.30.0,<0.31.0)
31
- Requires-Dist: pytest (>=7.2.0,<8.0.0)
32
- Requires-Dist: rdflib (>=7.1.3,<8.0.0)
33
- Requires-Dist: requests (>=2.28.2,<3.0.0)
34
- Requires-Dist: tabulate (>=0.9.0,<0.10.0)
35
- Requires-Dist: toml (>=0.10.2,<0.11.0)
36
- Requires-Dist: tomli (>=2.0.1,<3.0.0)
37
- Requires-Dist: urllib3 (==1.26.19)
38
- Project-URL: Repository, https://github.com/Semantic-partners/mustrd
39
- Description-Content-Type: text/markdown
40
-
41
- # mustrd
42
-
43
-
44
- [<img src="https://github.com/Semantic-partners/mustrd/raw/python-coverage-comment-action-data/badge.svg?sanitize=true" alt="coverage badge">](https://github.com/Semantic-partners/mustrd/tree/python-coverage-comment-action-data)
45
-
46
- ### Why?
47
-
48
- How do you know your SPARQL, whether it's in a pipeline, or a query, is doing what you intend?
49
-
50
- As much as we love RDF and SPARQL and Semantic Tech in general, we found a small gap in tooling to give us that certainty.
51
-
52
- 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.
53
-
54
- We wanted to be able to
55
-
56
- * setup data scenarios and ensure queries worked as expected
57
- * setup edge cases for queries and ensure they still work
58
- * isolate small sparql enrichment / transformation steps and know we're only INSERTing what we intend
59
-
60
- Enter MustRD.
61
-
62
- ### What?
63
-
64
- MustRD is a Spec-By-Example ontology, with a reference python implementation, inspired by the likes of Cucumber.
65
-
66
- It's designed to be triplestore/SPARQL engine agnostic (aren't open standards *wonderful*!).
67
-
68
- ### What it is NOT
69
- MustRD is nothing to do with SHACL, or an alternative to it. In fact, we use SHACL for some of our features.
70
-
71
- SHACL provides validation around data.
72
-
73
- MustRD provides validation around data transformations.
74
-
75
- ### How?
76
- You define your specs in ttl, or trig files.
77
- 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.
78
- 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* .
79
- Alternatively, you could define your *Then*
80
-
81
- * as an explicit ASK, or
82
- * select; or
83
- * in a higher-order expectation language like you will be used to in various platforms, a set of expectations.
84
-
85
-
86
- ### When?
87
-
88
- 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.
89
- We already think it's useful, but it might not meet *your* needs, out of the box.
90
-
91
- 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.
92
-
93
- ## Support
94
- 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, or mustrd@semanticpartners.com
95
-
96
-