cognite-neat 0.103.0__py3-none-any.whl → 0.104.0__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.

Files changed (64) hide show
  1. cognite/neat/_graph/extractors/_mock_graph_generator.py +1 -1
  2. cognite/neat/_graph/transformers/_base.py +109 -1
  3. cognite/neat/_graph/transformers/_classic_cdf.py +4 -0
  4. cognite/neat/_graph/transformers/_prune_graph.py +103 -47
  5. cognite/neat/_graph/transformers/_rdfpath.py +41 -17
  6. cognite/neat/_graph/transformers/_value_type.py +119 -154
  7. cognite/neat/_issues/_base.py +35 -8
  8. cognite/neat/_issues/warnings/_resources.py +1 -1
  9. cognite/neat/_rules/_shared.py +18 -34
  10. cognite/neat/_rules/exporters/_base.py +28 -2
  11. cognite/neat/_rules/exporters/_rules2dms.py +4 -0
  12. cognite/neat/_rules/exporters/_rules2excel.py +11 -0
  13. cognite/neat/_rules/exporters/_rules2instance_template.py +4 -0
  14. cognite/neat/_rules/exporters/_rules2ontology.py +13 -1
  15. cognite/neat/_rules/exporters/_rules2yaml.py +4 -0
  16. cognite/neat/_rules/importers/_base.py +9 -0
  17. cognite/neat/_rules/importers/_dms2rules.py +17 -5
  18. cognite/neat/_rules/importers/_dtdl2rules/dtdl_importer.py +5 -2
  19. cognite/neat/_rules/importers/_rdf/_base.py +10 -8
  20. cognite/neat/_rules/importers/_rdf/_imf2rules.py +4 -0
  21. cognite/neat/_rules/importers/_rdf/_inference2rules.py +7 -0
  22. cognite/neat/_rules/importers/_rdf/_owl2rules.py +4 -0
  23. cognite/neat/_rules/importers/_spreadsheet2rules.py +17 -8
  24. cognite/neat/_rules/importers/_yaml2rules.py +21 -7
  25. cognite/neat/_rules/models/_base_input.py +1 -1
  26. cognite/neat/_rules/models/_base_rules.py +5 -0
  27. cognite/neat/_rules/models/dms/_rules.py +4 -0
  28. cognite/neat/_rules/models/dms/_rules_input.py +9 -0
  29. cognite/neat/_rules/models/dms/_validation.py +2 -0
  30. cognite/neat/_rules/models/entities/_single_value.py +25 -5
  31. cognite/neat/_rules/models/information/_rules.py +4 -0
  32. cognite/neat/_rules/models/information/_rules_input.py +9 -0
  33. cognite/neat/_rules/models/mapping/_classic2core.py +2 -5
  34. cognite/neat/_rules/transformers/__init__.py +5 -4
  35. cognite/neat/_rules/transformers/_base.py +41 -65
  36. cognite/neat/_rules/transformers/_converters.py +149 -62
  37. cognite/neat/_rules/transformers/_mapping.py +17 -12
  38. cognite/neat/_rules/transformers/_verification.py +50 -37
  39. cognite/neat/_session/_base.py +32 -121
  40. cognite/neat/_session/_inspect.py +3 -3
  41. cognite/neat/_session/_mapping.py +17 -105
  42. cognite/neat/_session/_prepare.py +36 -254
  43. cognite/neat/_session/_read.py +11 -130
  44. cognite/neat/_session/_set.py +6 -30
  45. cognite/neat/_session/_show.py +49 -30
  46. cognite/neat/_session/_state.py +49 -107
  47. cognite/neat/_session/_to.py +42 -31
  48. cognite/neat/_shared.py +23 -2
  49. cognite/neat/_store/_provenance.py +3 -82
  50. cognite/neat/_store/_rules_store.py +372 -10
  51. cognite/neat/_store/exceptions.py +23 -0
  52. cognite/neat/_utils/graph_transformations_report.py +36 -0
  53. cognite/neat/_utils/io_.py +11 -0
  54. cognite/neat/_utils/rdf_.py +8 -0
  55. cognite/neat/_utils/spreadsheet.py +5 -4
  56. cognite/neat/_version.py +1 -1
  57. cognite/neat/_workflows/steps/lib/current/rules_exporter.py +7 -7
  58. cognite/neat/_workflows/steps/lib/current/rules_importer.py +24 -99
  59. {cognite_neat-0.103.0.dist-info → cognite_neat-0.104.0.dist-info}/METADATA +1 -1
  60. {cognite_neat-0.103.0.dist-info → cognite_neat-0.104.0.dist-info}/RECORD +63 -61
  61. cognite/neat/_rules/transformers/_pipelines.py +0 -70
  62. {cognite_neat-0.103.0.dist-info → cognite_neat-0.104.0.dist-info}/LICENSE +0 -0
  63. {cognite_neat-0.103.0.dist-info → cognite_neat-0.104.0.dist-info}/WHEEL +0 -0
  64. {cognite_neat-0.103.0.dist-info → cognite_neat-0.104.0.dist-info}/entry_points.txt +0 -0
@@ -1,6 +1,5 @@
1
- import time
2
1
  from pathlib import Path
3
- from typing import ClassVar
2
+ from typing import Any, ClassVar
4
3
 
5
4
  from cognite.client import CogniteClient
6
5
 
@@ -8,10 +7,9 @@ from cognite.neat._client import NeatClient
8
7
  from cognite.neat._issues.errors import WorkflowStepNotInitializedError
9
8
  from cognite.neat._issues.formatters import FORMATTER_BY_NAME
10
9
  from cognite.neat._rules import importers
11
- from cognite.neat._rules._shared import InputRules
12
- from cognite.neat._rules.models import RoleTypes
10
+ from cognite.neat._rules.models import DMSRules, InformationRules, RoleTypes
13
11
  from cognite.neat._rules.models.entities import DataModelEntity, DMSUnknownEntity
14
- from cognite.neat._rules.transformers import ImporterPipeline
12
+ from cognite.neat._rules.transformers import DMSToInformation, InformationToDMS, VerifyAnyRules
15
13
  from cognite.neat._workflows.model import FlowMessage, StepExecutionStatus
16
14
  from cognite.neat._workflows.steps.data_contracts import MultiRuleData
17
15
  from cognite.neat._workflows.steps.step_model import Configurable, Step
@@ -76,24 +74,24 @@ class ExcelToRules(Step):
76
74
  if role != "infer" and role is not None:
77
75
  role_enum = RoleTypes[role]
78
76
 
