cognite-neat 0.123.10__py3-none-any.whl → 0.123.11__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.
Potentially problematic release.
This version of cognite-neat might be problematic. Click here for more details.
- cognite/neat/_version.py +1 -1
- cognite/neat/core/_data_model/importers/_rdf/_shared.py +10 -0
- {cognite_neat-0.123.10.dist-info → cognite_neat-0.123.11.dist-info}/METADATA +1 -1
- {cognite_neat-0.123.10.dist-info → cognite_neat-0.123.11.dist-info}/RECORD +6 -6
- {cognite_neat-0.123.10.dist-info → cognite_neat-0.123.11.dist-info}/WHEEL +0 -0
- {cognite_neat-0.123.10.dist-info → cognite_neat-0.123.11.dist-info}/licenses/LICENSE +0 -0
cognite/neat/_version.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
__version__ = "0.123.
|
|
1
|
+
__version__ = "0.123.11"
|
|
2
2
|
__engine__ = "^2.0.4"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from typing import cast
|
|
2
|
+
from urllib.parse import quote
|
|
2
3
|
|
|
3
4
|
from rdflib import BNode, Graph
|
|
4
5
|
from rdflib.plugins.sparql import prepareQuery
|
|
@@ -33,6 +34,9 @@ def parse_concepts(graph: Graph, query: str, language: str, issue_list: IssueLis
|
|
|
33
34
|
res: dict = convert_rdflib_content(cast(ResultRow, raw).asdict(), True)
|
|
34
35
|
res = {key: res.get(key, None) for key in expected_keys}
|
|
35
36
|
|
|
37
|
+
# Quote the concept id to ensure it is web-safe
|
|
38
|
+
res["concept"] = quote(res["concept"], safe="")
|
|
39
|
+
|
|
36
40
|
concept_id = res["concept"]
|
|
37
41
|
|
|
38
42
|
# Safeguarding against incomplete semantic definitions
|
|
@@ -91,6 +95,8 @@ def parse_properties(graph: Graph, query: str, language: str, issue_list: IssueL
|
|
|
91
95
|
res: dict = convert_rdflib_content(cast(ResultRow, raw).asdict(), True)
|
|
92
96
|
res = {key: res.get(key, None) for key in expected_keys}
|
|
93
97
|
|
|
98
|
+
# Quote the concept id to ensure it is web-safe
|
|
99
|
+
res["property_"] = quote(res["property_"], safe="")
|
|
94
100
|
property_id = res["property_"]
|
|
95
101
|
|
|
96
102
|
# Safeguarding against incomplete semantic definitions
|
|
@@ -115,6 +121,10 @@ def parse_properties(graph: Graph, query: str, language: str, issue_list: IssueL
|
|
|
115
121
|
)
|
|
116
122
|
continue
|
|
117
123
|
|
|
124
|
+
# Quote the concept and value_type to ensure they are web-safe
|
|
125
|
+
res["concept"] = quote(res["concept"], safe="")
|
|
126
|
+
res["value_type"] = quote(res["value_type"], safe="")
|
|
127
|
+
|
|
118
128
|
id_ = f"{res['concept']}.{res['property_']}"
|
|
119
129
|
|
|
120
130
|
if id_ not in properties:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cognite-neat
|
|
3
|
-
Version: 0.123.
|
|
3
|
+
Version: 0.123.11
|
|
4
4
|
Summary: Knowledge graph transformation
|
|
5
5
|
Project-URL: Documentation, https://cognite-neat.readthedocs-hosted.com/
|
|
6
6
|
Project-URL: Homepage, https://cognite-neat.readthedocs-hosted.com/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
cognite/neat/__init__.py,sha256=12StS1dzH9_MElqxGvLWrNsxCJl9Hv8A2a9D0E5OD_U,193
|
|
2
|
-
cognite/neat/_version.py,sha256=
|
|
2
|
+
cognite/neat/_version.py,sha256=ozgwvgQNREIJNB1572G0X8P8ElNIjgvEBuwPMdpxGsY,47
|
|
3
3
|
cognite/neat/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
cognite/neat/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
cognite/neat/core/_config.py,sha256=WT1BS8uADcFvGoUYOOfwFOVq_VBl472TisdoA3wLick,280
|
|
@@ -44,7 +44,7 @@ cognite/neat/core/_data_model/importers/_rdf/__init__.py,sha256=1yOjV2PKCxwH7uCT
|
|
|
44
44
|
cognite/neat/core/_data_model/importers/_rdf/_base.py,sha256=FKceKumKmhEGpMZvo1BwEewnUvfAsTF3Ax9fo1nxsGE,6020
|
|
45
45
|
cognite/neat/core/_data_model/importers/_rdf/_inference2rdata_model.py,sha256=PCgM9-qGSLlupN7tYCFLHjivgICtMiahNry1ub8JCYk,28934
|
|
46
46
|
cognite/neat/core/_data_model/importers/_rdf/_owl2data_model.py,sha256=WmncZNpELeZnt6mdw6X8yWnr7XsFXZGfoVe5wTd0HH4,3438
|
|
47
|
-
cognite/neat/core/_data_model/importers/_rdf/_shared.py,sha256=
|
|
47
|
+
cognite/neat/core/_data_model/importers/_rdf/_shared.py,sha256=KJz4HirSpWBXsOw8YGBJh-6Yj_pBjrMB9_K8UQ00sQg,6411
|
|
48
48
|
cognite/neat/core/_data_model/models/__init__.py,sha256=hmF7MDR1XmpLxYdMkOEuPuHUqOQKE4AgsuUqdc-ySSQ,1249
|
|
49
49
|
cognite/neat/core/_data_model/models/_base_unverified.py,sha256=1Wfbp-tJaEF6hd1bFdp2FhTgPkInf-1ZokuEoVJRPxQ,6842
|
|
50
50
|
cognite/neat/core/_data_model/models/_base_verified.py,sha256=nzPrlj7ZvYull_Fdh2zeDXz98hux-eQOdTGy9jhUtYA,15127
|
|
@@ -186,7 +186,7 @@ cognite/neat/session/engine/__init__.py,sha256=D3MxUorEs6-NtgoICqtZ8PISQrjrr4dvc
|
|
|
186
186
|
cognite/neat/session/engine/_import.py,sha256=1QxA2_EK613lXYAHKQbZyw2yjo5P9XuiX4Z6_6-WMNQ,169
|
|
187
187
|
cognite/neat/session/engine/_interface.py,sha256=3W-cYr493c_mW3P5O6MKN1xEQg3cA7NHR_ev3zdF9Vk,533
|
|
188
188
|
cognite/neat/session/engine/_load.py,sha256=g52uYakQM03VqHt_RDHtpHso1-mFFifH5M4T2ScuH8A,5198
|
|
189
|
-
cognite_neat-0.123.
|
|
190
|
-
cognite_neat-0.123.
|
|
191
|
-
cognite_neat-0.123.
|
|
192
|
-
cognite_neat-0.123.
|
|
189
|
+
cognite_neat-0.123.11.dist-info/METADATA,sha256=NH4ItRGVPjcqNg9VXVWVnJb_55REoG53v5xz598Giwg,9172
|
|
190
|
+
cognite_neat-0.123.11.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
191
|
+
cognite_neat-0.123.11.dist-info/licenses/LICENSE,sha256=W8VmvFia4WHa3Gqxq1Ygrq85McUNqIGDVgtdvzT-XqA,11351
|
|
192
|
+
cognite_neat-0.123.11.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|