cognite-neat 0.85.5__tar.gz → 0.85.7__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.

Potentially problematic release.


This version of cognite-neat might be problematic. Click here for more details.

Files changed (319) hide show
  1. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/PKG-INFO +1 -1
  2. cognite_neat-0.85.7/cognite/neat/_version.py +1 -0
  3. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/api/routers/data_exploration.py +2 -2
  4. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/extractors/_classic_cdf/_assets.py +26 -9
  5. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/extractors/_mock_graph_generator.py +6 -2
  6. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/loaders/_base.py +3 -3
  7. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/loaders/_rdf2dms.py +13 -11
  8. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/queries/_base.py +16 -6
  9. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/queries/_shared.py +2 -2
  10. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/extractors/_mock_graph_generator.py +4 -2
  11. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/loaders/_asset_loader.py +5 -5
  12. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/loaders/core/rdf_to_assets.py +4 -4
  13. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/loaders/core/rdf_to_relationships.py +2 -2
  14. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/transformations/query_generator/sparql.py +2 -2
  15. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/transformations/transformer.py +2 -2
  16. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/exporters/_rules2ontology.py +6 -6
  17. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/importers/_graph2rules.py +4 -4
  18. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/importers/_owl2rules/_owl2classes.py +3 -3
  19. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/importers/_owl2rules/_owl2properties.py +5 -5
  20. cognite_neat-0.85.7/cognite/neat/rules/analysis/__init__.py +6 -0
  21. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/analysis/_base.py +0 -12
  22. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/analysis/_information_rules.py +116 -27
  23. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/exporters/_rules2ontology.py +6 -6
  24. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/importers/_base.py +8 -2
  25. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/importers/_inference2rules.py +4 -4
  26. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/importers/_owl2rules/_owl2classes.py +3 -3
  27. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/importers/_owl2rules/_owl2properties.py +5 -5
  28. cognite_neat-0.85.7/cognite/neat/utils/__init__.py +3 -0
  29. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/utils/utils.py +6 -6
  30. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/pyproject.toml +1 -1
  31. cognite_neat-0.85.5/cognite/neat/_version.py +0 -1
  32. cognite_neat-0.85.5/cognite/neat/rules/analysis/__init__.py +0 -3
  33. cognite_neat-0.85.5/cognite/neat/utils/__init__.py +0 -3
  34. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/LICENSE +0 -0
  35. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/README.md +0 -0
  36. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/__init__.py +0 -0
  37. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/_shared.py +0 -0
  38. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/api/__init__.py +0 -0
  39. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/api/asgi/metrics.py +0 -0
  40. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/api/configuration.py +0 -0
  41. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/api/context_manager/__init__.py +0 -0
  42. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/api/context_manager/manager.py +0 -0
  43. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/api/data_classes/__init__.py +0 -0
  44. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/api/data_classes/rest.py +0 -0
  45. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/api/explorer.py +0 -0
  46. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/api/routers/configuration.py +0 -0
  47. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/api/routers/core.py +0 -0
  48. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/api/routers/crud.py +0 -0
  49. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/api/routers/metrics.py +0 -0
  50. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/api/routers/rules.py +0 -0
  51. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/api/routers/workflows.py +0 -0
  52. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/api/utils/__init__.py +0 -0
  53. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/api/utils/data_mapping.py +0 -0
  54. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/api/utils/logging.py +0 -0
  55. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/api/utils/query_templates.py +0 -0
  56. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/main.py +0 -0
  57. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/monitoring/__init__.py +0 -0
  58. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/monitoring/metrics.py +0 -0
  59. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/ui/index.html +0 -0
  60. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/ui/neat-app/.gitignore +0 -0
  61. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/ui/neat-app/README.md +0 -0
  62. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/ui/neat-app/build/asset-manifest.json +0 -0
  63. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/ui/neat-app/build/favicon.ico +0 -0
  64. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/ui/neat-app/build/img/architect-icon.svg +0 -0
  65. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/ui/neat-app/build/img/developer-icon.svg +0 -0
  66. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/ui/neat-app/build/img/sme-icon.svg +0 -0
  67. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/ui/neat-app/build/index.html +0 -0
  68. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/ui/neat-app/build/logo192.png +0 -0
  69. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/ui/neat-app/build/manifest.json +0 -0
  70. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/ui/neat-app/build/robots.txt +0 -0
  71. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/ui/neat-app/build/static/css/main.38a62222.css +0 -0
  72. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/ui/neat-app/build/static/css/main.38a62222.css.map +0 -0
  73. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/ui/neat-app/build/static/js/main.ec7f72e2.js +0 -0
  74. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/ui/neat-app/build/static/js/main.ec7f72e2.js.LICENSE.txt +0 -0
  75. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/ui/neat-app/build/static/js/main.ec7f72e2.js.map +0 -0
  76. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/app/ui/neat-app/build/static/media/logo.8093b84df9ed36a174c629d6fe0b730d.svg +0 -0
  77. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/config.py +0 -0
  78. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/constants.py +0 -0
  79. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/exceptions.py +0 -0
  80. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/__init__.py +0 -0
  81. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/_shared.py +0 -0
  82. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/_tracking/__init__.py +0 -0
  83. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/_tracking/base.py +0 -0
  84. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/_tracking/log.py +0 -0
  85. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/examples/Knowledge-Graph-Nordic44-dirty.xml +0 -0
  86. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/examples/Knowledge-Graph-Nordic44.xml +0 -0
  87. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/examples/__init__.py +0 -0
  88. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/examples/skos-capturing-sheet-wind-topics.xlsx +0 -0
  89. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/exceptions.py +0 -0
  90. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/extractors/__init__.py +0 -0
  91. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/extractors/_base.py +0 -0
  92. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/extractors/_classic_cdf/__init__.py +0 -0
  93. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/extractors/_classic_cdf/_events.py +0 -0
  94. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/extractors/_classic_cdf/_files.py +0 -0
  95. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/extractors/_classic_cdf/_labels.py +0 -0
  96. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/extractors/_classic_cdf/_relationships.py +0 -0
  97. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/extractors/_classic_cdf/_sequences.py +0 -0
  98. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/extractors/_classic_cdf/_timeseries.py +0 -0
  99. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/extractors/_dexpi.py +0 -0
  100. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/extractors/_rdf_file.py +0 -0
  101. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/issues/__init__.py +0 -0
  102. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/issues/loader.py +0 -0
  103. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/loaders/__init__.py +0 -0
  104. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/loaders/_rdf2asset.py +0 -0
  105. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/models.py +0 -0
  106. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/queries/__init__.py +0 -0
  107. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/queries/_construct.py +0 -0
  108. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/stores/__init__.py +0 -0
  109. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/stores/_base.py +0 -0
  110. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/stores/_oxrdflib.py +0 -0
  111. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/stores/_provenance.py +0 -0
  112. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/transformers/__init__.py +0 -0
  113. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/transformers/_base.py +0 -0
  114. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/graph/transformers/_classic_cdf.py +0 -0
  115. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/issues.py +0 -0
  116. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/__init__.py +0 -0
  117. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/__init__.py +0 -0
  118. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/examples/Knowledge-Graph-Nordic44-dirty.xml +0 -0
  119. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/examples/Knowledge-Graph-Nordic44.xml +0 -0
  120. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/examples/__init__.py +0 -0
  121. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/examples/skos-capturing-sheet-wind-topics.xlsx +0 -0
  122. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/exceptions.py +0 -0
  123. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/extractors/__init__.py +0 -0
  124. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/extractors/_base.py +0 -0
  125. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/extractors/_dexpi.py +0 -0
  126. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/extractors/_graph_capturing_sheet.py +0 -0
  127. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/loaders/__init__.py +0 -0
  128. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/loaders/_base.py +0 -0
  129. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/loaders/_exceptions.py +0 -0
  130. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/loaders/core/__init__.py +0 -0
  131. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/loaders/core/labels.py +0 -0
  132. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/loaders/core/models.py +0 -0
  133. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/loaders/rdf_to_dms.py +0 -0
  134. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/loaders/validator.py +0 -0
  135. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/models.py +0 -0
  136. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/stores/__init__.py +0 -0
  137. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/stores/_base.py +0 -0
  138. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/stores/_graphdb_store.py +0 -0
  139. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/stores/_memory_store.py +0 -0
  140. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/stores/_oxigraph_store.py +0 -0
  141. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/stores/_oxrdflib.py +0 -0
  142. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/stores/_rdf_to_graph.py +0 -0
  143. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/transformations/__init__.py +0 -0
  144. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/transformations/entity_matcher.py +0 -0
  145. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/graph/transformations/query_generator/__init__.py +0 -0
  146. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/__init__.py +0 -0
  147. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/analysis.py +0 -0
  148. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/examples/Rules-Nordic44-to-graphql.xlsx +0 -0
  149. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/examples/Rules-Nordic44.xlsx +0 -0
  150. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/examples/__init__.py +0 -0
  151. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/examples/power-grid-containers.yaml +0 -0
  152. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/examples/power-grid-example.xlsx +0 -0
  153. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/examples/power-grid-model.yaml +0 -0
  154. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/examples/rules-template.xlsx +0 -0
  155. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/examples/sheet2cdf-transformation-rules.xlsx +0 -0
  156. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/examples/skos-rules.xlsx +0 -0
  157. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/examples/source-to-solution-mapping-rules.xlsx +0 -0
  158. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/examples/wind-energy.owl +0 -0
  159. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/exceptions.py +0 -0
  160. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/exporters/__init__.py +0 -0
  161. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/exporters/_base.py +0 -0
  162. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/exporters/_core/__init__.py +0 -0
  163. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/exporters/_core/rules2labels.py +0 -0
  164. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/exporters/_rules2dms.py +0 -0
  165. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/exporters/_rules2excel.py +0 -0
  166. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/exporters/_rules2graphql.py +0 -0
  167. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/exporters/_rules2pydantic_models.py +0 -0
  168. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/exporters/_rules2rules.py +0 -0
  169. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/exporters/_rules2triples.py +0 -0
  170. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/exporters/_validation.py +0 -0
  171. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/importers/__init__.py +0 -0
  172. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/importers/_base.py +0 -0
  173. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/importers/_dict2rules.py +0 -0
  174. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/importers/_dms2rules.py +0 -0
  175. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/importers/_json2rules.py +0 -0
  176. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/importers/_owl2rules/__init__.py +0 -0
  177. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/importers/_owl2rules/_owl2metadata.py +0 -0
  178. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/importers/_owl2rules/_owl2rules.py +0 -0
  179. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/importers/_spreadsheet2rules.py +0 -0
  180. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/importers/_xsd2rules.py +0 -0
  181. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/importers/_yaml2rules.py +0 -0
  182. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/models/__init__.py +0 -0
  183. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/models/_base.py +0 -0
  184. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/models/raw_rules.py +0 -0
  185. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/models/rdfpath.py +0 -0
  186. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/models/rules.py +0 -0
  187. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/models/tables.py +0 -0
  188. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/rules/models/value_types.py +0 -0
  189. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/workflows/examples/Export_DMS/workflow.yaml +0 -0
  190. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/workflows/examples/Export_Rules_to_Ontology/workflow.yaml +0 -0
  191. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/workflows/examples/Extract_DEXPI_Graph_and_Export_Rules/workflow.yaml +0 -0
  192. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/workflows/examples/Extract_RDF_Graph_and_Generate_Assets/workflow.yaml +0 -0
  193. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/workflows/examples/Import_DMS/workflow.yaml +0 -0
  194. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/workflows/examples/Ontology_to_Data_Model/workflow.yaml +0 -0
  195. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/workflows/examples/Validate_Rules/workflow.yaml +0 -0
  196. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/workflows/examples/Validate_Solution_Model/workflow.yaml +0 -0
  197. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/workflows/examples/Visualize_Data_Model_Using_Mock_Graph/workflow.yaml +0 -0
  198. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/legacy/workflows/examples/Visualize_Semantic_Data_Model/workflow.yaml +0 -0
  199. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/py.typed +0 -0
  200. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/__init__.py +0 -0
  201. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/_shared.py +0 -0
  202. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/examples/__init__.py +0 -0
  203. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/examples/wind-energy.owl +0 -0
  204. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/exceptions.py +0 -0
  205. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/exporters/__init__.py +0 -0
  206. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/exporters/_base.py +0 -0
  207. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/exporters/_rules2dms.py +0 -0
  208. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/exporters/_rules2excel.py +0 -0
  209. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/exporters/_rules2yaml.py +0 -0
  210. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/exporters/_validation.py +0 -0
  211. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/importers/__init__.py +0 -0
  212. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/importers/_dms2rules.py +0 -0
  213. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/importers/_dtdl2rules/__init__.py +0 -0
  214. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/importers/_dtdl2rules/_unit_lookup.py +0 -0
  215. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/importers/_dtdl2rules/dtdl_converter.py +0 -0
  216. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/importers/_dtdl2rules/dtdl_importer.py +0 -0
  217. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/importers/_dtdl2rules/spec.py +0 -0
  218. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/importers/_owl2rules/__init__.py +0 -0
  219. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/importers/_owl2rules/_owl2metadata.py +0 -0
  220. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/importers/_owl2rules/_owl2rules.py +0 -0
  221. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/importers/_spreadsheet2rules.py +0 -0
  222. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/importers/_yaml2rules.py +0 -0
  223. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/issues/__init__.py +0 -0
  224. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/issues/base.py +0 -0
  225. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/issues/dms.py +0 -0
  226. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/issues/fileread.py +0 -0
  227. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/issues/formatters.py +0 -0
  228. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/issues/importing.py +0 -0
  229. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/issues/spreadsheet.py +0 -0
  230. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/issues/spreadsheet_file.py +0 -0
  231. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/__init__.py +0 -0
  232. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/_base.py +0 -0
  233. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/_constants.py +0 -0
  234. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/_rdfpath.py +0 -0
  235. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/_types/__init__.py +0 -0
  236. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/_types/_base.py +0 -0
  237. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/_types/_field.py +0 -0
  238. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/asset/__init__.py +0 -0
  239. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/asset/_converter.py +0 -0
  240. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/asset/_rules.py +0 -0
  241. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/asset/_rules_input.py +0 -0
  242. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/asset/_serializer.py +0 -0
  243. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/asset/_validation.py +0 -0
  244. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/data_types.py +0 -0
  245. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/dms/__init__.py +0 -0
  246. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/dms/_converter.py +0 -0
  247. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/dms/_exporter.py +0 -0
  248. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/dms/_rules.py +0 -0
  249. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/dms/_rules_input.py +0 -0
  250. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/dms/_schema.py +0 -0
  251. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/dms/_serializer.py +0 -0
  252. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/dms/_validation.py +0 -0
  253. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/domain.py +0 -0
  254. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/entities.py +0 -0
  255. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/information/__init__.py +0 -0
  256. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/information/_converter.py +0 -0
  257. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/information/_rules.py +0 -0
  258. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/information/_rules_input.py +0 -0
  259. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/information/_serializer.py +0 -0
  260. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/information/_validation.py +0 -0
  261. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/rules/models/wrapped_entities.py +0 -0
  262. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/utils/auth.py +0 -0
  263. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/utils/auxiliary.py +0 -0
  264. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/utils/cdf.py +0 -0
  265. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/utils/cdf_classes.py +0 -0
  266. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/utils/cdf_loaders/__init__.py +0 -0
  267. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/utils/cdf_loaders/_base.py +0 -0
  268. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/utils/cdf_loaders/_data_modeling.py +0 -0
  269. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/utils/cdf_loaders/_ingestion.py +0 -0
  270. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/utils/cdf_loaders/data_classes.py +0 -0
  271. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/utils/exceptions.py +0 -0
  272. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/utils/spreadsheet.py +0 -0
  273. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/utils/text.py +0 -0
  274. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/utils/upload.py +0 -0
  275. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/utils/xml_.py +0 -0
  276. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/__init__.py +0 -0
  277. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/_exceptions.py +0 -0
  278. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/base.py +0 -0
  279. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/cdf_store.py +0 -0
  280. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/examples/Export_DMS/workflow.yaml +0 -0
  281. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/examples/Export_Rules_to_Ontology/workflow.yaml +0 -0
  282. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/examples/Extract_DEXPI_Graph_and_Export_Rules/workflow.yaml +0 -0
  283. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/examples/Extract_RDF_Graph_and_Generate_Assets/workflow.yaml +0 -0
  284. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/examples/Import_DMS/workflow.yaml +0 -0
  285. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/examples/Ontology_to_Data_Model/workflow.yaml +0 -0
  286. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/examples/Validate_Rules/workflow.yaml +0 -0
  287. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/examples/Validate_Solution_Model/workflow.yaml +0 -0
  288. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/examples/Visualize_Data_Model_Using_Mock_Graph/workflow.yaml +0 -0
  289. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/examples/Visualize_Semantic_Data_Model/workflow.yaml +0 -0
  290. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/manager.py +0 -0
  291. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/migration/__init__.py +0 -0
  292. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/migration/steps.py +0 -0
  293. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/migration/wf_manifests.py +0 -0
  294. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/model.py +0 -0
  295. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/steps/__init__.py +0 -0
  296. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/steps/data_contracts.py +0 -0
  297. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/steps/lib/__init__.py +0 -0
  298. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/steps/lib/current/__init__.py +0 -0
  299. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/steps/lib/current/graph_extractor.py +0 -0
  300. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/steps/lib/current/graph_loader.py +0 -0
  301. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/steps/lib/current/graph_store.py +0 -0
  302. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/steps/lib/current/rules_exporter.py +0 -0
  303. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/steps/lib/current/rules_importer.py +0 -0
  304. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/steps/lib/current/rules_validator.py +0 -0
  305. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/steps/lib/io/__init__.py +0 -0
  306. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/steps/lib/io/io_steps.py +0 -0
  307. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/steps/lib/legacy/__init__.py +0 -0
  308. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/steps/lib/legacy/graph_contextualization.py +0 -0
  309. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/steps/lib/legacy/graph_extractor.py +0 -0
  310. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/steps/lib/legacy/graph_loader.py +0 -0
  311. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/steps/lib/legacy/graph_store.py +0 -0
  312. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/steps/lib/legacy/graph_transformer.py +0 -0
  313. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/steps/lib/legacy/rules_exporter.py +0 -0
  314. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/steps/lib/legacy/rules_importer.py +0 -0
  315. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/steps/step_model.py +0 -0
  316. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/steps_registry.py +0 -0
  317. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/tasks.py +0 -0
  318. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/triggers.py +0 -0
  319. {cognite_neat-0.85.5 → cognite_neat-0.85.7}/cognite/neat/workflows/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cognite-neat