79
- excel_importer = importers.ExcelImporter[InputRules](rules_file_path)
80
- result = ImporterPipeline.try_verify(excel_importer, role_enum)
81
-
82
- if result.rules is None:
83
- output_dir = self.config.staging_path
84
- report_writer = FORMATTER_BY_NAME[self.configs["Report formatter"]]()
85
- report_writer.write_to_file(result.issues, file_or_dir_path=output_dir)
86
- report_file = report_writer.default_file_name
87
- error_text = (
88
- "<p></p>"
89
- f'<a href="/data/staging/{report_file}?{time.time()}" '
90
- f'target="_blank">Failed to validate rules, click here for report</a>'
91
- )
92
- return FlowMessage(error_text=error_text, step_execution_status=StepExecutionStatus.ABORT_AND_FAIL)
77
+ excel_importer = importers.ExcelImporter(rules_file_path) # type: ignore[var-annotated]
78
+ read_rules = excel_importer.to_rules()
79
+ rules = VerifyAnyRules[Any]().transform(read_rules)
80
+ result: DMSRules | InformationRules
81
+ if role_enum is RoleTypes.dms and isinstance(rules, InformationRules):
82
+ result = InformationToDMS().transform(rules)
83
+ elif role_enum is RoleTypes.dms and isinstance(rules, DMSRules):
84
+ result = rules
85
+ elif role_enum is RoleTypes.information and isinstance(rules, InformationRules):
86
+ result = rules
87
+ elif role_enum is RoleTypes.information and isinstance(rules, DMSRules):
88
+ result = DMSToInformation().transform(rules)
89
+ else:
90
+ raise ValueError(f"Role {role_enum} is not supported for rules of type {type(rules)}")
93
91
 
94
92
  output_text = "Rules validation passed successfully!"
95
93
 
96
- return FlowMessage(output_text=output_text), MultiRuleData.from_rules(result.rules)
94
+ return FlowMessage(output_text=output_text), MultiRuleData.from_rules(result)
97
95
 
98
96
 
99
97
  class OntologyToRules(Step):
@@ -139,27 +137,8 @@ class OntologyToRules(Step):
139
137
  error_text = "Expected either 'File name' in the step config or 'File uploader' step uploading Excel Rules."
140
138
  return FlowMessage(error_text=error_text, step_execution_status=StepExecutionStatus.ABORT_AND_FAIL)
141
139
 
142
- # if role is None, it will be inferred from the rules file
143
- role = self.configs.get("Role")
144
- role_enum = None
145
- if role != "infer" and role is not None:
146
- role_enum = RoleTypes[role]
147
-
148
140
  ontology_importer = importers.OWLImporter.from_file(filepath=rules_file_path)
149
- result = ImporterPipeline.try_verify(ontology_importer, role_enum)
150
-
151
- if result.rules is None:
152
- output_dir = self.config.staging_path
153
- report_writer = FORMATTER_BY_NAME[self.configs["Report formatter"]]()
154
- report_writer.write_to_file(result.issues, file_or_dir_path=output_dir)
155
- report_file = report_writer.default_file_name
156
- error_text = (
157
- "<p></p>"
158
- f'<a href="/data/staging/{report_file}?{time.time()}" '
159
- f'target="_blank">Failed to validate rules, click here for report</a>'
160
- )
161
- return FlowMessage(error_text=error_text, step_execution_status=StepExecutionStatus.ABORT_AND_FAIL)
162
-
141
+ result = ontology_importer.to_rules().rules.as_verified_rules()
163
142
  output_text = "Rules validation passed successfully!"
164
143
 
165
144
  return FlowMessage(output_text=output_text), MultiRuleData.from_rules(result.rules)
@@ -210,26 +189,8 @@ class IMFToRules(Step):
210
189
  error_text = "Expected either 'File name' in the step config or 'File uploader' step uploading Excel Rules."
211
190
  return FlowMessage(error_text=error_text, step_execution_status=StepExecutionStatus.ABORT_AND_FAIL)
212
191
 
213
- # if role is None, it will be inferred from the rules file
214
- role = self.configs.get("Role")
215
- role_enum = None
216
- if role != "infer" and role is not None:
217
- role_enum = RoleTypes[role]
218
-
219
192
  ontology_importer = importers.IMFImporter.from_file(rules_file_path)
220
- result = ImporterPipeline.try_verify(ontology_importer, role_enum)
221
-
222
- if result.rules is None:
223
- output_dir = self.config.staging_path
224
- report_writer = FORMATTER_BY_NAME[self.configs["Report formatter"]]()
225
- report_writer.write_to_file(result.issues, file_or_dir_path=output_dir)
226
- report_file = report_writer.default_file_name
227
- error_text = (
228
- "<p></p>"
229
- f'<a href="/data/staging/{report_file}?{time.time()}" '
230
- f'target="_blank">Failed to validate rules, click here for report</a>'
231
- )
232
- return FlowMessage(error_text=error_text, step_execution_status=StepExecutionStatus.ABORT_AND_FAIL)
193
+ result = ontology_importer.to_rules().rules.as_verified_rules()
233
194
 
234
195
  output_text = "Rules validation passed successfully!"
235
196
 
@@ -290,29 +251,11 @@ class DMSToRules(Step):
290
251
 
291
252
  dms_importer = importers.DMSImporter.from_data_model_id(NeatClient(cdf_client), datamodel_entity.as_id())
292
253
 
293
- # if role is None, it will be inferred from the rules file
294
- role = self.configs.get("Role")
295
- role_enum = None
296
- if role != "infer" and role is not None:
297
- role_enum = RoleTypes[role]
298
-
299
- result = ImporterPipeline.try_verify(dms_importer, role_enum)
300
-
301
- if result.rules is None:
302
- output_dir = self.config.staging_path
303
- report_writer = FORMATTER_BY_NAME[self.configs["Report formatter"]]()
304
- report_writer.write_to_file(result.issues, file_or_dir_path=output_dir)
305
- report_file = report_writer.default_file_name
306
- error_text = (
307
- "<p></p>"
308
- f'<a href="/data/staging/{report_file}?{time.time()}" '
309
- f'target="_blank">Failed to validate rules, click here for report</a>'
310
- )
311
- return FlowMessage(error_text=error_text, step_execution_status=StepExecutionStatus.ABORT_AND_FAIL)
254
+ result = dms_importer.to_rules().rules.as_verified_rules() # type: ignore[union-attr]
312
255
 
313
256
  output_text = "Rules import and validation passed successfully!"
314
257
 
315
- return FlowMessage(output_text=output_text), MultiRuleData.from_rules(result.rules)
258
+ return FlowMessage(output_text=output_text), MultiRuleData.from_rules(result)
316
259
 
317
260
 
318
261
  class RulesInferenceFromRdfFile(Step):
@@ -370,29 +313,11 @@ class RulesInferenceFromRdfFile(Step):
370
313
  error_text = "Expected either 'File name' in the step config or 'File uploader' step uploading Excel Rules."
371
314
  return FlowMessage(error_text=error_text, step_execution_status=StepExecutionStatus.ABORT_AND_FAIL)
372
315
 
373
- # if role is None, it will be inferred from the rules file
374
- role = self.configs.get("Role")
375
- role_enum = None
376
- if role != "infer" and role is not None:
377
- role_enum = RoleTypes[role]
378
-
379
316
  inference_importer = importers.InferenceImporter.from_file(
380
317
  rdf_file_path, max_number_of_instance=max_number_of_instance
381
318
  )
