cognite-neat 0.73.0__py3-none-any.whl → 0.73.2__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 CHANGED
@@ -1 +1 @@
1
- __version__ = "0.73.0"
1
+ __version__ = "0.73.2"
@@ -103,6 +103,10 @@ def _add_node_label(id_: str, nodes: dict, element: Element) -> dict:
103
103
  if grandchildren := get_children(children[0], "Text", 1):
104
104
  if "String" in grandchildren[0].attrib:
105
105
  nodes[id_]["header"]["label"] = grandchildren[0].attrib["String"]
106
+ # extension for schema version 3.3, where text is used to "label" without a <label> parent
107
+ elif children := get_children(element, "Text", 1):
108
+ if "String" in children[0].attrib:
109
+ nodes[id_]["header"]["label"] = children[0].attrib["String"]
106
110
 
107
111
  return nodes
108
112
 
@@ -111,10 +115,14 @@ def _add_node_generic_attributes(id_: str, nodes: dict, element: Element) -> dic
111
115
  if children := get_children(element, "GenericAttributes", 1):
112
116
  if grandchildren := get_children(children[0], "GenericAttribute"):
113
117
  for generic_attribute in grandchildren:
114
- if generic_attribute.attrib["AttributeURI"] not in nodes[id_]:
115
- nodes[id_]["attributes"][generic_attribute.attrib["AttributeURI"]] = [generic_attribute.attrib]
116
- else:
117
- nodes[id_]["attributes"][generic_attribute.attrib["AttributeURI"]].append(generic_attribute.attrib)
118
+ # extension for schema version 3.3, where "AttributeURI" is not included
119
+ if "AttributeURI" in generic_attribute.attrib:
120
+ if generic_attribute.attrib["AttributeURI"] not in nodes[id_]:
121
+ nodes[id_]["attributes"][generic_attribute.attrib["AttributeURI"]] = [generic_attribute.attrib]
122
+ else:
123
+ nodes[id_]["attributes"][generic_attribute.attrib["AttributeURI"]].append(
124
+ generic_attribute.attrib
125
+ )
118
126
 
119
127
  return nodes
120
128
 
cognite/neat/py.typed ADDED
File without changes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cognite-neat
3
- Version: 0.73.0
3
+ Version: 0.73.2
4
4
  Summary: Knowledge graph transformation
5
5
  Home-page: https://cognite-neat.readthedocs-hosted.com/
6
6
  License: Apache-2.0
@@ -39,7 +39,7 @@ Requires-Dist: mkdocstrings[python] ; extra == "docs"
39
39
  Requires-Dist: openpyxl
40
40
  Requires-Dist: oxrdflib[oxigraph] (>=0.3.3,<0.4.0) ; extra == "oxi" or extra == "all"
41
41
  Requires-Dist: pandas
42
- Requires-Dist: prometheus-client (>=0.17.0,<0.18.0)
42
+ Requires-Dist: prometheus-client (>=0.20.0,<0.21.0)
43
43
  Requires-Dist: pydantic (>=2,<3)
44
44
  Requires-Dist: pymdown-extensions ; extra == "docs"
45
45
  Requires-Dist: pyoxigraph (==0.3.19)
@@ -1,5 +1,5 @@
1
1
  cognite/neat/__init__.py,sha256=v-rRiDOgZ3sQSMQKq0vgUQZvpeOkoHFXissAx6Ktg84,61
2
- cognite/neat/_version.py,sha256=TEb-1D6cIr_qgLP1HaUQ8hIQZ7HNg_9m8A0caIDWuDQ,23
2
+ cognite/neat/_version.py,sha256=Ot5vZ-fi5dX17zEcWW6cPwKzAArZaQ0p_Ma4WP4RYOI,23
3
3
  cognite/neat/app/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  cognite/neat/app/api/asgi/metrics.py,sha256=nxFy7L5cChTI0a-zkCiJ59Aq8yLuIJp5c9Dg0wRXtV0,152
5
5
  cognite/neat/app/api/configuration.py,sha256=xnKdBE_dtq1nRvKa79YGA_wimI5UhoSRuBQz4LkLzQw,4606
@@ -49,7 +49,7 @@ cognite/neat/graph/examples/skos-capturing-sheet-wind-topics.xlsx,sha256=CV_yK5Z
49
49
  cognite/neat/graph/exceptions.py,sha256=G899CjKepLB2dxgwH4585cqqtjvbyH6MLTM2aaqZRqg,3402
50
50
  cognite/neat/graph/extractor/__init__.py,sha256=wqCiqz-sXhUpTL5LRcrl_KFTNF0yTBRY4EzXT8pyCvA,258
51
51
  cognite/neat/graph/extractor/_base.py,sha256=TOXDnlqske8DgnJwA0THDVRgmR79Acjm56yF0E-2w7I,356
52
- cognite/neat/graph/extractor/_dexpi.py,sha256=oq7SzCQF4ocMEoPcWV6zDJ7UhtlhNp55rwcGiplFxVY,11232
52
+ cognite/neat/graph/extractor/_dexpi.py,sha256=XW0fVyfVYZl2RAmcqjE19h2GZtNHBZ8A83Eg27CzsSc,11720
53
53
  cognite/neat/graph/extractor/_graph_capturing_sheet.py,sha256=JCxzapFxdp4MF8rLMrDfOvHw7YOigLabCk1nv_Lr8so,17652
54
54
  cognite/neat/graph/extractor/_mock_graph_generator.py,sha256=C-6jP4CBtaTWHhk03mSdFEO0eAPPZ8orL5WSt0w-5FA,14872
55
55
  cognite/neat/graph/extractors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -79,6 +79,7 @@ cognite/neat/graph/transformation/entity_matcher.py,sha256=RdOz6WQ2VApmFpaztTXNl
79
79
  cognite/neat/graph/transformation/query_generator/__init__.py,sha256=9N7RIlM8Pf-mJXzK8ulBe-eAa3yeHYBsBFQF7geTgWE,73
80
80
  cognite/neat/graph/transformation/query_generator/sparql.py,sha256=-611a0KlanTDfUUFlk2un2pRmN1UkBT0gPtBcoO-StA,18659
81
81
  cognite/neat/graph/transformation/transformer.py,sha256=ED_nCTBLh0kx-jbZMYHDsWj3X-RUqxJXbrogWZCMlnM,14673
82
+ cognite/neat/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
82
83
  cognite/neat/rules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
83
84
  cognite/neat/rules/_analysis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
84
85
  cognite/neat/rules/_analysis/_base.py,sha256=xzRf52rKf5P1EajWS2MoBhzO_FZG3qjNRKlIffCFMpU,674
@@ -226,8 +227,8 @@ cognite/neat/workflows/steps_registry.py,sha256=PZVoHX4d6Vmjz6XzUFnFFWMCnrVnqkUC
226
227
  cognite/neat/workflows/tasks.py,sha256=dqlJwKAb0jlkl7abbY8RRz3m7MT4SK8-7cntMWkOYjw,788
227
228
  cognite/neat/workflows/triggers.py,sha256=_BLNplzoz0iic367u1mhHMHiUrCwP-SLK6_CZzfODX0,7071
228
229
  cognite/neat/workflows/utils.py,sha256=gKdy3RLG7ctRhbCRwaDIWpL9Mi98zm56-d4jfHDqP1E,453
229
- cognite_neat-0.73.0.dist-info/LICENSE,sha256=W8VmvFia4WHa3Gqxq1Ygrq85McUNqIGDVgtdvzT-XqA,11351
230
- cognite_neat-0.73.0.dist-info/METADATA,sha256=M-VcOy7BmI2OfbtquJljKUwpda3GrWrV2P_GkyR5MwE,9321
231
- cognite_neat-0.73.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
232
- cognite_neat-0.73.0.dist-info/entry_points.txt,sha256=61FPqiWb25vbqB0KI7znG8nsg_ibLHBvTjYnkPvNFso,50
233
- cognite_neat-0.73.0.dist-info/RECORD,,
230
+ cognite_neat-0.73.2.dist-info/LICENSE,sha256=W8VmvFia4WHa3Gqxq1Ygrq85McUNqIGDVgtdvzT-XqA,11351
231
+ cognite_neat-0.73.2.dist-info/METADATA,sha256=_UpP0M-Pul3JlABGMi5dMV5lWXn8B77Nl5YrnYjFCXs,9321
232
+ cognite_neat-0.73.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
233
+ cognite_neat-0.73.2.dist-info/entry_points.txt,sha256=61FPqiWb25vbqB0KI7znG8nsg_ibLHBvTjYnkPvNFso,50
234
+ cognite_neat-0.73.2.dist-info/RECORD,,