3
- Version: 0.85.5
3
+ Version: 0.85.7
4
4
  Summary: Knowledge graph transformation
5
5
  Home-page: https://cognite-neat.readthedocs-hosted.com/
6
6
  License: Apache-2.0
@@ -0,0 +1 @@
1
+ __version__ = "0.85.7"
@@ -17,7 +17,7 @@ from cognite.neat.app.api.data_classes.rest import (
17
17
  from cognite.neat.app.api.utils.data_mapping import rdf_result_to_api_response
18
18
  from cognite.neat.app.api.utils.query_templates import query_templates
19
19
  from cognite.neat.legacy.graph.transformations import query_generator
20
- from cognite.neat.utils.utils import remove_namespace
20
+ from cognite.neat.utils.utils import remove_namespace_from_uri
21
21
  from cognite.neat.workflows.steps.data_contracts import RulesData, SolutionGraph, SourceGraph
22
22
 
23
23
  router = APIRouter()
@@ -51,7 +51,7 @@ def get_datatype_properties(request: DatatypePropertyRequest):
51
51
  {
52
52
  "id": row[rdflib.Variable("property")],
53
53
  "count": int(row[rdflib.Variable("occurrence")]),
54
- "name": remove_namespace(row[rdflib.Variable("property")]),
54
+ "name": remove_namespace_from_uri(row[rdflib.Variable("property")]),
55
55
  }
56
56
  for row in results["rows"]
57
57
  ]