382
- result = ImporterPipeline.try_verify(inference_importer, role_enum)
383
-
384
- if result.rules is None:
385
- output_dir = self.config.staging_path
386
- report_writer = FORMATTER_BY_NAME[self.configs["Report formatter"]]()
387
- report_writer.write_to_file(result.issues, file_or_dir_path=output_dir)
388
- report_file = report_writer.default_file_name
389
- error_text = (
390
- "<p></p>"
391
- f'<a href="/data/staging/{report_file}?{time.time()}" '
392
- f'target="_blank">Failed to validate rules, click here for report</a>'
393
- )
394
- return FlowMessage(error_text=error_text, step_execution_status=StepExecutionStatus.ABORT_AND_FAIL)
319
+ result = inference_importer.to_rules().rules.as_verified_rules() # type: ignore[union-attr]
395
320
 
396
321
  output_text = "Rules validation passed successfully!"
397
322
 
398
- return FlowMessage(output_text=output_text), MultiRuleData.from_rules(result.rules)
323
+ return FlowMessage(output_text=output_text), MultiRuleData.from_rules(result)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cognite-neat
3
- Version: 0.103.0
3
+ Version: 0.104.0
4
4
  Summary: Knowledge graph transformation
5
5
  Home-page: https://cognite-neat.readthedocs-hosted.com/
6
6
  License: Apache-2.0
@@ -106,7 +106,7 @@ cognite/neat/_graph/extractors/_classic_cdf/_timeseries.py,sha256=6CmmxWWG2IErfN
106
106
  cognite/neat/_graph/extractors/_dexpi.py,sha256=SFWnKXYpQToWag9aoX8fxISNa9b8KlqjZnkwI18BzNY,9431
107
107
  cognite/neat/_graph/extractors/_dms.py,sha256=bK5p4-NdXlnQMGaalr6vgODcIvWu2e4qE6f8nnvdQK0,6685
108
108
  cognite/neat/_graph/extractors/_iodd.py,sha256=nMSLmtgvxLrQJMA5NECF1OCp4Bcv0Vq0WsNv8X9Oj1k,18458
109
- cognite/neat/_graph/extractors/_mock_graph_generator.py,sha256=Zbf2I1I_F_VZDHmK3to1X7KYbc3aW5dCozHQifyshxU,15397
109
+ cognite/neat/_graph/extractors/_mock_graph_generator.py,sha256=PW7sgHXkwJnlipY5TDhEuNh4Z2Tc2QsTu1Q70yiSTD4,15391
110
110
  cognite/neat/_graph/extractors/_rdf_file.py,sha256=YgPZN4Ayk6UlbwFFjdWn4Yo3P74D8KeNUb3slXg6Ox8,1604
111
111
  cognite/neat/_graph/loaders/__init__.py,sha256=1eam_rG1BXTUJ8iDm8_IYZldEe177vn2GmHihDBi8qk,718
112
112
  cognite/neat/_graph/loaders/_base.py,sha256=Fp6uUkNfAM-SVgsLz7tyNJxJ1eeEw3h2d4Q0YyppR-Y,3991
@@ -116,14 +116,14 @@ cognite/neat/_graph/queries/_base.py,sha256=Y3Amuave6xdQsDE5ZXCrYLUgOMIH8BXa4n5P
116
116
  cognite/neat/_graph/queries/_construct.py,sha256=CW8uHtXXACUXDj1AcEjROXtvoiuyx0CTgZ0bURY5Neo,7213
117
117
  cognite/neat/_graph/queries/_shared.py,sha256=uhw-nY4jJvivgtj1msdCRrfTWgauU7ybSHUqqUaFOUU,5390
118
118
  cognite/neat/_graph/transformers/__init__.py,sha256=FFB6TyYFH6dIINNVk-Km7I8ldLD-eaJ1CAa8Gt7kxh0,1546
119
- cognite/neat/_graph/transformers/_base.py,sha256=3AJogynIiuTcXtGj70xU1Iz7l7HO3MJD4dTVvx2zqEk,336
120
- cognite/neat/_graph/transformers/_classic_cdf.py,sha256=8vzvoHH2YJMg2mMTEH_ASGWn1Maars1N1RZ9jWhLTkY,19291
119
+ cognite/neat/_graph/transformers/_base.py,sha256=omFmfRGaudojjq3GlW6b8PA2TNRcN3jXkw6Xvnx5r4M,4345
120
+ cognite/neat/_graph/transformers/_classic_cdf.py,sha256=uldka8Na8mVFxCJNG78pCNgEtQX90E7YjPs3Sj6Mpms,19371
121
121
  cognite/neat/_graph/transformers/_iodd.py,sha256=KNz1fPdKK40UaHgPMECzNZgSeU5PdPRyLdaRYdq1iug,866
122
- cognite/neat/_graph/transformers/_prune_graph.py,sha256=ZW_UHFAPjYiAm_B32utdxR6Dl1aq9C4ODmmmW8WrkUo,10616
123
- cognite/neat/_graph/transformers/_rdfpath.py,sha256=0ZH7d62kfdCyWGrCyY2oJSnGEPsHQd0sMrZAsTibCCI,4155
124
- cognite/neat/_graph/transformers/_value_type.py,sha256=8SSrLBobaeufkOTkCORtUSwefxl_ixoNtxN8wMaWzGk,10532
122
+ cognite/neat/_graph/transformers/_prune_graph.py,sha256=LFiAMYFteND5LGEv9KqYJr5C9-n7S5fR6IrEdtJyRnk,12447
123
+ cognite/neat/_graph/transformers/_rdfpath.py,sha256=jaJwtvfY65X2aRTJ__MSWcv_i_CyvOrlYYLRMCx2Ji4,4993
124
+ cognite/neat/_graph/transformers/_value_type.py,sha256=TQPo5QAvRwLtbX3z4Jd61zOJQ-38SNGNmVrWPqkyFn8,9713
125
125
  cognite/neat/_issues/__init__.py,sha256=vNnZaXX34T1uqw6nakvijoi0lHQSpyQ1QmJIMfHySeI,556
126
- cognite/neat/_issues/_base.py,sha256=Fm2Yr8zLDMkQFGQxVZ1KHLKcbubzGGYjcjfzVp971vw,19689
126
+ cognite/neat/_issues/_base.py,sha256=7AkxI1Hh1D4BUFZ96uGY6eIe0knaAdW_5GfRh-CyqQA,20488
127
127
  cognite/neat/_issues/errors/__init__.py,sha256=cAmB92WnUDicT8adowED0-UbMTuJxdde2TS5G65IW50,2216
128
128
  cognite/neat/_issues/errors/_external.py,sha256=2RUOH4zRLYZQGLNwoTospi8xTW-P7CUZ_hURjRPcSbE,1764
129
129
  cognite/neat/_issues/errors/_general.py,sha256=zwEoaygHA2Nt9vCwiveDuzJsqZYIaX0BoUYkwJkQ4jU,844
@@ -136,11 +136,11 @@ cognite/neat/_issues/warnings/_external.py,sha256=3tE98nLzOx9pb-VMi0MmQskHj-IuEq
136
136
  cognite/neat/_issues/warnings/_general.py,sha256=9ZSNYBwFQ_XEagxYioUijJdCkdmT3VDQTlTO_JINe_E,617
