cognite-neat 0.76.1__py3-none-any.whl → 0.76.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.
Files changed (52) hide show
  1. cognite/neat/_version.py +1 -1
  2. cognite/neat/app/api/routers/core.py +1 -1
  3. cognite/neat/app/api/routers/rules.py +1 -1
  4. cognite/neat/graph/extractors/_mock_graph_generator.py +2 -2
  5. cognite/neat/rules/_shared.py +1 -1
  6. cognite/neat/rules/analysis/_information_rules.py +3 -3
  7. cognite/neat/rules/exporters/_base.py +1 -1
  8. cognite/neat/rules/exporters/_rules2dms.py +8 -49
  9. cognite/neat/rules/exporters/_rules2excel.py +9 -3
  10. cognite/neat/rules/exporters/_rules2ontology.py +2 -2
  11. cognite/neat/rules/exporters/_rules2yaml.py +1 -1
  12. cognite/neat/rules/exporters/_validation.py +2 -2
  13. cognite/neat/rules/importers/_base.py +1 -1
  14. cognite/neat/rules/importers/_dms2rules.py +93 -108
  15. cognite/neat/rules/importers/_dtdl2rules/dtdl_converter.py +1 -1
  16. cognite/neat/rules/importers/_dtdl2rules/dtdl_importer.py +2 -3
  17. cognite/neat/rules/importers/_owl2rules/_owl2classes.py +1 -1
  18. cognite/neat/rules/importers/_owl2rules/_owl2metadata.py +2 -2
  19. cognite/neat/rules/importers/_owl2rules/_owl2properties.py +1 -1
  20. cognite/neat/rules/importers/_owl2rules/_owl2rules.py +1 -1
  21. cognite/neat/rules/importers/_spreadsheet2rules.py +10 -4
  22. cognite/neat/rules/importers/_yaml2rules.py +3 -3
  23. cognite/neat/rules/issues/base.py +5 -0
  24. cognite/neat/rules/models/__init__.py +27 -0
  25. cognite/neat/rules/models/dms/__init__.py +18 -0
  26. cognite/neat/rules/models/dms/_converter.py +140 -0
  27. cognite/neat/rules/models/dms/_exporter.py +405 -0
  28. cognite/neat/rules/models/dms/_rules.py +379 -0
  29. cognite/neat/rules/models/{rules/_dms_rules_write.py → dms/_rules_input.py} +33 -33
  30. cognite/neat/rules/models/{rules/_dms_schema.py → dms/_schema.py} +10 -4
  31. cognite/neat/rules/models/dms/_serializer.py +126 -0
  32. cognite/neat/rules/models/dms/_validation.py +255 -0
  33. cognite/neat/rules/models/information/__init__.py +3 -0
  34. cognite/neat/rules/models/information/_converter.py +193 -0
  35. cognite/neat/rules/models/{rules/_information_rules.py → information/_rules.py} +35 -202
  36. cognite/neat/workflows/steps/data_contracts.py +1 -1
  37. cognite/neat/workflows/steps/lib/current/rules_exporter.py +9 -3
  38. cognite/neat/workflows/steps/lib/current/rules_importer.py +1 -1
  39. cognite/neat/workflows/steps/lib/current/rules_validator.py +1 -2
  40. {cognite_neat-0.76.1.dist-info → cognite_neat-0.76.2.dist-info}/METADATA +1 -1
  41. {cognite_neat-0.76.1.dist-info → cognite_neat-0.76.2.dist-info}/RECORD +50 -43
  42. cognite/neat/rules/models/rules/__init__.py +0 -14
  43. cognite/neat/rules/models/rules/_dms_architect_rules.py +0 -1255
  44. /cognite/neat/rules/models/{rules/_base.py → _base.py} +0 -0
  45. /cognite/neat/rules/models/{rdfpath.py → _rdfpath.py} +0 -0
  46. /cognite/neat/rules/models/{rules/_types → _types}/__init__.py +0 -0
  47. /cognite/neat/rules/models/{rules/_types → _types}/_base.py +0 -0
  48. /cognite/neat/rules/models/{rules/_types → _types}/_field.py +0 -0
  49. /cognite/neat/rules/models/{rules/_domain_rules.py → domain.py} +0 -0
  50. {cognite_neat-0.76.1.dist-info → cognite_neat-0.76.2.dist-info}/LICENSE +0 -0
  51. {cognite_neat-0.76.1.dist-info → cognite_neat-0.76.2.dist-info}/WHEEL +0 -0
  52. {cognite_neat-0.76.1.dist-info → cognite_neat-0.76.2.dist-info}/entry_points.txt +0 -0
@@ -1,10 +1,8 @@
1
1
  import math
2
- import re
3
2
  import sys
4
3
  import warnings
5
- from collections import defaultdict
6
4
  from datetime import datetime
7
- from typing import TYPE_CHECKING, Any, ClassVar, Literal, cast
5
+ from typing import TYPE_CHECKING, Any, ClassVar, cast
8
6
 
9
7
  from pydantic import Field, field_serializer, field_validator, model_serializer, model_validator
10
8
  from pydantic_core.core_schema import SerializationInfo
@@ -13,37 +11,7 @@ from rdflib import Namespace
13
11
  import cognite.neat.rules.issues.spreadsheet
14
12
  from cognite.neat.constants import PREFIXES
15
13
  from cognite.neat.rules import exceptions
