cognite-neat 0.88.3__py3-none-any.whl → 0.90.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.
- cognite/neat/_version.py +1 -1
- cognite/neat/constants.py +6 -3
- cognite/neat/graph/extractors/__init__.py +2 -0
- cognite/neat/graph/extractors/_classic_cdf/_base.py +2 -2
- cognite/neat/graph/extractors/_dms.py +158 -0
- cognite/neat/graph/extractors/_mock_graph_generator.py +50 -9
- cognite/neat/graph/loaders/_rdf2dms.py +16 -13
- cognite/neat/graph/models.py +1 -0
- cognite/neat/graph/queries/_base.py +4 -2
- cognite/neat/issues/_base.py +3 -1
- cognite/neat/issues/errors/__init__.py +2 -1
- cognite/neat/issues/errors/_general.py +7 -0
- cognite/neat/issues/warnings/__init__.py +2 -0
- cognite/neat/issues/warnings/_models.py +1 -1
- cognite/neat/issues/warnings/_properties.py +12 -0
- cognite/neat/issues/warnings/user_modeling.py +1 -1
- cognite/neat/rules/_shared.py +49 -6
- cognite/neat/rules/analysis/_base.py +1 -1
- cognite/neat/rules/exporters/_base.py +7 -18
- cognite/neat/rules/exporters/_rules2dms.py +8 -18
- cognite/neat/rules/exporters/_rules2excel.py +5 -12
- cognite/neat/rules/exporters/_rules2ontology.py +9 -19
- cognite/neat/rules/exporters/_rules2yaml.py +3 -6
- cognite/neat/rules/importers/_base.py +7 -52
- cognite/neat/rules/importers/_dms2rules.py +172 -116
- cognite/neat/rules/importers/_dtdl2rules/dtdl_converter.py +26 -18
- cognite/neat/rules/importers/_dtdl2rules/dtdl_importer.py +14 -30
- cognite/neat/rules/importers/_rdf/_imf2rules/_imf2classes.py +7 -3
- cognite/neat/rules/importers/_rdf/_imf2rules/_imf2metadata.py +3 -3
- cognite/neat/rules/importers/_rdf/_imf2rules/_imf2properties.py +18 -11
- cognite/neat/rules/importers/_rdf/_imf2rules/_imf2rules.py +9 -18
- cognite/neat/rules/importers/_rdf/_inference2rules.py +37 -65
- cognite/neat/rules/importers/_rdf/_owl2rules/_owl2rules.py +9 -20
- cognite/neat/rules/importers/_rdf/_shared.py +1 -1
- cognite/neat/rules/importers/_spreadsheet2rules.py +22 -86
- cognite/neat/rules/importers/_yaml2rules.py +14 -41
- cognite/neat/rules/models/__init__.py +21 -5
- cognite/neat/rules/models/_base_input.py +162 -0
- cognite/neat/rules/models/{_base.py → _base_rules.py} +1 -12
- cognite/neat/rules/models/asset/__init__.py +5 -2
- cognite/neat/rules/models/asset/_rules.py +2 -20
- cognite/neat/rules/models/asset/_rules_input.py +40 -115
- cognite/neat/rules/models/asset/_validation.py +1 -1
- cognite/neat/rules/models/data_types.py +150 -44
- cognite/neat/rules/models/dms/__init__.py +19 -7
- cognite/neat/rules/models/dms/_exporter.py +82 -39
- cognite/neat/rules/models/dms/_rules.py +42 -155
- cognite/neat/rules/models/dms/_rules_input.py +186 -254
- cognite/neat/rules/models/dms/_serializer.py +44 -3
- cognite/neat/rules/models/dms/_validation.py +3 -4
- cognite/neat/rules/models/domain.py +52 -1
- cognite/neat/rules/models/entities/__init__.py +63 -0
- cognite/neat/rules/models/entities/_constants.py +73 -0
- cognite/neat/rules/models/entities/_loaders.py +76 -0
- cognite/neat/rules/models/entities/_multi_value.py +67 -0
- cognite/neat/rules/models/{entities.py → entities/_single_value.py} +74 -232
- cognite/neat/rules/models/entities/_types.py +86 -0
- cognite/neat/rules/models/{wrapped_entities.py → entities/_wrapped.py} +1 -1
- cognite/neat/rules/models/information/__init__.py +10 -2
- cognite/neat/rules/models/information/_rules.py +3 -14
- cognite/neat/rules/models/information/_rules_input.py +57 -204
- cognite/neat/rules/models/information/_validation.py +1 -1
- cognite/neat/rules/transformers/__init__.py +21 -0
- cognite/neat/rules/transformers/_base.py +69 -3
- cognite/neat/rules/{models/information/_converter.py → transformers/_converters.py} +226 -21
- cognite/neat/rules/transformers/_map_onto.py +97 -0
- cognite/neat/rules/transformers/_pipelines.py +61 -0
- cognite/neat/rules/transformers/_verification.py +136 -0
- cognite/neat/store/_base.py +2 -2
- cognite/neat/store/_provenance.py +10 -1
- cognite/neat/utils/cdf/data_classes.py +20 -0
- cognite/neat/utils/regex_patterns.py +6 -0
- cognite/neat/workflows/steps/lib/current/rules_exporter.py +106 -37
- cognite/neat/workflows/steps/lib/current/rules_importer.py +24 -22
- {cognite_neat-0.88.3.dist-info → cognite_neat-0.90.0.dist-info}/METADATA +1 -1
- {cognite_neat-0.88.3.dist-info → cognite_neat-0.90.0.dist-info}/RECORD +80 -74
- cognite/neat/rules/models/_constants.py +0 -2
- cognite/neat/rules/models/_types/__init__.py +0 -19
- cognite/neat/rules/models/asset/_converter.py +0 -4
- cognite/neat/rules/models/dms/_converter.py +0 -143
- /cognite/neat/rules/models/{_types/_field.py → _types.py} +0 -0
- {cognite_neat-0.88.3.dist-info → cognite_neat-0.90.0.dist-info}/LICENSE +0 -0
- {cognite_neat-0.88.3.dist-info → cognite_neat-0.90.0.dist-info}/WHEEL +0 -0
- {cognite_neat-0.88.3.dist-info → cognite_neat-0.90.0.dist-info}/entry_points.txt +0 -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=
|
|
3
|
+
cognite/neat/_version.py,sha256=FvxNqJMDVJIASnIcUVgFB9VPINXWP_qWXCWjSsjUHO8,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
|
|
@@ -39,7 +39,7 @@ cognite/neat/app/ui/neat-app/build/static/js/main.5a52cf09.js.LICENSE.txt,sha256
|
|
|
39
39
|
cognite/neat/app/ui/neat-app/build/static/js/main.5a52cf09.js.map,sha256=Lf93Q5-M2-Yc8NTq59fJ7floyiT9f-ayFYFKDvnVZqU,3161888
|
|
40
40
|
cognite/neat/app/ui/neat-app/build/static/media/logo.8093b84df9ed36a174c629d6fe0b730d.svg,sha256=EYf9q9JoVJ1L1np-XloeEZXCmaibzKmmpXCKn_44xzA,240334
|
|
41
41
|
cognite/neat/config.py,sha256=MbYOvlibOjODEPcCHNKwZHVjg9ft8kZSojnW4gQCiHQ,10116
|
|
42
|
-
cognite/neat/constants.py,sha256=
|
|
42
|
+
cognite/neat/constants.py,sha256=mhyB61-IKwREbq_8IL6Y0pNfZhCiceWlgwtWW42bkBE,913
|
|
43
43
|
cognite/neat/graph/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
44
44
|
cognite/neat/graph/_shared.py,sha256=9QRETdm7hvqIeiHv_n1xi1DUq91Nq7oRRpnPKE0Pnag,181
|
|
45
45
|
cognite/neat/graph/_tracking/__init__.py,sha256=pYj7c-YAUIP4hvN-4mlWnwaeZFerzL9_gM-oZhex7cE,91
|
|
@@ -49,11 +49,11 @@ cognite/neat/graph/examples/Knowledge-Graph-Nordic44-dirty.xml,sha256=ujJip6XBs5
|
|
|
49
49
|
cognite/neat/graph/examples/Knowledge-Graph-Nordic44.xml,sha256=U2Ns-M4LRjT1fBkhmRj63ur7jDzlRtHK9yOLf_npZ_g,1437996
|
|
50
50
|
cognite/neat/graph/examples/__init__.py,sha256=yAjHVY3b5jOjmbW-iLbhvu7BG014TpGi3K4igkDqW5I,368
|
|
51
51
|
cognite/neat/graph/examples/skos-capturing-sheet-wind-topics.xlsx,sha256=CV_yK5ZSbYS_ktfIZUPD8Sevs47zpswLXQUDFkGE4Gw,45798
|
|
52
|
-
cognite/neat/graph/extractors/__init__.py,sha256=
|
|
52
|
+
cognite/neat/graph/extractors/__init__.py,sha256=timbuOI3YBPBFu1lY42KDAN5aDJ32gIseKsjT7e0fgU,1698
|
|
53
53
|
cognite/neat/graph/extractors/_base.py,sha256=8IWygpkQTwo0UOmbbwWVI7540_klTVdUVX2JjVPFRIs,498
|
|
54
54
|
cognite/neat/graph/extractors/_classic_cdf/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
55
55
|
cognite/neat/graph/extractors/_classic_cdf/_assets.py,sha256=xVqWC_lyqX5RKGfTxX0Gb96A0GAyM13d6YIjd1xEbpI,6524
|
|
56
|
-
cognite/neat/graph/extractors/_classic_cdf/_base.py,sha256=
|
|
56
|
+
cognite/neat/graph/extractors/_classic_cdf/_base.py,sha256=oLqYxNkAgYCZlAGMqfOVTDbRnouyf72m54d1BfcpeAA,4494
|
|
57
57
|
cognite/neat/graph/extractors/_classic_cdf/_events.py,sha256=8shnrQD9LZCrKPIt7xeU6ac0-lSkIwGe9KB0DdJ7Eik,5600
|
|
58
58
|
cognite/neat/graph/extractors/_classic_cdf/_files.py,sha256=wa2jzbpOj4BssVY7PbgdGymFZGSrvd1GZaRVN-JjOXQ,6588
|
|
59
59
|
cognite/neat/graph/extractors/_classic_cdf/_labels.py,sha256=Xvyv22jebq4s94Sl1h2SMEeBvOkoTIPujB9tczRgcDo,4359
|
|
@@ -61,15 +61,16 @@ cognite/neat/graph/extractors/_classic_cdf/_relationships.py,sha256=VxmwnZ_vN_P1
|
|
|
61
61
|
cognite/neat/graph/extractors/_classic_cdf/_sequences.py,sha256=sTtVPngffQw2fyvoRG1ABC2yFkepA6skFT1XdCzg4cU,5086
|
|
62
62
|
cognite/neat/graph/extractors/_classic_cdf/_timeseries.py,sha256=zmVf5pO-G4ro3elKt0sCTfTtLulkEFoEahLgP9J5kKE,6581
|
|
63
63
|
cognite/neat/graph/extractors/_dexpi.py,sha256=Q3whJpEi3uFMzJGAAeUfgRnAzz6ZHmtuEdVBWqsZsTM,9384
|
|
64
|
-
cognite/neat/graph/extractors/
|
|
64
|
+
cognite/neat/graph/extractors/_dms.py,sha256=NbqY1nrisn-dJq8_qeCatpgJwm6-cKFsTISDR5afdbU,6688
|
|
65
|
+
cognite/neat/graph/extractors/_mock_graph_generator.py,sha256=ES-7__o750BJFC9rNWt5HRO5M53iZuzv-8lBqLIXdC0,15365
|
|
65
66
|
cognite/neat/graph/extractors/_rdf_file.py,sha256=ialMCLv9WH5k6v1YMfozfcmAYhz8OVo9jVhsKMyQkDA,763
|
|
66
67
|
cognite/neat/graph/loaders/__init__.py,sha256=TbeJqifd16JLOglPVNOeb6pN_w060UYag50KquBM_r0,769
|
|
67
68
|
cognite/neat/graph/loaders/_base.py,sha256=5CpNsSj3WGCCjT2dC4GhnbArSD7DlWg_kXtze_ediLg,3614
|
|
68
69
|
cognite/neat/graph/loaders/_rdf2asset.py,sha256=Opq7BNAzrAYq-ffF2ayAqNVopyBDrayn0hj07KVFsyI,17504
|
|
69
|
-
cognite/neat/graph/loaders/_rdf2dms.py,sha256=
|
|
70
|
-
cognite/neat/graph/models.py,sha256=
|
|
70
|
+
cognite/neat/graph/loaders/_rdf2dms.py,sha256=bFfl3UKVwewGxAGAFlpPrJCKHq-aZdpYtDNYugIWq7g,14977
|
|
71
|
+
cognite/neat/graph/models.py,sha256=Z9aj825ZS_BCU6rwekyxKq7LL0QMh6i0DXGp7QQf_D4,182
|
|
71
72
|
cognite/neat/graph/queries/__init__.py,sha256=BgDd-037kvtWwAoGAy8eORVNMiZ5-E9sIV0txIpeaN4,50
|
|
72
|
-
cognite/neat/graph/queries/_base.py,sha256=
|
|
73
|
+
cognite/neat/graph/queries/_base.py,sha256=SCBPd4w5BkXU6vq1DWDqRtY4JDPxXm3zDIMRZzpV2-s,8404
|
|
73
74
|
cognite/neat/graph/queries/_construct.py,sha256=lDquCxjiaUzL3G48ZQffrGJMcqPkWVtCdkfatgPAUKI,7208
|
|
74
75
|
cognite/neat/graph/queries/_shared.py,sha256=Kk53TqJmwD2G-rxhLq_jJXYy8jvLsUAAWGJS5r9pOaY,5327
|
|
75
76
|
cognite/neat/graph/transformers/__init__.py,sha256=FMvlDEDJHrZL4Jb_H0AiJZO5uHXBCuLhB5HVDuinnBI,665
|
|
@@ -77,107 +78,112 @@ cognite/neat/graph/transformers/_base.py,sha256=b37Ek-9njuM5pTR_3XhnxCMrg_ip_2BM
|
|
|
77
78
|
cognite/neat/graph/transformers/_classic_cdf.py,sha256=6xX-OBSJT5DAQrTJ-nuhCfGNaSk5Iktxn-WIMfzEIqo,13189
|
|
78
79
|
cognite/neat/graph/transformers/_rdfpath.py,sha256=VLtGJvTPT5SWhV98fuGGt0pptTXfzOOQSNehypsPHug,1861
|
|
79
80
|
cognite/neat/issues/__init__.py,sha256=KkBEO-0Lg3vdvjrQtxKR6Wy2iV2mooc9utSO8-_9UuI,405
|
|
80
|
-
cognite/neat/issues/_base.py,sha256=
|
|
81
|
-
cognite/neat/issues/errors/__init__.py,sha256=
|
|
81
|
+
cognite/neat/issues/_base.py,sha256=g-_C2zIitewZLHQkV84aBRQJU2UnT_-pl98PFcfmNy0,15183
|
|
82
|
+
cognite/neat/issues/errors/__init__.py,sha256=t23ZnbWOZEhd77Ae_gpAxMPAIWOTbt7-wi6yeCmlGZE,2077
|
|
82
83
|
cognite/neat/issues/errors/_external.py,sha256=TUdihRyr5amdGSzSU49hWz7N7BSPCTVo7glKFNDrc5w,1583
|
|
83
|
-
cognite/neat/issues/errors/_general.py,sha256=
|
|
84
|
+
cognite/neat/issues/errors/_general.py,sha256=Dtt4kEfNyj-CxpowsVVrq2eAwWEzx68JpPnS48QoY2U,787
|
|
84
85
|
cognite/neat/issues/errors/_properties.py,sha256=7To9RvOyBzspZrs4jG3kAYJ3bzmMjDld_2lXDTWkUgM,2299
|
|
85
86
|
cognite/neat/issues/errors/_resources.py,sha256=SqzHY4Mtm-JEYSKZO8x4Mh7vOVWMV3nOEu1JrUVdjIc,3863
|
|
86
87
|
cognite/neat/issues/errors/_workflow.py,sha256=nC3sxqlJSyi-kmo2ZAfxEH23ZuNRMC-oBcwQcl_2hkU,950
|
|
87
88
|
cognite/neat/issues/formatters.py,sha256=QCk41VLlpq-R9uaHpINYceZkIUoI9m4pwSq_yWPOmr8,3331
|
|
88
|
-
cognite/neat/issues/warnings/__init__.py,sha256
|
|
89
|
+
cognite/neat/issues/warnings/__init__.py,sha256=-PVXhGHmzMa35heEbBaheJyOUxYX520anfJJRTyi_nA,2330
|
|
89
90
|
cognite/neat/issues/warnings/_external.py,sha256=pauqW4VjKnfflUiz7J8EXtTdpXxCuCcE-EuzvXlPJuI,953
|
|
90
91
|
cognite/neat/issues/warnings/_general.py,sha256=yLfooeTwq57LQPbvvVgMZDBZpyrnalXHlA6bu0lSqFg,601
|
|
91
|
-
cognite/neat/issues/warnings/_models.py,sha256=
|
|
92
|
-
cognite/neat/issues/warnings/_properties.py,sha256=
|
|
92
|
+
cognite/neat/issues/warnings/_models.py,sha256=HIhn5_hICqE0sFiosI7HiJnn3gyJPkQxOk1kXpAdG-E,3026
|
|
93
|
+
cognite/neat/issues/warnings/_properties.py,sha256=zIXT1sezgyPPZgvytavP8bRRR9_DgvVM_awiDD-pdjM,1940
|
|
93
94
|
cognite/neat/issues/warnings/_resources.py,sha256=RpmZ-KLEyTTckfAG9IvQVslq8yjN9NPS9Q_Oa6Y3ps8,1788
|
|
94
|
-
cognite/neat/issues/warnings/user_modeling.py,sha256=
|
|
95
|
+
cognite/neat/issues/warnings/user_modeling.py,sha256=RwslCYWLZzmoX7zX8O2Ha5pgghbhIOLQCZyev5CppO8,3602
|
|
95
96
|
cognite/neat/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
96
97
|
cognite/neat/rules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
97
|
-
cognite/neat/rules/_shared.py,sha256=
|
|
98
|
+
cognite/neat/rules/_shared.py,sha256=BsOCCy0Ut2eOwOi04K-jVjse2jHRmsFaGYJHQ1puegg,1762
|
|
98
99
|
cognite/neat/rules/analysis/__init__.py,sha256=1qQXgddwSmRjC5s22XfQhsn8XPYfwAV_2n6lqeWJmKc,141
|
|
99
100
|
cognite/neat/rules/analysis/_asset.py,sha256=SCiDatwDPi80jj41yQAp740irRWijMKEtAObkwKOKYs,7322
|
|
100
|
-
cognite/neat/rules/analysis/_base.py,sha256=
|
|
101
|
+
cognite/neat/rules/analysis/_base.py,sha256=Dn1tKwV0KZWvgXMsKeeI8F45cxojuSWLi5o24YLOE80,16764
|
|
101
102
|
cognite/neat/rules/analysis/_information.py,sha256=TU9QbhtyhPVYqAxR-9L5awevl9i3q7x1Y25D5xb_Ciw,8085
|
|
102
103
|
cognite/neat/rules/examples/__init__.py,sha256=nxIwueAcHgZhkYriGxnDLQmIyiT8PByPHbScjYKDKe0,374
|
|
103
104
|
cognite/neat/rules/examples/wind-energy.owl,sha256=NuomCA9FuuLF0JlSuG3OKqD4VBcHgSjDKFLV17G1zV8,65934
|
|
104
105
|
cognite/neat/rules/exporters/__init__.py,sha256=nRMUBUf7yr1QPjyITeX2rTLtLLawHv24hhRE39d2-e0,1109
|
|
105
|
-
cognite/neat/rules/exporters/_base.py,sha256=
|
|
106
|
-
cognite/neat/rules/exporters/_rules2dms.py,sha256=
|
|
107
|
-
cognite/neat/rules/exporters/_rules2excel.py,sha256=
|
|
108
|
-
cognite/neat/rules/exporters/_rules2ontology.py,sha256=
|
|
109
|
-
cognite/neat/rules/exporters/_rules2yaml.py,sha256=
|
|
106
|
+
cognite/neat/rules/exporters/_base.py,sha256=Er8G2DRNUtD1RbDOe9_c6H8cVwXbkTQzGfqof7J9OhA,1329
|
|
107
|
+
cognite/neat/rules/exporters/_rules2dms.py,sha256=UekIEl9m-ZHu7AjPr0yaDrAkE3AMJaTcL2dkYdE17Ko,14448
|
|
108
|
+
cognite/neat/rules/exporters/_rules2excel.py,sha256=aSxvCINP9wzrqeqI3DaS00BQibMhFEHcRH3Ka_QHoMY,14232
|
|
109
|
+
cognite/neat/rules/exporters/_rules2ontology.py,sha256=qrSY8se-AUABaJt_7NOH46Htoq6mXAEMO4eN3dCzvG8,21705
|
|
110
|
+
cognite/neat/rules/exporters/_rules2yaml.py,sha256=2yAkU3b4P4UYdsCyAZn5K2OwphnRXAl8ZwNek4EMfGU,2899
|
|
110
111
|
cognite/neat/rules/exporters/_validation.py,sha256=A0kyrIEu51ZXl47CXmO4ZOT0whO5iKNwMY-BwMc2scA,680
|
|
111
112
|
cognite/neat/rules/importers/__init__.py,sha256=z682_ktGKDjr52DIL6cPvOercZS6-TYD_ZDo-MGqtck,1207
|
|
112
|
-
cognite/neat/rules/importers/_base.py,sha256=
|
|
113
|
-
cognite/neat/rules/importers/_dms2rules.py,sha256=
|
|
113
|
+
cognite/neat/rules/importers/_base.py,sha256=G9apdRztiAdnzX3LyZ-SNaavXagvtta2BQXFqEOQw_g,2851
|
|
114
|
+
cognite/neat/rules/importers/_dms2rules.py,sha256=us8I9drw_lBCn-n5-9ZZ-RTvbn-bCPWMno08UO2klDg,22895
|
|
114
115
|
cognite/neat/rules/importers/_dtdl2rules/__init__.py,sha256=CNR-sUihs2mnR1bPMKs3j3L4ds3vFTsrl6YycExZTfU,68
|
|
115
116
|
cognite/neat/rules/importers/_dtdl2rules/_unit_lookup.py,sha256=wW4saKva61Q_i17guY0dc4OseJDQfqHy_QZBtm0OD6g,12134
|
|
116
|
-
cognite/neat/rules/importers/_dtdl2rules/dtdl_converter.py,sha256=
|
|
117
|
-
cognite/neat/rules/importers/_dtdl2rules/dtdl_importer.py,sha256=
|
|
117
|
+
cognite/neat/rules/importers/_dtdl2rules/dtdl_converter.py,sha256=WklOdKq1p-w-j3bloDGX-eJIltyD_1mwo4aZbKY9UG4,11904
|
|
118
|
+
cognite/neat/rules/importers/_dtdl2rules/dtdl_importer.py,sha256=q5gWB6sI9HugEBginsAehoaw8nm45iNgQlBBaT0wLM8,6144
|
|
118
119
|
cognite/neat/rules/importers/_dtdl2rules/spec.py,sha256=_uy-rO45Y-BJIp5p5dQVbVmjjVKYahkazJf-khVbT4E,12165
|
|
119
120
|
cognite/neat/rules/importers/_rdf/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
120
121
|
cognite/neat/rules/importers/_rdf/_imf2rules/__init__.py,sha256=4ZuX81E-Tp4Vf6g_6Pb0iStzOCy7RJ83yxhvo4UddXY,63
|
|
121
|
-
cognite/neat/rules/importers/_rdf/_imf2rules/_imf2classes.py,sha256=
|
|
122
|
-
cognite/neat/rules/importers/_rdf/_imf2rules/_imf2metadata.py,sha256=
|
|
123
|
-
cognite/neat/rules/importers/_rdf/_imf2rules/_imf2properties.py,sha256=
|
|
124
|
-
cognite/neat/rules/importers/_rdf/_imf2rules/_imf2rules.py,sha256=
|
|
125
|
-
cognite/neat/rules/importers/_rdf/_inference2rules.py,sha256=
|
|
122
|
+
cognite/neat/rules/importers/_rdf/_imf2rules/_imf2classes.py,sha256=bXlzybKhiCmhTs0PufOSRKXjQu-OkXlaVDidd-ZFdB8,3745
|
|
123
|
+
cognite/neat/rules/importers/_rdf/_imf2rules/_imf2metadata.py,sha256=AHRyyt25Av_MS4iWFw49MCabz49Ng1mDGyLKXufisFM,957
|
|
124
|
+
cognite/neat/rules/importers/_rdf/_imf2rules/_imf2properties.py,sha256=aF7Jy29Jo2hm8rybRDyBxoLGycOx3UsM6Gq-ztBF41Y,6170
|
|
125
|
+
cognite/neat/rules/importers/_rdf/_imf2rules/_imf2rules.py,sha256=YFLXYjzsKCGL4rxE8gllpJ1LKeVEkNwXscE3aCyxlYs,6289
|
|
126
|
+
cognite/neat/rules/importers/_rdf/_inference2rules.py,sha256=ArD7zwiSbU1YXxycJ03F3Zju26XNUbsHtsR9PtlH5N8,12663
|
|
126
127
|
cognite/neat/rules/importers/_rdf/_owl2rules/__init__.py,sha256=tdGcrgtozdQyST-pTlxIa4cLBNTLvtk1nNYR4vOdFSw,63
|
|
127
128
|
cognite/neat/rules/importers/_rdf/_owl2rules/_owl2classes.py,sha256=VLlr2UHAia0xWaeg3tKJ3N0sq_nYur3UqcOXgjMYxzg,1934
|
|
128
129
|
cognite/neat/rules/importers/_rdf/_owl2rules/_owl2metadata.py,sha256=3eTXm0irYJcjMV4H57xblP_iaNO_T0JErQuAYZfNaFA,2659
|
|
129
130
|
cognite/neat/rules/importers/_rdf/_owl2rules/_owl2properties.py,sha256=2nuhRr7ZEEAEN94IFRYwrt_T4WqmQUzOpqrNuji_Vi4,2145
|
|
130
|
-
cognite/neat/rules/importers/_rdf/_owl2rules/_owl2rules.py,sha256=
|
|
131
|
-
cognite/neat/rules/importers/_rdf/_shared.py,sha256=
|
|
132
|
-
cognite/neat/rules/importers/_spreadsheet2rules.py,sha256
|
|
133
|
-
cognite/neat/rules/importers/_yaml2rules.py,sha256=
|
|
134
|
-
cognite/neat/rules/models/__init__.py,sha256=
|
|
135
|
-
cognite/neat/rules/models/
|
|
136
|
-
cognite/neat/rules/models/
|
|
131
|
+
cognite/neat/rules/importers/_rdf/_owl2rules/_owl2rules.py,sha256=nH_hJGIEG9LKAjC7q5owggwGT40XLNiMctyxqN8u-dY,2510
|
|
132
|
+
cognite/neat/rules/importers/_rdf/_shared.py,sha256=qZuJm2LiB_eScbRkoTOL7Qf6CJQ124Dv2Kxylo-Rzts,19771
|
|
133
|
+
cognite/neat/rules/importers/_spreadsheet2rules.py,sha256=2GhBLEq6jyu2TbnX6MTlSx4LaWOdSfz213Lo45nTaM4,11036
|
|
134
|
+
cognite/neat/rules/importers/_yaml2rules.py,sha256=aap5Nso_7EBNrHtG4pt8tT4jNzCYUQz4twHdmqrGya8,3139
|
|
135
|
+
cognite/neat/rules/models/__init__.py,sha256=LlbugWml19SAewFRihYLW8v47zl_06cWvqX2F_R7KLw,1530
|
|
136
|
+
cognite/neat/rules/models/_base_input.py,sha256=xVgdtnXkoSncWc9wXr3yMl6ugVAUn1JpFoUOyMRNzuc,5865
|
|
137
|
+
cognite/neat/rules/models/_base_rules.py,sha256=hAOMx443i4jhsPKAECaepg8c1170IrpCZJ8mqMSJ8CI,10912
|
|
137
138
|
cognite/neat/rules/models/_rdfpath.py,sha256=oyMpmL_t0R5Uocdm3CA9iDLT2ZJVr2BIuz4cxaUlabM,11881
|
|
138
|
-
cognite/neat/rules/models/_types
|
|
139
|
-
cognite/neat/rules/models/
|
|
140
|
-
cognite/neat/rules/models/asset/
|
|
141
|
-
cognite/neat/rules/models/asset/
|
|
142
|
-
cognite/neat/rules/models/asset/_rules.py,sha256=eYV32f31RZPFfp0yEEMTiMU-RGF1IQDBvYZOr9_gDTI,5911
|
|
143
|
-
cognite/neat/rules/models/asset/_rules_input.py,sha256=LiT-85CVgDz2ng65CtrRa77r4rnmg3E4Q6DC7-gv0dE,6257
|
|
139
|
+
cognite/neat/rules/models/_types.py,sha256=VM40gfADOzw5UFy-olCBotComra0MsAafjyUlaIgFV8,2875
|
|
140
|
+
cognite/neat/rules/models/asset/__init__.py,sha256=Z2tQEABW-q66bmHNcxMuIxPmYQBcGdiSZt7fHGe01dQ,363
|
|
141
|
+
cognite/neat/rules/models/asset/_rules.py,sha256=NYQU2eXXIL2kyLk8RR0vsNamsycMk390o_UKUdsz9zE,5279
|
|
142
|
+
cognite/neat/rules/models/asset/_rules_input.py,sha256=2Skh7OVk2X5k7L62O8uZvLmpogJfQeYD7lZbzejEZRw,3375
|
|
144
143
|
cognite/neat/rules/models/asset/_serializer.py,sha256=ixqRf9qEzvChgysRaDX4g_vHVDtRBCsPYC9sOn0-ShE,3365
|
|
145
|
-
cognite/neat/rules/models/asset/_validation.py,sha256=
|
|
146
|
-
cognite/neat/rules/models/data_types.py,sha256=
|
|
147
|
-
cognite/neat/rules/models/dms/__init__.py,sha256=
|
|
148
|
-
cognite/neat/rules/models/dms/
|
|
149
|
-
cognite/neat/rules/models/dms/
|
|
150
|
-
cognite/neat/rules/models/dms/
|
|
151
|
-
cognite/neat/rules/models/dms/_rules_input.py,sha256=bGarQoDNZmBuSZh_l7ARsZH86_hVWmlX73GmyOI3zGE,13645
|
|
144
|
+
cognite/neat/rules/models/asset/_validation.py,sha256=3goorodISq_mlyXroaivcMOZ-QV8sd27IK9-iGKnQ28,2014
|
|
145
|
+
cognite/neat/rules/models/data_types.py,sha256=jTYsWqQPuvwHytInRU0Y2TGF4aVBF83v0vp_SH9KgLA,9722
|
|
146
|
+
cognite/neat/rules/models/dms/__init__.py,sha256=CUqUlVjz4yZX_-61F-2ofSoV7N9MlSYx2N7vM-omp7E,640
|
|
147
|
+
cognite/neat/rules/models/dms/_exporter.py,sha256=4XiFCeXZOZuj5Ke1E-_rQJvPIcyRl7lIb2dHCfkYS4M,28126
|
|
148
|
+
cognite/neat/rules/models/dms/_rules.py,sha256=iwCQx0MVQVe1R0bFIIdDD5unyuzQ7tIZDQM7NmdbJp8,14871
|
|
149
|
+
cognite/neat/rules/models/dms/_rules_input.py,sha256=v5-zlb4VJi5Q610rnPLU1aHKzXmGwoUTrDzAkJFfEQY,10911
|
|
152
150
|
cognite/neat/rules/models/dms/_schema.py,sha256=lc6Q0EUchOAUSTRiJnWc6UPBz7LjCW5NEvIGwNakcSI,50724
|
|
153
|
-
cognite/neat/rules/models/dms/_serializer.py,sha256=
|
|
154
|
-
cognite/neat/rules/models/dms/_validation.py,sha256=
|
|
155
|
-
cognite/neat/rules/models/domain.py,sha256=
|
|
156
|
-
cognite/neat/rules/models/entities.py,sha256=
|
|
157
|
-
cognite/neat/rules/models/
|
|
158
|
-
cognite/neat/rules/models/
|
|
159
|
-
cognite/neat/rules/models/
|
|
160
|
-
cognite/neat/rules/models/
|
|
151
|
+
cognite/neat/rules/models/dms/_serializer.py,sha256=2Cu9BSS5cNfOc-sUvIUc5da3vh5koKfoDcx4s_Tt-R4,8585
|
|
152
|
+
cognite/neat/rules/models/dms/_validation.py,sha256=lfEUs0l21t0UL6Jjk-7E1hTwrdUT48VsHrXAhOP0LzM,15822
|
|
153
|
+
cognite/neat/rules/models/domain.py,sha256=YtVb3JIkZfcA9qrMA-RapHMv-_Q40JtxrY1oLVOFev0,4298
|
|
154
|
+
cognite/neat/rules/models/entities/__init__.py,sha256=ORRN2bkgbotGKAzxU66ff5JrbWd9z6wCISjgICBpFdA,1501
|
|
155
|
+
cognite/neat/rules/models/entities/_constants.py,sha256=r_Knlqmmb6QFgiSS0Yb_9UrhwYnaSBCYy2Wt9gODLhw,2316
|
|
156
|
+
cognite/neat/rules/models/entities/_loaders.py,sha256=uzMRAULggTxrP3B27_78i6anui3br4Ck6o9vmctqxkk,2691
|
|
157
|
+
cognite/neat/rules/models/entities/_multi_value.py,sha256=3DejtsIWJOA96y9wZMhjDBP5lOxJH9l27YZUxr9JIEY,2060
|
|
158
|
+
cognite/neat/rules/models/entities/_single_value.py,sha256=7d4aGkIqLF9X43p_r1GIEIYxVYzlEnm8KwdkihXGtJs,16416
|
|
159
|
+
cognite/neat/rules/models/entities/_types.py,sha256=lilHNUyviUHuYHZOT0ogrCqAfEpA32M1VOzr_JwdhD8,2127
|
|
160
|
+
cognite/neat/rules/models/entities/_wrapped.py,sha256=FxC8HztW_tUUtuArAOwxyFfkdJnSEB4bgZoNmmmfiPk,7137
|
|
161
|
+
cognite/neat/rules/models/information/__init__.py,sha256=fVvgXt-JuyZCP_mLgIVaeKD9pdAXe2BWUxU_BZs8e5g,480
|
|
162
|
+
cognite/neat/rules/models/information/_rules.py,sha256=X-jKm1_c8ZwTrsSSS_RbF1jNlXm9dc38UIjQPk3WExQ,13051
|
|
163
|
+
cognite/neat/rules/models/information/_rules_input.py,sha256=wKBISvbJ5IsPhl72hsF4hmOiza8nqN-4tTczl-Mif-w,5274
|
|
161
164
|
cognite/neat/rules/models/information/_serializer.py,sha256=yti9I_xJruxrib66YIBInhze___Io-oPTQH6uWDumPE,3503
|
|
162
|
-
cognite/neat/rules/models/information/_validation.py,sha256=
|
|
163
|
-
cognite/neat/rules/
|
|
164
|
-
cognite/neat/rules/transformers/
|
|
165
|
-
cognite/neat/rules/transformers/
|
|
165
|
+
cognite/neat/rules/models/information/_validation.py,sha256=Fa5S-rQozSCkIDpS4dPQn7U0lM71DOecAMCqL8K8Uag,9230
|
|
166
|
+
cognite/neat/rules/transformers/__init__.py,sha256=Iun5-3uDmzUzcO4IFneJ453PWAx6F_c-5LhkvrIrSc0,666
|
|
167
|
+
cognite/neat/rules/transformers/_base.py,sha256=FABG_8Xg_LUZPwVLQmKvxlcIDtI5phGLpEGpxNcJWNM,3269
|
|
168
|
+
cognite/neat/rules/transformers/_converters.py,sha256=8qvgAbW4U7gcYEYkgFkrvOKE1P-PwNjg-nOIvOgbhnE,22763
|
|
169
|
+
cognite/neat/rules/transformers/_map_onto.py,sha256=eXPhontrcJdRm2ILopwkFoPcwfM8L-BNv-CapL30klg,4824
|
|
170
|
+
cognite/neat/rules/transformers/_pipelines.py,sha256=of3NJ4gsLeKr3NiTfBMQVl1J5b2IwI5JWm8FP7oQ3B4,2438
|
|
171
|
+
cognite/neat/rules/transformers/_verification.py,sha256=rPSeDKkpe-hCJ0iiBx6yycvSANwnCS78PUFTDYgmNcA,4448
|
|
166
172
|
cognite/neat/store/__init__.py,sha256=G-VG_YwfRt1kuPao07PDJyZ3w_0-eguzLUM13n-Z_RA,64
|
|
167
|
-
cognite/neat/store/_base.py,sha256=
|
|
168
|
-
cognite/neat/store/_provenance.py,sha256=
|
|
173
|
+
cognite/neat/store/_base.py,sha256=WcwVxRo7UpSNUJ221yq26_XtaeX6xW647qkf9xG8aK0,12471
|
|
174
|
+
cognite/neat/store/_provenance.py,sha256=sniVJhLmvj0ulKhoUZzFLwjAsp7cQyRPxunZtLmMW4A,3902
|
|
169
175
|
cognite/neat/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
170
176
|
cognite/neat/utils/auth.py,sha256=k0sEfTpK_bamMjAkj7jN6n9yta8TaqHTFkZUjUgpwik,12770
|
|
171
177
|
cognite/neat/utils/auxiliary.py,sha256=A--zKPcu9tdEjJDvIX_mFiTsYaMhOgo7PtBPQzeMkoc,5716
|
|
172
178
|
cognite/neat/utils/cdf/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
173
|
-
cognite/neat/utils/cdf/data_classes.py,sha256=
|
|
179
|
+
cognite/neat/utils/cdf/data_classes.py,sha256=XdPsHfmE3G-4o1AT_rNRiT916kWRoUpOMfgCyYjI0xU,10461
|
|
174
180
|
cognite/neat/utils/cdf/loaders/__init__.py,sha256=s2aPR5XLo6WZ0ybstAJlcGFYkA7CyHW1XO-NYpL0V6o,483
|
|
175
181
|
cognite/neat/utils/cdf/loaders/_base.py,sha256=ryNC_AMXIESWXuTVJ-02L-HSVSpD6V49XdLTRYeFg70,1764
|
|
176
182
|
cognite/neat/utils/cdf/loaders/_data_modeling.py,sha256=0jynnwZ7utnG2KIkVRJBNvDshUCzwX29LZuGSlm6qUM,13216
|
|
177
183
|
cognite/neat/utils/cdf/loaders/_ingestion.py,sha256=QbF4ntaGUum6yTRTq9WNg8n49TQpfzF1T7H-Bx740ws,6326
|
|
178
184
|
cognite/neat/utils/collection_.py,sha256=fX4eAMau5AsUs1Dm5PlzINxR64kUjncEEHeoL_JT9rU,582
|
|
179
185
|
cognite/neat/utils/rdf_.py,sha256=VXDBQUt86vRntiGhejK35PlsbvKCUkuQQa1cMYz4SIc,5656
|
|
180
|
-
cognite/neat/utils/regex_patterns.py,sha256=
|
|
186
|
+
cognite/neat/utils/regex_patterns.py,sha256=rXOBW9d-n_eAffm9zVRIPFB7ElLS8VDdsvFDsr01Q-M,2155
|
|
181
187
|
cognite/neat/utils/spreadsheet.py,sha256=LI0c7dlW0zXHkHw0NvB-gg6Df6cDcE3FbiaHBYLXdzQ,2714
|
|
182
188
|
cognite/neat/utils/text.py,sha256=PvTEsEjaTu8SE8yYaKUrce4msboMj933dK7-0Eey_rE,3652
|
|
183
189
|
cognite/neat/utils/time_.py,sha256=O30LUiDH9TdOYz8_a9pFqTtJdg8vEjC3qHCk8xZblG8,345
|
|
@@ -201,8 +207,8 @@ cognite/neat/workflows/steps/lib/current/__init__.py,sha256=c22IznGdCSNCpXCi_yon
|
|
|
201
207
|
cognite/neat/workflows/steps/lib/current/graph_extractor.py,sha256=VHZpeo-QB_qSJu2QuU9uISFgw8LgQGeMVvSc1KORw3c,4738
|
|
202
208
|
cognite/neat/workflows/steps/lib/current/graph_loader.py,sha256=4FxE7A0ZCSwGmVP-dcWISwupBQo6TZzUr_1GMQ0klIM,1689
|
|
203
209
|
cognite/neat/workflows/steps/lib/current/graph_store.py,sha256=UydcYMoF2d2m8gOKAtlul8yCfKS3jFJJCTF2psM2flg,1582
|
|
204
|
-
cognite/neat/workflows/steps/lib/current/rules_exporter.py,sha256=
|
|
205
|
-
cognite/neat/workflows/steps/lib/current/rules_importer.py,sha256=
|
|
210
|
+
cognite/neat/workflows/steps/lib/current/rules_exporter.py,sha256=qLMlB3MqTZhD5q9A8YypksUQ7kOhwi6qGnNXdky_G9w,27752
|
|
211
|
+
cognite/neat/workflows/steps/lib/current/rules_importer.py,sha256=ytyIDg9_2AZWxMvH1rE044QI8jab5kdHNR-FKyKBaXE,17978
|
|
206
212
|
cognite/neat/workflows/steps/lib/current/rules_validator.py,sha256=phHSwyZzWQ0QK-2CFKUmFCQJU5lrWuZjmaDJUH8UYVg,5046
|
|
207
213
|
cognite/neat/workflows/steps/lib/io/__init__.py,sha256=k7IPbIq3ey19oRc5sA_15F99-O6dxzqbm1LihGRRo5A,32
|
|
208
214
|
cognite/neat/workflows/steps/lib/io/io_steps.py,sha256=N4d5lCh7UwBlVj-jL3RQEVA-NznfCUfT19Oh7kDIko0,16931
|
|
@@ -211,8 +217,8 @@ cognite/neat/workflows/steps_registry.py,sha256=FjMsFBlFFy82ABUzDnWoFidYODV3pp3c
|
|
|
211
217
|
cognite/neat/workflows/tasks.py,sha256=dqlJwKAb0jlkl7abbY8RRz3m7MT4SK8-7cntMWkOYjw,788
|
|
212
218
|
cognite/neat/workflows/triggers.py,sha256=_BLNplzoz0iic367u1mhHMHiUrCwP-SLK6_CZzfODX0,7071
|
|
213
219
|
cognite/neat/workflows/utils.py,sha256=gKdy3RLG7ctRhbCRwaDIWpL9Mi98zm56-d4jfHDqP1E,453
|
|
214
|
-
cognite_neat-0.
|
|
215
|
-
cognite_neat-0.
|
|
216
|
-
cognite_neat-0.
|
|
217
|
-
cognite_neat-0.
|
|
218
|
-
cognite_neat-0.
|
|
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,,
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
from ._field import (
|
|
2
|
-
ExternalIdType,
|
|
3
|
-
NamespaceType,
|
|
4
|
-
PrefixType,
|
|
5
|
-
PropertyType,
|
|
6
|
-
StrListType,
|
|
7
|
-
StrOrListType,
|
|
8
|
-
VersionType,
|
|
9
|
-
)
|
|
10
|
-
|
|
11
|
-
__all__ = [
|
|
12
|
-
"StrOrListType",
|
|
13
|
-
"StrListType",
|
|
14
|
-
"NamespaceType",
|
|
15
|
-
"PrefixType",
|
|
16
|
-
"ExternalIdType",
|
|
17
|
-
"VersionType",
|
|
18
|
-
"PropertyType",
|
|
19
|
-
]
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import warnings
|
|
2
|
-
from typing import TYPE_CHECKING, cast
|
|
3
|
-
|
|
4
|
-
from rdflib import Namespace
|
|
5
|
-
|
|
6
|
-
from cognite.neat.issues.warnings.user_modeling import ParentInDifferentSpaceWarning
|
|
7
|
-
from cognite.neat.rules.models._base import SheetList
|
|
8
|
-
from cognite.neat.rules.models.data_types import DataType
|
|
9
|
-
from cognite.neat.rules.models.domain import DomainRules
|
|
10
|
-
from cognite.neat.rules.models.entities import (
|
|
11
|
-
ClassEntity,
|
|
12
|
-
ContainerEntity,
|
|
13
|
-
DMSUnknownEntity,
|
|
14
|
-
ReferenceEntity,
|
|
15
|
-
UnknownEntity,
|
|
16
|
-
ViewEntity,
|
|
17
|
-
ViewPropertyEntity,
|
|
18
|
-
)
|
|
19
|
-
from cognite.neat.rules.models.information._rules import InformationRules
|
|
20
|
-
|
|
21
|
-
from ._rules import DMSMetadata, DMSProperty, DMSRules, DMSView
|
|
22
|
-
|
|
23
|
-
if TYPE_CHECKING:
|
|
24
|
-
from cognite.neat.rules.models.information._rules import InformationMetadata
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
class _DMSRulesConverter:
|
|
28
|
-
def __init__(self, dms: DMSRules):
|
|
29
|
-
self.dms = dms
|
|
30
|
-
|
|
31
|
-
def as_domain_rules(self) -> "DomainRules":
|
|
32
|
-
raise NotImplementedError("DomainRules not implemented yet")
|
|
33
|
-
|
|
34
|
-
def as_information_rules(
|
|
35
|
-
self,
|
|
36
|
-
) -> "InformationRules":
|
|
37
|
-
from cognite.neat.rules.models.information._rules import (
|
|
38
|
-
InformationClass,
|
|
39
|
-
InformationProperty,
|
|
40
|
-
InformationRules,
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
dms = self.dms.metadata
|
|
44
|
-
|
|
45
|
-
metadata = self._convert_metadata_to_info(dms)
|
|
46
|
-
|
|
47
|
-
classes = [
|
|
48
|
-
InformationClass(
|
|
49
|
-
# we do not want a version in class as we use URI for the class
|
|
50
|
-
class_=ClassEntity(prefix=view.class_.prefix, suffix=view.class_.suffix),
|
|
51
|
-
description=view.description,
|
|
52
|
-
parent=[
|
|
53
|
-
# we do not want a version in class as we use URI for the class
|
|
54
|
-
implemented_view.as_class(skip_version=True)
|
|
55
|
-
# We only want parents in the same namespace, parent in a different namespace is a reference
|
|
56
|
-
for implemented_view in view.implements or []
|
|
57
|
-
if implemented_view.prefix == view.class_.prefix
|
|
58
|
-
],
|
|
59
|
-
reference=self._get_class_reference(view),
|
|
60
|
-
)
|
|
61
|
-
for view in self.dms.views
|
|
62
|
-
]
|
|
63
|
-
|
|
64
|
-
properties: list[InformationProperty] = []
|
|
65
|
-
value_type: DataType | ClassEntity | str
|
|
66
|
-
for property_ in self.dms.properties:
|
|
67
|
-
if isinstance(property_.value_type, DataType):
|
|
68
|
-
value_type = property_.value_type
|
|
69
|
-
elif isinstance(property_.value_type, ViewEntity | ViewPropertyEntity):
|
|
70
|
-
value_type = ClassEntity(
|
|
71
|
-
prefix=property_.value_type.prefix,
|
|
72
|
-
suffix=property_.value_type.suffix,
|
|
73
|
-
)
|
|
74
|
-
elif isinstance(property_.value_type, DMSUnknownEntity):
|
|
75
|
-
value_type = UnknownEntity()
|
|
76
|
-
else:
|
|
77
|
-
raise ValueError(f"Unsupported value type: {property_.value_type.type_}")
|
|
78
|
-
|
|
79
|
-
properties.append(
|
|
80
|
-
InformationProperty(
|
|
81
|
-
# Removing version
|
|
82
|
-
class_=ClassEntity(suffix=property_.class_.suffix, prefix=property_.class_.prefix),
|
|
83
|
-
property_=property_.view_property,
|
|
84
|
-
value_type=value_type,
|
|
85
|
-
description=property_.description,
|
|
86
|
-
min_count=0 if property_.nullable or property_.nullable is None else 1,
|
|
87
|
-
max_count=float("inf") if property_.is_list or property_.nullable is None else 1,
|
|
88
|
-
reference=self._get_property_reference(property_),
|
|
89
|
-
)
|
|
90
|
-
)
|
|
91
|
-
|
|
92
|
-
return InformationRules(
|
|
93
|
-
metadata=metadata,
|
|
94
|
-
properties=SheetList[InformationProperty](data=properties),
|
|
95
|
-
classes=SheetList[InformationClass](data=classes),
|
|
96
|
-
last=self.dms.last.as_information_rules() if self.dms.last else None,
|
|
97
|
-
reference=self.dms.reference.as_information_rules() if self.dms.reference else None,
|
|
98
|
-
)
|
|
99
|
-
|
|
100
|
-
@classmethod
|
|
101
|
-
def _convert_metadata_to_info(cls, metadata: DMSMetadata) -> "InformationMetadata":
|
|
102
|
-
from cognite.neat.rules.models.information._rules import InformationMetadata
|
|
103
|
-
|
|
104
|
-
prefix = metadata.space
|
|
105
|
-
return InformationMetadata(
|
|
106
|
-
schema_=metadata.schema_,
|
|
107
|
-
data_model_type=metadata.data_model_type,
|
|
108
|
-
extension=metadata.extension,
|
|
109
|
-
prefix=prefix,
|
|
110
|
-
namespace=Namespace(f"https://purl.orgl/neat/{prefix}/"),
|
|
111
|
-
version=metadata.version,
|
|
112
|
-
description=metadata.description,
|
|
113
|
-
name=metadata.name or metadata.external_id,
|
|
114
|
-
creator=metadata.creator,
|
|
115
|
-
created=metadata.created,
|
|
116
|
-
updated=metadata.updated,
|
|
117
|
-
)
|
|
118
|
-
|
|
119
|
-
@classmethod
|
|
120
|
-
def _get_class_reference(cls, view: DMSView) -> ReferenceEntity | None:
|
|
121
|
-
parents_other_namespace = [parent for parent in view.implements or [] if parent.prefix != view.class_.prefix]
|
|
122
|
-
if len(parents_other_namespace) == 0:
|
|
123
|
-
return None
|
|
124
|
-
if len(parents_other_namespace) > 1:
|
|
125
|
-
warnings.warn(
|
|
126
|
-
ParentInDifferentSpaceWarning(view.view.as_id()),
|
|
127
|
-
stacklevel=2,
|
|
128
|
-
)
|
|
129
|
-
other_parent = parents_other_namespace[0]
|
|
130
|
-
|
|
131
|
-
return ReferenceEntity(prefix=other_parent.prefix, suffix=other_parent.suffix)
|
|
132
|
-
|
|
133
|
-
@classmethod
|
|
134
|
-
def _get_property_reference(cls, property_: DMSProperty) -> ReferenceEntity | None:
|
|
135
|
-
has_container_other_namespace = property_.container and property_.container.prefix != property_.class_.prefix
|
|
136
|
-
if not has_container_other_namespace:
|
|
137
|
-
return None
|
|
138
|
-
container = cast(ContainerEntity, property_.container)
|
|
139
|
-
return ReferenceEntity(
|
|
140
|
-
prefix=container.prefix,
|
|
141
|
-
suffix=container.suffix,
|
|
142
|
-
property=property_.container_property,
|
|
143
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|