137
137
  cognite/neat/_issues/warnings/_models.py,sha256=i4ZXr1IINKbFiVhUd8-qAt9_cXB8D3W-ng1Ime_lQTA,4376
138
138
  cognite/neat/_issues/warnings/_properties.py,sha256=xo_kaXaMOozmhxBRHhVTPaYobFpHWvfiO9q0UYqnKS8,2678
139
- cognite/neat/_issues/warnings/_resources.py,sha256=ahWKooStew8VE4w9k-n7fSxCQF2Pv8TMb2ScM0NkbZ4,3130
139
+ cognite/neat/_issues/warnings/_resources.py,sha256=KYkN0ZA69qRc6CPePX7S2lKddXkPsWGXqg4b3c8F_f0,3141
140
140
  cognite/neat/_issues/warnings/user_modeling.py,sha256=_cN1wbaQUStZ13aG0VbN5UwKM9YdtyPfuSNJ1AAS6o8,3668
141
141
  cognite/neat/_rules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
142
142
  cognite/neat/_rules/_constants.py,sha256=lOyf7nybSYOuAE_wKmTMncHYz0Io0_J_YVnYBzjrvZA,5637
143
- cognite/neat/_rules/_shared.py,sha256=b7mO8mXY4w84XmcY_ArQa4LqnS2A0emS12tbPb4sG7A,1562
143
+ cognite/neat/_rules/_shared.py,sha256=2WrvsSKP4XQisDXUVu5z4GOfjQMIQZwed_UNfb4NCoY,1282
144
144
  cognite/neat/_rules/analysis/__init__.py,sha256=sTW-gDkHn2VPAHnuOBYJF40Ap3AfxvhLkDGoIRKyOJE,126
145
145
  cognite/neat/_rules/analysis/_base.py,sha256=RXPxgcjhA8xZMZ30TZAYw9vXxd6p2Bn6nWekLEExY_Q,16744
146
146
  cognite/neat/_rules/analysis/_dms.py,sha256=k9OrN6kRCcdPr8GCJDRXyF0nNXmBYJQDtoGqw7R87po,2204
@@ -149,96 +149,98 @@ cognite/neat/_rules/catalog/__init__.py,sha256=38VJJmLBBn-GxM6r9OpEjWq4Xn9df988y
149
149
  cognite/neat/_rules/catalog/hello_world_pump.xlsx,sha256=4Fv9qyv7ARHBXSIh-PiOUHcYrtgznKyR2PZCdEBlA0o,17071
150
150
  cognite/neat/_rules/catalog/info-rules-imf.xlsx,sha256=7odm5CoAU72-VTZk_z1u7GbycIb-X-8Yy3mtBGLjhE4,55511
151
151
  cognite/neat/_rules/exporters/__init__.py,sha256=IYBa0DIYlx8cFItgYRw9W4FY_LmVEjuaqMz3JORZZX0,1204
152
- cognite/neat/_rules/exporters/_base.py,sha256=vadYWb5hVbjiPIhVIzlY6ARisoqhtJa6Ce0ysNHPXQc,1328
153
- cognite/neat/_rules/exporters/_rules2dms.py,sha256=pwqy0wzLpSh-BNukLOOB12gTVNeCHEPefX5idtTp2sI,17198
154
- cognite/neat/_rules/exporters/_rules2excel.py,sha256=aSMckwJWl9UXhXhMQOPH_DwairSU9EjiI26QHOJQu-Q,11779
155
- cognite/neat/_rules/exporters/_rules2instance_template.py,sha256=8HM1SkzcucaEYpQi96ncMnL8STArX9Oe09JBhJJAN4I,5810
156
- cognite/neat/_rules/exporters/_rules2ontology.py,sha256=ioMi1GUhnbvcfVOPb3Z0a24mIEe74AfxySETWMDS9Lc,21776
157
- cognite/neat/_rules/exporters/_rules2yaml.py,sha256=O9vnzDHf1ep1Qu0po0GVjgu945HNx3-zRmhxv65sv6I,3052
152
+ cognite/neat/_rules/exporters/_base.py,sha256=VkNMy8wsH-x4tAjS44cXgzzNH0CM2k_4RhkMwK50J7g,2284
153
+ cognite/neat/_rules/exporters/_rules2dms.py,sha256=IYjJptcZBdM9mbTE8kmKvCpLAcLbi4n3y4tey78J0lk,17298
154
+ cognite/neat/_rules/exporters/_rules2excel.py,sha256=CSZKs1tDXGG8jAXRxw6TQgSQ6iSuBAaffrVDZQKjW8g,12457
155
+ cognite/neat/_rules/exporters/_rules2instance_template.py,sha256=cgO8omyV5Jr0mPGI_W_9ipiE3W1xKxlMLW9ySOLJLZw,5932
156
+ cognite/neat/_rules/exporters/_rules2ontology.py,sha256=l0QJKh0qJ5CDtReWDeQ2jt7wa__v0FEgVMX9jCKHT2U,22120
157
+ cognite/neat/_rules/exporters/_rules2yaml.py,sha256=-TtE7-SvfJr0-ndNy26nrHXtxAq6hNyZQbh5jwGao4o,3149
158
158
  cognite/neat/_rules/exporters/_validation.py,sha256=DVJGdNNU2WtAFgUg0h4SWVhveRErEPOcYdT65y5toV0,682
159
159
  cognite/neat/_rules/importers/__init__.py,sha256=d5k8vNgf1rjECl6pubozVQV1Bdpz62GI59GYC-cJMrY,1316
160
- cognite/neat/_rules/importers/_base.py,sha256=RhL2lx3MkIdVVqJ5oyJD6Vali6rIngHrLlDTQwWAEN4,3382
161
- cognite/neat/_rules/importers/_dms2rules.py,sha256=u-zWfunrEXJEstgVfh3PVd33eJLz_s4hvFu2ayGmCME,21802
160
+ cognite/neat/_rules/importers/_base.py,sha256=HOmfESfF9KLGWGa5AmhPGc-AimwKHgoShbxPz90h2JE,3589
161
+ cognite/neat/_rules/importers/_dms2rules.py,sha256=ZZVIBFtALcg-r90ZO6x5hN1lJhiuN1WBz9tOa7wW2fo,22344
162
162
  cognite/neat/_rules/importers/_dtdl2rules/__init__.py,sha256=CNR-sUihs2mnR1bPMKs3j3L4ds3vFTsrl6YycExZTfU,68
163
163
  cognite/neat/_rules/importers/_dtdl2rules/_unit_lookup.py,sha256=wW4saKva61Q_i17guY0dc4OseJDQfqHy_QZBtm0OD6g,12134
164
164
  cognite/neat/_rules/importers/_dtdl2rules/dtdl_converter.py,sha256=j38U0um1ZWI-yRvEUR3z33vOvMCYXJxSO9L_B7m9xDE,11707
