cognite-neat 0.100.0__tar.gz → 0.101.0__tar.gz

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 (276) hide show
  1. cognite_neat-0.101.0/PKG-INFO +113 -0
  2. cognite_neat-0.101.0/README.md +48 -0
  3. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_client/_api/data_modeling_loaders.py +28 -8
  4. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/loaders/_rdf2dms.py +0 -1
  5. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/transformers/__init__.py +5 -0
  6. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/transformers/_iodd.py +9 -4
  7. cognite_neat-0.101.0/cognite/neat/_graph/transformers/_prune_graph.py +183 -0
  8. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/exporters/_rules2dms.py +38 -16
  9. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/models/_base_rules.py +13 -9
  10. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/models/dms/_rules.py +111 -39
  11. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/models/information/_rules.py +50 -17
  12. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_session/_base.py +18 -0
  13. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_session/_read.py +3 -3
  14. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_session/_to.py +3 -3
  15. cognite_neat-0.101.0/cognite/neat/_utils/reader/__init__.py +3 -0
  16. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_utils/reader/_base.py +40 -35
  17. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_utils/text.py +12 -0
  18. cognite_neat-0.101.0/cognite/neat/_version.py +2 -0
  19. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/pyproject.toml +1 -1
  20. cognite_neat-0.100.0/PKG-INFO +0 -215
  21. cognite_neat-0.100.0/README.md +0 -150
  22. cognite_neat-0.100.0/cognite/neat/_graph/transformers/_prune_graph.py +0 -126
  23. cognite_neat-0.100.0/cognite/neat/_utils/reader/__init__.py +0 -3
  24. cognite_neat-0.100.0/cognite/neat/_version.py +0 -2
  25. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/LICENSE +0 -0
  26. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/__init__.py +0 -0
  27. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/api/__init__.py +0 -0
  28. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/api/asgi/metrics.py +0 -0
  29. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/api/configuration.py +0 -0
  30. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/api/context_manager/__init__.py +0 -0
  31. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/api/context_manager/manager.py +0 -0
  32. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/api/data_classes/__init__.py +0 -0
  33. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/api/data_classes/rest.py +0 -0
  34. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/api/explorer.py +0 -0
  35. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/api/routers/configuration.py +0 -0
  36. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/api/routers/crud.py +0 -0
  37. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/api/routers/metrics.py +0 -0
  38. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/api/routers/workflows.py +0 -0
  39. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/api/utils/__init__.py +0 -0
  40. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/api/utils/data_mapping.py +0 -0
  41. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/api/utils/logging.py +0 -0
  42. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/api/utils/query_templates.py +0 -0
  43. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/main.py +0 -0
  44. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/monitoring/__init__.py +0 -0
  45. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/monitoring/metrics.py +0 -0
  46. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/index.html +0 -0
  47. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/.gitignore +0 -0
  48. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/README.md +0 -0
  49. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/build/asset-manifest.json +0 -0
  50. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/build/favicon.ico +0 -0
  51. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/build/img/architect-icon.svg +0 -0
  52. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/build/img/developer-icon.svg +0 -0
  53. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/build/img/sme-icon.svg +0 -0
  54. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/build/index.html +0 -0
  55. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/build/logo192.png +0 -0
  56. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/build/manifest.json +0 -0
  57. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/build/robots.txt +0 -0
  58. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/build/static/css/main.72e3d92e.css +0 -0
  59. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/build/static/css/main.72e3d92e.css.map +0 -0
  60. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/build/static/js/main.5a52cf09.js +0 -0
  61. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/build/static/js/main.5a52cf09.js.LICENSE.txt +0 -0
  62. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/build/static/js/main.5a52cf09.js.map +0 -0
  63. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/build/static/media/logo.8093b84df9ed36a174c629d6fe0b730d.svg +0 -0
  64. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/package-lock.json +0 -0
  65. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/package.json +0 -0
  66. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/public/favicon.ico +0 -0
  67. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/public/img/architect-icon.svg +0 -0
  68. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/public/img/developer-icon.svg +0 -0
  69. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/public/img/sme-icon.svg +0 -0
  70. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/public/index.html +0 -0
  71. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/public/logo192.png +0 -0
  72. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/public/manifest.json +0 -0
  73. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/public/robots.txt +0 -0
  74. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/src/App.css +0 -0
  75. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/src/App.js +0 -0
  76. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/src/App.test.js +0 -0
  77. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/src/MainContainer.tsx +0 -0
  78. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/src/components/JsonViewer.tsx +0 -0
  79. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/src/components/LocalUploader.tsx +0 -0
  80. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/src/components/OverviewComponentEditorDialog.tsx +0 -0
  81. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/src/components/StepEditorDialog.tsx +0 -0
  82. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/src/components/TabPanel.tsx +0 -0
  83. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/src/components/Utils.tsx +0 -0
  84. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/src/components/WorkflowDeleteDialog.tsx +0 -0
  85. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/src/components/WorkflowExecutionReport.tsx +0 -0
  86. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/src/components/WorkflowImportExportDialog.tsx +0 -0
  87. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/src/components/WorkflowMetadataDialog.tsx +0 -0
  88. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/src/index.css +0 -0
  89. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/src/index.js +0 -0
  90. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/src/logo.svg +0 -0
  91. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/src/reportWebVitals.js +0 -0
  92. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/src/setupTests.js +0 -0
  93. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/src/types/WorkflowTypes.ts +0 -0
  94. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/src/views/AboutView.tsx +0 -0
  95. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/src/views/ConfigView.tsx +0 -0
  96. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/src/views/GlobalConfigView.tsx +0 -0
  97. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/src/views/WorkflowView.tsx +0 -0
  98. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_app/ui/neat-app/tsconfig.json +0 -0
  99. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_client/__init__.py +0 -0
  100. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_client/_api/__init__.py +0 -0
  101. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_client/_api/schema.py +0 -0
  102. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_client/_api_client.py +0 -0
  103. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_client/data_classes/__init__.py +0 -0
  104. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_client/data_classes/data_modeling.py +0 -0
  105. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_client/data_classes/schema.py +0 -0
  106. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_config.py +0 -0
  107. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_constants.py +0 -0
  108. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/__init__.py +0 -0
  109. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/_shared.py +0 -0
  110. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/_tracking/__init__.py +0 -0
  111. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/_tracking/base.py +0 -0
  112. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/_tracking/log.py +0 -0
  113. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/examples/Knowledge-Graph-Nordic44-dirty.xml +0 -0
  114. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/examples/Knowledge-Graph-Nordic44.xml +0 -0
  115. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/examples/__init__.py +0 -0
  116. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/examples/skos-capturing-sheet-wind-topics.xlsx +0 -0
  117. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/extractors/__init__.py +0 -0
  118. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/extractors/_base.py +0 -0
  119. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/extractors/_classic_cdf/__init__.py +0 -0
  120. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/extractors/_classic_cdf/_assets.py +0 -0
  121. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/extractors/_classic_cdf/_base.py +0 -0
  122. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/extractors/_classic_cdf/_classic.py +0 -0
  123. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/extractors/_classic_cdf/_data_sets.py +0 -0
  124. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/extractors/_classic_cdf/_events.py +0 -0
  125. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/extractors/_classic_cdf/_files.py +0 -0
  126. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/extractors/_classic_cdf/_labels.py +0 -0
  127. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/extractors/_classic_cdf/_relationships.py +0 -0
  128. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/extractors/_classic_cdf/_sequences.py +0 -0
  129. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/extractors/_classic_cdf/_timeseries.py +0 -0
  130. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/extractors/_dexpi.py +0 -0
  131. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/extractors/_dms.py +0 -0
  132. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/extractors/_iodd.py +0 -0
  133. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/extractors/_mock_graph_generator.py +0 -0
  134. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/extractors/_rdf_file.py +0 -0
  135. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/loaders/__init__.py +0 -0
  136. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/loaders/_base.py +0 -0
  137. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/queries/__init__.py +0 -0
  138. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/queries/_base.py +0 -0
  139. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/queries/_construct.py +0 -0
  140. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/queries/_shared.py +0 -0
  141. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/transformers/_base.py +0 -0
  142. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/transformers/_classic_cdf.py +0 -0
  143. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/transformers/_rdfpath.py +0 -0
  144. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_graph/transformers/_value_type.py +0 -0
  145. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_issues/__init__.py +0 -0
  146. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_issues/_base.py +0 -0
  147. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_issues/errors/__init__.py +0 -0
  148. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_issues/errors/_external.py +0 -0
  149. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_issues/errors/_general.py +0 -0
  150. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_issues/errors/_properties.py +0 -0
  151. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_issues/errors/_resources.py +0 -0
  152. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_issues/errors/_workflow.py +0 -0
  153. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_issues/formatters.py +0 -0
  154. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_issues/warnings/__init__.py +0 -0
  155. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_issues/warnings/_external.py +0 -0
  156. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_issues/warnings/_general.py +0 -0
  157. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_issues/warnings/_models.py +0 -0
  158. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_issues/warnings/_properties.py +0 -0
  159. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_issues/warnings/_resources.py +0 -0
  160. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_issues/warnings/user_modeling.py +0 -0
  161. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/__init__.py +0 -0
  162. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/_constants.py +0 -0
  163. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/_shared.py +0 -0
  164. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/analysis/__init__.py +0 -0
  165. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/analysis/_base.py +0 -0
  166. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/analysis/_dms.py +0 -0
  167. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/analysis/_information.py +0 -0
  168. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/catalog/__init__.py +0 -0
  169. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/catalog/info-rules-imf.xlsx +0 -0
  170. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/exporters/__init__.py +0 -0
  171. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/exporters/_base.py +0 -0
  172. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/exporters/_rules2excel.py +0 -0
  173. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/exporters/_rules2instance_template.py +0 -0
  174. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/exporters/_rules2ontology.py +0 -0
  175. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/exporters/_rules2yaml.py +0 -0
  176. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/exporters/_validation.py +0 -0
  177. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/importers/__init__.py +0 -0
  178. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/importers/_base.py +0 -0
  179. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/importers/_dms2rules.py +0 -0
  180. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/importers/_dtdl2rules/__init__.py +0 -0
  181. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/importers/_dtdl2rules/_unit_lookup.py +0 -0
  182. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/importers/_dtdl2rules/dtdl_converter.py +0 -0
  183. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/importers/_dtdl2rules/dtdl_importer.py +0 -0
  184. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/importers/_dtdl2rules/spec.py +0 -0
  185. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/importers/_rdf/__init__.py +0 -0
  186. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/importers/_rdf/_base.py +0 -0
  187. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/importers/_rdf/_imf2rules.py +0 -0
  188. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/importers/_rdf/_inference2rules.py +0 -0
  189. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/importers/_rdf/_owl2rules.py +0 -0
  190. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/importers/_rdf/_shared.py +0 -0
  191. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/importers/_spreadsheet2rules.py +0 -0
  192. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/importers/_yaml2rules.py +0 -0
  193. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/models/__init__.py +0 -0
  194. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/models/_base_input.py +0 -0
  195. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/models/_rdfpath.py +0 -0
  196. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/models/_types.py +0 -0
  197. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/models/data_types.py +0 -0
  198. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/models/dms/__init__.py +0 -0
  199. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/models/dms/_exporter.py +0 -0
  200. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/models/dms/_rules_input.py +0 -0
  201. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/models/dms/_validation.py +0 -0
  202. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/models/entities/__init__.py +0 -0
  203. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/models/entities/_constants.py +0 -0
  204. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/models/entities/_loaders.py +0 -0
  205. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/models/entities/_multi_value.py +0 -0
  206. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/models/entities/_single_value.py +0 -0
  207. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/models/entities/_types.py +0 -0
  208. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/models/entities/_wrapped.py +0 -0
  209. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/models/information/__init__.py +0 -0
  210. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/models/information/_rules_input.py +0 -0
  211. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/models/information/_validation.py +0 -0
  212. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/models/mapping/__init__.py +0 -0
  213. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/models/mapping/_classic2core.py +0 -0
  214. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/models/mapping/_classic2core.yaml +0 -0
  215. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/transformers/__init__.py +0 -0
  216. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/transformers/_base.py +0 -0
  217. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/transformers/_converters.py +0 -0
  218. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/transformers/_mapping.py +0 -0
  219. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/transformers/_pipelines.py +0 -0
  220. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_rules/transformers/_verification.py +0 -0
  221. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_session/__init__.py +0 -0
  222. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_session/_collector.py +0 -0
  223. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_session/_drop.py +0 -0
  224. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_session/_inspect.py +0 -0
  225. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_session/_mapping.py +0 -0
  226. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_session/_prepare.py +0 -0
  227. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_session/_set.py +0 -0
  228. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_session/_show.py +0 -0
  229. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_session/_state.py +0 -0
  230. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_session/_wizard.py +0 -0
  231. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_session/engine/__init__.py +0 -0
  232. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_session/engine/_import.py +0 -0
  233. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_session/engine/_interface.py +0 -0
  234. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_session/engine/_load.py +0 -0
  235. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_session/exceptions.py +0 -0
  236. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_shared.py +0 -0
  237. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_store/__init__.py +0 -0
  238. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_store/_base.py +0 -0
  239. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_store/_provenance.py +0 -0
  240. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_utils/__init__.py +0 -0
  241. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_utils/auth.py +0 -0
  242. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_utils/auxiliary.py +0 -0
  243. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_utils/collection_.py +0 -0
  244. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_utils/rdf_.py +0 -0
  245. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_utils/spreadsheet.py +0 -0
  246. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_utils/time_.py +0 -0
  247. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_utils/upload.py +0 -0
  248. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_utils/xml_.py +0 -0
  249. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_workflows/__init__.py +0 -0
  250. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_workflows/base.py +0 -0
  251. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_workflows/cdf_store.py +0 -0
  252. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_workflows/examples/Export_DMS/workflow.yaml +0 -0
  253. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_workflows/examples/Export_Semantic_Data_Model/workflow.yaml +0 -0
  254. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_workflows/examples/Import_DMS/workflow.yaml +0 -0
  255. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_workflows/examples/Validate_Rules/workflow.yaml +0 -0
  256. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_workflows/examples/Validate_Solution_Model/workflow.yaml +0 -0
  257. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_workflows/manager.py +0 -0
  258. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_workflows/model.py +0 -0
  259. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_workflows/steps/__init__.py +0 -0
  260. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_workflows/steps/data_contracts.py +0 -0
  261. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_workflows/steps/lib/__init__.py +0 -0
  262. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_workflows/steps/lib/current/__init__.py +0 -0
  263. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_workflows/steps/lib/current/graph_extractor.py +0 -0
  264. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_workflows/steps/lib/current/graph_loader.py +0 -0
  265. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_workflows/steps/lib/current/graph_store.py +0 -0
  266. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_workflows/steps/lib/current/rules_exporter.py +0 -0
  267. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_workflows/steps/lib/current/rules_importer.py +0 -0
  268. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_workflows/steps/lib/current/rules_validator.py +0 -0
  269. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_workflows/steps/lib/io/__init__.py +0 -0
  270. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_workflows/steps/lib/io/io_steps.py +0 -0
  271. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_workflows/steps/step_model.py +0 -0
  272. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_workflows/steps_registry.py +0 -0
  273. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_workflows/tasks.py +0 -0
  274. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_workflows/triggers.py +0 -0
  275. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/_workflows/utils.py +0 -0
  276. {cognite_neat-0.100.0 → cognite_neat-0.101.0}/cognite/neat/py.typed +0 -0
