cognite-neat 0.87.6__py3-none-any.whl → 0.88.1__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/app/api/data_classes/rest.py +0 -19
- cognite/neat/app/api/explorer.py +6 -4
- cognite/neat/app/api/routers/configuration.py +1 -1
- cognite/neat/app/api/routers/crud.py +11 -21
- cognite/neat/app/api/routers/workflows.py +24 -94
- cognite/neat/app/ui/neat-app/build/asset-manifest.json +7 -7
- cognite/neat/app/ui/neat-app/build/index.html +1 -1
- cognite/neat/app/ui/neat-app/build/static/css/{main.38a62222.css → main.72e3d92e.css} +2 -2
- cognite/neat/app/ui/neat-app/build/static/css/main.72e3d92e.css.map +1 -0
- cognite/neat/app/ui/neat-app/build/static/js/main.5a52cf09.js +3 -0
- cognite/neat/app/ui/neat-app/build/static/js/{main.ec7f72e2.js.LICENSE.txt → main.5a52cf09.js.LICENSE.txt} +0 -9
- cognite/neat/app/ui/neat-app/build/static/js/main.5a52cf09.js.map +1 -0
- cognite/neat/config.py +44 -27
- cognite/neat/exceptions.py +6 -0
- cognite/neat/graph/extractors/_classic_cdf/_assets.py +21 -73
- cognite/neat/graph/extractors/_classic_cdf/_base.py +102 -0
- cognite/neat/graph/extractors/_classic_cdf/_events.py +46 -42
- cognite/neat/graph/extractors/_classic_cdf/_files.py +41 -45
- cognite/neat/graph/extractors/_classic_cdf/_labels.py +75 -52
- cognite/neat/graph/extractors/_classic_cdf/_relationships.py +49 -27
- cognite/neat/graph/extractors/_classic_cdf/_sequences.py +47 -50
- cognite/neat/graph/extractors/_classic_cdf/_timeseries.py +47 -49
- cognite/neat/graph/queries/_base.py +22 -29
- cognite/neat/graph/queries/_shared.py +1 -1
- cognite/neat/graph/stores/_base.py +24 -11
- cognite/neat/graph/transformers/_rdfpath.py +3 -2
- cognite/neat/issues.py +8 -0
- cognite/neat/rules/exporters/_rules2ontology.py +28 -20
- cognite/neat/rules/exporters/_validation.py +15 -21
- cognite/neat/rules/importers/_inference2rules.py +31 -35
- cognite/neat/rules/importers/_owl2rules/_owl2metadata.py +3 -7
- cognite/neat/rules/importers/_spreadsheet2rules.py +30 -27
- cognite/neat/rules/issues/dms.py +20 -0
- cognite/neat/rules/issues/importing.py +15 -0
- cognite/neat/rules/issues/ontology.py +298 -0
- cognite/neat/rules/issues/spreadsheet.py +48 -0
- cognite/neat/rules/issues/tables.py +72 -0
- cognite/neat/rules/models/_rdfpath.py +4 -4
- cognite/neat/rules/models/_types/_field.py +9 -19
- cognite/neat/rules/models/information/_rules.py +5 -4
- cognite/neat/utils/rdf_.py +17 -9
- cognite/neat/utils/regex_patterns.py +52 -0
- cognite/neat/workflows/steps/data_contracts.py +17 -43
- cognite/neat/workflows/steps/lib/current/graph_extractor.py +28 -24
- cognite/neat/workflows/steps/lib/current/graph_loader.py +4 -21
- cognite/neat/workflows/steps/lib/current/graph_store.py +18 -134
- cognite/neat/workflows/steps_registry.py +5 -7
- {cognite_neat-0.87.6.dist-info → cognite_neat-0.88.1.dist-info}/METADATA +2 -6
- cognite_neat-0.88.1.dist-info/RECORD +209 -0
- cognite/neat/app/api/routers/core.py +0 -91
- cognite/neat/app/api/routers/data_exploration.py +0 -336
- cognite/neat/app/api/routers/rules.py +0 -203
- cognite/neat/app/ui/neat-app/build/static/css/main.38a62222.css.map +0 -1
- cognite/neat/app/ui/neat-app/build/static/js/main.ec7f72e2.js +0 -3
- cognite/neat/app/ui/neat-app/build/static/js/main.ec7f72e2.js.map +0 -1
- cognite/neat/graph/stores/_oxrdflib.py +0 -247
- cognite/neat/legacy/__init__.py +0 -0
- cognite/neat/legacy/graph/__init__.py +0 -3
- cognite/neat/legacy/graph/examples/Knowledge-Graph-Nordic44-dirty.xml +0 -20182
- cognite/neat/legacy/graph/examples/Knowledge-Graph-Nordic44.xml +0 -20163
- cognite/neat/legacy/graph/examples/__init__.py +0 -10
- cognite/neat/legacy/graph/examples/skos-capturing-sheet-wind-topics.xlsx +0 -0
- cognite/neat/legacy/graph/exceptions.py +0 -90
- cognite/neat/legacy/graph/extractors/__init__.py +0 -6
- cognite/neat/legacy/graph/extractors/_base.py +0 -14
- cognite/neat/legacy/graph/extractors/_dexpi.py +0 -44
- cognite/neat/legacy/graph/extractors/_graph_capturing_sheet.py +0 -403
- cognite/neat/legacy/graph/extractors/_mock_graph_generator.py +0 -361
- cognite/neat/legacy/graph/loaders/__init__.py +0 -23
- cognite/neat/legacy/graph/loaders/_asset_loader.py +0 -511
- cognite/neat/legacy/graph/loaders/_base.py +0 -67
- cognite/neat/legacy/graph/loaders/_exceptions.py +0 -85
- cognite/neat/legacy/graph/loaders/core/__init__.py +0 -0
- cognite/neat/legacy/graph/loaders/core/labels.py +0 -58
- cognite/neat/legacy/graph/loaders/core/models.py +0 -136
- cognite/neat/legacy/graph/loaders/core/rdf_to_assets.py +0 -1046
- cognite/neat/legacy/graph/loaders/core/rdf_to_relationships.py +0 -559
- cognite/neat/legacy/graph/loaders/rdf_to_dms.py +0 -309
- cognite/neat/legacy/graph/loaders/validator.py +0 -87
- cognite/neat/legacy/graph/models.py +0 -6
- cognite/neat/legacy/graph/stores/__init__.py +0 -13
- cognite/neat/legacy/graph/stores/_base.py +0 -400
- cognite/neat/legacy/graph/stores/_graphdb_store.py +0 -52
- cognite/neat/legacy/graph/stores/_memory_store.py +0 -43
- cognite/neat/legacy/graph/stores/_oxigraph_store.py +0 -151
- cognite/neat/legacy/graph/stores/_oxrdflib.py +0 -247
- cognite/neat/legacy/graph/stores/_rdf_to_graph.py +0 -42
- cognite/neat/legacy/graph/transformations/__init__.py +0 -0
- cognite/neat/legacy/graph/transformations/entity_matcher.py +0 -101
- cognite/neat/legacy/graph/transformations/query_generator/__init__.py +0 -3
- cognite/neat/legacy/graph/transformations/query_generator/sparql.py +0 -575
- cognite/neat/legacy/graph/transformations/transformer.py +0 -322
- cognite/neat/legacy/rules/__init__.py +0 -0
- cognite/neat/legacy/rules/analysis.py +0 -231
- cognite/neat/legacy/rules/examples/Rules-Nordic44-to-graphql.xlsx +0 -0
- cognite/neat/legacy/rules/examples/Rules-Nordic44.xlsx +0 -0
- cognite/neat/legacy/rules/examples/__init__.py +0 -18
- cognite/neat/legacy/rules/examples/power-grid-containers.yaml +0 -124
- cognite/neat/legacy/rules/examples/power-grid-example.xlsx +0 -0
- cognite/neat/legacy/rules/examples/power-grid-model.yaml +0 -224
- cognite/neat/legacy/rules/examples/rules-template.xlsx +0 -0
- cognite/neat/legacy/rules/examples/sheet2cdf-transformation-rules.xlsx +0 -0
- cognite/neat/legacy/rules/examples/skos-rules.xlsx +0 -0
- cognite/neat/legacy/rules/examples/source-to-solution-mapping-rules.xlsx +0 -0
- cognite/neat/legacy/rules/examples/wind-energy.owl +0 -1511
- cognite/neat/legacy/rules/exceptions.py +0 -2972
- cognite/neat/legacy/rules/exporters/__init__.py +0 -20
- cognite/neat/legacy/rules/exporters/_base.py +0 -45
- cognite/neat/legacy/rules/exporters/_core/__init__.py +0 -5
- cognite/neat/legacy/rules/exporters/_core/rules2labels.py +0 -24
- cognite/neat/legacy/rules/exporters/_rules2dms.py +0 -885
- cognite/neat/legacy/rules/exporters/_rules2excel.py +0 -213
- cognite/neat/legacy/rules/exporters/_rules2graphql.py +0 -183
- cognite/neat/legacy/rules/exporters/_rules2ontology.py +0 -524
- cognite/neat/legacy/rules/exporters/_rules2pydantic_models.py +0 -748
- cognite/neat/legacy/rules/exporters/_rules2rules.py +0 -105
- cognite/neat/legacy/rules/exporters/_rules2triples.py +0 -38
- cognite/neat/legacy/rules/exporters/_validation.py +0 -146
- cognite/neat/legacy/rules/importers/__init__.py +0 -22
- cognite/neat/legacy/rules/importers/_base.py +0 -66
- cognite/neat/legacy/rules/importers/_dict2rules.py +0 -158
- cognite/neat/legacy/rules/importers/_dms2rules.py +0 -194
- cognite/neat/legacy/rules/importers/_graph2rules.py +0 -308
- cognite/neat/legacy/rules/importers/_json2rules.py +0 -39
- cognite/neat/legacy/rules/importers/_owl2rules/__init__.py +0 -3
- cognite/neat/legacy/rules/importers/_owl2rules/_owl2classes.py +0 -239
- cognite/neat/legacy/rules/importers/_owl2rules/_owl2metadata.py +0 -260
- cognite/neat/legacy/rules/importers/_owl2rules/_owl2properties.py +0 -217
- cognite/neat/legacy/rules/importers/_owl2rules/_owl2rules.py +0 -290
- cognite/neat/legacy/rules/importers/_spreadsheet2rules.py +0 -45
- cognite/neat/legacy/rules/importers/_xsd2rules.py +0 -20
- cognite/neat/legacy/rules/importers/_yaml2rules.py +0 -39
- cognite/neat/legacy/rules/models/__init__.py +0 -5
- cognite/neat/legacy/rules/models/_base.py +0 -151
- cognite/neat/legacy/rules/models/raw_rules.py +0 -316
- cognite/neat/legacy/rules/models/rdfpath.py +0 -237
- cognite/neat/legacy/rules/models/rules.py +0 -1289
- cognite/neat/legacy/rules/models/tables.py +0 -9
- cognite/neat/legacy/rules/models/value_types.py +0 -118
- cognite/neat/legacy/workflows/examples/Export_DMS/workflow.yaml +0 -89
- cognite/neat/legacy/workflows/examples/Export_Rules_to_Ontology/workflow.yaml +0 -152
- cognite/neat/legacy/workflows/examples/Extract_DEXPI_Graph_and_Export_Rules/workflow.yaml +0 -139
- cognite/neat/legacy/workflows/examples/Extract_RDF_Graph_and_Generate_Assets/workflow.yaml +0 -270
- cognite/neat/legacy/workflows/examples/Import_DMS/workflow.yaml +0 -65
- cognite/neat/legacy/workflows/examples/Ontology_to_Data_Model/workflow.yaml +0 -116
- cognite/neat/legacy/workflows/examples/Validate_Rules/workflow.yaml +0 -67
- cognite/neat/legacy/workflows/examples/Validate_Solution_Model/workflow.yaml +0 -64
- cognite/neat/legacy/workflows/examples/Visualize_Data_Model_Using_Mock_Graph/workflow.yaml +0 -95
- cognite/neat/legacy/workflows/examples/Visualize_Semantic_Data_Model/workflow.yaml +0 -111
- cognite/neat/rules/exceptions.py +0 -2972
- cognite/neat/rules/models/_types/_base.py +0 -16
- cognite/neat/workflows/examples/Export_Rules_to_Ontology/workflow.yaml +0 -152
- cognite/neat/workflows/examples/Extract_DEXPI_Graph_and_Export_Rules/workflow.yaml +0 -139
- cognite/neat/workflows/examples/Extract_RDF_Graph_and_Generate_Assets/workflow.yaml +0 -270
- cognite/neat/workflows/examples/Ontology_to_Data_Model/workflow.yaml +0 -116
- cognite/neat/workflows/migration/__init__.py +0 -0
- cognite/neat/workflows/migration/steps.py +0 -91
- cognite/neat/workflows/migration/wf_manifests.py +0 -33
- cognite/neat/workflows/steps/lib/legacy/__init__.py +0 -7
- cognite/neat/workflows/steps/lib/legacy/graph_contextualization.py +0 -82
- cognite/neat/workflows/steps/lib/legacy/graph_extractor.py +0 -746
- cognite/neat/workflows/steps/lib/legacy/graph_loader.py +0 -606
- cognite/neat/workflows/steps/lib/legacy/graph_store.py +0 -307
- cognite/neat/workflows/steps/lib/legacy/graph_transformer.py +0 -58
- cognite/neat/workflows/steps/lib/legacy/rules_exporter.py +0 -511
- cognite/neat/workflows/steps/lib/legacy/rules_importer.py +0 -612
- cognite_neat-0.87.6.dist-info/RECORD +0 -319
- {cognite_neat-0.87.6.dist-info → cognite_neat-0.88.1.dist-info}/LICENSE +0 -0
- {cognite_neat-0.87.6.dist-info → cognite_neat-0.88.1.dist-info}/WHEEL +0 -0
- {cognite_neat-0.87.6.dist-info → cognite_neat-0.88.1.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
cognite/neat/__init__.py,sha256=AiexNcHdAHFbrrbo9c65gtil1dqx_SGraDH1PSsXjKE,126
|
|
2
|
+
cognite/neat/_shared.py,sha256=RSaHm2eJceTlvb-hMMe4nHgoHdPYDfN3XcxDXo24k3A,1530
|
|
3
|
+
cognite/neat/_version.py,sha256=P5XVwIB6U8pfC7hf7GpFogFzmSGJkNu4O3TQwDhTFHk,23
|
|
4
|
+
cognite/neat/app/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
+
cognite/neat/app/api/asgi/metrics.py,sha256=nxFy7L5cChTI0a-zkCiJ59Aq8yLuIJp5c9Dg0wRXtV0,152
|
|
6
|
+
cognite/neat/app/api/configuration.py,sha256=L1DCtLZ1HZku8I2z-JWd5RDsXhIsboFsKwAMhkrm-bY,3600
|
|
7
|
+
cognite/neat/app/api/context_manager/__init__.py,sha256=2Wgf2S-Y44Z9Lbnml9e3X030H97ghbfTOrRxAUtrXaA,90
|
|
8
|
+
cognite/neat/app/api/context_manager/manager.py,sha256=cVwFua80PXXM5k7nOHbynmywr_zcpcZh_NDLVmjpDwY,380
|
|
9
|
+
cognite/neat/app/api/data_classes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
+
cognite/neat/app/api/data_classes/rest.py,sha256=axMBDGcYkR-W-_XhPRNVQdwDJ-EyZJ_zg62GK8WxIZ4,1299
|
|
11
|
+
cognite/neat/app/api/explorer.py,sha256=m1MUbe7WLZmAUWeVa1ITiyhHIPJCb3a3bKVqoM4Xj3w,1772
|
|
12
|
+
cognite/neat/app/api/routers/configuration.py,sha256=LyIeXK7129ayOx9tVeEjWE82B8vfTLqMcf73Lv8T91Y,597
|
|
13
|
+
cognite/neat/app/api/routers/crud.py,sha256=a9ukRgVmH5SOIIJFpAOivlyUTJ79g5f9f493bzvHI_w,3944
|
|
14
|
+
cognite/neat/app/api/routers/metrics.py,sha256=S_bUQk_GjfQq7WbEhSVdow4MUYBZ_bZNafzgcKogXK8,210
|
|
15
|
+
cognite/neat/app/api/routers/workflows.py,sha256=eE3jqeK0WXtNE3XVJ9ZEGF147qRpOkEpSvDIByGnrVk,8873
|
|
16
|
+
cognite/neat/app/api/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
|
+
cognite/neat/app/api/utils/data_mapping.py,sha256=ocqRyeCLbk3gS1NrQQnDr0w-q-xbkqV60uLZzsJIdyE,564
|
|
18
|
+
cognite/neat/app/api/utils/logging.py,sha256=WNmwcUOS0RRT_szeVwwu5CZ1dainx8iVXuVdtWT0n-M,806
|
|
19
|
+
cognite/neat/app/api/utils/query_templates.py,sha256=ykeZhelLItwqpMR2INSNp5h3FhLnloDbvT51bBxpjmY,4594
|
|
20
|
+
cognite/neat/app/main.py,sha256=oVJgkYu53tVA3C6eJHpixrO3sa2HquV_twck0dx6i9Y,357
|
|
21
|
+
cognite/neat/app/monitoring/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
|
+
cognite/neat/app/monitoring/metrics.py,sha256=GKNoYEmnQc43FrXNaBC6myQugObxRXrUd6jgqLJlyP0,2690
|
|
23
|
+
cognite/neat/app/ui/index.html,sha256=PQtvXjCd-PzogV-QjdaCGwSWz0PNn7T_fqnAznR3CCY,16
|
|
24
|
+
cognite/neat/app/ui/neat-app/.gitignore,sha256=iRXaC85HOaGaxS3OQR8uYGM0ShdU4CpGHR26ThRHUww,312
|
|
25
|
+
cognite/neat/app/ui/neat-app/README.md,sha256=cOr7x6X9RmqjITtafhsqQTg8vl1Ob8X0WC78WL21CdE,3359
|
|
26
|
+
cognite/neat/app/ui/neat-app/build/asset-manifest.json,sha256=2bhLuwjqn5PVW0KAf15cEfp3zNFAzZVVcizRZxokVvk,463
|
|
27
|
+
cognite/neat/app/ui/neat-app/build/favicon.ico,sha256=_Bw_morVrDlSHlMFOCjAzaJV1oM0sOLG6djD8HmP9VI,15406
|
|
28
|
+
cognite/neat/app/ui/neat-app/build/img/architect-icon.svg,sha256=HDoJmSO2ayVvxDk6R6-d42TwytbGlXMPWm_J2qFjmDA,10756
|
|
29
|
+
cognite/neat/app/ui/neat-app/build/img/developer-icon.svg,sha256=VeVFw2Pj97D4FPei6YLUJbVqJJKY24RzfF83UWUiujE,8374
|
|
30
|
+
cognite/neat/app/ui/neat-app/build/img/sme-icon.svg,sha256=z9MJYUNpWnjW4sIf_C0GkbMTfP1EBixIhX4a72s4888,5333
|
|
31
|
+
cognite/neat/app/ui/neat-app/build/index.html,sha256=zZeliqzRS8zJk5VA4ev_1LJyi-RmTdlNZ1PuDR-X_G0,628
|
|
32
|
+
cognite/neat/app/ui/neat-app/build/logo192.png,sha256=RvR_LqdUJTCcGEshzFi21taYa6RVtLbg5HVzvoURd3I,344557
|
|
33
|
+
cognite/neat/app/ui/neat-app/build/manifest.json,sha256=ULPYw5A68_eNhxuUVXqxT045yhkurKPSz6hjyGcnmhQ,492
|
|
34
|
+
cognite/neat/app/ui/neat-app/build/robots.txt,sha256=kNJLw79pisHhc3OVAimMzKcq3x9WT6sF9IS4xI0crdI,67
|
|
35
|
+
cognite/neat/app/ui/neat-app/build/static/css/main.72e3d92e.css,sha256=SS8E_b4N1ayPHBsmNLAVf_VpFVpo4u2Xgmvq39awN1M,5743
|
|
36
|
+
cognite/neat/app/ui/neat-app/build/static/css/main.72e3d92e.css.map,sha256=UCwPS3x4W1FET7XOTEKibp-aIpTklhq1NdWBfxKmw74,9689
|
|
37
|
+
cognite/neat/app/ui/neat-app/build/static/js/main.5a52cf09.js,sha256=smnlEqWQMDt0wRRv2DCOilBzsZgWSd3OKQkyoXMt-m8,758028
|
|
38
|
+
cognite/neat/app/ui/neat-app/build/static/js/main.5a52cf09.js.LICENSE.txt,sha256=M2qsmls4n4vaE1yB1m25JNt71IMv-VrlgyImZiTZVNE,2330
|
|
39
|
+
cognite/neat/app/ui/neat-app/build/static/js/main.5a52cf09.js.map,sha256=Lf93Q5-M2-Yc8NTq59fJ7floyiT9f-ayFYFKDvnVZqU,3161888
|
|
40
|
+
cognite/neat/app/ui/neat-app/build/static/media/logo.8093b84df9ed36a174c629d6fe0b730d.svg,sha256=EYf9q9JoVJ1L1np-XloeEZXCmaibzKmmpXCKn_44xzA,240334
|
|
41
|
+
cognite/neat/config.py,sha256=MbYOvlibOjODEPcCHNKwZHVjg9ft8kZSojnW4gQCiHQ,10116
|
|
42
|
+
cognite/neat/constants.py,sha256=kuAOxPWvv4RzBISgNGoeyEXrt4B_VgMfxexDIOUEdMA,877
|
|
43
|
+
cognite/neat/exceptions.py,sha256=ltg5N7s1A6mrL8OGiOE2SlDsDOgmRdye2Ifu4rR5ePQ,4376
|
|
44
|
+
cognite/neat/graph/__init__.py,sha256=J8JSJj3s4gFbuAexma__KGpBXPN8wuydPTKd6EwgKPA,65
|
|
45
|
+
cognite/neat/graph/_shared.py,sha256=9QRETdm7hvqIeiHv_n1xi1DUq91Nq7oRRpnPKE0Pnag,181
|
|
46
|
+
cognite/neat/graph/_tracking/__init__.py,sha256=pYj7c-YAUIP4hvN-4mlWnwaeZFerzL9_gM-oZhex7cE,91
|
|
47
|
+
cognite/neat/graph/_tracking/base.py,sha256=8JmaDhlFhSkdBe4SOvFnrdDvMmfTZkHhZxWWWTYkMOQ,820
|
|
48
|
+
cognite/neat/graph/_tracking/log.py,sha256=dBSINd8Tn92hBl8APMD8r6j15g2SlaX1tsDLCmHvaU4,927
|
|
49
|
+
cognite/neat/graph/examples/Knowledge-Graph-Nordic44-dirty.xml,sha256=ujJip6XBs5n8enVDPzNnuGkMBwv8g21tIr1sEVJpK5M,1439359
|
|
50
|
+
cognite/neat/graph/examples/Knowledge-Graph-Nordic44.xml,sha256=U2Ns-M4LRjT1fBkhmRj63ur7jDzlRtHK9yOLf_npZ_g,1437996
|
|
51
|
+
cognite/neat/graph/examples/__init__.py,sha256=yAjHVY3b5jOjmbW-iLbhvu7BG014TpGi3K4igkDqW5I,368
|
|
52
|
+
cognite/neat/graph/examples/skos-capturing-sheet-wind-topics.xlsx,sha256=CV_yK5ZSbYS_ktfIZUPD8Sevs47zpswLXQUDFkGE4Gw,45798
|
|
53
|
+
cognite/neat/graph/exceptions.py,sha256=R6pyOH774n9w2x_X_nrUr8OMAdjJMf_XPIqAvxIQaWo,3401
|
|
54
|
+
cognite/neat/graph/extractors/__init__.py,sha256=nXcNp6i3-1HteIkr8Ujxk4b09W5jk27Q3eWuwjcnGnM,1647
|
|
55
|
+
cognite/neat/graph/extractors/_base.py,sha256=8IWygpkQTwo0UOmbbwWVI7540_klTVdUVX2JjVPFRIs,498
|
|
56
|
+
cognite/neat/graph/extractors/_classic_cdf/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
57
|
+
cognite/neat/graph/extractors/_classic_cdf/_assets.py,sha256=xVqWC_lyqX5RKGfTxX0Gb96A0GAyM13d6YIjd1xEbpI,6524
|
|
58
|
+
cognite/neat/graph/extractors/_classic_cdf/_base.py,sha256=FLMGeF5mefy-85B0wJxaAlX-YpDPYEq7-RYw_WYNhjE,4463
|
|
59
|
+
cognite/neat/graph/extractors/_classic_cdf/_events.py,sha256=8shnrQD9LZCrKPIt7xeU6ac0-lSkIwGe9KB0DdJ7Eik,5600
|
|
60
|
+
cognite/neat/graph/extractors/_classic_cdf/_files.py,sha256=wa2jzbpOj4BssVY7PbgdGymFZGSrvd1GZaRVN-JjOXQ,6588
|
|
61
|
+
cognite/neat/graph/extractors/_classic_cdf/_labels.py,sha256=Xvyv22jebq4s94Sl1h2SMEeBvOkoTIPujB9tczRgcDo,4359
|
|
62
|
+
cognite/neat/graph/extractors/_classic_cdf/_relationships.py,sha256=VxmwnZ_vN_P14lXDuEYfR68OK-ZnLrvGqSFW9n0KHeY,7429
|
|
63
|
+
cognite/neat/graph/extractors/_classic_cdf/_sequences.py,sha256=sTtVPngffQw2fyvoRG1ABC2yFkepA6skFT1XdCzg4cU,5086
|
|
64
|
+
cognite/neat/graph/extractors/_classic_cdf/_timeseries.py,sha256=zmVf5pO-G4ro3elKt0sCTfTtLulkEFoEahLgP9J5kKE,6581
|
|
65
|
+
cognite/neat/graph/extractors/_dexpi.py,sha256=Q3whJpEi3uFMzJGAAeUfgRnAzz6ZHmtuEdVBWqsZsTM,9384
|
|
66
|
+
cognite/neat/graph/extractors/_mock_graph_generator.py,sha256=2qHh3fJxxAR9QdR6TPu-6DOvcjJkjHF4bwZN7lulziY,14678
|
|
67
|
+
cognite/neat/graph/extractors/_rdf_file.py,sha256=ialMCLv9WH5k6v1YMfozfcmAYhz8OVo9jVhsKMyQkDA,763
|
|
68
|
+
cognite/neat/graph/issues/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
69
|
+
cognite/neat/graph/issues/loader.py,sha256=v8YDsehkUT1QUG61JM9BDV_lqowMUnDmGmbay0aFzN4,3085
|
|
70
|
+
cognite/neat/graph/loaders/__init__.py,sha256=TbeJqifd16JLOglPVNOeb6pN_w060UYag50KquBM_r0,769
|
|
71
|
+
cognite/neat/graph/loaders/_base.py,sha256=497Jc1Gu3SmBpafUNTQ6fCAJz6dKq8HkweecdUmDsu4,3651
|
|
72
|
+
cognite/neat/graph/loaders/_rdf2asset.py,sha256=CqSXDcF4gVPSvE_9jy7yyuaCv-8HA9g0ld_2hqhnXug,17793
|
|
73
|
+
cognite/neat/graph/loaders/_rdf2dms.py,sha256=7HdFAVMORLaHIWzxKbm1DDGi45TcvqxXZYXYnggLYBI,14596
|
|
74
|
+
cognite/neat/graph/models.py,sha256=AtLgZh2qyRP6NRetjQCy9qLMuTQB0CH52Zsev-qa2sk,149
|
|
75
|
+
cognite/neat/graph/queries/__init__.py,sha256=BgDd-037kvtWwAoGAy8eORVNMiZ5-E9sIV0txIpeaN4,50
|
|
76
|
+
cognite/neat/graph/queries/_base.py,sha256=H1ypFF_Fjls_oViF_5rrfTZzFOjwA4AHnzPdnmLNdXM,8243
|
|
77
|
+
cognite/neat/graph/queries/_construct.py,sha256=lDquCxjiaUzL3G48ZQffrGJMcqPkWVtCdkfatgPAUKI,7208
|
|
78
|
+
cognite/neat/graph/queries/_shared.py,sha256=Kk53TqJmwD2G-rxhLq_jJXYy8jvLsUAAWGJS5r9pOaY,5327
|
|
79
|
+
cognite/neat/graph/stores/__init__.py,sha256=G-VG_YwfRt1kuPao07PDJyZ3w_0-eguzLUM13n-Z_RA,64
|
|
80
|
+
cognite/neat/graph/stores/_base.py,sha256=HC7PpqQV_KMxdF61aocwU3e7ljvpVHp4xvNwNKIrhBU,12442
|
|
81
|
+
cognite/neat/graph/stores/_provenance.py,sha256=HIXa-p7yc2l3HFkQWMnGPhn-t_FROEG21thADGkgy0c,3590
|
|
82
|
+
cognite/neat/graph/transformers/__init__.py,sha256=FMvlDEDJHrZL4Jb_H0AiJZO5uHXBCuLhB5HVDuinnBI,665
|
|
83
|
+
cognite/neat/graph/transformers/_base.py,sha256=b37Ek-9njuM5pTR_3XhnxCMrg_ip_2BMwM7ZhKpAAlw,328
|
|
84
|
+
cognite/neat/graph/transformers/_classic_cdf.py,sha256=6xX-OBSJT5DAQrTJ-nuhCfGNaSk5Iktxn-WIMfzEIqo,13189
|
|
85
|
+
cognite/neat/graph/transformers/_rdfpath.py,sha256=VLtGJvTPT5SWhV98fuGGt0pptTXfzOOQSNehypsPHug,1861
|
|
86
|
+
cognite/neat/issues.py,sha256=C8DE2Zcb_mCeaC0PSAf7zD231ewFI0k7sRIar_XH3-4,4909
|
|
87
|
+
cognite/neat/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
88
|
+
cognite/neat/rules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
89
|
+
cognite/neat/rules/_shared.py,sha256=G0bIu5XSrtEa93qqtOS5P0IDJUkU32gX5ypFhcV6t5c,216
|
|
90
|
+
cognite/neat/rules/analysis/__init__.py,sha256=1qQXgddwSmRjC5s22XfQhsn8XPYfwAV_2n6lqeWJmKc,141
|
|
91
|
+
cognite/neat/rules/analysis/_asset.py,sha256=SCiDatwDPi80jj41yQAp740irRWijMKEtAObkwKOKYs,7322
|
|
92
|
+
cognite/neat/rules/analysis/_base.py,sha256=jb9G2g59QaSZDwJmG1Kh9rq7CprvyrokTqfMytr0ZOk,16758
|
|
93
|
+
cognite/neat/rules/analysis/_information.py,sha256=TU9QbhtyhPVYqAxR-9L5awevl9i3q7x1Y25D5xb_Ciw,8085
|
|
94
|
+
cognite/neat/rules/examples/__init__.py,sha256=nxIwueAcHgZhkYriGxnDLQmIyiT8PByPHbScjYKDKe0,374
|
|
95
|
+
cognite/neat/rules/examples/wind-energy.owl,sha256=NuomCA9FuuLF0JlSuG3OKqD4VBcHgSjDKFLV17G1zV8,65934
|
|
96
|
+
cognite/neat/rules/exporters/__init__.py,sha256=nRMUBUf7yr1QPjyITeX2rTLtLLawHv24hhRE39d2-e0,1109
|
|
97
|
+
cognite/neat/rules/exporters/_base.py,sha256=vJXY7qdo4blDZemfDXuuYCkUt1cTa5PsOLMdll7OcGw,1896
|
|
98
|
+
cognite/neat/rules/exporters/_rules2dms.py,sha256=e0x54Zqn4LLHN_uCKLTz9dRe5P7NAWcSQSshizr9ItE,14543
|
|
99
|
+
cognite/neat/rules/exporters/_rules2excel.py,sha256=bVYq0zmMLDEzSDD39_DQOL6rFGBgRMq5lE7xVMAg8i8,14328
|
|
100
|
+
cognite/neat/rules/exporters/_rules2ontology.py,sha256=GjfZtS_BlxfBjyu9w-NNGWYWACt4N1Z8A0bGp6EDq0g,20678
|
|
101
|
+
cognite/neat/rules/exporters/_rules2yaml.py,sha256=GA8eUYRxUfIU6IMvlyGO5JidkOD5eUKSbH3qAiFiaCg,3026
|
|
102
|
+
cognite/neat/rules/exporters/_validation.py,sha256=E-vqVagQn6uhymy_-5GfGMnZ29mxinPE19IJNua8YQY,3787
|
|
103
|
+
cognite/neat/rules/importers/__init__.py,sha256=Vxl2Iq1dMXUsI6Wb411xPI3rromdq50xZUci-S8faSw,1097
|
|
104
|
+
cognite/neat/rules/importers/_base.py,sha256=EgXF2pmJ90LbmFs5rAMwh151wGX3PGkhTTF6rC-DzOg,4510
|
|
105
|
+
cognite/neat/rules/importers/_dms2rules.py,sha256=Bk9vJT9Tdei2OE_1HaaFYjitBFp0omyGuqIQEblF_IE,19744
|
|
106
|
+
cognite/neat/rules/importers/_dtdl2rules/__init__.py,sha256=CNR-sUihs2mnR1bPMKs3j3L4ds3vFTsrl6YycExZTfU,68
|
|
107
|
+
cognite/neat/rules/importers/_dtdl2rules/_unit_lookup.py,sha256=wW4saKva61Q_i17guY0dc4OseJDQfqHy_QZBtm0OD6g,12134
|
|
108
|
+
cognite/neat/rules/importers/_dtdl2rules/dtdl_converter.py,sha256=5ee8bD4iJ3Ndhx_S234XBCuBHxYjFkJnWiwnZwbTrXs,12432
|
|
109
|
+
cognite/neat/rules/importers/_dtdl2rules/dtdl_importer.py,sha256=Psj3C2jembY_Wu7WWJIFIwrMawvjISjeqfBnoRy_csw,6740
|
|
110
|
+
cognite/neat/rules/importers/_dtdl2rules/spec.py,sha256=tim_MfN1J0F3Oeqk3BMgIA82d_MZvhRuRMsLK3B4PYc,11897
|
|
111
|
+
cognite/neat/rules/importers/_inference2rules.py,sha256=xaB3HGVF_TsSErzE9nPn8XTfFC8nWe5Wsz4U0qlTVlM,13848
|
|
112
|
+
cognite/neat/rules/importers/_owl2rules/__init__.py,sha256=tdGcrgtozdQyST-pTlxIa4cLBNTLvtk1nNYR4vOdFSw,63
|
|
113
|
+
cognite/neat/rules/importers/_owl2rules/_owl2classes.py,sha256=YaEsYYRM8H7EkPgHIUVosiNdhhl6rEl2P7EtvVOqoBM,7383
|
|
114
|
+
cognite/neat/rules/importers/_owl2rules/_owl2metadata.py,sha256=XnE3aOVxd7ZyKln3o5k6cx3Sr92FHkLhRPWsHIgt0fY,7487
|
|
115
|
+
cognite/neat/rules/importers/_owl2rules/_owl2properties.py,sha256=qVzEs6o6ARaz9lf6mKaAPL0fJbOotzSa8CINxSEbbw0,7341
|
|
116
|
+
cognite/neat/rules/importers/_owl2rules/_owl2rules.py,sha256=41_wZFvt0A6TI55zlT04oQkvU7V73li4aGLgc4T4Lxo,6358
|
|
117
|
+
cognite/neat/rules/importers/_spreadsheet2rules.py,sha256=1yEzoAZpad57zWyaVo0XnKCer68lIgR_a2vvOvVAdi0,13108
|
|
118
|
+
cognite/neat/rules/importers/_yaml2rules.py,sha256=F0uksSz1A3po5OlRM2152_w5j8D9oYTLB9NFTkSMlWI,4275
|
|
119
|
+
cognite/neat/rules/issues/__init__.py,sha256=c12m0HAHHzF6oR8lKbULE3TxOPimTi9s1O9IIrtgh0g,549
|
|
120
|
+
cognite/neat/rules/issues/base.py,sha256=x2YLCfmqtPlFLoURq3qHaprXCpFaQdf0iWkql-EMyps,2446
|
|
121
|
+
cognite/neat/rules/issues/dms.py,sha256=Z6KjZv8geAzAjVUNipJrkiJYHOyaDS5h0XKkawMugDU,25136
|
|
122
|
+
cognite/neat/rules/issues/fileread.py,sha256=ao199mtvhPSW0IA8ZQZ0RzuLIIipYtL0jp6fLqxb4_c,5748
|
|
123
|
+
cognite/neat/rules/issues/formatters.py,sha256=_ag2bJ9hncOj8pAGJvTTEPs9kTtxbD7vkqvS9Zcnizc,3385
|
|
124
|
+
cognite/neat/rules/issues/importing.py,sha256=gkZR3ipR8LoURe1FFvAh9zhAEga72FmvTZLncdseRg4,13926
|
|
125
|
+
cognite/neat/rules/issues/ontology.py,sha256=hbEd6IdA1Sc3OMmU2iTnyUn1jUK2NVlXPykvxn0TX-g,10857
|
|
126
|
+
cognite/neat/rules/issues/spreadsheet.py,sha256=SYxVaNmVIg11aG0k_3SFF8wiN0bFS8GJzoQlp3bI3ms,19680
|
|
127
|
+
cognite/neat/rules/issues/spreadsheet_file.py,sha256=YCp0Pk_TsiqYuOPdWpjUpre-zvi2c5_MvrC_dxw10YY,4964
|
|
128
|
+
cognite/neat/rules/issues/tables.py,sha256=_Ut5wel4-88XvkUxM4VFYDANDIl3lq_loeLlzAJhtgc,2381
|
|
129
|
+
cognite/neat/rules/models/__init__.py,sha256=DHitrcmu9in2F8NqBE1O2J4UU_-MAlY6sB1MfigY4IU,887
|
|
130
|
+
cognite/neat/rules/models/_base.py,sha256=0wZgEDWLxKInQGw4ig3F_P_QP2FlUlMoanQvRMihHIg,11301
|
|
131
|
+
cognite/neat/rules/models/_constants.py,sha256=zPREgHT79_4FMg58QlaXc7A8XKRJrjP5SUgh63jDnTk,31
|
|
132
|
+
cognite/neat/rules/models/_rdfpath.py,sha256=WY2vqe3oaIThsh01Eb6E4WexS8B8juAVceHLiglQNuA,11954
|
|
133
|
+
cognite/neat/rules/models/_types/__init__.py,sha256=l1tGxzE7ezNHIL72AoEvNHN2IFuitxOLxiHJG__s6t4,305
|
|
134
|
+
cognite/neat/rules/models/_types/_field.py,sha256=rvmN7ztrFPW2S_xWxbj8DamVFrjBQAlQK6vA3no-Aec,3026
|
|
135
|
+
cognite/neat/rules/models/asset/__init__.py,sha256=qNon0kHleCPo2eT82TmeBAfiDDdwdKNU-Xdewuz8JRA,231
|
|
136
|
+
cognite/neat/rules/models/asset/_converter.py,sha256=PrTh9ZZkqSJBviiJE4xc3pClCsaWu2tTYOdgwg6_VOk,150
|
|
137
|
+
cognite/neat/rules/models/asset/_rules.py,sha256=SWjl3_GmO15RQeXl2MPoGaIgobVQNpF0Ezr0oDOkw5E,6069
|
|
138
|
+
cognite/neat/rules/models/asset/_rules_input.py,sha256=LiT-85CVgDz2ng65CtrRa77r4rnmg3E4Q6DC7-gv0dE,6257
|
|
139
|
+
cognite/neat/rules/models/asset/_serializer.py,sha256=ixqRf9qEzvChgysRaDX4g_vHVDtRBCsPYC9sOn0-ShE,3365
|
|
140
|
+
cognite/neat/rules/models/asset/_validation.py,sha256=7P46ksX2jkLbexfHX0ocYijFcxVShrzLnhTD4xDn224,1876
|
|
141
|
+
cognite/neat/rules/models/data_types.py,sha256=mHTjWh47VzLwrr0w6dRf59LW7pTTGRTgsxvtW9p0JWw,6020
|
|
142
|
+
cognite/neat/rules/models/dms/__init__.py,sha256=Wzyqzz2ZIjpUbDg04CMuuIAw-f2A02DayNeqO9R-2Hw,491
|
|
143
|
+
cognite/neat/rules/models/dms/_converter.py,sha256=2qiMsFKwVBi4K6ZnJPajUEtVSGYg_Wof1yGZLNMWrZ4,5869
|
|
144
|
+
cognite/neat/rules/models/dms/_exporter.py,sha256=YfJXW4lTD9YZVq6-YBhzK9U83l9SMV-Pq-40rLGOTTc,25203
|
|
145
|
+
cognite/neat/rules/models/dms/_rules.py,sha256=9sXEnx6Djy_uVagKn1j6WDGXNIGSmfFsLIJOWT6S6M0,20216
|
|
146
|
+
cognite/neat/rules/models/dms/_rules_input.py,sha256=bGarQoDNZmBuSZh_l7ARsZH86_hVWmlX73GmyOI3zGE,13645
|
|
147
|
+
cognite/neat/rules/models/dms/_schema.py,sha256=WmF4ektkA9LhHiz9QuQEx0fuxXyxeSsllpqQMkz2Epo,49523
|
|
148
|
+
cognite/neat/rules/models/dms/_serializer.py,sha256=iqp2zyyf8jEcU-R3PERuN8nu248xIqyxiWj4owAn92g,6406
|
|
149
|
+
cognite/neat/rules/models/dms/_validation.py,sha256=5mk9L99FSwC8Ok7weEjnFJ_OZnmqMWUc6XFMTfkqfDw,14549
|
|
150
|
+
cognite/neat/rules/models/domain.py,sha256=qG1387w6E4XIviOb7EwAjMaavUUQBweYlmYrZnj-FRI,2936
|
|
151
|
+
cognite/neat/rules/models/entities.py,sha256=xYUNZ9nhU2y741xW6tqvF_JeQS1KsLi3YB-3zE0E79w,20771
|
|
152
|
+
cognite/neat/rules/models/information/__init__.py,sha256=HR6g8xgyU53U7Ck8pPdbT70817Q4NC1r1pCRq5SA8iw,291
|
|
153
|
+
cognite/neat/rules/models/information/_converter.py,sha256=J3mY5clqMY1PR_EmIT-GsTBJ16XCpHQG8EkQWvpqdnI,13930
|
|
154
|
+
cognite/neat/rules/models/information/_rules.py,sha256=VFon-stz5QSAvol5PNeX6gjKeV-N-sS2wGicOTBVCJA,13575
|
|
155
|
+
cognite/neat/rules/models/information/_rules_input.py,sha256=AOTslaehKZH67VJaJO5bu8tT-1iSQz2uwf9mWFpK_44,10580
|
|
156
|
+
cognite/neat/rules/models/information/_serializer.py,sha256=yti9I_xJruxrib66YIBInhze___Io-oPTQH6uWDumPE,3503
|
|
157
|
+
cognite/neat/rules/models/information/_validation.py,sha256=rkDGbRHCLKyoZ6ooBZBfjDslouVUu9GXmfBcCorwxt4,8216
|
|
158
|
+
cognite/neat/rules/models/wrapped_entities.py,sha256=ThhjnNNrpgz0HeORIQ8Q894trxP73P7T_TuZj6qH2CU,7157
|
|
159
|
+
cognite/neat/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
160
|
+
cognite/neat/utils/auth.py,sha256=k0sEfTpK_bamMjAkj7jN6n9yta8TaqHTFkZUjUgpwik,12770
|
|
161
|
+
cognite/neat/utils/auxiliary.py,sha256=a8z7GTIrXE_EYnLZ3-Nvuj2TbQctyq1kzl5-Zj5q2W4,6943
|
|
162
|
+
cognite/neat/utils/cdf/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
163
|
+
cognite/neat/utils/cdf/data_classes.py,sha256=HWFpphCTHDkpnVwwtVb3gOLB76GKJ_F5XfLAf5wcd34,9615
|
|
164
|
+
cognite/neat/utils/cdf/loaders/__init__.py,sha256=s2aPR5XLo6WZ0ybstAJlcGFYkA7CyHW1XO-NYpL0V6o,483
|
|
165
|
+
cognite/neat/utils/cdf/loaders/_base.py,sha256=ryNC_AMXIESWXuTVJ-02L-HSVSpD6V49XdLTRYeFg70,1764
|
|
166
|
+
cognite/neat/utils/cdf/loaders/_data_modeling.py,sha256=0jynnwZ7utnG2KIkVRJBNvDshUCzwX29LZuGSlm6qUM,13216
|
|
167
|
+
cognite/neat/utils/cdf/loaders/_ingestion.py,sha256=QbF4ntaGUum6yTRTq9WNg8n49TQpfzF1T7H-Bx740ws,6326
|
|
168
|
+
cognite/neat/utils/collection_.py,sha256=fX4eAMau5AsUs1Dm5PlzINxR64kUjncEEHeoL_JT9rU,582
|
|
169
|
+
cognite/neat/utils/rdf_.py,sha256=VXDBQUt86vRntiGhejK35PlsbvKCUkuQQa1cMYz4SIc,5656
|
|
170
|
+
cognite/neat/utils/regex_patterns.py,sha256=M01rIfK6aRexP60qIrbG0qwBYaHj_ukmMC5leatSlic,1950
|
|
171
|
+
cognite/neat/utils/spreadsheet.py,sha256=LI0c7dlW0zXHkHw0NvB-gg6Df6cDcE3FbiaHBYLXdzQ,2714
|
|
172
|
+
cognite/neat/utils/text.py,sha256=gb63d-b7vhu46i09YN5I_h8gCuLPDWVpb1r9uPLlh9c,3185
|
|
173
|
+
cognite/neat/utils/time_.py,sha256=O30LUiDH9TdOYz8_a9pFqTtJdg8vEjC3qHCk8xZblG8,345
|
|
174
|
+
cognite/neat/utils/upload.py,sha256=7yQZZM1SFEC-Dhl12rQD_8gUoRKLwmWhNjsImVB18og,4015
|
|
175
|
+
cognite/neat/utils/xml_.py,sha256=ppLT3lQKVp8wOP-m8-tFY8uB2P4R76l7R_-kUtsABng,992
|
|
176
|
+
cognite/neat/workflows/__init__.py,sha256=oiKub_U9f5cA0I1nKl5dFkR4BD8_6Be9eMzQ_50PwP0,396
|
|
177
|
+
cognite/neat/workflows/_exceptions.py,sha256=cjMWH1hdc3Wp0k0_tiogDGcS6WoeQX5RFI6eFefPJOM,1362
|
|
178
|
+
cognite/neat/workflows/base.py,sha256=CIJkSUwcZPD1FHYiF-pjueB6SX2Egb-D2ATkuI83I88,26804
|
|
179
|
+
cognite/neat/workflows/cdf_store.py,sha256=HCn76PJ7_vrBeTtBv9GDBH77B7wCzVnH13AoS2lu9aA,18016
|
|
180
|
+
cognite/neat/workflows/examples/Export_DMS/workflow.yaml,sha256=XmyaUAsZrN-GnoBejg9eXHQBm1U1Z-NhdKc11Wm1ieM,1987
|
|
181
|
+
cognite/neat/workflows/examples/Import_DMS/workflow.yaml,sha256=i7FeD0dzUBhzorjMgo7v1mjShhgsEpobbxIAL-czt34,1364
|
|
182
|
+
cognite/neat/workflows/examples/Validate_Rules/workflow.yaml,sha256=lmuC-zttewtZl5EjnUv8RuM9t2dC-F053duNQHKoPGg,1395
|
|
183
|
+
cognite/neat/workflows/examples/Validate_Solution_Model/workflow.yaml,sha256=Oy3u9QJ7QZoKZqmY0mRMWtnJZd9agmbRZCrbvf32xis,1326
|
|
184
|
+
cognite/neat/workflows/examples/Visualize_Data_Model_Using_Mock_Graph/workflow.yaml,sha256=wVWxEGy_L_tTHKr-XxHyoykkya0DnFi99Y1erA96Oxs,2296
|
|
185
|
+
cognite/neat/workflows/examples/Visualize_Semantic_Data_Model/workflow.yaml,sha256=yWVL-NHghKtiNV2kpEX674MJwWqhOUn3j2ZOJiJbprE,2579
|
|
186
|
+
cognite/neat/workflows/manager.py,sha256=CtxnabAmZq4APd5XA6FTBlytP3WmlbKNGjNoR04uAQ4,14102
|
|
187
|
+
cognite/neat/workflows/model.py,sha256=LQY7abYnz3CUEIlIEqoj0Eo6Q8yQukTQ0S_sPststCA,6570
|
|
188
|
+
cognite/neat/workflows/steps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
189
|
+
cognite/neat/workflows/steps/data_contracts.py,sha256=4z_lyvlPI9IPHXYsO71a-iIk-MCryl5QoHp-UK7kbcE,2474
|
|
190
|
+
cognite/neat/workflows/steps/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
191
|
+
cognite/neat/workflows/steps/lib/current/__init__.py,sha256=c22IznGdCSNCpXCi_yonlbbywJE1uj6bfVCv0X2LYeE,225
|
|
192
|
+
cognite/neat/workflows/steps/lib/current/graph_extractor.py,sha256=CI12qMfG4qC7O_ccrYzlsn4154xjiCY7IOSFoJDR8U4,4707
|
|
193
|
+
cognite/neat/workflows/steps/lib/current/graph_loader.py,sha256=snHt-2czYLDsUfN9uWEkGh3IofVjUm2WuMXIfz1hyZw,1671
|
|
194
|
+
cognite/neat/workflows/steps/lib/current/graph_store.py,sha256=VZpe6rfrmVfK4imZr42QVhGw98E2c71hQDzDDUg5xwM,1589
|
|
195
|
+
cognite/neat/workflows/steps/lib/current/rules_exporter.py,sha256=1SKBYDnyDr975oMr9aOQVHExHjPQ0-whDDBNpTQ4K1A,23807
|
|
196
|
+
cognite/neat/workflows/steps/lib/current/rules_importer.py,sha256=23dxamGHSbJoG7qUqL4KiGznSmDTVHw1EfqhLCeAwDM,14695
|
|
197
|
+
cognite/neat/workflows/steps/lib/current/rules_validator.py,sha256=4fKlFpnNxgc435WRU1q3m_3TEA8M0iUzgAgCS7Bz1R8,4843
|
|
198
|
+
cognite/neat/workflows/steps/lib/io/__init__.py,sha256=k7IPbIq3ey19oRc5sA_15F99-O6dxzqbm1LihGRRo5A,32
|
|
199
|
+
cognite/neat/workflows/steps/lib/io/io_steps.py,sha256=QAGypoi1vP32BRiIgBZ0B4qsbFMcwhzpRiVUUnWysLA,16874
|
|
200
|
+
cognite/neat/workflows/steps/step_model.py,sha256=bYX0PhlW-B76fBksBPENGGf8foOT6gvJL-2aUO5JimY,2943
|
|
201
|
+
cognite/neat/workflows/steps_registry.py,sha256=85YtD6eW5SQ71pdr5-2EF3drwzjrL4aHgh-c6eIbDWo,10705
|
|
202
|
+
cognite/neat/workflows/tasks.py,sha256=dqlJwKAb0jlkl7abbY8RRz3m7MT4SK8-7cntMWkOYjw,788
|
|
203
|
+
cognite/neat/workflows/triggers.py,sha256=_BLNplzoz0iic367u1mhHMHiUrCwP-SLK6_CZzfODX0,7071
|
|
204
|
+
cognite/neat/workflows/utils.py,sha256=gKdy3RLG7ctRhbCRwaDIWpL9Mi98zm56-d4jfHDqP1E,453
|
|
205
|
+
cognite_neat-0.88.1.dist-info/LICENSE,sha256=W8VmvFia4WHa3Gqxq1Ygrq85McUNqIGDVgtdvzT-XqA,11351
|
|
206
|
+
cognite_neat-0.88.1.dist-info/METADATA,sha256=p4jZvdJndBOjwpadsKexZzA3t66jMHJeF_bFNvjN4mg,9441
|
|
207
|
+
cognite_neat-0.88.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
208
|
+
cognite_neat-0.88.1.dist-info/entry_points.txt,sha256=61FPqiWb25vbqB0KI7znG8nsg_ibLHBvTjYnkPvNFso,50
|
|
209
|
+
cognite_neat-0.88.1.dist-info/RECORD,,
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import json
|
|
2
|
-
import shutil
|
|
3
|
-
import tempfile
|
|
4
|
-
from copy import deepcopy
|
|
5
|
-
from pathlib import Path
|
|
6
|
-
from typing import cast
|
|
7
|
-
|
|
8
|
-
from fastapi import APIRouter, UploadFile
|
|
9
|
-
|
|
10
|
-
from cognite.neat.app.api.configuration import NEAT_APP
|
|
11
|
-
from cognite.neat.rules import exporters, importers
|
|
12
|
-
from cognite.neat.rules.models import DMSRules, RoleTypes
|
|
13
|
-
|
|
14
|
-
router = APIRouter()
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
@router.post("/api/core/convert")
|
|
18
|
-
async def convert_data_model_to_rules(file: UploadFile):
|
|
19
|
-
suffix = Path(cast(str, file.filename)).suffix
|
|
20
|
-
|
|
21
|
-
if suffix not in [".xlsx", ".ttl", ".owl", ".json", ".yaml"]:
|
|
22
|
-
return {
|
|
23
|
-
"filename": None,
|
|
24
|
-
"content": None,
|
|
25
|
-
"issues": [f"File type {suffix} not supported. Supported types are ['.xlsx', '.ttl', '.json', '.yaml']"],
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
with tempfile.NamedTemporaryFile(suffix=suffix, delete=False) as temp:
|
|
29
|
-
shutil.copyfileobj(file.file, temp) # type: ignore # known issue with mypy
|
|
30
|
-
temp_filepath = Path(temp.name)
|
|
31
|
-
|
|
32
|
-
# read as Excel rules
|
|
33
|
-
if suffix == ".xlsx":
|
|
34
|
-
rules, issues = importers.ExcelImporter(filepath=temp_filepath).to_rules(role=RoleTypes.dms)
|
|
35
|
-
|
|
36
|
-
# load as OWL
|
|
37
|
-
elif suffix in [".ttl", ".owl"]:
|
|
38
|
-
rules, issues = importers.OWLImporter(filepath=temp_filepath).to_rules(role=RoleTypes.dms)
|
|
39
|
-
|
|
40
|
-
# load as YAML
|
|
41
|
-
elif suffix in [".yml", ".yaml"]:
|
|
42
|
-
rules, issues = importers.YAMLImporter.from_file(temp_filepath).to_rules(role=RoleTypes.dms)
|
|
43
|
-
|
|
44
|
-
# load as JSON
|
|
45
|
-
elif suffix == ".json":
|
|
46
|
-
with temp_filepath.open() as temp:
|
|
47
|
-
json_data = json.load(temp)
|
|
48
|
-
rules, issues = importers.YAMLImporter(raw_data=json.loads(json_data)).to_rules(role=RoleTypes.dms)
|
|
49
|
-
|
|
50
|
-
# Remove the temporary file
|
|
51
|
-
temp_filepath.unlink()
|
|
52
|
-
|
|
53
|
-
return {"filename": file.filename, "content": rules.model_dump(by_alias=True) if rules else None, "issues": issues}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
@router.post("/api/core/rules2dms")
|
|
57
|
-
async def convert_rules_to_dms(rules: DMSRules):
|
|
58
|
-
dms_schema = exporters.DMSExporter().export(rules)
|
|
59
|
-
containers = {f"{container.space}:{container.external_id}": container.dump() for container in dms_schema.containers}
|
|
60
|
-
views = {f"{view.space}:{view.external_id}": view.dump() for view in dms_schema.views}
|
|
61
|
-
|
|
62
|
-
if views and containers:
|
|
63
|
-
_to_visualization_compliant_views(views, containers)
|
|
64
|
-
|
|
65
|
-
return {
|
|
66
|
-
"views": list(views.values()) if views else None,
|
|
67
|
-
"containers": list(containers.values()) if containers else None,
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
def _to_visualization_compliant_views(views, containers):
|
|
72
|
-
for view in views.values():
|
|
73
|
-
for property in view["properties"].values():
|
|
74
|
-
# needs coping information from container:
|
|
75
|
-
if property.get("container", None) and property["container"]["type"] == "container":
|
|
76
|
-
container_id = f"{property['container']['space']}:{property['container']['externalId']}"
|
|
77
|
-
container_property_def = deepcopy(
|
|
78
|
-
containers[container_id]["properties"][property["containerPropertyIdentifier"]]
|
|
79
|
-
)
|
|
80
|
-
property["type"] = container_property_def["type"]
|
|
81
|
-
container_property_def.pop("type")
|
|
82
|
-
property.update(container_property_def)
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
@router.post("/api/core/publish-rules")
|
|
86
|
-
async def publish_rules_as_data_model(rules: DMSRules):
|
|
87
|
-
if NEAT_APP.cdf_client:
|
|
88
|
-
uploaded = exporters.DMSExporter().export_to_cdf(rules, NEAT_APP.cdf_client)
|
|
89
|
-
return {"uploaded": uploaded}
|
|
90
|
-
else:
|
|
91
|
-
return {"uploaded": []}
|
|
@@ -1,336 +0,0 @@
|
|
|
1
|
-
import logging
|
|
2
|
-
import time
|
|
3
|
-
import traceback
|
|
4
|
-
from typing import Any, cast
|
|
5
|
-
|
|
6
|
-
import rdflib
|
|
7
|
-
from fastapi import APIRouter
|
|
8
|
-
|
|
9
|
-
from cognite.neat.app.api.asgi.metrics import counter
|
|
10
|
-
from cognite.neat.app.api.configuration import CACHE_STORE, NEAT_APP
|
|
11
|
-
from cognite.neat.app.api.data_classes.rest import (
|
|
12
|
-
DatatypePropertyRequest,
|
|
13
|
-
NodesAndEdgesRequest,
|
|
14
|
-
QueryRequest,
|
|
15
|
-
RuleRequest,
|
|
16
|
-
)
|
|
17
|
-
from cognite.neat.app.api.utils.data_mapping import rdf_result_to_api_response
|
|
18
|
-
from cognite.neat.app.api.utils.query_templates import query_templates
|
|
19
|
-
from cognite.neat.legacy.graph.transformations import query_generator
|
|
20
|
-
from cognite.neat.utils.rdf_ import remove_namespace_from_uri
|
|
21
|
-
from cognite.neat.workflows.steps.data_contracts import RulesData, SolutionGraph, SourceGraph
|
|
22
|
-
|
|
23
|
-
router = APIRouter()
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
@router.get("/api/list-queries")
|
|
27
|
-
def list_queries():
|
|
28
|
-
counter.inc()
|
|
29
|
-
return query_templates
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
@router.post("/api/get-datatype-properties")
|
|
33
|
-
def get_datatype_properties(request: DatatypePropertyRequest):
|
|
34
|
-
logging.info("Querying datatype properties ordered by usage:")
|
|
35
|
-
if "get_datatype_properties" in CACHE_STORE and request.cache:
|
|
36
|
-
return CACHE_STORE["get_datatype_properties"]
|
|
37
|
-
sparql_query: str = (
|
|
38
|
-
"SELECT DISTINCT ?property (count(?o) as ?occurrence ) "
|
|
39
|
-
"WHERE { ?s ?property ?o . FILTER(isLiteral(?o))} "
|
|
40
|
-
"group by ?property order by DESC(?occurrence)"
|
|
41
|
-
)
|
|
42
|
-
if request.limit != -1:
|
|
43
|
-
query = f"{sparql_query} LIMIT {request.limit}"
|
|
44
|
-
else:
|
|
45
|
-
query = sparql_query
|
|
46
|
-
|
|
47
|
-
results = get_data_from_graph(query, request.graph_name, request.workflow_name)
|
|
48
|
-
|
|
49
|
-
try:
|
|
50
|
-
datatype_properties = [
|
|
51
|
-
{
|
|
52
|
-
"id": row[rdflib.Variable("property")],
|
|
53
|
-
"count": int(row[rdflib.Variable("occurrence")]),
|
|
54
|
-
"name": remove_namespace_from_uri(row[rdflib.Variable("property")]),
|
|
55
|
-
}
|
|
56
|
-
for row in results["rows"]
|
|
57
|
-
]
|
|
58
|
-
except Exception as e:
|
|
59
|
-
logging.error(f"Error while parsing datatype properties : {e}")
|
|
60
|
-
|
|
61
|
-
merged_result = {
|
|
62
|
-
"datatype_properties": datatype_properties,
|
|
63
|
-
"error": "",
|
|
64
|
-
"elapsed_time_sec": results["elapsed_time_sec"],
|
|
65
|
-
"query": query,
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
if request.cache:
|
|
69
|
-
CACHE_STORE["get_datatype_properties"] = merged_result
|
|
70
|
-
return merged_result
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
@router.post("/api/get-nodes-and-edges")
|
|
74
|
-
def get_nodes_and_edges(request: NodesAndEdgesRequest):
|
|
75
|
-
logging.info("Querying graph nodes and edges :")
|
|
76
|
-
if "get_nodes_and_edges" in CACHE_STORE and request.cache:
|
|
77
|
-
return CACHE_STORE["get_nodes_and_edges"]
|
|
78
|
-
elapsed_time_sec: float
|
|
79
|
-
edges_result: dict | list
|
|
80
|
-
nodes_result: dict | list
|
|
81
|
-
"""
|
|
82
|
-
"nodes": [
|
|
83
|
-
{
|
|
84
|
-
"node_id": "http://purl.org/nordic44#_a63ce14e-fba0-4f9e-8b59-7ef2fe887ff8",
|
|
85
|
-
"node_class": "http://entsoe.eu/CIM/SchemaExtension/3/2#RateTemperature",
|
|
86
|
-
"node_name": "-5degreeCelsius"
|
|
87
|
-
}],
|
|
88
|
-
"edges": [
|
|
89
|
-
{
|
|
90
|
-
"src_object_ref": "http://purl.org/nordic44#_f1769eaa-9aeb-11e5-91da-b8763fd99c5f",
|
|
91
|
-
"conn": "http://iec.ch/TC57/2013/CIM-schema-cim16#OperationalLimitSet.Terminal",
|
|
92
|
-
"dst_object_ref": "http://purl.org/nordic44#_2dd90186-bdfb-11e5-94fa-c8f73332c8f4"
|
|
93
|
-
},
|
|
94
|
-
"""
|
|
95
|
-
if request.sparql_query:
|
|
96
|
-
mixed_result = get_data_from_graph(request.sparql_query, request.graph_name, request.workflow_name)
|
|
97
|
-
|
|
98
|
-
edges_result = []
|
|
99
|
-
nodes_result = []
|
|
100
|
-
try:
|
|
101
|
-
nodes_result = [
|
|
102
|
-
{
|
|
103
|
-
"node_id": v[rdflib.Variable("node_id")],
|
|
104
|
-
"node_class": v[rdflib.Variable("node_class")],
|
|
105
|
-
"node_name": v[rdflib.Variable("node_name")],
|
|
106
|
-
}
|
|
107
|
-
for v in mixed_result["rows"]
|
|
108
|
-
]
|
|
109
|
-
except Exception as e:
|
|
110
|
-
logging.error(f"Error while parsing nodes : {e}")
|
|
111
|
-
|
|
112
|
-
try:
|
|
113
|
-
edges_result = [
|
|
114
|
-
{
|
|
115
|
-
"src_object_ref": v[rdflib.Variable("src_object_ref")],
|
|
116
|
-
"dst_object_ref": v[rdflib.Variable("dst_object_ref")],
|
|
117
|
-
}
|
|
118
|
-
for v in mixed_result["rows"]
|
|
119
|
-
if rdflib.Variable("src_object_ref") in v and rdflib.Variable("dst_object_ref") in v
|
|
120
|
-
]
|
|
121
|
-
except Exception as e:
|
|
122
|
-
logging.error(f"Error while parsing edges : {e}")
|
|
123
|
-
|
|
124
|
-
query = request.sparql_query
|
|
125
|
-
elapsed_time_sec = mixed_result["elapsed_time_sec"]
|
|
126
|
-
else:
|
|
127
|
-
nodes_filter = ""
|
|
128
|
-
edges_dst_filter = ""
|
|
129
|
-
edges_src_filter = ""
|
|
130
|
-
|
|
131
|
-
if len(request.node_class_filter) > 0:
|
|
132
|
-
nodes_filter = "VALUES ?node_class { " + " ".join([f"<{x}>" for x in request.node_class_filter]) + " }"
|
|
133
|
-
|
|
134
|
-
if request.node_name_property:
|
|
135
|
-
nodes_query = f"SELECT DISTINCT ?node_id ?node_class ?node_name WHERE \
|
|
136
|
-
{{ {nodes_filter} \
|
|
137
|
-
?node_id {request.node_name_property} ?node_name . ?node_id a ?node_class }} "
|
|
138
|
-
else:
|
|
139
|
-
nodes_query = f"SELECT DISTINCT ?node_id ?node_class (?node_id AS ?node_name) WHERE \
|
|
140
|
-
{{ {nodes_filter} ?node_id a ?node_class }} "
|
|
141
|
-
|
|
142
|
-
if len(request.src_edge_filter) > 0:
|
|
143
|
-
edges_src_filter = (
|
|
144
|
-
"VALUES ?src_object_class { " + " ".join([f"<{x}>" for x in request.src_edge_filter]) + " }"
|
|
145
|
-
)
|
|
146
|
-
if len(request.dst_edge_filter) > 0:
|
|
147
|
-
edges_dst_filter = (
|
|
148
|
-
"VALUES ?dst_object_class { " + " ".join([f"<{x}>" for x in request.dst_edge_filter]) + " }"
|
|
149
|
-
)
|
|
150
|
-
|
|
151
|
-
edges_query = f"SELECT ?src_object_ref ?conn ?dst_object_ref \
|
|
152
|
-
WHERE {{ \
|
|
153
|
-
{edges_src_filter} \
|
|
154
|
-
{edges_dst_filter} \
|
|
155
|
-
?src_object_ref ?conn ?dst_object_ref . \
|
|
156
|
-
?src_object_ref a ?src_object_class . \
|
|
157
|
-
?dst_object_ref a ?dst_object_class .\
|
|
158
|
-
}} "
|
|
159
|
-
nodes_query = f"{nodes_query} LIMIT {request.limit}"
|
|
160
|
-
edges_query = f"{edges_query} LIMIT {request.limit}"
|
|
161
|
-
logging.info(f"Nodes query : {nodes_query}")
|
|
162
|
-
logging.info(f"Edges query : {edges_query}")
|
|
163
|
-
nodes_result = get_data_from_graph(nodes_query, request.graph_name, request.workflow_name)
|
|
164
|
-
edges_result = get_data_from_graph(edges_query, request.graph_name, request.workflow_name)
|
|
165
|
-
elapsed_time_sec = nodes_result["elapsed_time_sec"] + edges_result["elapsed_time_sec"]
|
|
166
|
-
query = nodes_query + edges_query
|
|
167
|
-
nodes_result = nodes_result["rows"]
|
|
168
|
-
edges_result = edges_result["rows"]
|
|
169
|
-
|
|
170
|
-
merged_result = {
|
|
171
|
-
"nodes": nodes_result,
|
|
172
|
-
"edges": edges_result,
|
|
173
|
-
"error": "",
|
|
174
|
-
"elapsed_time_sec": elapsed_time_sec,
|
|
175
|
-
"query": query,
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
if request.cache:
|
|
179
|
-
CACHE_STORE["get_nodes_and_edges"] = merged_result
|
|
180
|
-
return merged_result
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
@router.post("/api/query")
|
|
184
|
-
def query_graph(request: QueryRequest):
|
|
185
|
-
logging.info(f"Querying graph {request.graph_name} with query {request.query}")
|
|
186
|
-
sparq_query = request.query
|
|
187
|
-
return get_data_from_graph(sparq_query, request.graph_name, workflow_name=request.workflow_name)
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
@router.post("/api/execute-rule")
|
|
191
|
-
def execute_rule(request: RuleRequest):
|
|
192
|
-
if NEAT_APP.workflow_manager is None:
|
|
193
|
-
return {"error": "NeatApp is not initialized"}
|
|
194
|
-
logging.debug(
|
|
195
|
-
f"Executing rule type: { request.rule_type } rule : {request.rule} , workflow : {request.workflow_name} , "
|
|
196
|
-
f"graph : {request.graph_name}"
|
|
197
|
-
)
|
|
198
|
-
workflow = NEAT_APP.workflow_manager.get_workflow(request.workflow_name)
|
|
199
|
-
if workflow is None:
|
|
200
|
-
return {"error": f"Workflow {request.workflow_name} not found"}
|
|
201
|
-
|
|
202
|
-
api_result = {"error": ""}
|
|
203
|
-
workflow_context = workflow.get_context()
|
|
204
|
-
if workflow_context is None:
|
|
205
|
-
return {"error": "Workflow context is not initialized"}
|
|
206
|
-
if request.graph_name == "source":
|
|
207
|
-
if "SourceGraph" in workflow_context:
|
|
208
|
-
graph = cast(SourceGraph, workflow_context["SourceGraph"]).graph
|
|
209
|
-
else:
|
|
210
|
-
logging.info("Source graph is empty , please load the graph first")
|
|
211
|
-
api_result["error"] = "source graph is empty , please load the graph first"
|
|
212
|
-
elif request.graph_name == "solution":
|
|
213
|
-
if "SolutionGraph" in workflow_context:
|
|
214
|
-
graph = cast(SolutionGraph, workflow_context["SolutionGraph"]).graph
|
|
215
|
-
else:
|
|
216
|
-
logging.info("Solution graph is empty , please load the graph first")
|
|
217
|
-
api_result["error"] = "solution graph is empty , please load the graph first"
|
|
218
|
-
else:
|
|
219
|
-
raise Exception("Unknown graph name")
|
|
220
|
-
|
|
221
|
-
if request.rule_type == "rdfpath":
|
|
222
|
-
start_time = time.perf_counter()
|
|
223
|
-
rules = cast(RulesData, workflow_context["RulesData"]).rules
|
|
224
|
-
sparql_query = query_generator.build_sparql_query(
|
|
225
|
-
graph, # type: ignore[arg-type]
|
|
226
|
-
request.rule,
|
|
227
|
-
prefixes=rules.prefixes,
|
|
228
|
-
)
|
|
229
|
-
else:
|
|
230
|
-
logging.error("Unknown rule type")
|
|
231
|
-
return {"error": "Unknown rule type"}
|
|
232
|
-
stop_time = time.perf_counter()
|
|
233
|
-
elapsed_time_sec_1 = stop_time - start_time
|
|
234
|
-
logging.info(f"Computed query : {sparql_query} in {elapsed_time_sec_1 * 1000} ms")
|
|
235
|
-
|
|
236
|
-
api_result = get_data_from_graph(sparql_query, request.graph_name, workflow_name=request.workflow_name)
|
|
237
|
-
api_result["elapsed_time_sec"] += elapsed_time_sec_1
|
|
238
|
-
return api_result
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
@router.get("/api/object-properties")
|
|
242
|
-
def get_object_properties(reference: str, graph_name: str = "source", workflow_name: str = "default"):
|
|
243
|
-
logging.info(f"Querying object-properties from {graph_name} :")
|
|
244
|
-
query = f"SELECT ?property ?value WHERE {{ <{reference}> ?property ?value }} ORDER BY ?property"
|
|
245
|
-
return get_data_from_graph(query, graph_name, workflow_name=workflow_name)
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
@router.get("/api/search")
|
|
249
|
-
def search(
|
|
250
|
-
search_str: str, graph_name: str = "source", search_type: str = "value_exact_match", workflow_name: str = "default"
|
|
251
|
-
):
|
|
252
|
-
logging.info(f"Search from {graph_name} :")
|
|
253
|
-
if search_type == "reference":
|
|
254
|
-
query = (
|
|
255
|
-
f"SELECT ?class ?reference WHERE {{ {{?reference ?class <{search_str}> . }} "
|
|
256
|
-
f"UNION {{ <{search_str}> ?class ?reference }} }} limit 10000"
|
|
257
|
-
)
|
|
258
|
-
|
|
259
|
-
elif search_type == "value_exact_match":
|
|
260
|
-
query = (
|
|
261
|
-
f"select ?object_ref ?type ?property ?value where "
|
|
262
|
-
f"{{ ?object_ref ?property ?value . ?object_ref a ?type . "
|
|
263
|
-
f'FILTER(?value="{search_str}") }} limit 10000'
|
|
264
|
-
)
|
|
265
|
-
elif search_type == "value_regexp":
|
|
266
|
-
query = (
|
|
267
|
-
f"select ?object_ref ?type ?property ?value where "
|
|
268
|
-
f"{{ ?object_ref ?property ?value . ?object_ref a ?type . "
|
|
269
|
-
f'FILTER regex(?value, "{search_str}","i") }} limit 10000'
|
|
270
|
-
)
|
|
271
|
-
return get_data_from_graph(query, graph_name, workflow_name=workflow_name)
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
@router.get("/api/get-classes")
|
|
275
|
-
def get_classes(graph_name: str = "source", workflow_name: str = "default", cache: bool = True):
|
|
276
|
-
logging.info(f"Querying graph classes from graph name : {graph_name}, cache : {cache}")
|
|
277
|
-
cache_key = f"classes_{graph_name}"
|
|
278
|
-
if cache_key in CACHE_STORE and cache:
|
|
279
|
-
return CACHE_STORE[cache_key]
|
|
280
|
-
query = (
|
|
281
|
-
"SELECT ?class (count(?s) as ?instances ) WHERE { ?s a ?class . } " "group by ?class order by DESC(?instances)"
|
|
282
|
-
)
|
|
283
|
-
api_result = get_data_from_graph(query, graph_name, workflow_name)
|
|
284
|
-
CACHE_STORE["get_classes"] = api_result
|
|
285
|
-
return api_result
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
def get_data_from_graph(sparq_query: str, graph_name: str = "source", workflow_name: str = "default") -> dict[str, Any]:
|
|
289
|
-
if NEAT_APP.workflow_manager is None:
|
|
290
|
-
return {"error": "NeatApp is not initialized"}
|
|
291
|
-
total_elapsed_time = 0.0
|
|
292
|
-
api_result: dict[str, Any] = {"error": ""}
|
|
293
|
-
result = None
|
|
294
|
-
|
|
295
|
-
try:
|
|
296
|
-
logging.info(f"Preparing query :{sparq_query} ")
|
|
297
|
-
start_time = time.perf_counter()
|
|
298
|
-
workflow = NEAT_APP.workflow_manager.get_workflow(workflow_name)
|
|
299
|
-
if workflow is None:
|
|
300
|
-
return {"error": f"Workflow {workflow_name} not found"}
|
|
301
|
-
workflow_context = workflow.get_context()
|
|
302
|
-
|
|
303
|
-
if graph_name == "source":
|
|
304
|
-
if "SourceGraph" in workflow_context:
|
|
305
|
-
result = cast(SourceGraph, workflow_context["SourceGraph"]).graph.query(sparq_query)
|
|
306
|
-
else:
|
|
307
|
-
logging.info("Source graph is empty , please load the graph first")
|
|
308
|
-
api_result["error"] = "source graph is empty , please load the graph first"
|
|
309
|
-
elif graph_name == "solution":
|
|
310
|
-
if "SolutionGraph" in workflow_context:
|
|
311
|
-
result = cast(SolutionGraph, workflow_context["SolutionGraph"]).graph.query(sparq_query)
|
|
312
|
-
else:
|
|
313
|
-
logging.info("Solution graph is empty , please load the graph first")
|
|
314
|
-
api_result["error"] = "solution graph is empty , please load the graph first"
|
|
315
|
-
else:
|
|
316
|
-
raise Exception("Unknown graph name")
|
|
317
|
-
|
|
318
|
-
stop_time = time.perf_counter()
|
|
319
|
-
elapsed_time_sec_1 = stop_time - start_time
|
|
320
|
-
logging.info(f"Query prepared in {elapsed_time_sec_1 * 1000} ms")
|
|
321
|
-
|
|
322
|
-
start_time = time.perf_counter()
|
|
323
|
-
if result:
|
|
324
|
-
api_result = rdf_result_to_api_response(result)
|
|
325
|
-
stop_time = time.perf_counter()
|
|
326
|
-
elapsed_time_sec_2 = stop_time - start_time
|
|
327
|
-
total_elapsed_time = elapsed_time_sec_1 + elapsed_time_sec_2
|
|
328
|
-
except Exception as e:
|
|
329
|
-
logging.error(f"Error while executing query :{e}")
|
|
330
|
-
traceback.print_exc()
|
|
331
|
-
api_result["error"] = str(e)
|
|
332
|
-
|
|
333
|
-
api_result["query"] = sparq_query
|
|
334
|
-
api_result["elapsed_time_sec"] = total_elapsed_time
|
|
335
|
-
logging.info(f"Data fetched in {total_elapsed_time * 1000} ms")
|
|
336
|
-
return api_result
|