@@ -1,4 +1,4 @@
1
- from collections.abc import Iterable
1
+ from collections.abc import Callable, Iterable
2
2
  from datetime import datetime, timezone
3
3
  from pathlib import Path
4
4
  from typing import cast
@@ -19,15 +19,19 @@ class AssetsExtractor(BaseExtractor):
19
19
  Args:
20
20
  assets (Iterable[Asset]): An iterable of assets.
21
21
  namespace (Namespace, optional): The namespace to use. Defaults to DEFAULT_NAMESPACE.
22
+ to_type (Callable[[Asset], str | None], optional): A function to convert an asset to a type. Defaults to None.
23
+ If None or if the function returns None, the asset will be set to the default type "Asset".
22
24
  """
23
25
 
24
26
  def __init__(
25
27
  self,
26
28
  assets: Iterable[Asset],
27
29
  namespace: Namespace | None = None,
30
+ to_type: Callable[[Asset], str | None] | None = None,
28
31
  ):
29
32
  self.namespace = namespace or DEFAULT_NAMESPACE
30
33
  self.assets = assets
34
+ self.to_type = to_type
31
35
 
32
36
  @classmethod
33
37
  def from_dataset(
@@ -35,29 +39,42 @@ class AssetsExtractor(BaseExtractor):
35
39
  client: CogniteClient,
36
40
  data_set_external_id: str,
37
41
  namespace: Namespace | None = None,
42
+ to_type: Callable[[Asset], str | None] | None = None,
38
43
  ):
39
- return cls(cast(Iterable[Asset], client.assets(data_set_external_ids=data_set_external_id)), namespace)
44
+ return cls(cast(Iterable[Asset], client.assets(data_set_external_ids=data_set_external_id)), namespace, to_type)
40
45
 
41
46
  @classmethod
42
- def from_hierarchy(cls, client: CogniteClient, root_asset_external_id: str, namespace: Namespace | None = None):
43
- return cls(cast(Iterable[Asset], client.assets(asset_subtree_external_ids=root_asset_external_id)), namespace)
47
+ def from_hierarchy(
48
+ cls,
49
+ client: CogniteClient,
50
+ root_asset_external_id: str,
51
+ namespace: Namespace | None = None,
52
+ to_type: Callable[[Asset], str | None] | None = None,
53
+ ):
54
+ return cls(
55
+ cast(Iterable[Asset], client.assets(asset_subtree_external_ids=root_asset_external_id)), namespace, to_type
56
+ )
44
57
 
45
58
  @classmethod
46
- def from_file(cls, file_path: str, namespace: Namespace | None = None):
47
- return cls(AssetList.load(Path(file_path).read_text()), namespace)
59
+ def from_file(
60
+ cls, file_path: str, namespace: Namespace | None = None, to_type: Callable[[Asset], str] | None = None
61
+ ):
62
+ return cls(AssetList.load(Path(file_path).read_text()), namespace, to_type)
48
63
 
49
64
  def extract(self) -> Iterable[Triple]:
50
65
  """Extracts an asset with the given asset_id."""
51
66
  for asset in self.assets:
52
67
  yield from self._asset2triples(asset, self.namespace)
53
68
 
54
- @classmethod
55
- def _asset2triples(cls, asset: Asset, namespace: Namespace) -> list[Triple]:
69
+ def _asset2triples(self, asset: Asset, namespace: Namespace) -> list[Triple]:
56
70
  """Converts an asset to triples."""
57
71
  id_ = namespace[f"Asset_{asset.id}"]
58
72
 
59
73
  # Set rdf type
60
- triples: list[Triple] = [(id_, RDF.type, namespace["Asset"])]
74
+ type_ = "Asset"
75
+ if self.to_type:
76
+ type_ = self.to_type(asset) or type_
77
+ triples: list[Triple] = [(id_, RDF.type, namespace[type_])]
61
78
 
62
79
  # Create attributes
63
80
  if asset.name:
@@ -17,7 +17,7 @@ from cognite.neat.rules.models import DMSRules, InformationRules
17
17
  from cognite.neat.rules.models.data_types import DataType
18
18
  from cognite.neat.rules.models.entities import ClassEntity, EntityTypes
19
19
  from cognite.neat.rules.models.information import InformationProperty
20
- from cognite.neat.utils.utils import remove_namespace
20
+ from cognite.neat.utils.utils import remove_namespace_from_uri
21
21
 
22
22
  from ._base import BaseExtractor
23
23
 
@@ -258,7 +258,11 @@ def _generate_mock_data_property_triples(
258
258
  # generate string
259
259
  else:
260
260
  triples.append(
261
- (id_, URIRef(namespace[property_]), Literal(f"{property_}-{remove_namespace(id_).split('-')[-1]}"))
261
+ (
262
+ id_,
263
+ URIRef(namespace[property_]),
264
+ Literal(f"{property_}-{remove_namespace_from_uri(id_).split('-')[-1]}"),
265
+ )
262
266
  )
263
267
  return triples
264
268
 
@@ -65,11 +65,11 @@ class CDFLoader(BaseLoader[T_Output]):
65
65
  items.append(result)
66
66
 
67
67
  if len(items) >= self._UPLOAD_BATCH_SIZE:
68
- yield self._upload_to_cdf(client, items, dry_run, issues)
68
+ yield from self._upload_to_cdf(client, items, dry_run, issues)
69
69
  issues = NeatIssueList[NeatIssue]()
70
70
  items = []
71
71
  if items:
72
- yield self._upload_to_cdf(client, items, dry_run, issues)
72
+ yield from self._upload_to_cdf(client, items, dry_run, issues)
73
73
 
74
74
  @abstractmethod
75
75
  def _get_required_capabilities(self) -> list[Capability]:
@@ -82,5 +82,5 @@ class CDFLoader(BaseLoader[T_Output]):
82
82
  items: list[T_Output],
83
83
  dry_run: bool,
84
84
  read_issues: NeatIssueList,
85
- ) -> UploadResult:
85
+ ) -> Iterable[UploadResult]:
86
86
  raise NotImplementedError
@@ -1,4 +1,3 @@
1
- import itertools
2
1
  import json
3
2
  from collections import defaultdict
4
3
  from collections.abc import Iterable, Sequence
@@ -263,8 +262,7 @@ class DMSLoader(CDFLoader[dm.InstanceApply]):
263
262
  items: list[dm.InstanceApply],
264
263
  dry_run: bool,
265
264
  read_issues: NeatIssueList,
266
- ) -> UploadResult:
267
- result = UploadResult[InstanceId](name=type(self).__name__, issues=read_issues)
265
+ ) -> Iterable[UploadResult]:
268
266
  try:
269
267
  nodes = [item for item in items if isinstance(item, dm.NodeApply)]
270
268
  edges = [item for item in items if isinstance(item, dm.EdgeApply)]
@@ -276,18 +274,22 @@ class DMSLoader(CDFLoader[dm.InstanceApply]):
276
274
  skip_on_version_conflict=True,
277
275
  )
278
276
  except CogniteAPIError as e:
277
+ result = UploadResult[InstanceId](name="Instances", issues=read_issues)
279
278
  result.error_messages.append(str(e))
280
279
  result.failed_upserted.update(item.as_id() for item in e.failed + e.unknown)
281
280
  result.created.update(item.as_id() for item in e.successful)
281
+ yield result
282
282
  else:
283
- for instance in itertools.chain(upserted.nodes, upserted.edges):
284
- if instance.was_modified and instance.created_time == instance.last_updated_time:
285
- result.created.add(instance.as_id())
286
- elif instance.was_modified:
287
- result.changed.add(instance.as_id())
288
- else:
289
- result.unchanged.add(instance.as_id())
290
- return result
283
+ for instance_type, instances in {"Nodes": upserted.nodes, "Edges": upserted.edges}.items():
284
+ result = UploadResult[InstanceId](name=instance_type, issues=read_issues)
285
+ for instance in instances: # type: ignore[attr-defined]
286
+ if instance.was_modified and instance.created_time == instance.last_updated_time:
287
+ result.created.add(instance.as_id())
288
+ elif instance.was_modified:
289
+ result.changed.add(instance.as_id())
290
+ else:
291
+ result.unchanged.add(instance.as_id())
292
+ yield result
291
293
 
292
294
 
293
295
  def _triples2dictionary(
@@ -1,12 +1,12 @@
1
1
  import warnings
2
- from typing import cast
2
+ from typing import Literal, cast, overload
3
3
 
4
4
  from rdflib import RDF, Graph, URIRef
5
5
  from rdflib.query import ResultRow
6
6
 
7
7
  from cognite.neat.rules.models.entities import ClassEntity
8
8
  from cognite.neat.rules.models.information import InformationRules
9
- from cognite.neat.utils.utils import remove_namespace
9
+ from cognite.neat.utils.utils import remove_namespace_from_uri
10
10
 
11
11
  from ._construct import build_construct_query
12
12
 
@@ -66,7 +66,7 @@ class Queries:
66
66
  result = self.graph.query(query)
67
67
 
68
68
  # We cannot include the RDF.type in case there is a neat:type property
69
- return [remove_namespace(*triple) for triple in result if triple[1] != RDF.type] # type: ignore[misc, index]
69
+ return [remove_namespace_from_uri(*triple) for triple in result if triple[1] != RDF.type] # type: ignore[misc, index]
70
70
  else:
71
71
  warnings.warn("No rules found for the graph store, returning empty list.", stacklevel=2)
72
72
  return []
@@ -93,7 +93,7 @@ class Queries:
93
93
  result = self.graph.query(query)
94
94
 
95
95
  # We cannot include the RDF.type in case there is a neat:type property
96
- return [remove_namespace(*triple) for triple in result if triple[1] != RDF.type] # type: ignore[misc, index]
96
+ return [remove_namespace_from_uri(*triple) for triple in result if triple[1] != RDF.type] # type: ignore[misc, index]
97
97
  else:
98
98
  warnings.warn("No rules found for the graph store, returning empty list.", stacklevel=2)
99
99
  return []
@@ -110,14 +110,24 @@ class Queries:
110
110
  query = f"SELECT ?subject ?predicate ?object WHERE {{ ?subject ?predicate ?object }} LIMIT {limit}"
111
111
  return cast(list[ResultRow], list(self.graph.query(query)))
112
112
 
113
- def list_types(self, limit: int = 25) -> list[ResultRow]:
113
+ @overload
114
+ def list_types(self, remove_namespace: Literal[False] = False, limit: int = 25) -> list[ResultRow]: ...
115
+
116
+ @overload
117
+ def list_types(self, remove_namespace: Literal[True], limit: int = 25) -> list[str]: ...
118
+
119
+ def list_types(self, remove_namespace: bool = False, limit: int = 25) -> list[ResultRow] | list[str]:
114
120
  """List types in the graph store