165
- cognite/neat/_rules/importers/_dtdl2rules/dtdl_importer.py,sha256=y3UMwrBysT3pl_wXJj-qKYKYbJDKa424AAfn6e8489k,5955
165
+ cognite/neat/_rules/importers/_dtdl2rules/dtdl_importer.py,sha256=amK-Q1n4Zl_LdZko23ZW6cJD7G6U3vm8EIDr3qiRo64,6097
166
166
  cognite/neat/_rules/importers/_dtdl2rules/spec.py,sha256=u__f08rAiYG0FIRiWoecBN83bVN3GEy--Lvm7463Q68,12166
167
167
  cognite/neat/_rules/importers/_rdf/__init__.py,sha256=x06gjJ3dXlhJRRgyXZ-HoF4vFnbPmzI2ni6wyzwtfPU,183
168
- cognite/neat/_rules/importers/_rdf/_base.py,sha256=03YUWpcxjTrmYoVmZYxQKlMo4v54VJFfe_qx0fc8AGA,5449
169
- cognite/neat/_rules/importers/_rdf/_imf2rules.py,sha256=xemIv5G6JXJJ6Jn_1P5UldwEDNsgMIGiDF28DnOTtjU,3597
170
- cognite/neat/_rules/importers/_rdf/_inference2rules.py,sha256=Zu6GTsG8A48PQs8F7H8iskTj9zu2R-l4NlWejCwSwqo,12518
171
- cognite/neat/_rules/importers/_rdf/_owl2rules.py,sha256=KhQAM9ai2ckhpB7ohfRi0n8ztRwbPADfNMFed8f-5V8,3267
168
+ cognite/neat/_rules/importers/_rdf/_base.py,sha256=b7MM4PV4d0irLbU8nKws4ynhiIuzmvvZeeQycHVKMpQ,5682
169
+ cognite/neat/_rules/importers/_rdf/_imf2rules.py,sha256=M5hfWZUhoCgXFlr8QNfogNCI2pxzqqAvTJII4yA8xJw,3723
170
+ cognite/neat/_rules/importers/_rdf/_inference2rules.py,sha256=Kp0ShcswOP0HKL2RtTwnN5Q2mxpI1lXzqzgNF2npfHM,12741
171
+ cognite/neat/_rules/importers/_rdf/_owl2rules.py,sha256=gTMe94DC9xe8NR9KNVHTMTshg_NzVuN1v8Lz95BUshI,3392
172
172
  cognite/neat/_rules/importers/_rdf/_shared.py,sha256=mxBoqFQfvHeLa4kbDYAd7FEcHe1fv97tcqHd9gmFeKk,5867
173
- cognite/neat/_rules/importers/_spreadsheet2rules.py,sha256=TI92l_qddRW2JWk3JbmsvKkDYgXU-e_avw4y7epD_rs,10732
174
- cognite/neat/_rules/importers/_yaml2rules.py,sha256=5DsEMYo6JVHC_mBOaaR3J6on1rXSpk82plCsrOq5_l8,3144
173
+ cognite/neat/_rules/importers/_spreadsheet2rules.py,sha256=2KhOSzNPmQgBb64L3aIARwmqY944LNP_9QciMnn7ecY,10911
174
+ cognite/neat/_rules/importers/_yaml2rules.py,sha256=k2oDgz--mxFVeyqQG3uvyYcb0BkFHwKHdBYHVaxtAEc,3721
175
175
  cognite/neat/_rules/models/__init__.py,sha256=tf6tyWiYO0eC2PHCcpy208dwOHjEi9hg0sEaQLcB3uA,1024
176
- cognite/neat/_rules/models/_base_input.py,sha256=qJrxobZLqpc28adEUJTKdJ8hDUZ67SVDFkUJnGjcPOc,6647
177
- cognite/neat/_rules/models/_base_rules.py,sha256=3DayGFiCZftZJA2xq8Q9Gct6nIbW4tq8_pfx7vt6aTU,14804
176
+ cognite/neat/_rules/models/_base_input.py,sha256=kAVI6QYAzsgQ79eLPc_hANJjl-o1e9IKeD7lF61ru9Y,6656
177
+ cognite/neat/_rules/models/_base_rules.py,sha256=DOcdfYxop9ENswgIoiwHV1Dl5wJ3nq2cf9PgQkDGSiw,14959
178
178
  cognite/neat/_rules/models/_rdfpath.py,sha256=hqUMZCMeI8ESdJltu7FifuUhna5JNN_Heup2aYkV56Y,11882
179
179
  cognite/neat/_rules/models/_types.py,sha256=7rh4PVaqI58OTXtoIgZKitmwa5hZlVtk8uX4czlSGFY,5261
180
180
  cognite/neat/_rules/models/data_types.py,sha256=LJuWUbStlZM4hUJGExOJIJXmAA4uiA0tvO9zKqLUrQg,9805
181
181
  cognite/neat/_rules/models/dms/__init__.py,sha256=fRaUH0IwG0YwWd_DNKM6j-jHHFyiIVz4_8DPiS1KR0Y,695
182
182
  cognite/neat/_rules/models/dms/_exporter.py,sha256=eB5uDX06XYkQkON96eykSk7ZCegb9a5dCxTmTIr252c,28020
183
- cognite/neat/_rules/models/dms/_rules.py,sha256=xQ8NoSE9D4tMjcEwKn4z7HdF9l_3OR-1xRlH3uamQPM,20186
184
- cognite/neat/_rules/models/dms/_rules_input.py,sha256=mVW-gHrjjlqFuq82qTkxIaMZ7OlzQFxjopxdlwQergY,12949
185
- cognite/neat/_rules/models/dms/_validation.py,sha256=c3egIGDlsQTETReX57JkolBidn7H3zNV6Y-dUGY8Cl8,27652
183
+ cognite/neat/_rules/models/dms/_rules.py,sha256=G0bJOm0tVOWMBZ9629gtK0M6ukZqKSBaqE2jG_wiHgE,20277
184
+ cognite/neat/_rules/models/dms/_rules_input.py,sha256=mDLojcIZyu-EIR0qLDCYIUqcgWDKdC7dEF5qffVvLfs,13197
185
+ cognite/neat/_rules/models/dms/_validation.py,sha256=PNFHsDNHJZfbHY1qt6D4t3eFOGjqe6Koa702Gzcz0I8,27734
186
186
  cognite/neat/_rules/models/entities/__init__.py,sha256=Hlucp3LyV6ncLl79aqRTbSy2qgiGzoyN8x54D_zaJCY,1469
187
187
  cognite/neat/_rules/models/entities/_constants.py,sha256=ToiLaaF-hGLPfn3AsKIIrfB4ZdTk4cY1RjM9gA1Qjkg,288
188
188
  cognite/neat/_rules/models/entities/_loaders.py,sha256=jFllRty5XpS6uLklr9wJkx7Bzm-qwg65um6hnVistvw,2728
189
189
  cognite/neat/_rules/models/entities/_multi_value.py,sha256=6j-nlUA392yQP_uB_CFB6_qFReNhi54ZlbFTcOKpbKY,2755
190
- cognite/neat/_rules/models/entities/_single_value.py,sha256=dVfqIx3_Agi_LddhsqPOyWcAt0s06PNpRxrW-7n-z0Y,18513
190
+ cognite/neat/_rules/models/entities/_single_value.py,sha256=GW1R8ko1vwjGhAs2Fl5BGgpz3qtiYnYoahT4hBgJdkA,19441
191
191
  cognite/neat/_rules/models/entities/_types.py,sha256=df9rnXJJKciv2Bp-Ve2q4xdEJt6WWniq12Z0hW2d6sk,1917
192
192
  cognite/neat/_rules/models/entities/_wrapped.py,sha256=FxC8HztW_tUUtuArAOwxyFfkdJnSEB4bgZoNmmmfiPk,7137
193
193
  cognite/neat/_rules/models/information/__init__.py,sha256=lV7l8RTfWBvN_DFkzea8OzADjq0rZGgWe_0Fiwtfje0,556
194
- cognite/neat/_rules/models/information/_rules.py,sha256=c_vS0GM9hv2ESanuso5H5x5vR1aBVtG5rwzjQhHij_k,11798
195
- cognite/neat/_rules/models/information/_rules_input.py,sha256=PdXTPN0QfO4vxN5M4xzaaDwHEQo53RbY_jIr5TfBszY,5443
194
+ cognite/neat/_rules/models/information/_rules.py,sha256=juiqvFkSmpO9Z2EKOR1GH9eSapnWWm34BJJtdCg_iso,11897
195
+ cognite/neat/_rules/models/information/_rules_input.py,sha256=_e4ocafo4RYg0b67y2UgWIdPylrh8FkrimttAgIEqIs,5699
196
196
  cognite/neat/_rules/models/information/_validation.py,sha256=HbaLShj6uumu-t9I3FUI_iKQfUDiwEkuFENHgWIPfrk,10202
197
197
  cognite/neat/_rules/models/mapping/__init__.py,sha256=T68Hf7rhiXa7b03h4RMwarAmkGnB-Bbhc1H07b2PyC4,100
198
- cognite/neat/_rules/models/mapping/_classic2core.py,sha256=oIU8jKixts-GIO64ArT8VCK_hK-t2zW34gadlvzDwy4,1353
198
+ cognite/neat/_rules/models/mapping/_classic2core.py,sha256=2IEIWTF7siB7nHTKuafG_KJbt4h1CPMdG3yDsw3Sky8,1239
199
199
  cognite/neat/_rules/models/mapping/_classic2core.yaml,sha256=AMCbYxXNb5ecz0debtJYPp4bVTg6EdKcUJbYENTywqI,12938
200
- cognite/neat/_rules/transformers/__init__.py,sha256=L2NdJjRkmb7nRq-FiJAKb_Kjd6bdMxir8r0ldUxb_3I,844
201
- cognite/neat/_rules/transformers/_base.py,sha256=jmgcSFWOPvrbfme0kUwXi1_3Bvxwif1T1Pin2jqhzlU,3585
202
- cognite/neat/_rules/transformers/_converters.py,sha256=1czcTr0cNLyqOuPb7coq2QSZuO0T3Cg1xOr3zZQ1_9Q,44856
203
- cognite/neat/_rules/transformers/_mapping.py,sha256=gMkLHeMWTvQJZV-YLMQm0pirnd2amVnRq48_WKMcxQo,16579
204
- cognite/neat/_rules/transformers/_pipelines.py,sha256=uCjiwKUg51k0nNJQQDScaSCm6dwxJuQvqM8dgzgMYnM,2696
205
- cognite/neat/_rules/transformers/_verification.py,sha256=M4-Cr3vTm3PZyHSjW-odbOqbY5g0hiRjERDjvLgYbxU,3907
200
+ cognite/neat/_rules/transformers/__init__.py,sha256=vBBGNbKxmZ9jMdmmgL2My9JT7PZUJe4OTFFLeMBuY7Q,841
201
+ cognite/neat/_rules/transformers/_base.py,sha256=sflEUKfNgCE3NNErzBMJ88VJEYB12pU1H3da40B52Yg,2556
202
+ cognite/neat/_rules/transformers/_converters.py,sha256=K7usG4fbLtdVc0eP-0cpoyERR6D55rmMm2XM5P6SlZY,48540
203
+ cognite/neat/_rules/transformers/_mapping.py,sha256=NNPtff-Gl-FtZ_i_OQfgvYiK3DfQ5HBWSmVBd5uY6VM,16467
204
+ cognite/neat/_rules/transformers/_verification.py,sha256=3Yeyc-KnG9Qt6o7MkX4SF3Y9rmwLzfDzVC1525EodjM,4673
206
205
  cognite/neat/_session/__init__.py,sha256=fxQ5URVlUnmEGYyB8Baw7IDq-uYacqkigbc4b-Pr9Fw,58
207
- cognite/neat/_session/_base.py,sha256=yOrG3nOTcZkgmDst5f46iUEnXJPELu-Gms7Kae_g7LY,13906
206
+ cognite/neat/_session/_base.py,sha256=qkZh5FFFydD3m4YOyAXEss429eCcb9nJyjCFszWWYqc,10067
208
207
  cognite/neat/_session/_collector.py,sha256=SPCb1fEuOVIMHMQsVUNS7nkUUPhtUuNatnWPAIfQMcE,4093
209
208
  cognite/neat/_session/_drop.py,sha256=kfXSgsq3xaLOAxtfjPkix9C18xulJv4Cfu4gj86nBSY,1392
210
- cognite/neat/_session/_inspect.py,sha256=XYZi3zmSke-SzT9oEYksoPuBJbQKr7DnfAgb9EncNms,8087
211
- cognite/neat/_session/_mapping.py,sha256=brXv1C7426OwknAulYzv55xKVBtCdeAqwPZ1MoeLqKw,6265
212
- cognite/neat/_session/_prepare.py,sha256=uJemU23b-mR-fsgkvlYIQe_qrEC2ZicuNO8GATLWHWE,29588
213
- cognite/neat/_session/_read.py,sha256=3HbzXbfXmIv6D5f47OgzF1Lgs8gvyH_pyWHfBvlEQH4,20459
214
- cognite/neat/_session/_set.py,sha256=DflpDN4gc9Iu7RfuitId-1IJZDBIW8pn4wBOLYJs71s,2353
215
- cognite/neat/_session/_show.py,sha256=imSp95XTAOXJf9l-Vxxtmhen4n7i8D2h8QTlDeYlZt4,15500
216
- cognite/neat/_session/_state.py,sha256=rqKHkikagO1pf_fKpY-LZI1X5R_v6AyYpV72_3eSduM,5783
217
- cognite/neat/_session/_to.py,sha256=7SBZ-wXkmJE9f1UgMdqlaQ31yU4l_E81I3ftLXWzi1w,9316
209
+ cognite/neat/_session/_inspect.py,sha256=uBaPtrq1jI5EqFyvrFmHAJqpuJ7iCDThbau9qzWblXc,8084
210
+ cognite/neat/_session/_mapping.py,sha256=WbFFho2Lr3PNL4WkfHw5K3ca9d8DiAcWRYkFkMURsds,2451
211
+ cognite/neat/_session/_prepare.py,sha256=KFS7V70m52TcEwvbyLL8iCtTN2JtcNHU5xaFZyR9dqk,20072
212
+ cognite/neat/_session/_read.py,sha256=-VF8gUuUy7k1DpdjbLV5Q9hIG1MDWnXjxerTkAUUQfg,16323
213
+ cognite/neat/_session/_set.py,sha256=5glxDLjgJaEmX-KbWTWsJOfYaDSZ-j-kxvZfnoHmV1k,1622
214
+ cognite/neat/_session/_show.py,sha256=bp1IddBd0vBxlWcewxL3U3zv-GsE8l7lxIE7muCvyXk,16305
215
+ cognite/neat/_session/_state.py,sha256=ZkFEhU0lxRx3cUt8ex652mPRZcrBprEOBDs2dzlTd6k,4031
216
+ cognite/neat/_session/_to.py,sha256=d9WJjzU59rEyug6b07hks6cPdvvArWk7-4wToiGHVOw,9729
218
217
  cognite/neat/_session/_wizard.py,sha256=O8d0FA87RIoiTOD2KLyTVsxwA2-ewAG2By4JfxXSL84,1474
