mustrd 0.3.1a10__tar.gz → 0.3.3a1__tar.gz

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.
Files changed (32) hide show
  1. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/PKG-INFO +1 -1
  2. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/mustrd/mustrd.py +28 -3
  3. mustrd-0.3.3a1/mustrd/shared_utils.py +0 -0
  4. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/mustrd/spec_component.py +2 -0
  5. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/pyproject.toml +1 -1
  6. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/LICENSE +0 -0
  7. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/README.md +0 -0
  8. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/mustrd/README.adoc +0 -0
  9. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/mustrd/README.md +0 -0
  10. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/mustrd/TestResult.py +0 -0
  11. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/mustrd/__init__.py +0 -0
  12. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/mustrd/anzo_utils.py +0 -0
  13. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/mustrd/logger_setup.py +0 -0
  14. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/mustrd/model/catalog-v001.xml +0 -0
  15. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/mustrd/model/mustrdShapes.ttl +0 -0
  16. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/mustrd/model/mustrdTestOntology.ttl +0 -0
  17. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/mustrd/model/mustrdTestShapes.ttl +0 -0
  18. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/mustrd/model/ontology.ttl +0 -0
  19. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/mustrd/model/test-resources/resources.ttl +0 -0
  20. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/mustrd/model/triplestoreOntology.ttl +0 -0
  21. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/mustrd/model/triplestoreshapes.ttl +0 -0
  22. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/mustrd/mustrdAnzo.py +0 -0
  23. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/mustrd/mustrdGraphDb.py +0 -0
  24. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/mustrd/mustrdRdfLib.py +0 -0
  25. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/mustrd/mustrdTestPlugin.py +0 -0
  26. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/mustrd/namespace.py +0 -0
  27. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/mustrd/run.py +0 -0
  28. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/mustrd/steprunner.py +0 -0
  29. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/mustrd/templates/md_ResultList_leaf_template.jinja +0 -0
  30. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/mustrd/templates/md_ResultList_template.jinja +0 -0
  31. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/mustrd/templates/md_stats_template.jinja +0 -0
  32. {mustrd-0.3.1a10 → mustrd-0.3.3a1}/mustrd/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: mustrd
3
- Version: 0.3.1a10
3
+ Version: 0.3.3a1
4
4
  Summary: A Spec By Example framework for RDF and SPARQL, Inspired by Cucumber.
5
5
  License: MIT
6
6
  Author: John Placek
@@ -548,13 +548,38 @@ def run_spec(spec: Specification) -> SpecResult:
548
548
 
549
549
 
550
550
  def get_triple_store_graph(triple_store_graph_path: Path, secrets: str):
551
+ graph = Graph()
552
+ # Parse the main triple store graph file
553
+ try:
554
+ graph.parse(triple_store_graph_path)
555
+ except Exception as e:
556
+ log.error(f"Failed to parse triple store graph file '{triple_store_graph_path}': {e}")
557
+ raise
558
+
559
+ # Parse secrets, either from string or from file
551
560
  if secrets:
552
- return Graph().parse(triple_store_graph_path).parse(data=secrets)
561
+ log.info("Parsing secrets from provided string (--secrets option)")
562
+ log.info("" + secrets)
563
+ try:
564
+ graph.parse(data=secrets)
565
+ except Exception as e:
566
+ log.error(f"Failed to parse secrets data for triple store graph: {e}")
567
+ raise
553
568
  else:
554
- secret_path = triple_store_graph_path.parent / Path(
569
+ secret_path = triple_store_graph_path.with_name(
555
570
  triple_store_graph_path.stem + "_secrets" + triple_store_graph_path.suffix
556
571
  )
557
- return Graph().parse(triple_store_graph_path).parse(secret_path)
572
+ log.info("Parsing secrets from secrets file: " + str(secret_path))
573
+ if secret_path.exists():
574
+ try:
575
+ graph.parse(secret_path)
576
+ except Exception as e:
577
+ log.error(f"Failed to parse secrets file '{secret_path}': {e}")
578
+ raise
579
+ else:
580
+ log.info(f"No secrets file found at '{secret_path}', continuing without it.")
581
+
582
+ return graph
558
583
 
559
584
 
560
585
  # Parse and validate triple store configuration
File without changes
@@ -179,6 +179,8 @@ def get_file_absolute_path(spec_component_details: SpecComponentDetails, relativ
179
179
 
180
180
 
181
181
  def get_spec_component_type(spec_components: List[SpecComponent]) -> Type[SpecComponent]:
182
+ if not spec_components:
183
+ raise ValueError("spec_components list is empty")
182
184
  # Get the type of the first object in the list
183
185
  spec_type = type(spec_components[0])
184
186
  # Loop through the remaining objects in the list and check their types
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "mustrd"
3
- version = "0.3.1a10"
3
+ version = "0.3.3a1"
4
4
  description = "A Spec By Example framework for RDF and SPARQL, Inspired by Cucumber."
5
5
  authors = [
6
6
  { name = "John Placek", email = "john.placek@semanticpartners.com" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes