cognite-neat 0.90.0__py3-none-any.whl → 0.90.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.90.0"
1
+ __version__ = "0.90.2"
@@ -1,7 +1,7 @@
1
1
  configs: []
2
2
  description: null
3
3
  implementation_module: null
4
- name: Visualize Semantic Data Model
4
+ name: Export Semantic Data Model
5
5
  steps:
6
6
  - complex_configs: {}
7
7
  configs: {}
@@ -63,49 +63,4 @@ steps:
63
63
  ui_config:
64
64
  pos_x: 497
65
65
  pos_y: 323
66
- - complex_configs: {}
67
- configs:
68
- Disk storage directory: semantic-data-model
69
- Graph: source
70
- Graph store type: oxigraph
71
- GraphDB API root URL: ''
72
- Init procedure: reset
73
- Query URL: ''
74
- Update URL: ''
75
- description: null
76
- enabled: true
77
- id: step_configure_graph_store
78
- label: Configure Graph Store
79
- max_retries: 0
80
- method: GraphStoreConfiguration
81
- params: {}
82
- retry_delay: 3
83
- stype: stdstep
84
- system_component_id: null
85
- transition_to:
86
- - step_load_semantic_data_model
87
- trigger: false
88
- ui_config:
89
- pos_x: 495
90
- pos_y: 399
91
- - complex_configs: {}
92
- configs:
93
- Add base URI: 'False'
94
- File path: staging/semantic-data-model.ttl
95
- MIME type: text/turtle
96
- description: null
97
- enabled: true
98
- id: step_load_semantic_data_model
99
- label: Load Semantic Data Model
100
- max_retries: 0
101
- method: GraphFromRdfFile
102
- params: {}
103
- retry_delay: 3
104
- stype: stdstep
105
- system_component_id: null
106
- transition_to: []
107
- trigger: false
108
- ui_config:
109
- pos_x: 495
110
- pos_y: 476
111
66
  system_components: []
@@ -1,5 +1,4 @@
1
1
  import json
2
- import logging
3
2
  from pathlib import Path
4
3
  from typing import ClassVar, cast
5
4
 
@@ -42,7 +41,7 @@ class GraphFromMockData(Step):
42
41
  ]
43
42
 
44
43
  def run( # type: ignore[override, syntax]
45
- self, rules: MultiRuleData, graph_store: NeatGraph
44
+ self, rules: MultiRuleData, store: NeatGraph
46
45
  ) -> FlowMessage:
47
46
  if self.configs is None:
48
47
  raise WorkflowStepNotInitializedError(type(self).__name__)
@@ -53,9 +52,6 @@ class GraphFromMockData(Step):
53
52
  step_execution_status=StepExecutionStatus.ABORT_AND_FAIL,
54
53
  )
55
54
 
56
- logging.info(50 * "#")
57
- logging.info(50 * "#")
58
- logging.info(self.configs["Class count"])
59
55
  try:
60
56
  class_count = json.loads(self.configs["Class count"]) if self.configs["Class count"] else {}
61
57
  except Exception:
@@ -69,9 +65,9 @@ class GraphFromMockData(Step):
69
65
  class_count,
70
66
  )
71
67
 
72
- NeatGraph.graph.write(extractor)
68
+ store.graph.write(extractor)
73
69
 
74
- return FlowMessage(output_text=f"Instances loaded to the {graph_store.__class__.__name__}")
70
+ return FlowMessage(output_text=f"Instances loaded to the {store.__class__.__name__}")
75
71
 
76
72
 
77
73
  class GraphFromRdfFile(Step):
@@ -108,12 +104,12 @@ class GraphFromRdfFile(Step):
108
104
  ),
109
105
  ]
110
106
 
111
- def run(self, graph_store: NeatGraph) -> FlowMessage: # type: ignore[override, syntax]
107
+ def run(self, store: NeatGraph) -> FlowMessage: # type: ignore[override, syntax]
112
108
  if self.configs is None or self.data_store_path is None:
113
109
  raise WorkflowStepNotInitializedError(type(self).__name__)
114
110
 
115
111
  if source_file := self.configs["File path"]:
116
- NeatGraph.graph.write(
112
+ store.graph.write(
117
113
  RdfFileExtractor( # type: ignore[abstract]
118
114
  filepath=self.data_store_path / Path(source_file),
119
115
  mime_type=self.configs["MIME type"], # type: ignore[arg-type]
@@ -31,7 +31,7 @@ class GraphToRdfFile(Step):
31
31
  ]
32
32
 
33
33
  def run( # type: ignore[override, syntax]
34
- self, graph: NeatGraph
34
+ self, store: NeatGraph
35
35
  ) -> FlowMessage: # type: ignore[syntax]
36
36
  if self.configs is None or self.data_store_path is None:
37
37
  raise WorkflowStepNotInitializedError(type(self).__name__)
@@ -39,7 +39,7 @@ class GraphToRdfFile(Step):
39
39
  storage_path = self.data_store_path / Path(self.configs["File path"])
40
40
  relative_graph_file_path = str(storage_path).split("/data/")[1]
41
41
 
42
- graph.graph.graph.serialize(str(storage_path), format="turtle")
42
+ store.graph.graph.serialize(str(storage_path), format="turtle")
43
43
 
44
44
  output_text = (
45
45
  "<p></p>"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cognite-neat
3
- Version: 0.90.0
3
+ Version: 0.90.2
4
4
  Summary: Knowledge graph transformation
5
5
  Home-page: https://cognite-neat.readthedocs-hosted.com/
6
6
  License: Apache-2.0
@@ -1,6 +1,6 @@
1
1
  cognite/neat/__init__.py,sha256=AiexNcHdAHFbrrbo9c65gtil1dqx_SGraDH1PSsXjKE,126
2
2
  cognite/neat/_shared.py,sha256=RSaHm2eJceTlvb-hMMe4nHgoHdPYDfN3XcxDXo24k3A,1530
3
- cognite/neat/_version.py,sha256=FvxNqJMDVJIASnIcUVgFB9VPINXWP_qWXCWjSsjUHO8,23
3
+ cognite/neat/_version.py,sha256=fcsBhBSYOqMMAcHXZq1b0z3azsr6o60zMlxH4H6fDbY,23
4
4
  cognite/neat/app/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  cognite/neat/app/api/asgi/metrics.py,sha256=nxFy7L5cChTI0a-zkCiJ59Aq8yLuIJp5c9Dg0wRXtV0,152
6
6
  cognite/neat/app/api/configuration.py,sha256=L1DCtLZ1HZku8I2z-JWd5RDsXhIsboFsKwAMhkrm-bY,3600
@@ -193,19 +193,18 @@ cognite/neat/workflows/__init__.py,sha256=oiKub_U9f5cA0I1nKl5dFkR4BD8_6Be9eMzQ_5
193
193
  cognite/neat/workflows/base.py,sha256=pWsUCtHVjdDe_N_pbQpmYLji-iN2U-H1G13aJbAXy7M,26829
194
194
  cognite/neat/workflows/cdf_store.py,sha256=Ao6YnZ5wnZtP1wdnDQM7Hj2G7NqtLzBOKn4LJQS-8AU,18047
195
195
  cognite/neat/workflows/examples/Export_DMS/workflow.yaml,sha256=XmyaUAsZrN-GnoBejg9eXHQBm1U1Z-NhdKc11Wm1ieM,1987
196
+ cognite/neat/workflows/examples/Export_Semantic_Data_Model/workflow.yaml,sha256=67glGNis215kQbxX-e4g5QO_6of0-Vaq4J9k81YUWCk,1461
196
197
  cognite/neat/workflows/examples/Import_DMS/workflow.yaml,sha256=i7FeD0dzUBhzorjMgo7v1mjShhgsEpobbxIAL-czt34,1364
197
198
  cognite/neat/workflows/examples/Validate_Rules/workflow.yaml,sha256=lmuC-zttewtZl5EjnUv8RuM9t2dC-F053duNQHKoPGg,1395
198
199
  cognite/neat/workflows/examples/Validate_Solution_Model/workflow.yaml,sha256=Oy3u9QJ7QZoKZqmY0mRMWtnJZd9agmbRZCrbvf32xis,1326
199
- cognite/neat/workflows/examples/Visualize_Data_Model_Using_Mock_Graph/workflow.yaml,sha256=wVWxEGy_L_tTHKr-XxHyoykkya0DnFi99Y1erA96Oxs,2296
200
- cognite/neat/workflows/examples/Visualize_Semantic_Data_Model/workflow.yaml,sha256=yWVL-NHghKtiNV2kpEX674MJwWqhOUn3j2ZOJiJbprE,2579
201
200
  cognite/neat/workflows/manager.py,sha256=CtxnabAmZq4APd5XA6FTBlytP3WmlbKNGjNoR04uAQ4,14102
202
201
  cognite/neat/workflows/model.py,sha256=LQY7abYnz3CUEIlIEqoj0Eo6Q8yQukTQ0S_sPststCA,6570
203
202
  cognite/neat/workflows/steps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
204
203
  cognite/neat/workflows/steps/data_contracts.py,sha256=RobxctwAOxdOYdPf6jEkMj9KSTJjj4Cf__oOr5Ge2rs,2467
205
204
  cognite/neat/workflows/steps/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
206
205
  cognite/neat/workflows/steps/lib/current/__init__.py,sha256=c22IznGdCSNCpXCi_yonlbbywJE1uj6bfVCv0X2LYeE,225
207
- cognite/neat/workflows/steps/lib/current/graph_extractor.py,sha256=VHZpeo-QB_qSJu2QuU9uISFgw8LgQGeMVvSc1KORw3c,4738
208
- cognite/neat/workflows/steps/lib/current/graph_loader.py,sha256=4FxE7A0ZCSwGmVP-dcWISwupBQo6TZzUr_1GMQ0klIM,1689
206
+ cognite/neat/workflows/steps/lib/current/graph_extractor.py,sha256=3nP-BoXbDA8oobVak7KLvMg8-0-5sQrXrPQNIXNGI1U,4585
207
+ cognite/neat/workflows/steps/lib/current/graph_loader.py,sha256=TUgLPExa9OuaDboGFBTRReigkhwFturMoJTMwkDT4s4,1689
209
208
  cognite/neat/workflows/steps/lib/current/graph_store.py,sha256=UydcYMoF2d2m8gOKAtlul8yCfKS3jFJJCTF2psM2flg,1582
210
209
  cognite/neat/workflows/steps/lib/current/rules_exporter.py,sha256=qLMlB3MqTZhD5q9A8YypksUQ7kOhwi6qGnNXdky_G9w,27752
211
210
  cognite/neat/workflows/steps/lib/current/rules_importer.py,sha256=ytyIDg9_2AZWxMvH1rE044QI8jab5kdHNR-FKyKBaXE,17978
@@ -217,8 +216,8 @@ cognite/neat/workflows/steps_registry.py,sha256=FjMsFBlFFy82ABUzDnWoFidYODV3pp3c
217
216
  cognite/neat/workflows/tasks.py,sha256=dqlJwKAb0jlkl7abbY8RRz3m7MT4SK8-7cntMWkOYjw,788
218
217
  cognite/neat/workflows/triggers.py,sha256=_BLNplzoz0iic367u1mhHMHiUrCwP-SLK6_CZzfODX0,7071
219
218
  cognite/neat/workflows/utils.py,sha256=gKdy3RLG7ctRhbCRwaDIWpL9Mi98zm56-d4jfHDqP1E,453
220
- cognite_neat-0.90.0.dist-info/LICENSE,sha256=W8VmvFia4WHa3Gqxq1Ygrq85McUNqIGDVgtdvzT-XqA,11351
221
- cognite_neat-0.90.0.dist-info/METADATA,sha256=a6RmI8e8zGcHtk6RhHErdW-QGwuzSD3T6du_pzBBQhM,9441
222
- cognite_neat-0.90.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
223
- cognite_neat-0.90.0.dist-info/entry_points.txt,sha256=61FPqiWb25vbqB0KI7znG8nsg_ibLHBvTjYnkPvNFso,50
224
- cognite_neat-0.90.0.dist-info/RECORD,,
219
+ cognite_neat-0.90.2.dist-info/LICENSE,sha256=W8VmvFia4WHa3Gqxq1Ygrq85McUNqIGDVgtdvzT-XqA,11351
220
+ cognite_neat-0.90.2.dist-info/METADATA,sha256=90SwbMpyJcPoeU0D-q2bUyNa3Mz0w-v4gte0-kmZ8Jw,9441
221
+ cognite_neat-0.90.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
222
+ cognite_neat-0.90.2.dist-info/entry_points.txt,sha256=61FPqiWb25vbqB0KI7znG8nsg_ibLHBvTjYnkPvNFso,50
223
+ cognite_neat-0.90.2.dist-info/RECORD,,
@@ -1,95 +0,0 @@
1
- configs: []
2
- description: null
3
- implementation_module: null
4
- name: Visualize Data Model Using Mock Graph
5
- steps:
6
- - complex_configs: {}
7
- configs:
8
- File name: information-architect-david.xlsx
9
- Report formatter: BasicHTML
10
- Role: infer
11
- description: null
12
- enabled: true
13
- id: step_verify_rules
14
- label: Verify Rules
15
- max_retries: 0
16
- method: ExcelToRules
17
- params: {}
18
- retry_delay: 3
19
- stype: stdstep
20
- system_component_id: null
21
- transition_to:
22
- - step_configure_graph_store
23
- trigger: false
24
- ui_config:
25
- pos_x: 507
26
- pos_y: 250
27
- - complex_configs: {}
28
- configs:
29
- Disk storage directory: mock-graph-store
30
- Graph: source
31
- Graph store type: oxigraph
32
- GraphDB API root URL: ""
33
- Init procedure: reset
34
- Query URL: ""
35
- Update URL: ""
36
- description: null
37
- enabled: true
38
- id: step_configure_graph_store
39
- label: Configure Graph Store
40
- max_retries: 0
41
- method: GraphStoreConfiguration
42
- params: {}
43
- retry_delay: 3
44
- stype: stdstep
45
- system_component_id: null
46
- transition_to:
47
- - step_166101
48
- - step_mock_graph_generation
49
- trigger: false
50
- ui_config:
51
- pos_x: 506
52
- pos_y: 314
53
- - complex_configs: {}
54
- configs:
55
- Class count:
56
- '{"WindTurbine" : 1, "WindFarm" : 1, "OffshoreSubstation" : 1,
57
- "DistributionSubstation" : 1, "OnshoreSubstation" : 1, "ArrayCable" :
58
- 1, "ExportCable" : 1, "Transmission" : 1, "DistributionLine" : 1, "Meter"
59
- : 1, "ElectricCarCharger" : 1}'
60
- Graph: source
61
- description: null
62
- enabled: true
63
- id: step_mock_graph_generation
64
- label: Generate Mock Graph
65
- max_retries: 0
66
- method: GraphFromMockData
67
- params: {}
68
- retry_delay: 3
69
- stype: stdstep
70
- system_component_id: null
71
- transition_to: []
72
- trigger: false
73
- ui_config:
74
- pos_x: 506
75
- pos_y: 390
76
- - complex_configs: {}
77
- configs: {}
78
- description: null
79
- enabled: true
80
- id: step_upload_rules
81
- label: Upload Rules
82
- max_retries: 0
83
- method: null
84
- params:
85
- file_type: rules
86
- retry_delay: 3
87
- stype: file_uploader
88
- system_component_id: null
89
- transition_to:
90
- - step_verify_rules
91
- trigger: true
92
- ui_config:
93
- pos_x: 507
94
- pos_y: 177
95
- system_components: []