219
218
  cognite/neat/_session/engine/__init__.py,sha256=D3MxUorEs6-NtgoICqtZ8PISQrjrr4dvca6n48bu_bI,120
220
219
  cognite/neat/_session/engine/_import.py,sha256=1QxA2_EK613lXYAHKQbZyw2yjo5P9XuiX4Z6_6-WMNQ,169
221
220
  cognite/neat/_session/engine/_interface.py,sha256=ItJ1VMrPt-pKKvpSpglD9n9yFC6ehF9xV2DUVCyfQB0,533
222
221
  cognite/neat/_session/engine/_load.py,sha256=LcoYVthQyCzLWKzRE_75_nElS-n_eMWSPAgNJBnh5dA,5193
223
222
  cognite/neat/_session/exceptions.py,sha256=dvhwF7d8AADxqEI13nZreLCPBPN_7A3KiAqlWjkpuqc,2303
224
- cognite/neat/_shared.py,sha256=JXebp3LREqBq9TPNXb7QCHwF7_nbWo622WAzllxSaaU,1671
223
+ cognite/neat/_shared.py,sha256=Ov59SWYboRRsncB_5V1ZC_BAoACfNLjo80vqE5Ru6wo,2325
225
224
  cognite/neat/_store/__init__.py,sha256=RrvuZrMdezqun5dOrwHWSk26kampZcvqiHBqSFumkEE,130
226
225
  cognite/neat/_store/_graph_store.py,sha256=36wShJzRTJUBg-rSZJwvD4c3RsdvxCL1ORQopeuCSuU,18384
227
- cognite/neat/_store/_provenance.py,sha256=MS5FEdUl4KUYOo6r7oCZ6z9N6mODfJlqm9uVHbblq2k,8971
228
- cognite/neat/_store/_rules_store.py,sha256=Z7nG20-LYngZbxQa3saWpSGv4gWY53jM3OWkV3XfXNY,635
226
+ cognite/neat/_store/_provenance.py,sha256=g_u6O7jo3ZekQVtc-FfJR1fTGqD9L3ipwfSEjdHB1xM,6610
227
+ cognite/neat/_store/_rules_store.py,sha256=QMQsjMXZ2ZnknrpCjra1c6VGmCyAJ4ELb9VRClUdr6U,15471
228
+ cognite/neat/_store/exceptions.py,sha256=1xLtWqX-TiGcXdgayBgeNx1cipoXkye7LmTMFdpMg1s,506
229
229
  cognite/neat/_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
230
230
  cognite/neat/_utils/auth.py,sha256=Y35foeQHHbnAWhfDtgNqXGOoPqBk5gtrfhPWgoSa5XQ,13444
231
231
  cognite/neat/_utils/auxiliary.py,sha256=WFOycFgoYipvDmtGvn6ZNH3H8iNZmHamrfe2kXRb8lM,6667
232
232
  cognite/neat/_utils/collection_.py,sha256=Q_LN1qypr0SeAV3dAR5KLD1szHNohSdYxyA8hr3n4T8,1433
233
- cognite/neat/_utils/rdf_.py,sha256=_nmZqo6_Ef7Aep0kXR_uoiRxGQR2u5lMK4g5mxWneeY,8586
233
+ cognite/neat/_utils/graph_transformations_report.py,sha256=rjEy4XMvOygFL4UgnYOmFW6AHxaU9IXep-dmYc5654c,1230
234
+ cognite/neat/_utils/io_.py,sha256=D2Mg8sOxfBoDg3fC0jBzaxO3vkXmr0QvZSgYIv6xRkM,386
235
+ cognite/neat/_utils/rdf_.py,sha256=b3sE3aTW9lu4gJWQJEaq_NCLbI54cc1o12utz-xbLh8,9023
234
236
  cognite/neat/_utils/reader/__init__.py,sha256=fPkrNB_9hLB7CyHTCFV_xEbIfOMqUQzNly5JN33-QfM,146
235
237
  cognite/neat/_utils/reader/_base.py,sha256=mk_kZDnfg5LcvYJr5IiBosYwbF82mLWo1p1Wq3K2p_Y,4681
236
- cognite/neat/_utils/spreadsheet.py,sha256=LI0c7dlW0zXHkHw0NvB-gg6Df6cDcE3FbiaHBYLXdzQ,2714
238
+ cognite/neat/_utils/spreadsheet.py,sha256=ssNWat42srjbQfzzApaGiNanyEy-oFlAQ6qQXCZOhoE,2777
237
239
  cognite/neat/_utils/text.py,sha256=0IffvBIAmeGh92F4T6xiEdd-vv3B7FOGEMbfuTktO5Y,4017
238
240
  cognite/neat/_utils/time_.py,sha256=O30LUiDH9TdOYz8_a9pFqTtJdg8vEjC3qHCk8xZblG8,345
239
241
  cognite/neat/_utils/upload.py,sha256=iWKmsQgw4EHLv-11NjYu7zAj5LtqTAfNa87a1kWeuaU,5727
240
242
  cognite/neat/_utils/xml_.py,sha256=FQkq84u35MUsnKcL6nTMJ9ajtG9D5i1u4VBnhGqP2DQ,1710
241
- cognite/neat/_version.py,sha256=XasIHNUoR5yEKcSpbN-2IEcv1b20UHkxPc8KrEJo6II,46
243
+ cognite/neat/_version.py,sha256=bA82iWPXSxZkO2aVWnj25V2NORWQYPYnVHlrdDLbA2k,46
242
244
  cognite/neat/_workflows/__init__.py,sha256=CbnZi0l84-ixeQQCnhE6ldpemzCf-mZtf5UpxW_sS8U,420
243
245
  cognite/neat/_workflows/base.py,sha256=O1pcmfbme2gIVF2eOGrKZSUDmhZc8L9rI8UfvLN2YAM,26839
244
246
  cognite/neat/_workflows/cdf_store.py,sha256=3pebnATPo6In4-1srpa3wzstynTOi3T6hwFX5uaie4c,18050