16
- from cognite.neat.rules.models.data_types import DataType
17
- from cognite.neat.rules.models.entities import (
18
- ClassEntity,
19
- ContainerEntity,
20
- DMSUnknownEntity,
21
- Entity,
22
- EntityTypes,
23
- ParentClassEntity,
24
- ParentEntityList,
25
- ReferenceEntity,
26
- Undefined,
27
- Unknown,
28
- UnknownEntity,
29
- URLEntity,
30
- ViewEntity,
31
- ViewPropertyEntity,
32
- _UndefinedType,
33
- _UnknownType,
34
- )
35
- from cognite.neat.rules.models.rdfpath import (
36
- AllReferences,
37
- Hop,
38
- RawLookup,
39
- SingleProperty,
40
- SPARQLQuery,
41
- TransformationRuleType,
42
- Traversal,
43
- parse_rule,
44
- )
45
-
46
- from ._base import (
14
+ from cognite.neat.rules.models._base import (
47
15
  BaseMetadata,
48
16
  DataModelType,
49
17
  ExtensionCategory,
@@ -55,17 +23,42 @@ from ._base import (
55
23
  SheetEntity,
56
24
  SheetList,
57
25
  )
58
- from ._domain_rules import DomainRules
59
- from ._types import (
26
+ from cognite.neat.rules.models._rdfpath import (
27
+ AllReferences,
28
+ Hop,
29
+ RawLookup,
30
+ SingleProperty,
31
+ SPARQLQuery,
32
+ TransformationRuleType,
33
+ Traversal,
34
+ parse_rule,
35
+ )
36
+ from cognite.neat.rules.models._types import (
60
37
  NamespaceType,
61
38
  PrefixType,
62
39
  PropertyType,
63
40
  StrListType,
64
41
  VersionType,
65
42
  )
43
+ from cognite.neat.rules.models.data_types import DataType
44
+ from cognite.neat.rules.models.domain import DomainRules
45
+ from cognite.neat.rules.models.entities import (
46
+ ClassEntity,
47
+ Entity,
48
+ EntityTypes,
49
+ ParentClassEntity,
50
+ ParentEntityList,
51
+ ReferenceEntity,
52
+ Undefined,
53
+ Unknown,
54
+ UnknownEntity,
55
+ URLEntity,
56
+ _UndefinedType,
57
+ _UnknownType,
58
+ )
66
59
 
67
60
  if TYPE_CHECKING:
68
- from ._dms_architect_rules import DMSProperty, DMSRules
61
+ from cognite.neat.rules.models.dms._rules import DMSRules
69
62
 
70
63
 
71
64
  if sys.version_info >= (3, 11):
@@ -259,6 +252,7 @@ class InformationRules(RuleModel):
259
252
  properties: SheetList[InformationProperty] = Field(alias="Properties")
260
253
  classes: SheetList[InformationClass] = Field(alias="Classes")
261
254
  prefixes: dict[str, Namespace] = Field(default_factory=lambda: PREFIXES.copy())
255
+ last: "InformationRules | None" = Field(None, alias="Last")
262
256
  reference: "InformationRules | None" = Field(None, alias="Reference")
263
257
 
264
258
  @field_validator("prefixes", mode="before")
@@ -361,9 +355,13 @@ class InformationRules(RuleModel):
361
355
  }
362
356
 
363
357
  def as_domain_rules(self) -> DomainRules:
358
+ from ._converter import _InformationRulesConverter
359
+
364
360
  return _InformationRulesConverter(self).as_domain_rules()
365
361
 
366
362
  def as_dms_architect_rules(self) -> "DMSRules":
363
+ from ._converter import _InformationRulesConverter
364
+
367
365
  return _InformationRulesConverter(self).as_dms_architect_rules()
368
366
 
369
367
  def reference_self(self) -> "InformationRules":
@@ -388,168 +386,3 @@ class InformationRules(RuleModel):
388
386
  )
389
387
 
390
388
  return new_self
391
-
392
-
393
- class _InformationRulesConverter:
394
- def __init__(self, information: InformationRules):
395
- self.information = information
396
-
397
- def as_domain_rules(self) -> DomainRules:
398
- raise NotImplementedError("DomainRules not implemented yet")
399
-
400
- def as_dms_architect_rules(self, created: datetime | None = None, updated: datetime | None = None) -> "DMSRules":
401
- from ._dms_architect_rules import DMSContainer, DMSMetadata, DMSProperty, DMSRules, DMSView
402
-
403
- info_metadata = self.information.metadata
404
- default_version = info_metadata.version
405
- default_space = self._to_space(info_metadata.prefix)
406
- space = self._to_space(info_metadata.prefix)
407
-
408
- metadata = DMSMetadata(
409
- schema_=info_metadata.schema_,
410
- space=space,
411
- version=info_metadata.version,
412
- external_id=info_metadata.name.replace(" ", "_").lower(),
413
- creator=info_metadata.creator,
414
- name=info_metadata.name,
415
- created=created or datetime.now(),
416
- updated=updated or datetime.now(),
417
- )
418
-
419
- properties_by_class: dict[str, list[DMSProperty]] = defaultdict(list)
420
- for prop in self.information.properties:
421
- properties_by_class[prop.class_.versioned_id].append(
422
- self._as_dms_property(prop, default_space, default_version)
423
- )
424
-
425
- views: list[DMSView] = [
426
- DMSView(
427
- class_=cls_.class_,
428
- name=cls_.name,
429
- view=cls_.class_.as_view_entity(default_space, default_version),
430
- description=cls_.description,
431
- reference=cls_.reference,
432
- implements=self._get_view_implements(cls_, info_metadata),
433
- )
434
- for cls_ in self.information.classes
435
- ]
436
-
437
- classes_without_properties: set[str] = set()
438
- for class_ in self.information.classes:
439
- properties: list[DMSProperty] = properties_by_class.get(class_.class_.versioned_id, [])
440
- if not properties or all(
441
- isinstance(prop.value_type, ViewPropertyEntity) and prop.connection != "direct" for prop in properties
442
- ):
443
- classes_without_properties.add(class_.class_.versioned_id)
444
-
445
- containers: list[DMSContainer] = []
446
- for class_ in self.information.classes:
447
- if class_.class_.versioned_id in classes_without_properties:
448
- continue
449
- containers.append(
450
- DMSContainer(
451
- class_=class_.class_,
452
- name=class_.name,
453
- container=class_.class_.as_container_entity(default_space),
454
- description=class_.description,
455
- constraint=[
456
- parent.as_container_entity(default_space)
457
- for parent in class_.parent or []
458
- if parent.versioned_id not in classes_without_properties
459
- ]
460
- or None,
461
- )
462
- )
463
-
464
- return DMSRules(
465
- metadata=metadata,
466
- properties=SheetList[DMSProperty](
467
- data=[prop for prop_set in properties_by_class.values() for prop in prop_set]
468
- ),
469
- views=SheetList[DMSView](data=views),
470
- containers=SheetList[DMSContainer](data=containers),
471
- reference=self.information.reference and self.information.reference.as_dms_architect_rules(), # type: ignore[arg-type]
472
- )
473
-
474
- @classmethod
475
- def _as_dms_property(cls, prop: InformationProperty, default_space: str, default_version: str) -> "DMSProperty":
476
- """This creates the first"""
477
-
478
- from ._dms_architect_rules import DMSProperty
479
-
480
- # returns property type, which can be ObjectProperty or DatatypeProperty
481
- value_type: DataType | ViewEntity | ViewPropertyEntity | DMSUnknownEntity
482
- if isinstance(prop.value_type, DataType):
483
- value_type = prop.value_type
484
- elif isinstance(prop.value_type, UnknownEntity):
485
- value_type = DMSUnknownEntity()
486
- elif isinstance(prop.value_type, ClassEntity):
487
- value_type = prop.value_type.as_view_entity(default_space, default_version)
488
- else:
489
- raise ValueError(f"Unsupported value type: {prop.value_type.type_}")
490
-
491
- relation: Literal["direct", "edge", "reverse"] | None = None
492
- if isinstance(value_type, ViewEntity | ViewPropertyEntity):
493
- relation = "edge" if prop.is_list else "direct"
494
-
495
- container: ContainerEntity | None = None
496
- container_property: str | None = None
497
- is_list: bool | None = prop.is_list
498
- nullable: bool | None = not prop.is_mandatory
499
- if relation == "edge":
500
- nullable = None
501
- elif relation == "direct":
502
- nullable = True
503
- container, container_property = cls._get_container(prop, default_space)
504
- else:
505
- container, container_property = cls._get_container(prop, default_space)
506
-
507
- return DMSProperty(
508
- class_=prop.class_,
509
- name=prop.name,
510
- property_=prop.property_,
511
- value_type=value_type,
512
- nullable=nullable,
513
- is_list=is_list,
514
- connection=relation,
515
- default=prop.default,
516
- reference=prop.reference,
517
- container=container,
518
- container_property=container_property,
519
- view=prop.class_.as_view_entity(default_space, default_version),
520
- view_property=prop.property_,
521
- )
522
-
523
- @classmethod
524
- def _to_space(cls, prefix: str) -> str:
525
- """Ensures that the prefix comply with the CDF space regex"""
526
- prefix = re.sub(r"[^a-zA-Z0-9_-]", "_", prefix)
527
- if prefix[0].isdigit() or prefix[0] == "_":
528
- prefix = f"a{prefix}"
529
- prefix = prefix[:43]
530
- if prefix[-1] == "_":
531
- prefix = f"{prefix[:-1]}1"
532
- return prefix
533
-
534
- @classmethod
535
- def _get_container(cls, prop: InformationProperty, default_space: str) -> tuple[ContainerEntity, str]:
536
- if isinstance(prop.reference, ReferenceEntity):
537
- return (
538
- prop.reference.as_container_entity(default_space),
539
- prop.reference.property_ or prop.property_,
540
- )
541
- else:
542
- return prop.class_.as_container_entity(default_space), prop.property_
543
-
544
- @classmethod
545
- def _get_view_implements(cls, cls_: InformationClass, metadata: InformationMetadata) -> list[ViewEntity]:
546
- if isinstance(cls_.reference, ReferenceEntity) and cls_.reference.prefix != metadata.prefix:
547
- # We use the reference for implements if it is in a different namespace
548
- implements = [
549
- cls_.reference.as_view_entity(metadata.prefix, metadata.version),
550
- ]
551
- else:
552
- implements = []
553
-
554
- implements.extend([parent.as_view_entity(metadata.prefix, metadata.version) for parent in cls_.parent or []])
555
- return implements
@@ -7,7 +7,7 @@ from cognite.client.data_classes.data_modeling import EdgeApply, NodeApply
7
7
  from cognite.neat.legacy.graph.stores import NeatGraphStoreBase
8
8
  from cognite.neat.legacy.rules.exporters._rules2dms import DMSSchemaComponents
9
9
  from cognite.neat.legacy.rules.models.rules import Rules
10
- from cognite.neat.rules.models.rules import DMSRules, DomainRules, InformationRules
10
+ from cognite.neat.rules.models import DMSRules, DomainRules, InformationRules
11
11
  from cognite.neat.workflows.steps.step_model import DataContract
12
12
 
13
13
 
@@ -4,7 +4,7 @@ from typing import ClassVar, Literal, cast
4
4
 
5
5
  from cognite.neat.rules import exporters
6
6
  from cognite.neat.rules._shared import DMSRules, InformationRules, Rules
7
- from cognite.neat.rules.models.rules import RoleTypes
7
+ from cognite.neat.rules.models import RoleTypes
8
8
  from cognite.neat.workflows._exceptions import StepNotInitialized
9
9
  from cognite.neat.workflows.model import FlowMessage, StepExecutionStatus
10
10
  from cognite.neat.workflows.steps.data_contracts import CogniteClient, MultiRuleData
@@ -268,6 +268,12 @@ class RulesToExcel(Step):
268
268
  "rules will be used.",
269
269
  options=["input", *RoleTypes.__members__.keys()],
270
270
  ),
