mustrd 0.1.4__py3-none-any.whl → 0.1.6__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.
- mustrd/mustrd.py +7 -5
- mustrd/mustrdTestPlugin.py +6 -4
- mustrd/plugin.py +12 -3
- {mustrd-0.1.4.dist-info → mustrd-0.1.6.dist-info}/METADATA +6 -1
- {mustrd-0.1.4.dist-info → mustrd-0.1.6.dist-info}/RECORD +8 -8
- {mustrd-0.1.4.dist-info → mustrd-0.1.6.dist-info}/LICENSE +0 -0
- {mustrd-0.1.4.dist-info → mustrd-0.1.6.dist-info}/WHEEL +0 -0
- {mustrd-0.1.4.dist-info → mustrd-0.1.6.dist-info}/entry_points.txt +0 -0
mustrd/mustrd.py
CHANGED
@@ -381,11 +381,13 @@ def run_spec(spec: Specification) -> SpecResult:
|
|
381
381
|
# if type(mustrd_triple_store) == MustrdAnzo and close_connection:
|
382
382
|
# mustrd_triple_store.clear_graph()
|
383
383
|
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
384
|
+
def get_triple_store_graph(triple_store_graph_path: Path, secrets: str):
|
385
|
+
if secrets:
|
386
|
+
return Graph().parse(triple_store_graph_path).parse(data = secrets)
|
387
|
+
else:
|
388
|
+
secret_path = triple_store_graph_path.parent / Path(triple_store_graph_path.stem + "_secrets" + triple_store_graph_path.suffix)
|
389
|
+
return Graph().parse(triple_store_graph_path).parse(source = secret_path)
|
390
|
+
|
389
391
|
|
390
392
|
def get_triple_stores(triple_store_graph: Graph) -> list[dict]:
|
391
393
|
triple_stores = []
|
mustrd/mustrdTestPlugin.py
CHANGED
@@ -61,10 +61,12 @@ class TestConfig:
|
|
61
61
|
class MustrdTestPlugin:
|
62
62
|
md_path: str
|
63
63
|
test_configs: Dict[str, TestConfig]
|
64
|
+
secrets: str
|
64
65
|
|
65
|
-
def __init__(self, md_path, test_configs):
|
66
|
+
def __init__(self, md_path, test_configs, secrets):
|
66
67
|
self.md_path = md_path
|
67
68
|
self.test_configs = test_configs
|
69
|
+
self.secrets = secrets
|
68
70
|
|
69
71
|
# Hook called at collection time: reads the configuration of the tests, and generate pytests from it
|
70
72
|
def pytest_generate_tests(self, metafunc):
|
@@ -122,10 +124,10 @@ class MustrdTestPlugin:
|
|
122
124
|
def get_triple_stores_from_file(self, test_config):
|
123
125
|
if test_config.triplestore_spec_path:
|
124
126
|
try:
|
125
|
-
triple_stores = get_triple_stores(get_triple_store_graph(Path(test_config.triplestore_spec_path)))
|
126
|
-
except Exception:
|
127
|
+
triple_stores = get_triple_stores(get_triple_store_graph(Path(test_config.triplestore_spec_path), self.secrets))
|
128
|
+
except Exception as e:
|
127
129
|
print(f"""No triple store configuration found at {test_config.triplestore_spec_path}.
|
128
|
-
Fall back: only embedded rdflib will be executed""")
|
130
|
+
Fall back: only embedded rdflib will be executed""", e)
|
129
131
|
triple_stores = [{'type': MUST.RdfLib}]
|
130
132
|
else:
|
131
133
|
print("No triple store configuration required: using embedded rdflib")
|
mustrd/plugin.py
CHANGED
@@ -36,7 +36,7 @@ def pytest_addoption(parser):
|
|
36
36
|
"--md",
|
37
37
|
action="store",
|
38
38
|
dest="mdpath",
|
39
|
-
metavar="
|
39
|
+
metavar="pathToMdSummary",
|
40
40
|
default=None,
|
41
41
|
help="create md summary file at that path.",
|
42
42
|
)
|
@@ -44,11 +44,20 @@ def pytest_addoption(parser):
|
|
44
44
|
"--config",
|
45
45
|
action="store",
|
46
46
|
dest="configpath",
|
47
|
-
metavar="
|
47
|
+
metavar="pathToTestConfig",
|
48
48
|
default=None,
|
49
49
|
required=True,
|
50
50
|
help="Ttl file containing the list of test to construct.",
|
51
51
|
)
|
52
|
+
group.addoption(
|
53
|
+
"--secrets",
|
54
|
+
action="store",
|
55
|
+
dest="secrets",
|
56
|
+
metavar="Secrets",
|
57
|
+
default=None,
|
58
|
+
required=False,
|
59
|
+
help="Give the secrets by command line in order to be able to store secrets safely in CI tools",
|
60
|
+
)
|
52
61
|
return
|
53
62
|
|
54
63
|
|
@@ -70,7 +79,7 @@ def pytest_configure(config) -> None:
|
|
70
79
|
triplestore_spec_path=triplestore_spec_path,
|
71
80
|
filter_on_tripleStore=filter_on_tripleStore)
|
72
81
|
|
73
|
-
config.pluginmanager.register(MustrdTestPlugin(config.getoption("mdpath"), test_configs))
|
82
|
+
config.pluginmanager.register(MustrdTestPlugin(config.getoption("mdpath"), test_configs, config.getoption("secrets")))
|
74
83
|
|
75
84
|
|
76
85
|
def get_config_param(config_graph, config_subject, config_param, convert_function):
|
@@ -1,12 +1,16 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: mustrd
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.6
|
4
4
|
Summary: A Spec By Example framework for RDF and SPARQL, Inspired by Cucumber.
|
5
|
+
Home-page: https://github.com/Semantic-partners/mustrd
|
6
|
+
License: MIT
|
5
7
|
Author: John Placek
|
6
8
|
Author-email: john.placek@semanticpartners.com
|
7
9
|
Requires-Python: ==3.11.7
|
8
10
|
Classifier: Framework :: Pytest
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
9
12
|
Classifier: Natural Language :: English
|
13
|
+
Classifier: Programming Language :: Python
|
10
14
|
Classifier: Programming Language :: Python :: 3
|
11
15
|
Classifier: Topic :: Software Development :: Quality Assurance
|
12
16
|
Classifier: Topic :: Software Development :: Testing
|
@@ -29,6 +33,7 @@ Requires-Dist: tabulate (>=0.9.0,<0.10.0)
|
|
29
33
|
Requires-Dist: toml (>=0.10.2,<0.11.0)
|
30
34
|
Requires-Dist: tomli (>=2.0.1,<3.0.0)
|
31
35
|
Requires-Dist: urllib3 (==1.26.15)
|
36
|
+
Project-URL: Repository, https://github.com/Semantic-partners/mustrd
|
32
37
|
Description-Content-Type: text/plain
|
33
38
|
|
34
39
|
== Mustrd
|
@@ -3,13 +3,13 @@ mustrd/logger_setup.py,sha256=AXTXiiyQ4E_SyqNaKlLsZlkkKr_YJfJZ0N4PEoN7d7E,1630
|
|
3
3
|
mustrd/model/mustrdShapes.ttl,sha256=BR-9fAwGpQt6glfPpDB0Xx3vFXMt_UTQwi469o6aWUo,9709
|
4
4
|
mustrd/model/ontology.ttl,sha256=6xhmOF02gjP4nlOh6rnF5EWCaxWOdexQFn8YndGebck,17226
|
5
5
|
mustrd/model/test-resources/resources.ttl,sha256=7z1P4qJwuqRdmHzKd_mhnUIs-aQoSQxas7yDCwKYarc,1558
|
6
|
-
mustrd/mustrd.py,sha256=
|
6
|
+
mustrd/mustrd.py,sha256=kAudCpk7NLoS2Y555l5Q2jhKbxR-D_sSPLa0Z3yP42w,34109
|
7
7
|
mustrd/mustrdAnzo.py,sha256=bQ-IHCnsEK7paJ31GgS9IH3hGd4o_5zeNrpn0Sb8WIk,11822
|
8
8
|
mustrd/mustrdGraphDb.py,sha256=KNXXYyZjYm_IZaeuuxlPBP-XyX9hZ5UvrdxshKnZhwo,5599
|
9
9
|
mustrd/mustrdRdfLib.py,sha256=LeS-uArlxQwsM-7lrJyp8O8m-6VgxsR1BlpxsOCNePs,2129
|
10
|
-
mustrd/mustrdTestPlugin.py,sha256=
|
10
|
+
mustrd/mustrdTestPlugin.py,sha256=RZ7Ma6d_DVzU1G4VQm1fuIO1skN7HsuW4rz6GN19FWg,9102
|
11
11
|
mustrd/namespace.py,sha256=pCvLXkD_n_tS23oIizO52ylVwXGC1xFP8cHx4Mml0Ro,3326
|
12
|
-
mustrd/plugin.py,sha256=
|
12
|
+
mustrd/plugin.py,sha256=jVeH-cnB2bZiNGiRXoZMR7fkqMRBEvOdmD1Q4tBkVOE,3785
|
13
13
|
mustrd/README.adoc,sha256=DwXeoMy2yMgAoLvyjZHp3HQW8NBIn8wCSaNo1ixHvFo,11803
|
14
14
|
mustrd/run.py,sha256=Ez00qZrl0Qb7P374miD8hEVucRKt_PYWdr4aorigltg,4366
|
15
15
|
mustrd/spec_component.py,sha256=l2CP8dszFENDkUsMIC065KNMeU8tNPPMMfCyQ4a1gHc,32487
|
@@ -19,8 +19,8 @@ mustrd/templates/md_ResultList_template.jinja,sha256=RrTaPN1obsTEpG5BjQp7BV9iBFz
|
|
19
19
|
mustrd/templates/md_stats_template.jinja,sha256=DlNfH9eoEFVHQmvp6QNbQv36cqRLyBkqG1ITOHb_Yu8,157
|
20
20
|
mustrd/TestResult.py,sha256=q5BnvRxhfCEEY062rHasnA61AeKR4oXXs5z8lASvx1o,4986
|
21
21
|
mustrd/utils.py,sha256=fuvdLE20MdkJtY5atBiU8-u7sVcq1mzIYF0gTcw1UMk,1424
|
22
|
-
mustrd-0.1.
|
23
|
-
mustrd-0.1.
|
24
|
-
mustrd-0.1.
|
25
|
-
mustrd-0.1.
|
26
|
-
mustrd-0.1.
|
22
|
+
mustrd-0.1.6.dist-info/entry_points.txt,sha256=AlSt0VltDOA7QmCskqlKGwtAQl4TKkpwGyaZXx7bWYc,40
|
23
|
+
mustrd-0.1.6.dist-info/LICENSE,sha256=OwjAcbL4HsENdMen1iYR23HH7OEn899oCt100xUo0Zo,1099
|
24
|
+
mustrd-0.1.6.dist-info/METADATA,sha256=ZtSFhvOBuQJMAOnL80bomHDy7cZG54ckHPIBZIMa8so,4130
|
25
|
+
mustrd-0.1.6.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
26
|
+
mustrd-0.1.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|