115
121
 
116
122
  Args:
117
123
  limit: Max number of types to return, by default 25
124
+ remove_namespace: Whether to remove the namespace from the type, by default False
118
125
 
119
126
  Returns:
120
127
  List of types
121
128
  """
122
129
  query = f"SELECT DISTINCT ?type WHERE {{ ?subject a ?type }} LIMIT {limit}"
123
- return cast(list[ResultRow], list(self.graph.query(query)))
130
+ result = cast(list[ResultRow], list(self.graph.query(query)))
131
+ if remove_namespace:
132
+ return [remove_namespace_from_uri(res[0]) for res in result]
133
+ return result
@@ -11,7 +11,7 @@ from cognite.neat.rules.models._rdfpath import (
11
11
  Hop,
12
12
  Step,
13
13
  )
14
- from cognite.neat.utils.utils import remove_namespace, uri_to_short_form
14
+ from cognite.neat.utils.utils import remove_namespace_from_uri, uri_to_short_form
15
15
 
16
16
  if sys.version_info >= (3, 11):
17
17
  from typing import Self
@@ -146,7 +146,7 @@ def triples2dictionary(triples: Iterable[tuple[URIRef, URIRef, str | URIRef]]) -
146
146
  value: str
147
147
  uri: URIRef
148
148
 
149
- id_, property_, value = remove_namespace(*triple) # type: ignore[misc]
149
+ id_, property_, value = remove_namespace_from_uri(*triple) # type: ignore[misc]
150
150
  uri = triple[0]
151
151
 
152
152
  if uri not in dictionary:
@@ -20,7 +20,7 @@ from cognite.neat.legacy.rules.analysis import (
20
20
  from cognite.neat.legacy.rules.exporters._rules2rules import subset_rules
21
21
  from cognite.neat.legacy.rules.models import Rules
22
22
  from cognite.neat.legacy.rules.models.value_types import XSD_VALUE_TYPE_MAPPINGS
23
- from cognite.neat.utils.utils import remove_namespace
23
+ from cognite.neat.utils.utils import remove_namespace_from_uri
24
24
 
25
25
  from ._base import BaseExtractor
26
26
 
@@ -247,7 +247,9 @@ def _generate_mock_data_property_triples(
247
247
  triples.append((id_, URIRef(namespace[property_]), Literal(numpy.float32(random.uniform(1, 1983)))))
248
248
  # generate string
249
249
  else:
250
- triples.append((id_, URIRef(namespace[property_]), Literal(remove_namespace(id_).replace("-", " "))))
250
+ triples.append(
251
+ (id_, URIRef(namespace[property_]), Literal(remove_namespace_from_uri(id_).replace("-", " ")))
252
+ )
251
253
  return triples
252
254
 
253
255
 
@@ -15,7 +15,7 @@ from rdflib.query import ResultRow
15
15
  from cognite.neat.legacy.graph.stores import NeatGraphStoreBase
16
16
  from cognite.neat.legacy.rules.models import Rules
17
17
  from cognite.neat.legacy.rules.models.rules import Property
18
- from cognite.neat.utils import remove_namespace
18
+ from cognite.neat.utils import remove_namespace_from_uri
19
19
  from cognite.neat.utils.utils import epoch_now_ms
20
20
 
21
21
  from ._base import CogniteLoader
@@ -166,7 +166,7 @@ class AssetLoader(CogniteLoader[AssetResource]):
166
166
  logging.debug(f"Class <{class_name}> has {len(result)} instances")
167
167
 
168
168
  for instance_uri, properties_values in groupby(result, lambda x: x[0]):
169
- instance_id = remove_namespace(instance_uri)
169
+ instance_id = remove_namespace_from_uri(instance_uri)
170
170
  values_by_property = self._prepare_instance_data(instance_id, properties_values)
171
171
  try:
172
172
  asset = self._load_asset(
@@ -195,7 +195,7 @@ class AssetLoader(CogniteLoader[AssetResource]):
195
195
  relationships = self._load_relationships(
196
196
  properties_by_class_name[class_name],
197
197
  values_by_property,
198
- remove_namespace(instance_id),
198
+ remove_namespace_from_uri(instance_id),
199
199
  class_name,
200
200
  )
201
201
  except Exception as e:
@@ -342,11 +342,11 @@ class AssetLoader(CogniteLoader[AssetResource]):
342
342
  A dictionary with property type as key and a list of values as value.
343
343
  """
