mustrd 0.2.6__tar.gz → 0.2.6.2__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 (31) hide show
  1. {mustrd-0.2.6 → mustrd-0.2.6.2}/PKG-INFO +2 -2
  2. {mustrd-0.2.6 → mustrd-0.2.6.2}/README.md +1 -1
  3. mustrd-0.2.6.2/mustrd/README.adoc +33 -0
  4. {mustrd-0.2.6 → mustrd-0.2.6.2}/mustrd/mustrd.py +24 -0
  5. {mustrd-0.2.6 → mustrd-0.2.6.2}/mustrd/mustrdTestPlugin.py +4 -2
  6. {mustrd-0.2.6 → mustrd-0.2.6.2}/pyproject.toml +1 -1
  7. {mustrd-0.2.6 → mustrd-0.2.6.2}/LICENSE +0 -0
  8. {mustrd-0.2.6 → mustrd-0.2.6.2}/mustrd/README.md +0 -0
  9. {mustrd-0.2.6 → mustrd-0.2.6.2}/mustrd/TestResult.py +0 -0
  10. {mustrd-0.2.6 → mustrd-0.2.6.2}/mustrd/__init__.py +0 -0
  11. {mustrd-0.2.6 → mustrd-0.2.6.2}/mustrd/logger_setup.py +0 -0
  12. {mustrd-0.2.6 → mustrd-0.2.6.2}/mustrd/model/catalog-v001.xml +0 -0
  13. {mustrd-0.2.6 → mustrd-0.2.6.2}/mustrd/model/mustrdShapes.ttl +0 -0
  14. {mustrd-0.2.6 → mustrd-0.2.6.2}/mustrd/model/mustrdTestOntology.ttl +0 -0
  15. {mustrd-0.2.6 → mustrd-0.2.6.2}/mustrd/model/mustrdTestShapes.ttl +0 -0
  16. {mustrd-0.2.6 → mustrd-0.2.6.2}/mustrd/model/ontology.ttl +0 -0
  17. {mustrd-0.2.6 → mustrd-0.2.6.2}/mustrd/model/test-resources/resources.ttl +0 -0
  18. {mustrd-0.2.6 → mustrd-0.2.6.2}/mustrd/model/triplestoreOntology.ttl +0 -0
  19. {mustrd-0.2.6 → mustrd-0.2.6.2}/mustrd/model/triplestoreshapes.ttl +0 -0
  20. {mustrd-0.2.6 → mustrd-0.2.6.2}/mustrd/mustrdAnzo.py +0 -0
  21. {mustrd-0.2.6 → mustrd-0.2.6.2}/mustrd/mustrdGraphDb.py +0 -0
  22. {mustrd-0.2.6 → mustrd-0.2.6.2}/mustrd/mustrdRdfLib.py +0 -0
  23. {mustrd-0.2.6 → mustrd-0.2.6.2}/mustrd/namespace.py +0 -0
  24. {mustrd-0.2.6 → mustrd-0.2.6.2}/mustrd/run.py +0 -0
  25. {mustrd-0.2.6 → mustrd-0.2.6.2}/mustrd/spec_component.py +0 -0
  26. {mustrd-0.2.6 → mustrd-0.2.6.2}/mustrd/steprunner.py +0 -0
  27. {mustrd-0.2.6 → mustrd-0.2.6.2}/mustrd/templates/md_ResultList_leaf_template.jinja +0 -0
  28. {mustrd-0.2.6 → mustrd-0.2.6.2}/mustrd/templates/md_ResultList_template.jinja +0 -0
  29. {mustrd-0.2.6 → mustrd-0.2.6.2}/mustrd/templates/md_stats_template.jinja +0 -0
  30. {mustrd-0.2.6 → mustrd-0.2.6.2}/mustrd/test/test_mustrd.py +0 -0
  31. {mustrd-0.2.6 → mustrd-0.2.6.2}/mustrd/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mustrd
3
- Version: 0.2.6
3
+ Version: 0.2.6.2
4
4
  Summary: A Spec By Example framework for RDF and SPARQL, Inspired by Cucumber.
5
5
  Home-page: https://github.com/Semantic-partners/mustrd
6
6
  License: MIT
@@ -42,7 +42,7 @@ Description-Content-Type: text/markdown
42
42
  # mustrd
43
43
 
44
44
 