271
+ Configurable(
272
+ name="Is Reference",
273
+ value="False",
274
+ label="Export rules as reference rules. If provided, the rules will be exported as reference rules. ",
275
+ options=["True", "False"],
276
+ ),
271
277
  Configurable(
272
278
  name="File path",
273
279
  value="",
@@ -279,20 +285,20 @@ class RulesToExcel(Step):
279
285
  if self.configs is None or self.data_store_path is None:
280
286
  raise StepNotInitialized(type(self).__name__)
281
287
 
288
+ is_reference = self.configs.get("Is Reference") == "True"
282
289
  styling = cast(exporters.ExcelExporter.Style, self.configs.get("Styling", "default"))
283
290
  role = self.configs.get("Output role format")
284
291
  output_role = None
285
292
  if role != "input" and role is not None:
286
293
  output_role = RoleTypes[role]
287
294
 
288
- excel_exporter = exporters.ExcelExporter(styling=styling, output_role=output_role)
295
+ excel_exporter = exporters.ExcelExporter(styling=styling, output_role=output_role, is_reference=is_reference)
289
296
 
290
297
  rule_instance: Rules
291
298
  if rules.domain:
292
299
  rule_instance = rules.domain
293
300
  elif rules.information:
294
301
  rule_instance = rules.information
295
-
296
302
  elif rules.dms:
297
303
  rule_instance = rules.dms
298
304
  else:
@@ -6,8 +6,8 @@ from cognite.client import CogniteClient
6
6
 
7
7
  from cognite.neat.rules import importers
8
8
  from cognite.neat.rules.issues.formatters import FORMATTER_BY_NAME
9
+ from cognite.neat.rules.models import RoleTypes
9
10
  from cognite.neat.rules.models.entities import DataModelEntity, DMSUnknownEntity
10
- from cognite.neat.rules.models.rules import RoleTypes
11
11
  from cognite.neat.workflows._exceptions import StepNotInitialized
12
12
  from cognite.neat.workflows.model import FlowMessage, StepExecutionStatus
13
13
  from cognite.neat.workflows.steps.data_contracts import MultiRuleData
@@ -8,8 +8,7 @@ from cognite.client import CogniteClient
8
8
  from cognite.neat.rules.issues import IssueList
9
9
  from cognite.neat.rules.issues.dms import MissingContainerError, MissingSpaceError, MissingViewError
10
10
  from cognite.neat.rules.issues.formatters import FORMATTER_BY_NAME
11
- from cognite.neat.rules.models.rules import DMSRules
12
- from cognite.neat.rules.models.rules._base import SchemaCompleteness
11
+ from cognite.neat.rules.models import DMSRules, SchemaCompleteness
13
12
  from cognite.neat.utils import cdf_loaders
14
13
  from cognite.neat.workflows._exceptions import StepNotInitialized
15
14
  from cognite.neat.workflows.model import FlowMessage, StepExecutionStatus
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cognite-neat
3
- Version: 0.76.1
3
+ Version: 0.76.2
4
4
  Summary: Knowledge graph transformation
5
5
  Home-page: https://cognite-neat.readthedocs-hosted.com/
6
6
  License: Apache-2.0
@@ -1,5 +1,5 @@
1
1
  cognite/neat/__init__.py,sha256=v-rRiDOgZ3sQSMQKq0vgUQZvpeOkoHFXissAx6Ktg84,61
2
- cognite/neat/_version.py,sha256=JYMWad1hoQA4r17GzBIhK4in6LVyBr7OqBPAmFHo8cc,23
2
+ cognite/neat/_version.py,sha256=HtluIH-Z1E-exBrYUiTjSYnxRCglf6JdDjRnCX5A30k,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=2U5M6M252swvQPQyooA1EBzFUZNtcTmuSaywfJDgckM,4232
@@ -9,11 +9,11 @@ cognite/neat/app/api/data_classes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeR
9
9
  cognite/neat/app/api/data_classes/rest.py,sha256=yVWqFkBCDCGooOWaE5nun4No8B-PBa6svdenIjBINdo,1675
10
10
  cognite/neat/app/api/explorer.py,sha256=OlLI-RbQGjXEuDgtmFfBuTXfnRVemTJDKbL9VvXLr6Y,1891
11
11
  cognite/neat/app/api/routers/configuration.py,sha256=rg9GihPPYjgNj1n_wWqfASO4iMXWh_US5sgNJCwejCE,585
12
- cognite/neat/app/api/routers/core.py,sha256=WVK_7-h5qCogZL9snJAa6JG2FTgG2BFHpwmywt5BGfw,3529
12
+ cognite/neat/app/api/routers/core.py,sha256=cHMX0JoxFHQB65VkFCvOprSkO8tFydECYtVFfRq9yfE,3523
13
13
  cognite/neat/app/api/routers/crud.py,sha256=VCQMjvcLosELkmMZRiunyd-RK5sltQFjcCSrGk5kwXc,4597
14
14
  cognite/neat/app/api/routers/data_exploration.py,sha256=j2dEg9Hng5-wg5C_7O2Mym8pVkKJBuflshTaBGmj6Mo,13686
15
15
  cognite/neat/app/api/routers/metrics.py,sha256=S_bUQk_GjfQq7WbEhSVdow4MUYBZ_bZNafzgcKogXK8,210
16
- cognite/neat/app/api/routers/rules.py,sha256=aygUVp2h9LEazNlCSi24Sb5-5RLazXZPGSbJWg4hyNc,8127
16
+ cognite/neat/app/api/routers/rules.py,sha256=MECSzurNe7y07-GfsggBDmfNtYkFuLdAm9ogSjLbzzk,8121
17
17
  cognite/neat/app/api/routers/workflows.py,sha256=fPqNT0swH-sfcjD8PLK5NzKY1sVSU7GaCMkHfH78gxw,12393
18
18
  cognite/neat/app/api/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
19
  cognite/neat/app/api/utils/data_mapping.py,sha256=ocqRyeCLbk3gS1NrQQnDr0w-q-xbkqV60uLZzsJIdyE,564
@@ -51,7 +51,7 @@ cognite/neat/graph/examples/skos-capturing-sheet-wind-topics.xlsx,sha256=CV_yK5Z
51
51
  cognite/neat/graph/exceptions.py,sha256=R6pyOH774n9w2x_X_nrUr8OMAdjJMf_XPIqAvxIQaWo,3401
52
52
  cognite/neat/graph/extractors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
53
53
  cognite/neat/graph/extractors/_base.py,sha256=TOXDnlqske8DgnJwA0THDVRgmR79Acjm56yF0E-2w7I,356
54
- cognite/neat/graph/extractors/_mock_graph_generator.py,sha256=xxrY3wuN7ZgP_iWirC_wtvEO5_cCsGoQZVyEZKx362w,14980
54
+ cognite/neat/graph/extractors/_mock_graph_generator.py,sha256=gziG2FFsLk-HmA9uxAeT9RCjVpFxjkCTLiC4tq2zgvw,14961
55
55
  cognite/neat/graph/models.py,sha256=AtLgZh2qyRP6NRetjQCy9qLMuTQB0CH52Zsev-qa2sk,149
56
56
  cognite/neat/graph/stores/__init__.py,sha256=ivvk7STSo-4wuP_CpizKUCPKmt_ufpNWRJUN9Bv5gdY,543
57
57
  cognite/neat/graph/stores/_base.py,sha256=_39ZoiSed7U-OdOKhiuT8dOS3u7HNfSIkLQp3a0B0GQ,13473
@@ -155,57 +155,64 @@ cognite/neat/legacy/workflows/examples/Visualize_Data_Model_Using_Mock_Graph/wor
155
155
  cognite/neat/legacy/workflows/examples/Visualize_Semantic_Data_Model/workflow.yaml,sha256=yWVL-NHghKtiNV2kpEX674MJwWqhOUn3j2ZOJiJbprE,2579
156
156
  cognite/neat/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
157
157
  cognite/neat/rules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
158
- cognite/neat/rules/_shared.py,sha256=UuciM9RlL9Iwh6UOYiKXFRwjnpRUnhsYRptTPjePmFE,176
158
+ cognite/neat/rules/_shared.py,sha256=5dc2dfwqjNB_Us27x7oRNkEoEETT0gQChoiIU8mcvyQ,170
159
159
  cognite/neat/rules/analysis/__init__.py,sha256=J2yL0QWSvXOWLbaYPyA0HXHh3aqOWmkwobScdgVQpw8,115
160
160
  cognite/neat/rules/analysis/_base.py,sha256=PmN5NLgGsovsHtsnvUzc_zuarWl-Xwk1azWcYKKuWdA,669
161
- cognite/neat/rules/analysis/_information_rules.py,sha256=zGY1cx1WG98fge-ADTQpceCtJojLD872v5DZNGaE8Ss,19608
161
+ cognite/neat/rules/analysis/_information_rules.py,sha256=vEODgoCKlqYy6A-A3oe_IBWJs5J12Vrc5XCjPCoV8zU,19584
162
162
  cognite/neat/rules/examples/__init__.py,sha256=nxIwueAcHgZhkYriGxnDLQmIyiT8PByPHbScjYKDKe0,374
163
163
  cognite/neat/rules/examples/wind-energy.owl,sha256=NuomCA9FuuLF0JlSuG3OKqD4VBcHgSjDKFLV17G1zV8,65934
164
164
  cognite/neat/rules/exceptions.py,sha256=YLnsbXXJdDSr_szQoioEtOdqDV8PR7RdQjpMP2SWeCs,123868
165
165
  cognite/neat/rules/exporters/__init__.py,sha256=Gn3CjkVKHJF9Po1ZPH4wAJ-sRW9up7b2CpXm-eReV3Q,413
166
- cognite/neat/rules/exporters/_base.py,sha256=rJIKvM9CQlwwAOBlmpYepB1Urb-ZLC0xBxS0fE7am-I,1517
166
+ cognite/neat/rules/exporters/_base.py,sha256=m63iw8xjlZbZAxGL8mn7pjGf1pW3rVv8C20_RSiu4t0,1511
167
167
  cognite/neat/rules/exporters/_models.py,sha256=vRd0P_YsrZ1eaAGGHfdTeFunaqHdaa0ZtnWiVZBR1nc,1976
168
- cognite/neat/rules/exporters/_rules2dms.py,sha256=zFb-C4ihWrvud81AbNU2ZbSQ0jHqbYk4x34Zc1zFHyw,16126
169
- cognite/neat/rules/exporters/_rules2excel.py,sha256=QFRNsd3kt1WLtz5WxI5gFErzS_Y1ScIb-u2QYNtnPAQ,13068
170
- cognite/neat/rules/exporters/_rules2ontology.py,sha256=GBpaAjM0X8t02NWE3CRmKKovEiHhvOHdWfbeXP7Hh6c,20139
171
- cognite/neat/rules/exporters/_rules2yaml.py,sha256=Irr4CwJ5pLlwiJeOMuGPU-HX9zoYrONyfV9JpRYz6j8,3038
172
- cognite/neat/rules/exporters/_validation.py,sha256=zPMwQLw3U2HKFTtdrUMt2e0D-3FfgcaqdYU0DZ9YG_g,4090
168
+ cognite/neat/rules/exporters/_rules2dms.py,sha256=BNznUtTdJ__M10I7QQf3_zdIQTET8SGFvHv5a-5louM,13529
169
+ cognite/neat/rules/exporters/_rules2excel.py,sha256=zjGmUxQmsnHCEmSM5KvGQCFapdaDCCMJQRaLkVsI8mM,13034
170
+ cognite/neat/rules/exporters/_rules2ontology.py,sha256=NWS3cn2927LQqW_PdQ-92OLIlmIKGNk7xh5yOMAyj94,20120
171
+ cognite/neat/rules/exporters/_rules2yaml.py,sha256=sOSdnTJ5mXuyAJECdNnNsX6oLvgETptkpgPUQbK0n2w,3026
172
+ cognite/neat/rules/exporters/_validation.py,sha256=OlKIyf4nhSDehJwFHDQ8Zdf6HpNfW7dSe2s67eywHu4,4078
173
173
  cognite/neat/rules/importers/__init__.py,sha256=zqNbGpvdVhYkLjWx1i9dJ3FXzYGtuQyTydUYsj-BndQ,408
174
- cognite/neat/rules/importers/_base.py,sha256=ZT9kzmC8TluiMTao1rCVvD1ZK_Rq3WWclzn96ZuQg2U,4280
175
- cognite/neat/rules/importers/_dms2rules.py,sha256=eSuUYZauRP3Hs3kh5SLUfd-KV_tubWesyxUEgbTdm6w,17827
174
+ cognite/neat/rules/importers/_base.py,sha256=GUiJrYwJ25thI71iS9hCeP_iSZ0Vv8ou3z6MfD07FAk,4274
175
+ cognite/neat/rules/importers/_dms2rules.py,sha256=HNUDix1xwNILpyb_wxwrOqnhSvdMiPKYfk4JL7AT6ks,16891
176
176
  cognite/neat/rules/importers/_dtdl2rules/__init__.py,sha256=CNR-sUihs2mnR1bPMKs3j3L4ds3vFTsrl6YycExZTfU,68
177
177
  cognite/neat/rules/importers/_dtdl2rules/_unit_lookup.py,sha256=wW4saKva61Q_i17guY0dc4OseJDQfqHy_QZBtm0OD6g,12134
178
- cognite/neat/rules/importers/_dtdl2rules/dtdl_converter.py,sha256=dHWbcP7rLxnLOef69DBR2xDYFIWj_DQPx-IkIWwBZIA,12676
179
- cognite/neat/rules/importers/_dtdl2rules/dtdl_importer.py,sha256=TByg_W9H1Obz-ZQqmbao3_XtvsIKoFOyj3uCCDqiJhQ,6785
178
+ cognite/neat/rules/importers/_dtdl2rules/dtdl_converter.py,sha256=ysmWUxZ0npwrTB0uiH5jA0v37sfCwowGaYk17IyxPUU,12663
179
+ cognite/neat/rules/importers/_dtdl2rules/dtdl_importer.py,sha256=gud3vUzUpl4PtikzfSLRzjppX1h5fu0HhX3HUOLV4ls,6717
180
180
  cognite/neat/rules/importers/_dtdl2rules/spec.py,sha256=tim_MfN1J0F3Oeqk3BMgIA82d_MZvhRuRMsLK3B4PYc,11897
181
181
  cognite/neat/rules/importers/_owl2rules/__init__.py,sha256=tdGcrgtozdQyST-pTlxIa4cLBNTLvtk1nNYR4vOdFSw,63
182
- cognite/neat/rules/importers/_owl2rules/_owl2classes.py,sha256=3qxQlZr-3MLhL0oDHlCfOK9ndsT4edDGqz3pQb5f61A,7597
183
- cognite/neat/rules/importers/_owl2rules/_owl2metadata.py,sha256=mqDa0oiKCX2gBEk47rX4r-VzOmsVyK6q_J7wvDOCklA,7804
184
- cognite/neat/rules/importers/_owl2rules/_owl2properties.py,sha256=UB7iZZFkoeTsxuM745rl5I4Myp5mrotDgzmjPBBfv8w,7443
185
- cognite/neat/rules/importers/_owl2rules/_owl2rules.py,sha256=CN0CK0vXzXwawRH1Sp4FdDmxjChP3IWZYdYb1HEV23s,6931
186
- cognite/neat/rules/importers/_spreadsheet2rules.py,sha256=Td5w03RCY7ligcLHrSEiCLMHngwLuwgTSSUruMe3jz8,11397
187
- cognite/neat/rules/importers/_yaml2rules.py,sha256=LzcfsdKgU28TPAqxG5q3y09rJbUPbMhBWZRt0Z5bU3k,4299
182
+ cognite/neat/rules/importers/_owl2rules/_owl2classes.py,sha256=LInFeBq-NbBIuMEAwgWch2a4DbBUt4_OMqPkwehW-sw,7591
183
+ cognite/neat/rules/importers/_owl2rules/_owl2metadata.py,sha256=NdPN0dBB0NYkAcfC0yrYdIrGfdPbl5gfeGnSV3EtUPM,7786
184
+ cognite/neat/rules/importers/_owl2rules/_owl2properties.py,sha256=BLptGmH-Aa5gZu0hDIxSZTrn9GmB2FicWgRYoETLSnQ,7437
185
+ cognite/neat/rules/importers/_owl2rules/_owl2rules.py,sha256=H2Vv56hXGFnq_b0obWGWr5ErDFcoWpT8G2uy89100cU,6925
186
+ cognite/neat/rules/importers/_spreadsheet2rules.py,sha256=eCDxFImXn_tQagjET_fxC9wriQmrWqRhghqilPfDXPI,11353
187
+ cognite/neat/rules/importers/_yaml2rules.py,sha256=F0uksSz1A3po5OlRM2152_w5j8D9oYTLB9NFTkSMlWI,4275
188
188
  cognite/neat/rules/issues/__init__.py,sha256=Ms6jgCxCezc5IgTOwCFtXQPtoVFfOvdcXj84_rs917I,563
189
- cognite/neat/rules/issues/base.py,sha256=MpqxzJrAEzPUOSdJEkUE1CvJogyWDN_7YJyoAY6sR_o,6242
189
+ cognite/neat/rules/issues/base.py,sha256=i2aTC-wq3UVW2bj_7wKeuhYxCpMD06Bd9-m00bWcTBs,6438
190
190
  cognite/neat/rules/issues/dms.py,sha256=0xBTYa3b3CPFjsdfKv59l3yX8DLTYB1Jo0LWDhfG6oQ,19178
191
191
  cognite/neat/rules/issues/fileread.py,sha256=ao199mtvhPSW0IA8ZQZ0RzuLIIipYtL0jp6fLqxb4_c,5748
192
192
  cognite/neat/rules/issues/formatters.py,sha256=_ag2bJ9hncOj8pAGJvTTEPs9kTtxbD7vkqvS9Zcnizc,3385
193
193
  cognite/neat/rules/issues/importing.py,sha256=p90847g_TbUAXMyxalcEaWXaPygJoSE5E85dQO4syoo,12288
194
194
  cognite/neat/rules/issues/spreadsheet.py,sha256=-jMcamtvDIACKiIHtDNafjiMgovVN-VthyqE1FaSy-0,13936
195
195
  cognite/neat/rules/issues/spreadsheet_file.py,sha256=YCp0Pk_TsiqYuOPdWpjUpre-zvi2c5_MvrC_dxw10YY,4964
196
+ cognite/neat/rules/models/__init__.py,sha256=aqhQUidHYgOk5_iqdi6s72s2g8qyMRFXShYzh-ctNpw,782
197
+ cognite/neat/rules/models/_base.py,sha256=bFH_HSftl960ROroUMy5jjXdIir6lm3tHK2qJmc-UG8,10876
198
+ cognite/neat/rules/models/_rdfpath.py,sha256=RoHnfWufjnDtwJh7UUzWKoJz8luvX7Gb5SDQORfkQTE,11030
199
+ cognite/neat/rules/models/_types/__init__.py,sha256=l1tGxzE7ezNHIL72AoEvNHN2IFuitxOLxiHJG__s6t4,305
200
+ cognite/neat/rules/models/_types/_base.py,sha256=2GhLUE1ukV8X8SGL_JDxpbWGZyAvOnSqAE6JmDh5wbI,929
201
+ cognite/neat/rules/models/_types/_field.py,sha256=74WfCSVbTubpK4n4VsysQqCch6VI8IcPqnHQpvNbFZ8,3197
196
202
  cognite/neat/rules/models/data_types.py,sha256=lanwkhwG8iHKfjYfia4v2SBTJrMeXOsqaVkVEP2QMXs,6078
203
+ cognite/neat/rules/models/dms/__init__.py,sha256=Wzyqzz2ZIjpUbDg04CMuuIAw-f2A02DayNeqO9R-2Hw,491
204
+ cognite/neat/rules/models/dms/_converter.py,sha256=x3u3jLnkknozoXXoAXXOWFHCsppqUwSvWv9wMOJ2F1Y,5706
205
+ cognite/neat/rules/models/dms/_exporter.py,sha256=9EVToiib2QSxEXOzP7-xSlitpUlWSZTHar1HLIrtqxI,18908
206
+ cognite/neat/rules/models/dms/_rules.py,sha256=CesPmLT4rC7rB_Q895nIV34lwfg3RC9NoU1wsz5l-hA,15599
207
+ cognite/neat/rules/models/dms/_rules_input.py,sha256=WcdL_ztq1fAd8dv0Ob6X865pMMc_T1TVd4k2-kwlE2c,13147
208
+ cognite/neat/rules/models/dms/_schema.py,sha256=-sMP5_2_DjY_QwdNpDWvSErEorTtZqUa7dATz0S9mZs,36236
209
+ cognite/neat/rules/models/dms/_serializer.py,sha256=MYPpkbuor75PoY6kIk6O4elFqnKU8_0ON39nMtkG3dU,6619
210
+ cognite/neat/rules/models/dms/_validation.py,sha256=k1awA0nMpv3G1dyWQd3q1GX1RBjJgEzN_G-uVlomaUY,12960
211
+ cognite/neat/rules/models/domain.py,sha256=2S74P9YPPtb6myx8wg3-el9jrEBMH9AOBg9dAfwzlh4,2934
197
212
  cognite/neat/rules/models/entities.py,sha256=iBG84Jr1qQ7PvkMJUJzJ1oWApeONb1IACixdJSztUhk,16395
198
- cognite/neat/rules/models/rdfpath.py,sha256=RoHnfWufjnDtwJh7UUzWKoJz8luvX7Gb5SDQORfkQTE,11030
199
- cognite/neat/rules/models/rules/__init__.py,sha256=YHzkEkDzDuPs9N69FP12SAbnOBiLOxk0m5jXH-IQgbY,522
200
- cognite/neat/rules/models/rules/_base.py,sha256=bFH_HSftl960ROroUMy5jjXdIir6lm3tHK2qJmc-UG8,10876
201
- cognite/neat/rules/models/rules/_dms_architect_rules.py,sha256=sGlV_hOyQemtUUwYC_fwtihk40PlU7WrlywdagP65fI,58546
202
- cognite/neat/rules/models/rules/_dms_rules_write.py,sha256=12fkwQY5c0Y6SGM_pU6pEAqjUO2VuB3cPOAVllwUOkQ,13135
203
- cognite/neat/rules/models/rules/_dms_schema.py,sha256=ySGa0Qe_puGjXg1T-Ec0Kzvobqn60D5toFuSzeLuzW0,35870
204
- cognite/neat/rules/models/rules/_domain_rules.py,sha256=2S74P9YPPtb6myx8wg3-el9jrEBMH9AOBg9dAfwzlh4,2934
205
- cognite/neat/rules/models/rules/_information_rules.py,sha256=ni2KSHHG9nBqho50Sn5C7HJRHZCPatNUSM1xQSn_0lI,22447
206
- cognite/neat/rules/models/rules/_types/__init__.py,sha256=l1tGxzE7ezNHIL72AoEvNHN2IFuitxOLxiHJG__s6t4,305
207
- cognite/neat/rules/models/rules/_types/_base.py,sha256=2GhLUE1ukV8X8SGL_JDxpbWGZyAvOnSqAE6JmDh5wbI,929
208
- cognite/neat/rules/models/rules/_types/_field.py,sha256=74WfCSVbTubpK4n4VsysQqCch6VI8IcPqnHQpvNbFZ8,3197
213
+ cognite/neat/rules/models/information/__init__.py,sha256=KvbYxVk38qReGbGTrU_Y3P3Gz6Bfghk5lHSKs8DlTOI,195
214
+ cognite/neat/rules/models/information/_converter.py,sha256=cNWMBTsJ412M9MW2ytcafDKuWYZc_xcjwcsUag0Fs54,7833
215
+ cognite/neat/rules/models/information/_rules.py,sha256=YE7X8MsPQv-AVtl4vYtQW99moT45sYk2dI2DDS1YRO0,15546
209
216
  cognite/neat/rules/models/wrapped_entities.py,sha256=c5GkzOrYrE6SSRzIS2r8OAjhwxXpOoAO1WGc8kwiPPo,6154
210
217
  cognite/neat/utils/__init__.py,sha256=l5Nyqhqo25bcQXCOb_lk01cr-UXsG8cczz_y_I0u6bg,68
211
218
  cognite/neat/utils/auxiliary.py,sha256=E2-YtddzScvN7l7j0kNYIMlfqIUT9NWMqLpcJYPK4rY,309
@@ -240,15 +247,15 @@ cognite/neat/workflows/migration/steps.py,sha256=4YCPWwfEqzIgLN4lRNx8Y-nj14ptNxH
240
247
  cognite/neat/workflows/migration/wf_manifests.py,sha256=TIJ9q_sbZ1LVJfUYVk8VRYcxrRHlwyktHRag0OJcVrE,1556
241
248
  cognite/neat/workflows/model.py,sha256=LQY7abYnz3CUEIlIEqoj0Eo6Q8yQukTQ0S_sPststCA,6570
242
249
  cognite/neat/workflows/steps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
243
- cognite/neat/workflows/steps/data_contracts.py,sha256=aMdSaSIZ0C_K5DtNjDN0_hGeNtXc7M_Z0WcQHJk1sQo,3015
250
+ cognite/neat/workflows/steps/data_contracts.py,sha256=OSlLHJuXUyEKajjwEu6UXxf3oicbdRAucKF3OGq5Ts8,3009
244
251
  cognite/neat/workflows/steps/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
245
252
  cognite/neat/workflows/steps/lib/current/__init__.py,sha256=c22IznGdCSNCpXCi_yonlbbywJE1uj6bfVCv0X2LYeE,225
246
253
  cognite/neat/workflows/steps/lib/current/graph_extractor.py,sha256=vW9UpJScx5dFVCSairpOdWRdBdLpkCt2kNh6litbF0o,5161
247
254
  cognite/neat/workflows/steps/lib/current/graph_loader.py,sha256=HfGg1HRZhbV58TFu89FTjKeUxGsbCYLeFJIQFDN_pQM,2341
248
255
  cognite/neat/workflows/steps/lib/current/graph_store.py,sha256=r7VTxdaz8jJQU7FJbnRDMxvEYbSAZFNMABhPyfNwiFk,6295
249
- cognite/neat/workflows/steps/lib/current/rules_exporter.py,sha256=VrrD6QcYRh8-O3eAx_UU2zym773Rz0QphReiXpP1exQ,22491
250
- cognite/neat/workflows/steps/lib/current/rules_importer.py,sha256=CX_CoLTK8r2ErQ7uyZ54cQsXs5g1FQilffYLjHBtMOU,10344
251
- cognite/neat/workflows/steps/lib/current/rules_validator.py,sha256=Zle0XH3_7e9CGmybk3XFvi1vOlvjZltLC_UUFaHrRXo,4784
256
+ cognite/neat/workflows/steps/lib/current/rules_exporter.py,sha256=Xe0b-ngLvfkc_uxvoG-BOzIuYdUup-QfSoJR31cIOwE,22824
257
+ cognite/neat/workflows/steps/lib/current/rules_importer.py,sha256=yDq06cvxLvEpSnTXTjwhxDie_MzHa3wO1A4cbKnrH6c,10338
258
+ cognite/neat/workflows/steps/lib/current/rules_validator.py,sha256=fDRQiRHN9Cuph38-WruK0T1UG5H448S_GsbzdOpi0h4,4729
252
259
  cognite/neat/workflows/steps/lib/io/__init__.py,sha256=k7IPbIq3ey19oRc5sA_15F99-O6dxzqbm1LihGRRo5A,32
253
260
  cognite/neat/workflows/steps/lib/io/io_steps.py,sha256=QAGypoi1vP32BRiIgBZ0B4qsbFMcwhzpRiVUUnWysLA,16874
254
261
  cognite/neat/workflows/steps/lib/legacy/__init__.py,sha256=725aFzVqhE0tbVOAW70zWXTGKFiYImVupRZ4C5_IkUo,274
@@ -264,8 +271,8 @@ cognite/neat/workflows/steps_registry.py,sha256=fkTX14ZA7_gkUYfWIlx7A1XbCidvqR23
264
271
  cognite/neat/workflows/tasks.py,sha256=dqlJwKAb0jlkl7abbY8RRz3m7MT4SK8-7cntMWkOYjw,788
265
272
  cognite/neat/workflows/triggers.py,sha256=_BLNplzoz0iic367u1mhHMHiUrCwP-SLK6_CZzfODX0,7071
266
273
  cognite/neat/workflows/utils.py,sha256=gKdy3RLG7ctRhbCRwaDIWpL9Mi98zm56-d4jfHDqP1E,453
267
- cognite_neat-0.76.1.dist-info/LICENSE,sha256=W8VmvFia4WHa3Gqxq1Ygrq85McUNqIGDVgtdvzT-XqA,11351
268
- cognite_neat-0.76.1.dist-info/METADATA,sha256=WbYTbZfKFf2l9ASMKwMVGYW_otwMLULyqp1K0WfIqOY,9316
269
- cognite_neat-0.76.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
270
- cognite_neat-0.76.1.dist-info/entry_points.txt,sha256=61FPqiWb25vbqB0KI7znG8nsg_ibLHBvTjYnkPvNFso,50
271
- cognite_neat-0.76.1.dist-info/RECORD,,
274
+ cognite_neat-0.76.2.dist-info/LICENSE,sha256=W8VmvFia4WHa3Gqxq1Ygrq85McUNqIGDVgtdvzT-XqA,11351
275
+ cognite_neat-0.76.2.dist-info/METADATA,sha256=0DLiYko7Fua8EdVbh9D7gvftXhrk9TyltRtIs_HLvkY,9316
276
+ cognite_neat-0.76.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
277
+ cognite_neat-0.76.2.dist-info/entry_points.txt,sha256=61FPqiWb25vbqB0KI7znG8nsg_ibLHBvTjYnkPvNFso,50
278
+ cognite_neat-0.76.2.dist-info/RECORD,,
@@ -1,14 +0,0 @@
1
- from ._base import RoleTypes
2
- from ._dms_architect_rules import DMSRules
3
- from ._dms_schema import DMSSchema
4
- from ._domain_rules import DomainRules
5
- from ._information_rules import InformationRules
6
-
7
- RULES_PER_ROLE: dict[RoleTypes, type[DomainRules] | type[InformationRules] | type[DMSRules]] = {
8
- RoleTypes.domain_expert: DomainRules,
9
- RoleTypes.information_architect: InformationRules,
10
- RoleTypes.dms_architect: DMSRules,
11
- }
12
-
13
-
14
- __all__ = ["DomainRules", "InformationRules", "DMSRules", "RULES_PER_ROLE", "DMSSchema"]