344
344
  properties_value_tuples: list[tuple[str, str]] = [
345
- remove_namespace(prop, value) # type: ignore[misc]
345
+ remove_namespace_from_uri(prop, value) # type: ignore[misc]
346
346
  for _, prop, value in properties_values
347
347
  ]
348
348
  # We add an identifier which will be used as fallback for external_id
349
- properties_value_tuples.append((self._identifier, remove_namespace(instance_id)))
349
+ properties_value_tuples.append((self._identifier, remove_namespace_from_uri(instance_id)))
350
350
  values_by_property: dict[str, str | list[str]] = {}
351
351
  for prop, values in groupby(sorted(properties_value_tuples), lambda x: x[0]):
352
352
  values_list: list[str] = [value for _, value in values] # type: ignore[misc, has-type]
@@ -18,7 +18,7 @@ from rdflib.term import URIRef
18
18
  from cognite.neat.legacy.graph.loaders.core.models import AssetTemplate
19
19
  from cognite.neat.legacy.graph.stores import NeatGraphStoreBase
20
20
  from cognite.neat.legacy.rules.models.rules import Property, Rules
21
- from cognite.neat.utils.utils import chunker, datetime_utc_now, remove_namespace, retry_decorator
21
+ from cognite.neat.utils.utils import chunker, datetime_utc_now, remove_namespace_from_uri, retry_decorator
22
22
 