45
- [<img src="https://github.com/Semantic-partners/mustrd/raw/python-coverage-comment-action-data/badge.svg" alt="coverage badge">](https://github.com/Semantic-partners/mustrd/tree/python-coverage-comment-action-data)
45
+ [<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)
46
46
 
47
47
  ### Why?
48
48
 
@@ -1,7 +1,7 @@
1
1
  # mustrd
2
2
 
3
3
 
4
- [<img src="https://github.com/Semantic-partners/mustrd/raw/python-coverage-comment-action-data/badge.svg" alt="coverage badge">](https://github.com/Semantic-partners/mustrd/tree/python-coverage-comment-action-data)
4
+ [<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)
5
5
 
6
6
  ### Why?
7
7
 
@@ -0,0 +1,33 @@
1
+ = Developer helper
2
+ // tag::body[]
3
+
4
+ == Try it out
5
+
6
+ Ensure you have python3 installed, before you begin.
7
+ To install the necessary dependencies, run the following command from the project root.
8
+
9
+ `pip3 install -r requirements.txt`
10
+
11
+ Run the following command to execute the accompanying tests specifications.
12
+
13
+ `python3 src/run.py -v -p "test/test-specs" -g "test/data" -w "test/data" -t "test/data"`
14
+
15
+ You will see some warnings. Do not worry, some tests specifications are invalid and intentionally skipped.
16
+
17
+ For a brief explanation of the meaning of these options use the help option.
18
+
19
+ `python3 src/run.py --help`
20
+
21
+ == Run the tests
22
+
23
+ Run `pytest` from the project root.
24
+
25
+ == Additional Notes for Developers
26
+ Mustrd remains very much under development. It is anticipated that additional functionality and triplestore support will be added over time. The project uses https://python-poetry.org/docs/[Poetry] to manage dependencies so it will be necessary to have this installed to contribute towards the project. The link contains instructions on how to install and use this.
27
+ As the project is actually built from the requirements.txt file at the project root, it is necessary to export dependencies from poetry to this file before committing and pushing changes to the repository, using the following command.
28
+
29
+ `poetry export -f requirements.txt --without-hashes > requirements.txt`
30
+
31
+
32
+
33
+ // end::body[]
@@ -636,6 +636,30 @@ def get_then_update(spec_uri: URIRef, spec_graph: Graph) -> Graph:
636
636
 
637
637
  return expected_results
638
638
 
639
+ def write_result_diff_to_log(res):
640
+ if isinstance(res, UpdateSpecFailure) or isinstance(res, ConstructSpecFailure):
641
+ log.info(f"{Fore.RED}Failed {res.spec_uri} {res.triple_store}")
642
+ log.info(f"{Fore.BLUE} In Expected Not In Actual:")
643
+ log.info(res.graph_comparison.in_expected_not_in_actual.serialize(format="ttl"))
644
+ log.info(f"{Fore.RED} in_actual_not_in_expected")
645
+ log.info(res.graph_comparison.in_actual_not_in_expected.serialize(format="ttl"))
646
+ log.info(f"{Fore.GREEN} in_both")
647
+ log.info(res.graph_comparison.in_both.serialize(format="ttl"))
648
+
649
+ if isinstance(res, SelectSpecFailure):
650
+ log.info(f"{Fore.RED}Failed {res.spec_uri} {res.triple_store}")
651
+ log.info(res.message)
652
+ log.info(res.table_comparison.to_markdown())
653
+ if isinstance(res, SpecPassedWithWarning):
654
+ log.info(f"{Fore.YELLOW}Passed with warning {res.spec_uri} {res.triple_store}")
655
+ log.info(res.warning)
656
+ if isinstance(res, TripleStoreConnectionError) or isinstance(res, SparqlExecutionError) or \
657
+ isinstance(res, SparqlParseFailure):
658
+ log.info(f"{Fore.RED}Failed {res.spec_uri} {res.triple_store}")
659
+ log.info(res.exception)
660
+ if isinstance(res, SpecSkipped):
661
+ log.info(f"{Fore.YELLOW}Skipped {res.spec_uri} {res.triple_store}")
662
+ log.info(res.message)
639
663
 
640
664
  def calculate_row_difference(df1: pandas.DataFrame,
641
665
  df2: pandas.DataFrame) -> pandas.DataFrame:
@@ -32,7 +32,7 @@ from pytest import Session
32
32
 
33
33
  from mustrd.TestResult import ResultList, TestResult, get_result_list
34
34
  from mustrd.utils import get_mustrd_root
35
- from mustrd.mustrd import get_triple_store_graph, get_triple_stores
35
+ from mustrd.mustrd import write_result_diff_to_log, get_triple_store_graph, get_triple_stores
36
36
  from mustrd.mustrd import Specification, SpecSkipped, validate_specs, get_specs, SpecPassed, run_spec
37
37
  from mustrd.namespace import MUST, TRIPLESTORE, MUSTRDTEST
38
38
  from typing import Union
@@ -331,4 +331,6 @@ def run_test_spec(test_spec):
331
331
  if result_type == SpecSkipped:
332
332
  # FIXME: Better exception management
333
333
  pytest.skip("Unsupported configuration")
334
- return result_type == SpecPassed
334
+ if result_type != SpecPassed:
335
+ write_result_diff_to_log(result)
336
+ return result_type == SpecPassed
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "mustrd"
3
- version = "0.2.6"
3
+ version = "0.2.6.2"
4
4
  description = "A Spec By Example framework for RDF and SPARQL, Inspired by Cucumber."
5
5
  authors = ["John Placek <john.placek@semanticpartners.com>",
6
6
  "Juliane Piñeiro-Winkler <juliane.pineiro-winkler@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