@@ -256,8 +258,8 @@ cognite/neat/_workflows/steps/lib/current/__init__.py,sha256=c22IznGdCSNCpXCi_yo
256
258
  cognite/neat/_workflows/steps/lib/current/graph_extractor.py,sha256=7S8iBvOwmeHolpsI7dl1v3Md5G5gv5IO1GEDSpCNBpA,3711
257
259
  cognite/neat/_workflows/steps/lib/current/graph_loader.py,sha256=EItu0wh-b-AFyn7iRhdThLjJ2NvHYBv3hY3x2w5sCqg,1693
258
260
  cognite/neat/_workflows/steps/lib/current/graph_store.py,sha256=Fbd3Fb4K2QML_if46SLldikvBJUPJ2VUAG2Bzqcq-Qc,1586
259
- cognite/neat/_workflows/steps/lib/current/rules_exporter.py,sha256=7sNmNoFTq6sGfhFhsO47v0fqAjReH3MvTV9rhtli_7A,21934
260
- cognite/neat/_workflows/steps/lib/current/rules_importer.py,sha256=5brvhpVUAhiz-a8CUVO1xruFtO2v1xUYPC1jdEMir-g,17280
261
+ cognite/neat/_workflows/steps/lib/current/rules_exporter.py,sha256=h_zZ_-a6tAE4NAHhaBerJWwSKUejs-182n6hLefWzko,21892
262
+ cognite/neat/_workflows/steps/lib/current/rules_importer.py,sha256=Gq8W4HnDmu2_C7AFWoQS7s1Grz9qyQ4e50MPCAU8MOQ,13892
261
263
  cognite/neat/_workflows/steps/lib/current/rules_validator.py,sha256=yTQnjWuDQpL8TjhqBnHVkqS7TduZ5vVfzmzHiXy9gPA,4665
262
264
  cognite/neat/_workflows/steps/lib/io/__init__.py,sha256=k7IPbIq3ey19oRc5sA_15F99-O6dxzqbm1LihGRRo5A,32
263
265
  cognite/neat/_workflows/steps/lib/io/io_steps.py,sha256=P0KNYPCzkYtCJqrqPn7KVKsih_K10M0x5e1bU5DeqHY,16934
@@ -267,8 +269,8 @@ cognite/neat/_workflows/tasks.py,sha256=dr2xuIb8P5e5e9p_fjzRlvDbKsre2xGYrkc3wnRx
267
269
  cognite/neat/_workflows/triggers.py,sha256=u69xOsaTtM8_WD6ZeIIBB-XKwvlZmPHAsZQh_TnyHcM,7073
268
270
  cognite/neat/_workflows/utils.py,sha256=gKdy3RLG7ctRhbCRwaDIWpL9Mi98zm56-d4jfHDqP1E,453
269
271
  cognite/neat/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
270
- cognite_neat-0.103.0.dist-info/LICENSE,sha256=W8VmvFia4WHa3Gqxq1Ygrq85McUNqIGDVgtdvzT-XqA,11351
271
- cognite_neat-0.103.0.dist-info/METADATA,sha256=2369m9OcvLldJSc94bGxCbHHlPAr3ERzHPk2dy1Ruv4,5708
272
- cognite_neat-0.103.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
273
- cognite_neat-0.103.0.dist-info/entry_points.txt,sha256=SsQlnl8SNMSSjE3acBI835JYFtsIinLSbVmHmMEXv6E,51
274
- cognite_neat-0.103.0.dist-info/RECORD,,
272
+ cognite_neat-0.104.0.dist-info/LICENSE,sha256=W8VmvFia4WHa3Gqxq1Ygrq85McUNqIGDVgtdvzT-XqA,11351
273
+ cognite_neat-0.104.0.dist-info/METADATA,sha256=rhswfmlw2tv_wvrlDwBRKkaEb-CPgGvQ5Y-2ja8piQ4,5708
274
+ cognite_neat-0.104.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
275
+ cognite_neat-0.104.0.dist-info/entry_points.txt,sha256=SsQlnl8SNMSSjE3acBI835JYFtsIinLSbVmHmMEXv6E,51
276
+ cognite_neat-0.104.0.dist-info/RECORD,,
@@ -1,70 +0,0 @@
1
- from collections.abc import Iterable
2
- from typing import TYPE_CHECKING
3
-
4
- from cognite.neat._issues.errors import NeatValueError
5
- from cognite.neat._rules._shared import InputRules, MaybeRules, VerifiedRules
6
- from cognite.neat._rules.models import VERIFIED_RULES_BY_ROLE, RoleTypes
7
-
8
- from ._base import RulesPipeline, RulesTransformer
9
- from ._converters import ConvertToRules
10
- from ._verification import VerifyAnyRules
11
-
12
- if TYPE_CHECKING:
13
- from cognite.neat._rules.importers import BaseImporter
14
-
15
-
16
- class ImporterPipeline(RulesPipeline[InputRules, VerifiedRules]):
17
- """This is a standard pipeline that verifies, convert and return the rules from the importer."""
18
-
19
- def __init__(
20
- self,
21
- importer: "BaseImporter[InputRules]",
22
- items: Iterable[RulesTransformer[InputRules, VerifiedRules]] | None = None,
23
- ) -> None:
24
- super().__init__(items or [])
25
- self._importer = importer
26
-
27
- @classmethod
28
- def _create_pipeline(
29
- cls, importer: "BaseImporter[InputRules]", role: RoleTypes | None = None
30
- ) -> "ImporterPipeline":
31
- items: list[RulesTransformer] = [VerifyAnyRules(errors="continue", validate=True)]
32
- if role is not None:
33
- out_cls = VERIFIED_RULES_BY_ROLE[role]
34
- items.append(ConvertToRules(out_cls))
35
- return cls(importer, items)
36
-
37
- @classmethod
38
- def try_verify(cls, importer: "BaseImporter", role: RoleTypes | None = None) -> MaybeRules[VerifiedRules]:
39
- """This is a standard pipeline that verifies, convert and return the rules from the importer.
40
-
41
- Args:
42
- importer: The importer to use.
43
- role: The type of rules to convert to. If None, the rules will not be converted.
44
-
45
- Returns:
46
- The verified rules.
47
- """
48
- return cls._create_pipeline(importer, role).try_execute()
49
-
50
- @classmethod
51
- def verify(cls, importer: "BaseImporter", role: RoleTypes | None = None) -> VerifiedRules:
52
- """Verify the rules."""
53
- return cls._create_pipeline(importer, role).execute()
54
-
55
- def try_execute(self) -> MaybeRules[VerifiedRules]:
56
- """Try to execute the pipeline from importer to rules."""
57
- rules = self._importer.to_rules()
58
- return self.try_transform(rules)
59
-
60
- def execute(self) -> VerifiedRules:
61
- """Execute the pipeline from importer to rules."""
62
- rules = self._importer.to_rules()
63
- out = self.transform(rules)
64
- if isinstance(out, MaybeRules) and out.rules is None:
65
- raise out.issues.as_errors("Failed to convert rules")
66
-
67
- rules = out.get_rules()
68
- if rules is None:
69
- raise NeatValueError("Rules is missing cannot convert")
70
- return rules