mustrd 0.1.6__py3-none-any.whl → 0.1.8__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/README.adoc +6 -6
- mustrd/model/catalog-v001.xml +5 -0
- mustrd/model/mustrdTestOntology.ttl +51 -0
- mustrd/model/mustrdTestShapes.ttl +24 -0
- mustrd/model/ontology.ttl +2 -1
- mustrd/model/triplestoreOntology.ttl +174 -0
- mustrd/model/triplestoreshapes.ttl +42 -0
- mustrd/mustrd.py +49 -39
- mustrd/mustrdTestPlugin.py +168 -41
- mustrd/namespace.py +36 -29
- mustrd/run.py +2 -2
- mustrd/spec_component.py +11 -11
- mustrd/steprunner.py +15 -15
- mustrd/test/test_mustrd.py +5 -0
- {mustrd-0.1.6.dist-info → mustrd-0.1.8.dist-info}/METADATA +1 -1
- mustrd-0.1.8.dist-info/RECORD +31 -0
- mustrd-0.1.8.dist-info/entry_points.txt +3 -0
- mustrd/plugin.py +0 -87
- mustrd-0.1.6.dist-info/RECORD +0 -26
- mustrd-0.1.6.dist-info/entry_points.txt +0 -3
- {mustrd-0.1.6.dist-info → mustrd-0.1.8.dist-info}/LICENSE +0 -0
- {mustrd-0.1.6.dist-info → mustrd-0.1.8.dist-info}/WHEEL +0 -0
mustrd/plugin.py
DELETED
@@ -1,87 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
MIT License
|
3
|
-
|
4
|
-
Copyright (c) 2023 Semantic Partners Ltd
|
5
|
-
|
6
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
-
of this software and associated documentation files (the "Software"), to deal
|
8
|
-
in the Software without restriction, including without limitation the rights
|
9
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
-
copies of the Software, and to permit persons to whom the Software is
|
11
|
-
furnished to do so, subject to the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be included in all
|
14
|
-
copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
22
|
-
SOFTWARE.
|
23
|
-
"""
|
24
|
-
|
25
|
-
from typing import Dict
|
26
|
-
from .mustrdTestPlugin import MustrdTestPlugin, TestConfig
|
27
|
-
from rdflib import RDF, Graph
|
28
|
-
from .namespace import MUST
|
29
|
-
from collections import defaultdict
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
def pytest_addoption(parser):
|
34
|
-
group = parser.getgroup("md summary")
|
35
|
-
group.addoption(
|
36
|
-
"--md",
|
37
|
-
action="store",
|
38
|
-
dest="mdpath",
|
39
|
-
metavar="pathToMdSummary",
|
40
|
-
default=None,
|
41
|
-
help="create md summary file at that path.",
|
42
|
-
)
|
43
|
-
group.addoption(
|
44
|
-
"--config",
|
45
|
-
action="store",
|
46
|
-
dest="configpath",
|
47
|
-
metavar="pathToTestConfig",
|
48
|
-
default=None,
|
49
|
-
required=True,
|
50
|
-
help="Ttl file containing the list of test to construct.",
|
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
|
-
)
|
61
|
-
return
|
62
|
-
|
63
|
-
|
64
|
-
def pytest_configure(config) -> None:
|
65
|
-
|
66
|
-
# Read configuration file
|
67
|
-
test_configs: Dict[str, TestConfig] = defaultdict(lambda: defaultdict(list))
|
68
|
-
config_graph = Graph().parse(config.getoption("configpath"))
|
69
|
-
for test_config_subject in config_graph.subjects(predicate=RDF.type, object=MUST.TestConfig):
|
70
|
-
test_function = get_config_param(config_graph, test_config_subject, MUST.hasTestFunction, str)
|
71
|
-
spec_path = get_config_param(config_graph, test_config_subject, MUST.hasSpecPath, str)
|
72
|
-
data_path = get_config_param(config_graph, test_config_subject, MUST.hasDataPath, str)
|
73
|
-
triplestore_spec_path = get_config_param(config_graph, test_config_subject, MUST.triplestoreSpecPath, str)
|
74
|
-
filter_on_tripleStore = list(config_graph.objects(subject=test_config_subject,
|
75
|
-
predicate=MUST.filterOnTripleStore))
|
76
|
-
|
77
|
-
test_configs[test_function] = TestConfig(test_function=test_function,
|
78
|
-
spec_path=spec_path, data_path=data_path,
|
79
|
-
triplestore_spec_path=triplestore_spec_path,
|
80
|
-
filter_on_tripleStore=filter_on_tripleStore)
|
81
|
-
|
82
|
-
config.pluginmanager.register(MustrdTestPlugin(config.getoption("mdpath"), test_configs, config.getoption("secrets")))
|
83
|
-
|
84
|
-
|
85
|
-
def get_config_param(config_graph, config_subject, config_param, convert_function):
|
86
|
-
raw_value = config_graph.value(subject=config_subject, predicate=config_param, any=True)
|
87
|
-
return convert_function(raw_value) if raw_value else None
|
mustrd-0.1.6.dist-info/RECORD
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
mustrd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
mustrd/logger_setup.py,sha256=AXTXiiyQ4E_SyqNaKlLsZlkkKr_YJfJZ0N4PEoN7d7E,1630
|
3
|
-
mustrd/model/mustrdShapes.ttl,sha256=BR-9fAwGpQt6glfPpDB0Xx3vFXMt_UTQwi469o6aWUo,9709
|
4
|
-
mustrd/model/ontology.ttl,sha256=6xhmOF02gjP4nlOh6rnF5EWCaxWOdexQFn8YndGebck,17226
|
5
|
-
mustrd/model/test-resources/resources.ttl,sha256=7z1P4qJwuqRdmHzKd_mhnUIs-aQoSQxas7yDCwKYarc,1558
|
6
|
-
mustrd/mustrd.py,sha256=kAudCpk7NLoS2Y555l5Q2jhKbxR-D_sSPLa0Z3yP42w,34109
|
7
|
-
mustrd/mustrdAnzo.py,sha256=bQ-IHCnsEK7paJ31GgS9IH3hGd4o_5zeNrpn0Sb8WIk,11822
|
8
|
-
mustrd/mustrdGraphDb.py,sha256=KNXXYyZjYm_IZaeuuxlPBP-XyX9hZ5UvrdxshKnZhwo,5599
|
9
|
-
mustrd/mustrdRdfLib.py,sha256=LeS-uArlxQwsM-7lrJyp8O8m-6VgxsR1BlpxsOCNePs,2129
|
10
|
-
mustrd/mustrdTestPlugin.py,sha256=RZ7Ma6d_DVzU1G4VQm1fuIO1skN7HsuW4rz6GN19FWg,9102
|
11
|
-
mustrd/namespace.py,sha256=pCvLXkD_n_tS23oIizO52ylVwXGC1xFP8cHx4Mml0Ro,3326
|
12
|
-
mustrd/plugin.py,sha256=jVeH-cnB2bZiNGiRXoZMR7fkqMRBEvOdmD1Q4tBkVOE,3785
|
13
|
-
mustrd/README.adoc,sha256=DwXeoMy2yMgAoLvyjZHp3HQW8NBIn8wCSaNo1ixHvFo,11803
|
14
|
-
mustrd/run.py,sha256=Ez00qZrl0Qb7P374miD8hEVucRKt_PYWdr4aorigltg,4366
|
15
|
-
mustrd/spec_component.py,sha256=l2CP8dszFENDkUsMIC065KNMeU8tNPPMMfCyQ4a1gHc,32487
|
16
|
-
mustrd/steprunner.py,sha256=bpa0K_WCapsH-3tbdzQkCYNQI3NnfTXy71w8Pl0-8aA,7430
|
17
|
-
mustrd/templates/md_ResultList_leaf_template.jinja,sha256=un1XMeNO9xLcry-DmTQ2QoWoTM5Q5CkVUV_LS4O7sHM,526
|
18
|
-
mustrd/templates/md_ResultList_template.jinja,sha256=RrTaPN1obsTEpG5BjQp7BV9iBFzZOXHwslgvyC0hDKY,211
|
19
|
-
mustrd/templates/md_stats_template.jinja,sha256=DlNfH9eoEFVHQmvp6QNbQv36cqRLyBkqG1ITOHb_Yu8,157
|
20
|
-
mustrd/TestResult.py,sha256=q5BnvRxhfCEEY062rHasnA61AeKR4oXXs5z8lASvx1o,4986
|
21
|
-
mustrd/utils.py,sha256=fuvdLE20MdkJtY5atBiU8-u7sVcq1mzIYF0gTcw1UMk,1424
|
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
|