23
23
  if sys.version_info >= (3, 11):
24
24
  from datetime import UTC
@@ -320,13 +320,13 @@ def _list2dict(class_instance: list) -> dict[str, Any]:
320
320
 
321
321
  class_instance_dict: dict[str, Any] = {}
322
322
  for property_value_pair in class_instance:
323
- property_ = remove_namespace(property_value_pair[0])
323
+ property_ = remove_namespace_from_uri(property_value_pair[0])
324
324
 
325
325
  # Remove namespace from URIRef values, otherwise convert Literal to string
326
326
  # ideally this should react upon property type provided in sheet
327
327
  # however Assets only support string values
328
328
  value = (
329
- remove_namespace(property_value_pair[1])
329
+ remove_namespace_from_uri(property_value_pair[1])
330
330
  if isinstance(property_value_pair[1], URIRef)
331
331
  else str(property_value_pair[1])
332
332
  )
@@ -440,7 +440,7 @@ def rdf2assets(
440
440
  progress_counter += 1
441
441
  except Exception as ValidationError:
442
442
  logging.error(
443
- f"Skipping class <{class_}> instance <{remove_namespace(str(instance_id))}>, "
443
+ f"Skipping class <{class_}> instance <{remove_namespace_from_uri(str(instance_id))}>, "
444
444
  f"reason:\n{ValidationError}\n"
445
445
  )
446
446
  if stop_on_exception:
@@ -14,7 +14,7 @@ from cognite.neat.legacy.graph.loaders.core.models import RelationshipDefinition
14
14
  from cognite.neat.legacy.graph.loaders.core.rdf_to_assets import _categorize_cdf_assets
15
15
  from cognite.neat.legacy.graph.stores import NeatGraphStoreBase
16
16
  from cognite.neat.legacy.rules.models.rules import Rules
17
- from cognite.neat.utils.utils import chunker, datetime_utc_now, epoch_now_ms, remove_namespace, retry_decorator
17
+ from cognite.neat.utils.utils import chunker, datetime_utc_now, epoch_now_ms, remove_namespace_from_uri, retry_decorator
18
18
 
19
19
 
20
20
  def define_relationships(rules: Rules, data_set_id: int, stop_on_exception: bool = False) -> RelationshipDefinitions:
@@ -150,7 +150,7 @@ def rdf2relationships(
150
150
  relationship_data_frame.rename(columns={0: "source_external_id", 1: "target_external_id"}, inplace=True)
151
151
 
152
152
  # removes namespace
153
- relationship_data_frame = relationship_data_frame.map(remove_namespace) # type: ignore[operator]
153
+ relationship_data_frame = relationship_data_frame.map(remove_namespace_from_uri) # type: ignore[operator]
154
154
 
155
155
  # adding prefix
156
156
  if relationship_external_id_prefix:
@@ -21,7 +21,7 @@ from cognite.neat.legacy.rules.models.rdfpath import (
21
21
  parse_traversal,
22
22
  )
23
23
  from cognite.neat.legacy.rules.models.rules import Rules
24
- from cognite.neat.utils.utils import remove_namespace
24
+ from cognite.neat.utils.utils import remove_namespace_from_uri
25
25
 
26
26
 
27
27
  def _generate_prefix_header(prefixes: dict[str, Namespace] = PREFIXES) -> str:
@@ -529,7 +529,7 @@ def triples2dictionary(triples: Iterable[tuple[URIRef, URIRef, str | URIRef]]) -
529
529
  property_: str
530
530
  value: str
531
531
  uri: URIRef
532
- id_, property_, value = remove_namespace(*triple) # type: ignore[misc]
532
+ id_, property_, value = remove_namespace_from_uri(*triple) # type: ignore[misc]
533
533
  uri = triple[0]
534
534
 
535
535
  if uri not in dictionary:
@@ -24,7 +24,7 @@ from cognite.neat.legacy.rules.models.rdfpath import (
24
24
  parse_rule,
25
25
  )
26
26
  from cognite.neat.legacy.rules.models.rules import Rules
27
- from cognite.neat.utils.utils import remove_namespace
27
+ from cognite.neat.utils.utils import remove_namespace_from_uri
28
28
 
29
29
  prom_total_proc_rules_g = Gauge("neat_total_processed_rules", "Number of processed rules", ["state"])
30
30
  rules_processing_timing_metric = Gauge(
@@ -228,7 +228,7 @@ def domain2app_knowledge_graph(
228
228
  # in the target graph then we should remove namespace from the object URI and store it as literal
229
229
  if isinstance(rule.traversal, AllReferences) and rule_definition.property_type == "DatatypeProperty":
230
230
  instance_df[EntityTypes.object] = instance_df[EntityTypes.object].apply(
231
- lambda x: Literal(remove_namespace(x))
231
+ lambda x: Literal(remove_namespace_from_uri(x))
232
232
  )
233
233
 
234
234
  if isinstance(rule, RawLookup):
@@ -14,7 +14,7 @@ from cognite.neat.legacy.rules.exporters._base import BaseExporter
14
14
  from cognite.neat.legacy.rules.exporters._validation import are_properties_redefined
15
15
  from cognite.neat.legacy.rules.models.rules import Class, Metadata, Property, Rules
16
16
  from cognite.neat.legacy.rules.models.value_types import XSD_VALUE_TYPE_MAPPINGS
17
- from cognite.neat.utils.utils import generate_exception_report, remove_namespace
17
+ from cognite.neat.utils.utils import generate_exception_report, remove_namespace_from_uri
18
18
 
19
19
  if sys.version_info >= (3, 11):
20
20
  from typing import Self
@@ -322,7 +322,7 @@ class OWLProperty(OntologyModel):
322
322
  if len(v) > 1:
323
323
  warnings.warn(
324
324
  exceptions.OntologyMultiTypeProperty(
325
- remove_namespace(info.data["id_"]), [remove_namespace(t) for t in v]
325
+ remove_namespace_from_uri(info.data["id_"]), [remove_namespace_from_uri(t) for t in v]
326
326
  ).message,
327
327
  category=exceptions.OntologyMultiTypeProperty,
328
328
  stacklevel=2,
@@ -334,7 +334,7 @@ class OWLProperty(OntologyModel):
334
334
  if len(v) > 1:
335
335
  warnings.warn(
336
336
  exceptions.OntologyMultiRangeProperty(
337
- remove_namespace(info.data["id_"]), [remove_namespace(t) for t in v]
337
+ remove_namespace_from_uri(info.data["id_"]), [remove_namespace_from_uri(t) for t in v]
338
338
  ).message,
339
339
  category=exceptions.OntologyMultiRangeProperty,
340
340
  stacklevel=2,
@@ -346,7 +346,7 @@ class OWLProperty(OntologyModel):
346
346
  if len(v) > 1:
347
347
  warnings.warn(
348
348
  exceptions.OntologyMultiDomainProperty(
349
- remove_namespace(info.data["id_"]), [remove_namespace(t) for t in v]
349
+ remove_namespace_from_uri(info.data["id_"]), [remove_namespace_from_uri(t) for t in v]
350
350
  ).message,
351
351
  category=exceptions.OntologyMultiDomainProperty,
352
352
  stacklevel=2,
@@ -357,7 +357,7 @@ class OWLProperty(OntologyModel):
357
357
  def has_multi_name(cls, v, info: ValidationInfo):
358
358
  if len(v) > 1:
359
359
  warnings.warn(
360
- exceptions.OntologyMultiLabeledProperty(remove_namespace(info.data["id_"]), v).message,
360
+ exceptions.OntologyMultiLabeledProperty(remove_namespace_from_uri(info.data["id_"]), v).message,
361
361
  category=exceptions.OntologyMultiLabeledProperty,
362
362
  stacklevel=2,
363
363
  )
@@ -367,7 +367,7 @@ class OWLProperty(OntologyModel):
367
367
  def has_multi_comment(cls, v, info: ValidationInfo):
368
368
  if len(v) > 1:
369
369
  warnings.warn(
370
- exceptions.OntologyMultiDefinitionProperty(remove_namespace(info.data["id_"])).message,
370
+ exceptions.OntologyMultiDefinitionProperty(remove_namespace_from_uri(info.data["id_"])).message,
371
371
  category=exceptions.OntologyMultiDefinitionProperty,
372
372
  stacklevel=2,
373
373
  )
@@ -14,7 +14,7 @@ from cognite.neat.constants import PREFIXES
14
14
  from cognite.neat.legacy.rules import exceptions
15
15
  from cognite.neat.legacy.rules.exporters._rules2rules import to_dms_name
16
16
  from cognite.neat.legacy.rules.models.tables import Tables
17
- from cognite.neat.utils.utils import get_namespace, remove_namespace, uri_to_short_form
17
+ from cognite.neat.utils.utils import get_namespace, remove_namespace_from_uri, uri_to_short_form
18
18
 
19
19
  from ._base import BaseImporter
20
20
 
@@ -173,7 +173,7 @@ def _graph_to_data_model_dict(graph: Graph, max_number_of_instance: int = -1) ->
173
173
 
174
174
  for class_ in _get_class_ids(graph):
175
175
  _add_uri_namespace_to_prefixes(class_, prefixes)
176
- class_name = remove_namespace(class_)
176
+ class_name = remove_namespace_from_uri(class_)
177
177
 
178
178
  if class_name in data_model:
179
179
  warnings.warn(
@@ -187,7 +187,7 @@ def _graph_to_data_model_dict(graph: Graph, max_number_of_instance: int = -1) ->
187
187
 
188
188
  for instance in _get_class_instance_ids(graph, class_, max_number_of_instance):
189
189
  for property_, occurrence, data_type, object_type in _define_instance_properties(graph, instance):
190
- property_name = remove_namespace(property_)
190
+ property_name = remove_namespace_from_uri(property_)
191
191
  _add_uri_namespace_to_prefixes(property_, prefixes)
192
192
 
193
193
  type_ = data_type if data_type else object_type
@@ -196,7 +196,7 @@ def _graph_to_data_model_dict(graph: Graph, max_number_of_instance: int = -1) ->
196
196
  if not type_:
197
197
  continue
198
198
 
199
- type_name = remove_namespace(type_)
199
+ type_name = remove_namespace_from_uri(type_)
200
200
  _add_uri_namespace_to_prefixes(type_, prefixes)
201
201
 
202
202
  if property_name not in data_model[class_name]["properties"]:
@@ -4,7 +4,7 @@ import numpy as np
4
4
  import pandas as pd
5
5
  from rdflib import OWL, Graph
6
6
 
7
- from cognite.neat.utils.utils import remove_namespace
7
+ from cognite.neat.utils.utils import remove_namespace_from_uri
8
8
 
9
9
 
10
10
  def parse_owl_classes(graph: Graph, make_compliant: bool = False, language: str = "en") -> pd.DataFrame:
@@ -84,10 +84,10 @@ def _parse_raw_dataframe(query_results: list[tuple]) -> pd.DataFrame:
84
84
  df.replace(np.nan, "", regex=True, inplace=True)
85
85
 
86
86
  df.Source = df.Class
87
- df.Class = df.Class.apply(lambda x: remove_namespace(x))
87
+ df.Class = df.Class.apply(lambda x: remove_namespace_from_uri(x))
88
88
  df["Source Entity Name"] = df.Class
89
89
  df["Match"] = len(df) * ["exact"]
90
- df["Parent Class"] = df["Parent Class"].apply(lambda x: remove_namespace(x))
90
+ df["Parent Class"] = df["Parent Class"].apply(lambda x: remove_namespace_from_uri(x))
91
91
 
92
92
  return df
93
93
 
@@ -4,7 +4,7 @@ import numpy as np
4
4
  import pandas as pd
5
5
  from rdflib import Graph
6
6
 
7
- from cognite.neat.utils.utils import remove_namespace
7
+ from cognite.neat.utils.utils import remove_namespace_from_uri
8
8
 
9
9
  from ._owl2classes import _data_type_property_class, _object_property_class, _thing_class
10
10
 
@@ -92,12 +92,12 @@ def _parse_raw_dataframe(query_results: list[tuple]) -> pd.DataFrame:
92
92
  df.replace(np.nan, "", regex=True, inplace=True)
93
93
 
94
94
  df.Source = df.Property
95
- df.Class = df.Class.apply(lambda x: remove_namespace(x))
96
- df.Property = df.Property.apply(lambda x: remove_namespace(x))
97
- df.Type = df.Type.apply(lambda x: remove_namespace(x))
95
+ df.Class = df.Class.apply(lambda x: remove_namespace_from_uri(x))
96
+ df.Property = df.Property.apply(lambda x: remove_namespace_from_uri(x))
97
+ df.Type = df.Type.apply(lambda x: remove_namespace_from_uri(x))
98
98
  df["Source Entity Name"] = df.Property
99
99
  df["Match Type"] = len(df) * ["exact"]
100
- df["_property_type"] = df["_property_type"].apply(lambda x: remove_namespace(x))
100
+ df["_property_type"] = df["_property_type"].apply(lambda x: remove_namespace_from_uri(x))
101
101
 
102
102
  return df
103
103
 
@@ -0,0 +1,6 @@
1
+ from ._information_rules import (
2
+ AssetArchitectRulesAnalysis,
3
+ InformationArchitectRulesAnalysis,
4
+ )
5
+
6
+ __all__ = ["InformationArchitectRulesAnalysis", "AssetArchitectRulesAnalysis"]
@@ -1,15 +1,9 @@
1
- import sys
2
1
  from abc import ABC, abstractmethod
3
2
  from typing import Generic, TypeVar
4
3
 
5
4
  from cognite.neat.rules._shared import Rules
6
5
  from cognite.neat.rules.models.entities import ClassEntity
7
6
 
8
- if sys.version_info >= (3, 11):
9
- from enum import StrEnum
10
- else:
11
- from backports.strenum import StrEnum
12
-
13
7
  T_Rules = TypeVar("T_Rules", bound=Rules)
14
8
 
15
9
 
@@ -17,9 +11,3 @@ class BaseAnalysis(ABC, Generic[T_Rules]):
17
11
  @abstractmethod
18
12
  def subset_rules(self, desired_classes: set[ClassEntity]) -> T_Rules:
19
13
  raise NotImplementedError()
20
-
21
-
22
- class DataModelingScenario(StrEnum):
23
- from_scratch = "from scratch"
24
- build_solution = "build solution"
25
- extend_reference = "extend reference"