@@ -0,0 +1,113 @@
1
+ Metadata-Version: 2.1
2
+ Name: cognite-neat
3
+ Version: 0.101.0
4
+ Summary: Knowledge graph transformation
5
+ Home-page: https://cognite-neat.readthedocs-hosted.com/
6
+ License: Apache-2.0
7
+ Author: Nikola Vasiljevic
8
+ Author-email: nikola.vasiljevic@cognite.com
9
+ Requires-Python: >=3.10,<4.0
10
+ Classifier: License :: OSI Approved :: Apache Software License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Provides-Extra: all
17
+ Provides-Extra: docs
18
+ Provides-Extra: google
19
+ Provides-Extra: oxi
20
+ Provides-Extra: service
21
+ Requires-Dist: PyYAML
22
+ Requires-Dist: backports.strenum (>=1.2,<2.0) ; python_version < "3.11"
23
+ Requires-Dist: cognite-sdk (>=7.54.6,<8.0.0)
24
+ Requires-Dist: elementpath (>=4.0.0,<5.0.0)
25
+ Requires-Dist: exceptiongroup (>=1.1.3,<2.0.0) ; python_version < "3.11"
26
+ Requires-Dist: fastapi (>=0,<1) ; extra == "service" or extra == "all"
27
+ Requires-Dist: google-api-python-client ; extra == "google"
28
+ Requires-Dist: google-auth-oauthlib ; extra == "google"
29
+ Requires-Dist: gspread ; extra == "google"
30
+ Requires-Dist: jsonpath-python (>=1.0.6,<2.0.0)
31
+ Requires-Dist: lxml (>=5.3.0,<6.0.0) ; extra == "all"
32
+ Requires-Dist: mixpanel (>=4.10.1,<5.0.0)
33
+ Requires-Dist: mkdocs ; extra == "docs"
34
+ Requires-Dist: mkdocs-autorefs (>=0.5.0,<0.6.0) ; extra == "docs"
35
+ Requires-Dist: mkdocs-git-authors-plugin ; extra == "docs"
36
+ Requires-Dist: mkdocs-git-revision-date-localized-plugin ; extra == "docs"
37
+ Requires-Dist: mkdocs-gitbook ; extra == "docs"
38
+ Requires-Dist: mkdocs-glightbox ; extra == "docs"
39
+ Requires-Dist: mkdocs-jupyter ; extra == "docs"
40
+ Requires-Dist: mkdocs-material-extensions ; extra == "docs"
41
+ Requires-Dist: mkdocstrings[python] ; extra == "docs"
42
+ Requires-Dist: networkx (>=3.4.2,<4.0.0)
43
+ Requires-Dist: openpyxl
44
+ Requires-Dist: oxrdflib[oxigraph] (>=0.4.0,<0.5.0) ; extra == "oxi" or extra == "all"
45
+ Requires-Dist: packaging (>=22.0,<25.0)
46
+ Requires-Dist: pandas
47
+ Requires-Dist: prometheus-client (>=0,<1) ; extra == "service" or extra == "all"
48
+ Requires-Dist: pydantic (>=2,<3)
49
+ Requires-Dist: pymdown-extensions ; extra == "docs"
50
+ Requires-Dist: pyoxigraph (==0.4.3) ; extra == "oxi" or extra == "all"
51
+ Requires-Dist: python-multipart (==0.0.9) ; extra == "service" or extra == "all"
52
+ Requires-Dist: pyvis (>=0.3.2,<0.4.0)
53
+ Requires-Dist: rdflib
54
+ Requires-Dist: requests
55
+ Requires-Dist: rich[jupyter] (>=13.7.1,<14.0.0)
56
+ Requires-Dist: schedule (>=1,<2) ; extra == "service" or extra == "all"
57
+ Requires-Dist: tomli (>=2.0.1,<3.0.0) ; python_version < "3.11"
58
+ Requires-Dist: typing_extensions (>=4.8,<5.0) ; python_version < "3.11"
59
+ Requires-Dist: urllib3 (>=2,<3)
60
+ Requires-Dist: uvicorn[standard] (>=0,<1) ; extra == "service" or extra == "all"
61
+ Project-URL: Documentation, https://cognite-neat.readthedocs-hosted.com/
62
+ Project-URL: Repository, https://github.com/cognitedata/neat
63
+ Description-Content-Type: text/markdown
64
+
65
+ # kNowlEdge grAph Transformer (NEAT)
66
+
67
+ [![release](https://img.shields.io/github/actions/workflow/status/cognitedata/neat/release.yaml?style=for-the-badge)](https://github.com/cognitedata/neat/actions/workflows/release.yaml)
68
+ [![Documentation Status](https://readthedocs.com/projects/cognite-neat/badge/?version=latest&style=for-the-badge)](https://cognite-neat.readthedocs-hosted.com/en/latest/?badge=latest)
69
+ [![Github](https://shields.io/badge/github-cognite/neat-green?logo=github&style=for-the-badge)](https://github.com/cognitedata/neat)
70
+ [![PyPI](https://img.shields.io/pypi/v/cognite-neat?style=for-the-badge)](https://pypi.org/project/cognite-neat/)
71
+ [![Downloads](https://img.shields.io/pypi/dm/cognite-neat?style=for-the-badge)](https://pypistats.org/packages/cognite-neat)
72
+ [![Docker Pulls](https://img.shields.io/docker/pulls/cognite/neat?style=for-the-badge)](https://hub.docker.com/r/cognite/neat)
73
+ [![GitHub](https://img.shields.io/github/license/cognitedata/neat?style=for-the-badge)](https://github.com/cognitedata/neat/blob/master/LICENSE)
74
+ [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge)](https://github.com/ambv/black)
75
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json&style=for-the-badge)](https://github.com/astral-sh/ruff)
76
+ [![mypy](https://img.shields.io/badge/mypy-checked-000000.svg?style=for-the-badge&color=blue)](http://mypy-lang.org)
77
+
78
+ NEAT is a domain expert centric and developer friendly solution for rapid:
79
+
80
+ - semantic data modeling
81
+ - creation, transformation and enrichment of knowledge graphs
82
+ - and ingestion of the models and graphs into [Cognite Data Fusion](https://www.cognite.com/en/product/cognite_data_fusion_industrial_dataops_platform)
83
+
84
+ NEAT is using open and globally recognized standards maintained by the [World Wide Web Consortium (W3C)](https://www.w3.org/RDF/).
85
+ NEAT represents an essential tool for creation of standardized, machine-actionable, linked and semantic (meta)data.
86
+
87
+ > NEAT is an acronym derived from k**N**owl**Ed**ge gr**A**ph **T**ransformer hallucinated by GenAI.
88
+
89
+ ## Installation
90
+
91
+ ```bash
92
+ pip install cognite-neat
93
+ ```
94
+
95
+ ## Usage
96
+
97
+ The user interface for `NEAT` is a notebook-based environment. Once you have set up your notebook
98
+ environment, you start by creating a `CogniteClient` and instantiate a `NeatSession` object.
99
+
100
+ ```python
101
+ from cognite.neat import NeatSession, get_cognite_client
102
+
103
+ client = get_cognite_client(".env")
104
+
105
+ neat = NeatSession(client)
106
+
107
+ neat.read.cdf.data_model(("my_space", "MyDataModel", "v1"))
108
+ ```
109
+
110
+ ## Documentation
111
+
112
+ For more information, see the [documentation](https://cognite-neat.readthedocs-hosted.com/en/latest/)
113
+
@@ -0,0 +1,48 @@
1
+ # kNowlEdge grAph Transformer (NEAT)
2
+
3
+ [![release](https://img.shields.io/github/actions/workflow/status/cognitedata/neat/release.yaml?style=for-the-badge)](https://github.com/cognitedata/neat/actions/workflows/release.yaml)
4
+ [![Documentation Status](https://readthedocs.com/projects/cognite-neat/badge/?version=latest&style=for-the-badge)](https://cognite-neat.readthedocs-hosted.com/en/latest/?badge=latest)
5
+ [![Github](https://shields.io/badge/github-cognite/neat-green?logo=github&style=for-the-badge)](https://github.com/cognitedata/neat)
6
+ [![PyPI](https://img.shields.io/pypi/v/cognite-neat?style=for-the-badge)](https://pypi.org/project/cognite-neat/)
7
+ [![Downloads](https://img.shields.io/pypi/dm/cognite-neat?style=for-the-badge)](https://pypistats.org/packages/cognite-neat)
8
+ [![Docker Pulls](https://img.shields.io/docker/pulls/cognite/neat?style=for-the-badge)](https://hub.docker.com/r/cognite/neat)
9
+ [![GitHub](https://img.shields.io/github/license/cognitedata/neat?style=for-the-badge)](https://github.com/cognitedata/neat/blob/master/LICENSE)
10
+ [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge)](https://github.com/ambv/black)
11
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json&style=for-the-badge)](https://github.com/astral-sh/ruff)
12
+ [![mypy](https://img.shields.io/badge/mypy-checked-000000.svg?style=for-the-badge&color=blue)](http://mypy-lang.org)
13
+
14
+ NEAT is a domain expert centric and developer friendly solution for rapid:
15
+
16
+ - semantic data modeling
17
+ - creation, transformation and enrichment of knowledge graphs
18
+ - and ingestion of the models and graphs into [Cognite Data Fusion](https://www.cognite.com/en/product/cognite_data_fusion_industrial_dataops_platform)
19
+
20
+ NEAT is using open and globally recognized standards maintained by the [World Wide Web Consortium (W3C)](https://www.w3.org/RDF/).
21
+ NEAT represents an essential tool for creation of standardized, machine-actionable, linked and semantic (meta)data.
22
+
23
+ > NEAT is an acronym derived from k**N**owl**Ed**ge gr**A**ph **T**ransformer hallucinated by GenAI.
24
+
25
+ ## Installation
26
+
27
+ ```bash
28
+ pip install cognite-neat
29
+ ```
30
+
31
+ ## Usage
32
+
33
+ The user interface for `NEAT` is a notebook-based environment. Once you have set up your notebook
34
+ environment, you start by creating a `CogniteClient` and instantiate a `NeatSession` object.
35
+
36
+ ```python
37
+ from cognite.neat import NeatSession, get_cognite_client
38
+
39
+ client = get_cognite_client(".env")
40
+
41
+ neat = NeatSession(client)
42
+
43
+ neat.read.cdf.data_model(("my_space", "MyDataModel", "v1"))
44
+ ```
45
+
46
+ ## Documentation
47
+
48
+ For more information, see the [documentation](https://cognite-neat.readthedocs-hosted.com/en/latest/)
@@ -3,7 +3,7 @@ from abc import ABC, abstractmethod
3
3
  from collections.abc import Callable, Collection, Iterable, Sequence
4
4
  from dataclasses import dataclass, field
5
5
  from graphlib import TopologicalSorter
6
- from typing import TYPE_CHECKING, Any, ClassVar, Generic, TypeVar, cast
6
+ from typing import TYPE_CHECKING, Any, ClassVar, Generic, Literal, TypeVar, cast
7
7
 
8
8
  from cognite.client.data_classes import filters
9
9
  from cognite.client.data_classes._base import (
@@ -363,9 +363,16 @@ class SpaceLoader(DataModelingLoader[str, SpaceApply, Space, SpaceApplyList, Spa
363
363
  return SpaceApplyList(schema.spaces.values())
364
364
 
365
365
  def has_data(self, item_id: str) -> bool:
366
- return bool(self._client.data_modeling.instances.list("node", limit=1, space=item_id)) or bool(
367
- self._client.data_modeling.instances.list("edge", limit=1, space=item_id)
368
- )
366
+ if self._client.data_modeling.instances.list("node", limit=1, space=item_id):
367
+ return True
368
+ if self._client.data_modeling.instances.list("edge", limit=1, space=item_id):
369
+ return True
370
+ # Need to check if there are any containers with data in the space. Typically,
371
+ # a schema space will not contain data, while it will have containers that have data in an instance space.
372
+ for container in self._client.data_modeling.containers(space=item_id, include_global=False):
373
+ if self._client.loaders.containers.has_data(container.as_id()):
374
+ return True
375
+ return False
369
376
 
370
377
 
371
378
  class ContainerLoader(DataModelingLoader[ContainerId, ContainerApply, Container, ContainerApplyList, ContainerList]):
@@ -490,10 +497,23 @@ class ContainerLoader(DataModelingLoader[ContainerId, ContainerApply, Container,
490
497
  return ContainerApplyList(schema.containers.values())
491
498
 
492
499
  def has_data(self, item_id: ContainerId) -> bool:
493
- has_data = filters.HasData(containers=[item_id])
494
- return bool(self._client.data_modeling.instances.list("node", limit=1, filter=has_data)) or bool(
495
- self._client.data_modeling.instances.list("edge", limit=1, filter=has_data)
496
- )
500
+ has_data_filter = filters.HasData(containers=[item_id])
501
+ has_data = False
502
+ instance_type: Literal["node", "edge"]
503
+ # Mypy does not understand that the instance type is Literal["node", "edge"]
504
+ for instance_type in ["node", "edge"]: # type: ignore[assignment]
505
+ try:
506
+ has_data = bool(
507
+ self._client.data_modeling.instances.list(instance_type, limit=1, filter=has_data_filter)
508
+ )
509
+ except CogniteAPIError as e:
510
+ if e.code != 400:
511
+ # If the container is used for nodes and we ask for edges, we get a 400 error. This
512
+ # means there is no edge data for this container.
513
+ raise
514
+ if has_data:
515
+ return True
516
+ return has_data
497
517
 
498
518
 
499
519
  class ViewLoader(DataModelingLoader[ViewId, ViewApply, View, ViewApplyList, ViewList]):
@@ -156,7 +156,6 @@ class DMSLoader(CDFLoader[dm.InstanceApply]):
156
156
 
157
157
  for identifier, properties in reader:
158
158
  try:
159
- print(view_id)
160
159
  yield self._create_node(identifier, properties, pydantic_cls, view_id)
161
160
  except ValueError as e:
162
161
  error_node = ResourceCreationError(identifier, "node", error=str(e))
@@ -7,6 +7,7 @@ from ._classic_cdf import (
7
7
  AssetTimeSeriesConnector,
8
8
  RelationshipAsEdgeTransformer,
9
9
  )
10
+ from ._prune_graph import AttachPropertyFromTargetToSource, PruneDanglingNodes
10
11
  from ._rdfpath import AddSelfReferenceProperty, MakeConnectionOnExactMatch
11
12
  from ._value_type import SplitMultiValueProperty
12
13
 
@@ -21,6 +22,8 @@ __all__ = [
21
22
  "SplitMultiValueProperty",
22
23
  "RelationshipAsEdgeTransformer",
23
24
  "MakeConnectionOnExactMatch",
25
+ "AttachPropertyFromTargetToSource",
26
+ "PruneDanglingNodes",
24
27
  ]
25
28
 
26
29
  Transformers = (
@@ -34,4 +37,6 @@ Transformers = (
34
37
  | SplitMultiValueProperty
35
38
  | RelationshipAsEdgeTransformer
36
39
  | MakeConnectionOnExactMatch
40
+ | AttachPropertyFromTargetToSource
41
+ | PruneDanglingNodes
37
42
  )
@@ -2,12 +2,12 @@ from rdflib import Namespace
2
2
 
3
3
  from cognite.neat._graph.extractors import IODDExtractor
4
4
 
5
- from ._prune_graph import PruneDanglingNodes, TwoHopFlattener
5
+ from ._prune_graph import AttachPropertyFromTargetToSource, PruneDanglingNodes
6
6
 
7
7
  IODD = Namespace("http://www.io-link.com/IODD/2010/10/")
8
8
 
9
9
 
10
- class IODDTwoHopFlattener(TwoHopFlattener):
10
+ class IODDAttachPropertyFromTargetToSource(AttachPropertyFromTargetToSource):
11
11
  _need_changes = frozenset(
12
12
  {
13
13
  str(IODDExtractor.__name__),
@@ -15,11 +15,16 @@ class IODDTwoHopFlattener(TwoHopFlattener):
15
15
  )
16
16
 
17
17
  def __init__(self):
18
- super().__init__(destination_node_type=IODD.TextObject, property_predicate=IODD.value, property_name="value")
18
+ super().__init__(
19
+ target_node_type=IODD.TextObject,
20
+ namespace=IODD,
21
+ target_property="value",
22
+ delete_target_node=True,
23
+ )
19
24
 
20
25
 
21
26
  class IODDPruneDanglingNodes(PruneDanglingNodes):
22
- _need_changes = frozenset({str(IODDExtractor.__name__), str(IODDTwoHopFlattener.__name__)})
27
+ _need_changes = frozenset({str(IODDExtractor.__name__), str(IODDAttachPropertyFromTargetToSource.__name__)})
23
28
 
24
29
  def __init__(self):
25
30
  super().__init__(node_prune_types=[IODD.TextObject])
@@ -0,0 +1,183 @@
1
+ from rdflib import Graph, Namespace, URIRef
2
+ from rdflib.query import ResultRow
3
+
4
+ from cognite.neat._utils.rdf_ import as_neat_compliant_uri
5
+ from cognite.neat._utils.text import sentence_or_string_to_camel
6
+
7
+ from ._base import BaseTransformer
8
+
9
+
10
+ class AttachPropertyFromTargetToSource(BaseTransformer):
11
+ """
12
+ Transformer that considers a TargetNode and SourceNode relationship, to extract a property that is attached to
13
+ the TargetNode, and attaches it to the SourceNode instead, while also deleting the edge between
14
+ the SourceNode and TargetNode.
15
+ This means that you no longer have to go via the SourceNode to TargetNode to extract
16
+ the desired property from TargetNode, you can get it directly from the SourceNode instead.
17
+ Further, there are two ways of defining the predicate for the new property to attach to
18
+ the SourceNode. The predicate that is used will either be the old predicate between the SourceNode and TargetNode,
19
+ or, the TargetNode may hold a property with a value for the new predicate to use.
20
+ In this case, the user must specify the name of this predicate property connected to the TargetNode.
21
+ Consider the following example for illustration:
22
+
23
+ Ex. AttachPropertyFromTargetToSource
24
+ Graph before transformation:
25
+
26
+ :SourceNode a :SourceType .
27
+ :SourceNode :sourceProperty :TargetNode .
28
+
29
+ :TargetNode a :TargetType .
30
+ :TargetNode :propertyWhichValueWeWant 'Target Value' .
31
+ :TargetNode :propertyWhichValueWeMightWantAsNameForNewProperty 'PropertyName'
32
+
33
+ Use case A after transformation - attach new property to SourceNode using old predicate:
34
+
35
+ :SourceNode a :SourceType .
36
+ :SourceNode :sourceProperty 'Target Value' .
37
+
38
+ Use case B after transformation - extract new predicate from one of the properties of the TargetNode:
39
+
40
+ :SourceNode a :SourceType .
41
+ :SourceNode :PropertyName 'Target Value' .
42
+
43
+
44
+ The user can provide a flag to decide if the intermediate target node should be removed from the graph or not
45
+ after connecting the target property to the source node. The example illustrates this.
46
+ The default however is False.
47
+
48
+ If delete_target_node is not set, the expected number of triples after this transformation should be the same as
49
+ before the transformation.
50
+
51
+ If delete_target_node is set, the expected number of triples should be:
52
+ #triples_before - #target_nodes * #target_nodes_properties
53
+
54
+ Number of triples after operation from above example: 5 - 1*3 = 2
55
+
56
+ Args:
57
+ target_node_type: RDF.type of edge Node
58
+ namespace: RDF Namespace to use when querying the graph
59
+ target_property: str with name of the property that holds the value attached to the intermediate node
60
+ target_property_holding_new_property_name: Optional str of the property name that holds
61
+ the new predicate to use when attaching the new property to the source node.
62
+ delete_target_node: bool if the intermediate Node and Edge between source Node
63
+ and target property should be deleted. Defaults to False.
64
+ """
65
+
66
+ description: str = "Attaches a target property from a target node that is connected to a source node."
67
+
68
+ _query_template_use_case_a: str = """
69
+ SELECT ?sourceNode ?sourceProperty ?targetNode ?newSourceProperty ?newSourcePropertyValue WHERE {{
70
+ ?sourceNode ?sourceProperty ?targetNode .
71
+ BIND( <{target_property}> as ?newSourceProperty ) .
72
+ ?targetNode a <{target_node_type}> .
73
+ ?targetNode <{target_property}> ?newSourcePropertyValue . }}"""
74
+
75
+ _query_template_use_case_b: str = """
76
+ SELECT ?sourceNode ?sourceProperty ?targetNode ?newSourceProperty ?newSourcePropertyValue WHERE {{
77
+ ?sourceNode ?sourceProperty ?targetNode .
78
+ ?targetNode a <{target_node_type}> .
79
+ ?targetNode <{target_property_holding_new_property_name}> ?newSourceProperty .
80
+ ?targetNode <{target_property}> ?newSourcePropertyValue . }}"""
81
+
82
+ def __init__(
83
+ self,
84
+ target_node_type: URIRef,
85
+ namespace: Namespace,
86
+ target_property: str,
87
+ target_property_holding_new_property_name: str | None = None,
88
+ delete_target_node: bool = False,
89
+ ):
90
+ self.target_node_type = target_node_type
91
+ self.namespace = namespace
92
+ self.target_property = self.namespace[target_property]
93
+ self.delete_target_node = delete_target_node
94
+ self.target_property_holding_new_property_name = target_property_holding_new_property_name
95
+
96
+ def transform(self, graph) -> None:
97
+ nodes_to_delete: list[tuple] = []
98
+
99
+ if self.target_property_holding_new_property_name is not None:
100
+ target_property_holding_new_property_name = self.namespace[self.target_property_holding_new_property_name]
101
+ query = self._query_template_use_case_b.format(
102
+ target_node_type=self.target_node_type,
103
+ target_property_holding_new_property_name=target_property_holding_new_property_name,
104
+ target_property=self.target_property,
105
+ )
106
+ else:
107
+ query = self._query_template_use_case_a.format(
108
+ target_node_type=self.target_node_type,
109
+ target_property=self.target_property,
110
+ )
111
+
112
+ for (
113
+ source_node,
114
+ old_predicate,
115
+ target_node,
116
+ new_predicate_value,
117
+ new_property_value,
118
+ ) in graph.query(query):
119
+ if self.target_property_holding_new_property_name is not None:
120
+ # Ensure new predicate is URI compliant as we are creating a new predicate
121
+ new_predicate_value_string = sentence_or_string_to_camel(str(new_predicate_value))
122
+ predicate = as_neat_compliant_uri(self.namespace[new_predicate_value_string])
123
+ else:
124
+ predicate = old_predicate
125
+
126
+ # Create new connection from source node to value
127
+ graph.add((source_node, predicate, new_property_value))
128
+ # Remove old relationship between source node and destination node
129
+ graph.remove((source_node, old_predicate, target_node))
130
+
131
+ nodes_to_delete.append(target_node)
132
+
133
+ if self.delete_target_node:
134
+ for target_node in nodes_to_delete:
135
+ # Remove triples with edges to target_node
136
+ graph.remove((None, None, target_node))
137
+ # Remove target node triple and its properties
138
+ graph.remove((target_node, None, None))
139
+
140
+
141
+ class PruneDanglingNodes(BaseTransformer):
142
+ """
143
+ Knowledge graph pruner and resolver. Will remove rdf triples from graph that does not have connections
144
+ to other nodes, and traverse graph for specified types to resolve the value in the final node and link it to
145
+ the source node.
146
+
147
+ Ex. PruneDanglingNodes
148
+
149
+ Graph before pruning:
150
+ node(A, rdf:type(Pump)) -> node(B, rdf:type(Disc)),
151
+ node(C, rdf:type(Disc))
152
+
153
+ Graph after pruning of nodes rdf:type(Disc):
154
+
155
+ node(A, rd:type(Pump)) -> node(B, rdf:type(Disc))
156
+
157
+ Args:
158
+ node_prune_types: list of RDF types to prune from the Graph if they are stand-alone Nodes
159
+ """
160
+
161
+ description: str = "Prunes the graph of specified rdf types that do not have connections to other nodes."
162
+ _query_template = """
163
+ SELECT ?subject
164
+ WHERE {{
165
+ ?subject a <{rdf_type}> .
166
+ FILTER NOT EXISTS {{ ?s ?p ?subject }}
167
+ }}
168
+ """
169
+
170
+ def __init__(
171
+ self,
172
+ node_prune_types: list[URIRef],
173
+ ):
174
+ self.node_prune_types = node_prune_types
175
+
176
+ def transform(self, graph: Graph) -> None:
177
+ for object_type in self.node_prune_types:
178
+ nodes_without_neighbours = list(graph.query(self._query_template.format(rdf_type=object_type)))
179
+
180
+ for node in nodes_without_neighbours:
181
+ # Remove node and its property triples in the graph
182
+ if isinstance(node, ResultRow):
183
+ graph.remove((node["subject"], None, None))
@@ -12,6 +12,7 @@ from cognite.client.data_classes._base import (
12
12
  from cognite.client.data_classes.data_modeling import (
13
13
  DataModelApplyList,
14
14
  DataModelId,
15
+ SpaceApply,
15
16
  ViewApplyList,
16
17
  )
17
18
  from cognite.client.exceptions import CogniteAPIError
@@ -200,6 +201,32 @@ class DMSExporter(CDFExporter[DMSRules, DMSSchema]):
200
201
  loader.resource_name for loader, categorized in categorized_items_by_loader.items() if categorized.to_update
201
202
  )
202
203
 
204
+ deleted_by_name: dict[str, UploadResult] = {}
205
+ if not is_failing:
206
+ # Deletion is done in reverse order to take care of dependencies
207
+ for loader, items in reversed(categorized_items_by_loader.items()):
208
+ issue_list = IssueList()
209
+
210
+ if items.resource_name == client.loaders.data_models.resource_name:
211
+ warning_list = self._validate(list(items.item_ids()), client)
212
+ issue_list.extend(warning_list)
213
+
214
+ results = UploadResult(loader.resource_name, issues=issue_list) # type: ignore[var-annotated]
215
+ if dry_run:
216
+ results.deleted.update(items.to_delete_ids)
217
+ else:
218
+ if items.to_delete_ids:
219
+ try:
220
+ deleted = loader.delete(items.to_delete_ids)
221
+ except MultiCogniteAPIError as e:
222
+ results.deleted.update([loader.get_id(item) for item in e.success])
223
+ results.failed_deleted.update([loader.get_id(item) for item in e.failed])
224
+ for error in e.errors:
225
+ results.error_messages.append(f"Failed to delete {loader.resource_name}: {error!s}")
226
+ else:
227
+ results.deleted.update(deleted)
228
+ deleted_by_name[loader.resource_name] = results
229
+
203
230
  for loader, items in categorized_items_by_loader.items():
204
231
  issue_list = IssueList()
205
232
 
@@ -221,28 +248,21 @@ class DMSExporter(CDFExporter[DMSRules, DMSSchema]):
221
248
 
222
249
  results.unchanged.update(items.unchanged_ids)
223
250
  results.skipped.update(items.to_skip_ids)
251
+ if delete_results := deleted_by_name.get(loader.resource_name):
252
+ results.deleted.update(delete_results.deleted)
253
+ results.failed_deleted.update(delete_results.failed_deleted)
254
+ results.error_messages.extend(delete_results.error_messages)
255
+
224
256
  if dry_run:
225
257
  if self.existing in ["update", "force"]:
226
258
  # Assume all changed are successful
227
259
  results.changed.update(items.to_update_ids)
228
260
  elif self.existing == "skip":
229
261
  results.skipped.update(items.to_update_ids)
230
- results.deleted.update(items.to_delete_ids)
231
262
  results.created.update(items.to_create_ids)
232
263
  yield results
233
264
  continue
234
265
 
235
- if items.to_delete_ids:
236
- try:
237
- deleted = loader.delete(items.to_delete_ids)
238
- except MultiCogniteAPIError as e:
239
- results.deleted.update([loader.get_id(item) for item in e.success])
240
- results.failed_deleted.update([loader.get_id(item) for item in e.failed])
241
- for error in e.errors:
242
- results.error_messages.append(f"Failed to delete {loader.resource_name}: {error!s}")
243
- else:
244
- results.deleted.update(deleted)
245
-
246
266
  if items.to_create:
247
267
  try:
248
268
  created = loader.create(items.to_create)
@@ -304,12 +324,14 @@ class DMSExporter(CDFExporter[DMSRules, DMSSchema]):
304
324
  and not loader.in_space(item, self.include_space)
305
325
  ):
306
326
  continue
307
-
308
- cdf_item = cdf_item_by_id.get(loader.get_id(item))
327
+ item_id = loader.get_id(item)
328
+ cdf_item = cdf_item_by_id.get(item_id)
309
329
  if cdf_item is None:
310
330
  categorized.to_create.append(item)
311
- elif is_redeploying or self.existing == "recreate":
312
- if loader.has_data(cdf_item) and not self.drop_data:
331
+ elif (is_redeploying or self.existing == "recreate") and not isinstance(item, SpaceApply):
332
+ # Spaces are not deleted, instead they are updated. Deleting a space is an expensive operation
333
+ # and are seldom needed. If you need to delete the space, it should be done in a different operation.
334
+ if not self.drop_data and loader.has_data(item_id):
313
335
  categorized.to_skip.append(cdf_item)
314
336
  else:
315
337
  categorized.to_delete.append(cdf_item.as_write())
@@ -147,11 +147,13 @@ class BaseMetadata(SchemaModel):
147
147
  Metadata model for data model
148
148
  """
149
149
 
150
- role: ClassVar[RoleTypes]
151
- aspect: ClassVar[DataModelAspect]
152
- space: SpaceType = Field(alias="prefix")
153
- external_id: DataModelExternalIdType = Field(alias="externalId")
154
- version: VersionType
150
+ role: ClassVar[RoleTypes] = Field(description="Role of the person creating the data model")
151
+ aspect: ClassVar[DataModelAspect] = Field(description="Aspect of the data model")
152
+ space: SpaceType = Field(alias="prefix", description="The space where the data model is defined")
153
+ external_id: DataModelExternalIdType = Field(
154
+ alias="externalId", description="External identifier for the data model"
155
+ )
156
+ version: VersionType = Field(description="Version of the data model")
155
157
 
156
158
  name: str | None = Field(
157
159
  None,
@@ -160,21 +162,23 @@ class BaseMetadata(SchemaModel):
160
162
  max_length=255,
161
163
  )
162
164
 
163
- description: str | None = Field(None, min_length=1, max_length=1024)
165
+ description: str | None = Field(
166
+ None, min_length=1, max_length=1024, description="Short description of the data model"
167
+ )
164
168
 
165
169
  creator: StrListType = Field(
166
170
  description=(
167
- "List of contributors to the data model creation, "
171
+ "List of contributors (comma seperated) to the data model creation, "
168
172
  "typically information architects are considered as contributors."
169
173
  ),
170
174
  )
171
175
 
172
176
  created: datetime = Field(
173
- description=("Date of the data model creation"),
177
+ description="Date of the data model creation",
174
178
  )
175
179
 
176
180
  updated: datetime = Field(
177
- description=("Date of the data model update"),
181
+ description="Date of the data model update",
178
182
  )
179
183
 
180
184
  @field_validator("*", mode="before")