cognite-neat 0.92.0__tar.gz → 0.92.2__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 (224) hide show
  1. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/PKG-INFO +2 -2
  2. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/README.md +1 -1
  3. cognite_neat-0.92.2/cognite/neat/_version.py +1 -0
  4. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/queries/_base.py +52 -16
  5. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/analysis/_information.py +50 -5
  6. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/examples/__init__.py +1 -0
  7. cognite_neat-0.92.2/cognite/neat/rules/examples/info-rules-imf.xlsx +0 -0
  8. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/importers/_base.py +8 -3
  9. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/store/_base.py +23 -5
  10. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/pyproject.toml +1 -1
  11. cognite_neat-0.92.0/cognite/neat/_version.py +0 -1
  12. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/LICENSE +0 -0
  13. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/__init__.py +0 -0
  14. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/_shared.py +0 -0
  15. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/api/__init__.py +0 -0
  16. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/api/asgi/metrics.py +0 -0
  17. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/api/configuration.py +0 -0
  18. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/api/context_manager/__init__.py +0 -0
  19. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/api/context_manager/manager.py +0 -0
  20. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/api/data_classes/__init__.py +0 -0
  21. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/api/data_classes/rest.py +0 -0
  22. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/api/explorer.py +0 -0
  23. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/api/routers/configuration.py +0 -0
  24. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/api/routers/crud.py +0 -0
  25. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/api/routers/metrics.py +0 -0
  26. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/api/routers/workflows.py +0 -0
  27. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/api/utils/__init__.py +0 -0
  28. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/api/utils/data_mapping.py +0 -0
  29. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/api/utils/logging.py +0 -0
  30. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/api/utils/query_templates.py +0 -0
  31. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/main.py +0 -0
  32. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/monitoring/__init__.py +0 -0
  33. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/monitoring/metrics.py +0 -0
  34. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/ui/index.html +0 -0
  35. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/ui/neat-app/.gitignore +0 -0
  36. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/ui/neat-app/README.md +0 -0
  37. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/ui/neat-app/build/asset-manifest.json +0 -0
  38. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/ui/neat-app/build/favicon.ico +0 -0
  39. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/ui/neat-app/build/img/architect-icon.svg +0 -0
  40. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/ui/neat-app/build/img/developer-icon.svg +0 -0
  41. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/ui/neat-app/build/img/sme-icon.svg +0 -0
  42. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/ui/neat-app/build/index.html +0 -0
  43. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/ui/neat-app/build/logo192.png +0 -0
  44. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/ui/neat-app/build/manifest.json +0 -0
  45. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/ui/neat-app/build/robots.txt +0 -0
  46. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/ui/neat-app/build/static/css/main.72e3d92e.css +0 -0
  47. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/ui/neat-app/build/static/css/main.72e3d92e.css.map +0 -0
  48. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/ui/neat-app/build/static/js/main.5a52cf09.js +0 -0
  49. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/ui/neat-app/build/static/js/main.5a52cf09.js.LICENSE.txt +0 -0
  50. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/ui/neat-app/build/static/js/main.5a52cf09.js.map +0 -0
  51. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/app/ui/neat-app/build/static/media/logo.8093b84df9ed36a174c629d6fe0b730d.svg +0 -0
  52. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/config.py +0 -0
  53. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/constants.py +0 -0
  54. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/__init__.py +0 -0
  55. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/_shared.py +0 -0
  56. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/_tracking/__init__.py +0 -0
  57. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/_tracking/base.py +0 -0
  58. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/_tracking/log.py +0 -0
  59. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/examples/Knowledge-Graph-Nordic44-dirty.xml +0 -0
  60. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/examples/Knowledge-Graph-Nordic44.xml +0 -0
  61. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/examples/__init__.py +0 -0
  62. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/examples/skos-capturing-sheet-wind-topics.xlsx +0 -0
  63. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/extractors/__init__.py +0 -0
  64. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/extractors/_base.py +0 -0
  65. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/extractors/_classic_cdf/__init__.py +0 -0
  66. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/extractors/_classic_cdf/_assets.py +0 -0
  67. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/extractors/_classic_cdf/_base.py +0 -0
  68. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/extractors/_classic_cdf/_classic.py +0 -0
  69. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/extractors/_classic_cdf/_data_sets.py +0 -0
  70. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/extractors/_classic_cdf/_events.py +0 -0
  71. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/extractors/_classic_cdf/_files.py +0 -0
  72. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/extractors/_classic_cdf/_labels.py +0 -0
  73. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/extractors/_classic_cdf/_relationships.py +0 -0
  74. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/extractors/_classic_cdf/_sequences.py +0 -0
  75. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/extractors/_classic_cdf/_timeseries.py +0 -0
  76. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/extractors/_dexpi.py +0 -0
  77. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/extractors/_dms.py +0 -0
  78. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/extractors/_iodd.py +0 -0
  79. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/extractors/_mock_graph_generator.py +0 -0
  80. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/extractors/_rdf_file.py +0 -0
  81. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/loaders/__init__.py +0 -0
  82. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/loaders/_base.py +0 -0
  83. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/loaders/_rdf2asset.py +0 -0
  84. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/loaders/_rdf2dms.py +0 -0
  85. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/models.py +0 -0
  86. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/queries/__init__.py +0 -0
  87. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/queries/_construct.py +0 -0
  88. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/queries/_shared.py +0 -0
  89. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/transformers/__init__.py +0 -0
  90. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/transformers/_base.py +0 -0
  91. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/transformers/_classic_cdf.py +0 -0
  92. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/graph/transformers/_rdfpath.py +0 -0
  93. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/issues/__init__.py +0 -0
  94. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/issues/_base.py +0 -0
  95. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/issues/errors/__init__.py +0 -0
  96. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/issues/errors/_external.py +0 -0
  97. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/issues/errors/_general.py +0 -0
  98. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/issues/errors/_properties.py +0 -0
  99. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/issues/errors/_resources.py +0 -0
  100. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/issues/errors/_workflow.py +0 -0
  101. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/issues/formatters.py +0 -0
  102. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/issues/warnings/__init__.py +0 -0
  103. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/issues/warnings/_external.py +0 -0
  104. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/issues/warnings/_general.py +0 -0
  105. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/issues/warnings/_models.py +0 -0
  106. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/issues/warnings/_properties.py +0 -0
  107. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/issues/warnings/_resources.py +0 -0
  108. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/issues/warnings/user_modeling.py +0 -0
  109. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/py.typed +0 -0
  110. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/__init__.py +0 -0
  111. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/_shared.py +0 -0
  112. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/analysis/__init__.py +0 -0
  113. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/analysis/_asset.py +0 -0
  114. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/analysis/_base.py +0 -0
  115. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/examples/wind-energy.owl +0 -0
  116. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/exporters/__init__.py +0 -0
  117. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/exporters/_base.py +0 -0
  118. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/exporters/_rules2dms.py +0 -0
  119. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/exporters/_rules2excel.py +0 -0
  120. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/exporters/_rules2ontology.py +0 -0
  121. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/exporters/_rules2yaml.py +0 -0
  122. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/exporters/_validation.py +0 -0
  123. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/importers/__init__.py +0 -0
  124. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/importers/_dms2rules.py +0 -0
  125. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/importers/_dtdl2rules/__init__.py +0 -0
  126. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/importers/_dtdl2rules/_unit_lookup.py +0 -0
  127. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/importers/_dtdl2rules/dtdl_converter.py +0 -0
  128. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/importers/_dtdl2rules/dtdl_importer.py +0 -0
  129. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/importers/_dtdl2rules/spec.py +0 -0
  130. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/importers/_rdf/__init__.py +0 -0
  131. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/importers/_rdf/_imf2rules/__init__.py +0 -0
  132. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/importers/_rdf/_imf2rules/_imf2classes.py +0 -0
  133. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/importers/_rdf/_imf2rules/_imf2metadata.py +0 -0
  134. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/importers/_rdf/_imf2rules/_imf2properties.py +0 -0
  135. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/importers/_rdf/_imf2rules/_imf2rules.py +0 -0
  136. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/importers/_rdf/_inference2rules.py +0 -0
  137. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/importers/_rdf/_owl2rules/__init__.py +0 -0
  138. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/importers/_rdf/_owl2rules/_owl2classes.py +0 -0
  139. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/importers/_rdf/_owl2rules/_owl2metadata.py +0 -0
  140. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/importers/_rdf/_owl2rules/_owl2properties.py +0 -0
  141. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/importers/_rdf/_owl2rules/_owl2rules.py +0 -0
  142. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/importers/_rdf/_shared.py +0 -0
  143. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/importers/_spreadsheet2rules.py +0 -0
  144. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/importers/_yaml2rules.py +0 -0
  145. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/models/__init__.py +0 -0
  146. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/models/_base_input.py +0 -0
  147. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/models/_base_rules.py +0 -0
  148. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/models/_rdfpath.py +0 -0
  149. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/models/_types.py +0 -0
  150. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/models/asset/__init__.py +0 -0
  151. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/models/asset/_rules.py +0 -0
  152. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/models/asset/_rules_input.py +0 -0
  153. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/models/asset/_validation.py +0 -0
  154. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/models/data_types.py +0 -0
  155. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/models/dms/__init__.py +0 -0
  156. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/models/dms/_exporter.py +0 -0
  157. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/models/dms/_rules.py +0 -0
  158. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/models/dms/_rules_input.py +0 -0
  159. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/models/dms/_schema.py +0 -0
  160. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/models/dms/_validation.py +0 -0
  161. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/models/domain.py +0 -0
  162. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/models/entities/__init__.py +0 -0
  163. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/models/entities/_constants.py +0 -0
  164. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/models/entities/_loaders.py +0 -0
  165. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/models/entities/_multi_value.py +0 -0
  166. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/models/entities/_single_value.py +0 -0
  167. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/models/entities/_types.py +0 -0
  168. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/models/entities/_wrapped.py +0 -0
  169. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/models/information/__init__.py +0 -0
  170. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/models/information/_rules.py +0 -0
  171. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/models/information/_rules_input.py +0 -0
  172. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/models/information/_validation.py +0 -0
  173. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/transformers/__init__.py +0 -0
  174. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/transformers/_base.py +0 -0
  175. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/transformers/_converters.py +0 -0
  176. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/transformers/_map_onto.py +0 -0
  177. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/transformers/_pipelines.py +0 -0
  178. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/rules/transformers/_verification.py +0 -0
  179. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/store/__init__.py +0 -0
  180. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/store/_provenance.py +0 -0
  181. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/utils/__init__.py +0 -0
  182. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/utils/auth.py +0 -0
  183. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/utils/auxiliary.py +0 -0
  184. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/utils/cdf/__init__.py +0 -0
  185. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/utils/cdf/data_classes.py +0 -0
  186. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/utils/cdf/loaders/__init__.py +0 -0
  187. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/utils/cdf/loaders/_base.py +0 -0
  188. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/utils/cdf/loaders/_data_modeling.py +0 -0
  189. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/utils/cdf/loaders/_ingestion.py +0 -0
  190. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/utils/collection_.py +0 -0
  191. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/utils/rdf_.py +0 -0
  192. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/utils/regex_patterns.py +0 -0
  193. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/utils/spreadsheet.py +0 -0
  194. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/utils/text.py +0 -0
  195. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/utils/time_.py +0 -0
  196. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/utils/upload.py +0 -0
  197. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/utils/xml_.py +0 -0
  198. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/workflows/__init__.py +0 -0
  199. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/workflows/base.py +0 -0
  200. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/workflows/cdf_store.py +0 -0
  201. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/workflows/examples/Export_DMS/workflow.yaml +0 -0
  202. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/workflows/examples/Export_Semantic_Data_Model/workflow.yaml +0 -0
  203. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/workflows/examples/Import_DMS/workflow.yaml +0 -0
  204. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/workflows/examples/Validate_Rules/workflow.yaml +0 -0
  205. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/workflows/examples/Validate_Solution_Model/workflow.yaml +0 -0
  206. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/workflows/manager.py +0 -0
  207. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/workflows/model.py +0 -0
  208. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/workflows/steps/__init__.py +0 -0
  209. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/workflows/steps/data_contracts.py +0 -0
  210. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/workflows/steps/lib/__init__.py +0 -0
  211. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/workflows/steps/lib/current/__init__.py +0 -0
  212. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/workflows/steps/lib/current/graph_extractor.py +0 -0
  213. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/workflows/steps/lib/current/graph_loader.py +0 -0
  214. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/workflows/steps/lib/current/graph_store.py +0 -0
  215. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/workflows/steps/lib/current/rules_exporter.py +0 -0
  216. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/workflows/steps/lib/current/rules_importer.py +0 -0
  217. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/workflows/steps/lib/current/rules_validator.py +0 -0
  218. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/workflows/steps/lib/io/__init__.py +0 -0
  219. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/workflows/steps/lib/io/io_steps.py +0 -0
  220. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/workflows/steps/step_model.py +0 -0
  221. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/workflows/steps_registry.py +0 -0
  222. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/workflows/tasks.py +0 -0
  223. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/cognite/neat/workflows/triggers.py +0 -0
  224. {cognite_neat-0.92.0 → cognite_neat-0.92.2}/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.92.0
3
+ Version: 0.92.2
4
4
  Summary: Knowledge graph transformation
5
5
  Home-page: https://cognite-neat.readthedocs-hosted.com/
6
6
  License: Apache-2.0
@@ -59,7 +59,7 @@ Description-Content-Type: text/markdown
59
59
 
60
60
  # kNowlEdge grAph Transformer (NEAT)
61
61
 
62
- [![release](https://img.shields.io/github/actions/workflow/status/cognitedata/neat/release_pypi.yaml?style=for-the-badge)](https://github.com/cognitedata/neat/actions/workflows/release_pypi.yaml)
62
+ [![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)
63
63
  [![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)
64
64
  [![Github](https://shields.io/badge/github-cognite/neat-green?logo=github&style=for-the-badge)](https://github.com/cognitedata/neat)
65
65
  [![PyPI](https://img.shields.io/pypi/v/cognite-neat?style=for-the-badge)](https://pypi.org/project/cognite-neat/)
@@ -1,6 +1,6 @@
1
1
  # kNowlEdge grAph Transformer (NEAT)
2
2
 
3
- [![release](https://img.shields.io/github/actions/workflow/status/cognitedata/neat/release_pypi.yaml?style=for-the-badge)](https://github.com/cognitedata/neat/actions/workflows/release_pypi.yaml)
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
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
5
  [![Github](https://shields.io/badge/github-cognite/neat-green?logo=github&style=for-the-badge)](https://github.com/cognitedata/neat)
6
6
  [![PyPI](https://img.shields.io/pypi/v/cognite-neat?style=for-the-badge)](https://pypi.org/project/cognite-neat/)
@@ -0,0 +1 @@
1
+ __version__ = "0.92.2"
@@ -7,7 +7,7 @@ from rdflib import Literal as RdfLiteral
7
7
  from rdflib.query import ResultRow
8
8
 
9
9
  from cognite.neat.graph.models import InstanceType
10
- from cognite.neat.rules.models.entities import ClassEntity
10
+ from cognite.neat.rules.models.entities import ClassEntity, EntityTypes
11
11
  from cognite.neat.rules.models.information import InformationRules
12
12
  from cognite.neat.utils.rdf_ import remove_namespace_from_uri
13
13
 
@@ -98,13 +98,18 @@ class Queries:
98
98
  def describe(
99
99
  self,
100
100
  instance_id: URIRef,
101
+ instance_type: str | None = None,
101
102
  property_renaming_config: dict | None = None,
103
+ property_types: dict[str, EntityTypes] | None = None,
102
104
  ) -> tuple[str, dict[str | InstanceType, list[str]]] | None:
103
105
  """DESCRIBE instance for a given class from the graph store
104
106
 
105
107
  Args:
106
108
  instance_id: Instance id for which we want to generate query
107
- property_renaming_config: Dictionary to rename properties, default None
109
+ instance_type: Type of the instance, default None (will be inferred from triples)
110
+ property_renaming_config: Dictionary to rename properties, default None (no renaming)
111
+ property_types: Dictionary of property types, default None (helper for removal of namespace)
112
+
108
113
 
109
114
  Returns:
110
115
  Dictionary of instance properties
@@ -119,21 +124,52 @@ class Queries:
119
124
  "null",
120
125
  ]:
121
126
  continue
122
- # we are skipping deep validation with Pydantic to remove namespace here
123
- # as it reduces time to process triples by 10-15x
124
- value = remove_namespace_from_uri(object_, validation="prefix")
125
-
126
- # use-case: calling describe without renaming properties
127
- # losing the namespace from the predicate!
128
- if not property_renaming_config and predicate != RDF.type:
129
- property_values[remove_namespace_from_uri(predicate, validation="prefix")].append(value)
130
- elif predicate == RDF.type:
131
- property_values[RDF.type].append(value)
132
- # use-case: calling describe with renaming properties
133
- # renaming the property to the new name, if the property is defined
134
- # in the RULES sheet
135
- elif property_renaming_config and (property_ := property_renaming_config.get(predicate, None)):
127
+
128
+ # set property
129
+ if property_renaming_config and predicate != RDF.type:
130
+ property_ = property_renaming_config.get(
131
+ predicate, remove_namespace_from_uri(predicate, validation="prefix")
132
+ )
133
+ elif not property_renaming_config and predicate != RDF.type:
134
+ property_ = remove_namespace_from_uri(predicate, validation="prefix")
135
+ else:
136
+ property_ = RDF.type
137
+
138
+ # set value
139
+ # if it is URIRef and property type is object property, we need to remove namespace
140
+ # if it URIref but we are doing this into data type property, we do not remove namespace
141
+ # case 1 for RDF type we remove namespace
142
+ if property_ == RDF.type:
143
+ value = remove_namespace_from_uri(object_, validation="prefix")
144
+
145
+ # case 2 for define object properties we remove namespace
146
+ elif (
147
+ isinstance(object_, URIRef)
148
+ and property_types
149
+ and property_types.get(property_, None) == EntityTypes.object_property
150
+ ):
151
+ value = remove_namespace_from_uri(object_, validation="prefix")
152
+
153
+ # case 3 when property type is not defined and returned value is URIRef we remove namespace
154
+ elif isinstance(object_, URIRef) and not property_types:
155
+ value = remove_namespace_from_uri(object_, validation="prefix")
156
+
157
+ # case 4 for data type properties we do not remove namespace but keep the entire value
158
+ # but we drop the datatype part, and keep everything to be string (data loader will do the conversion)
159
+ # for value type it expects (if possible)
160
+ else:
161
+ value = str(object_)
162
+
163
+ # add type to the dictionary
164
+ if predicate != RDF.type:
136
165
  property_values[property_].append(value)
166
+ else:
167
+ # guarding against multiple rdf:type values as this is not allowed in CDF
168
+ if RDF.type not in property_values:
169
+ property_values[RDF.type].append(instance_type if instance_type else value)
170
+ else:
171
+ # we should not have multiple rdf:type values
172
+ continue
137
173
 
138
174
  if property_values:
139
175
  return (
@@ -1,4 +1,3 @@
1
- import logging
2
1
  import warnings
3
2
  from typing import Any, cast
4
3
 
@@ -12,12 +11,13 @@ from cognite.neat.rules.models._rdfpath import (
12
11
  SelfReferenceProperty,
13
12
  SingleProperty,
14
13
  )
15
- from cognite.neat.rules.models.entities import ClassEntity, ReferenceEntity
14
+ from cognite.neat.rules.models.entities import ClassEntity, EntityTypes, ReferenceEntity
16
15
  from cognite.neat.rules.models.information import (
17
16
  InformationClass,
18
17
  InformationProperty,
19
18
  InformationRules,
20
19
  )
20
+ from cognite.neat.utils.collection_ import most_occurring_element
21
21
  from cognite.neat.utils.rdf_ import get_inheritance_path
22
22
 
23
23
  from ._base import BaseAnalysis
@@ -105,6 +105,26 @@ class InformationAnalysis(BaseAnalysis[InformationRules, InformationClass, Infor
105
105
 
106
106
  return property_renaming_configuration
107
107
 
108
+ def property_types(self, class_: ClassEntity) -> dict[str, EntityTypes]:
109
+ property_types = {}
110
+ if definitions := self.class_property_pairs(consider_inheritance=True).get(class_, None):
111
+ for property_id, definition in definitions.items():
112
+ property_types[property_id] = definition.type_
113
+
114
+ return property_types
115
+
116
+ def most_occurring_class_in_transformations(self, class_: ClassEntity) -> ClassEntity | None:
117
+ classes = []
118
+ if class_property_pairs := self.class_property_pairs(consider_inheritance=True, only_rdfpath=True).get(
119
+ class_, None
120
+ ):
121
+ for property_ in class_property_pairs.values():
122
+ classes.append(cast(RDFPath, property_.transformation).traversal.class_)
123
+
124
+ return cast(ClassEntity, most_occurring_element(classes))
125
+ else:
126
+ return None
127
+
108
128
  def subset_rules(self, desired_classes: set[ClassEntity]) -> InformationRules:
109
129
  """
110
130
  Subset rules to only include desired classes and their properties.
@@ -148,11 +168,9 @@ class InformationAnalysis(BaseAnalysis[InformationRules, InformationClass, Infor
148
168
  possible_classes = possible_classes.union(parents)
149
169
 
150
170
  if not possible_classes:
151
- logging.error("None of the desired classes are defined in the data model!")
152
171
  raise ValueError("None of the desired classes are defined in the data model!")
153
172
 
154
173
  if impossible_classes:
155
- logging.warning(f"Could not find the following classes defined in the data model: {impossible_classes}")
156
174
  warnings.warn(
157
175
  f"Could not find the following classes defined in the data model: {impossible_classes}",
158
176
  stacklevel=2,
@@ -165,7 +183,6 @@ class InformationAnalysis(BaseAnalysis[InformationRules, InformationClass, Infor
165
183
  "properties": [],
166
184
  }
167
185
 
168
- logging.info(f"Reducing data model to only include the following classes: {possible_classes}")
169
186
  for class_ in possible_classes:
170
187
  reduced_data_model["classes"].append(class_as_dict[str(class_.suffix)])
171
188
 
@@ -181,3 +198,31 @@ class InformationAnalysis(BaseAnalysis[InformationRules, InformationClass, Infor
181
198
  warnings.warn(f"Reduced data model is not complete: {e}", stacklevel=2)
182
199
  reduced_data_model["metadata"].schema_ = SchemaCompleteness.partial
183
200
  return type(self.rules).model_construct(**reduced_data_model)
201
+
202
+ def class_uri(self, class_: ClassEntity) -> URIRef | None:
203
+ """Get URI for a class entity based on the rules.
204
+
205
+ Args:
206
+ class_: instance of ClassEntity
207
+
208
+ Returns:
209
+ URIRef of the class entity or None if not found
210
+ """
211
+
212
+ # we need to handle optional renamings and we do this
213
+ # by checking if the most occurring class in transformations alternatively
214
+ # in cases when we are not specifying transformations we default to the class entity
215
+ if not (most_frequent_class := self.most_occurring_class_in_transformations(class_)):
216
+ most_frequent_class = class_
217
+
218
+ # case 1 class prefix in rules.prefixes
219
+ if most_frequent_class.prefix in self.rules.prefixes:
220
+ return self.rules.prefixes[cast(str, most_frequent_class.prefix)][most_frequent_class.suffix]
221
+
222
+ # case 2 class prefix equal to rules.metadata.prefix
223
+ elif most_frequent_class.prefix == self.rules.metadata.prefix:
224
+ return self.rules.metadata.namespace[most_frequent_class.suffix]
225
+
226
+ # case 3 when class prefix is not found in prefixes of rules
227
+ else:
228
+ return None
@@ -7,3 +7,4 @@ from pathlib import Path
7
7
 
8
8
  _EXAMPLES = Path(__file__).parent
9
9
  wind_energy_ontology = _EXAMPLES / "wind-energy.owl"
10
+ imf_info_rules = _EXAMPLES / "info-rules-imf.xlsx"
@@ -1,8 +1,7 @@
1
- import getpass
2
1
  import warnings
3
2
  from abc import ABC, abstractmethod
4
3
  from collections.abc import Iterator
5
- from contextlib import contextmanager
4
+ from contextlib import contextmanager, suppress
6
5
  from datetime import datetime
7
6
  from typing import Any, Generic, Literal
8
7
 
@@ -25,6 +24,12 @@ class BaseImporter(ABC, Generic[T_InputRules]):
25
24
  raise NotImplementedError()
26
25
 
27
26
  def _default_metadata(self) -> dict[str, Any]:
27
+ creator = "UNKNOWN"
28
+ with suppress(KeyError, ImportError):
29
+ import getpass
30
+
31
+ creator = getpass.getuser()
32
+
28
33
  return {
29
34
  "prefix": "neat",
30
35
  "schema": "partial",
@@ -33,7 +38,7 @@ class BaseImporter(ABC, Generic[T_InputRules]):
33
38
  "title": "Neat Imported Data Model",
34
39
  "created": datetime.now().replace(microsecond=0).isoformat(),
35
40
  "updated": datetime.now().replace(microsecond=0).isoformat(),
36
- "creator": getpass.getuser(),
41
+ "creator": creator,
37
42
  "description": f"Imported using {type(self).__name__}",
38
43
  }
39
44
 
@@ -186,9 +186,17 @@ class NeatGraphStore:
186
186
  warnings.warn("Desired type not found in graph!", stacklevel=2)
187
187
  return None
188
188
 
189
- analysis = InformationAnalysis(self.rules)
190
- has_hop_transformations = analysis.has_hop_transformations()
191
- has_self_reference_transformations = analysis.has_self_reference_property_transformations()
189
+ if not (class_uri := InformationAnalysis(self.rules).class_uri(class_entity)):
190
+ warnings.warn(
191
+ f"Class {class_} does not have namespace defined for prefix {class_entity.prefix} Rules!",
192
+ stacklevel=2,
193
+ )
194
+ return None
195
+
196
+ has_hop_transformations = InformationAnalysis(self.rules).has_hop_transformations()
197
+ has_self_reference_transformations = InformationAnalysis(
198
+ self.rules
199
+ ).has_self_reference_property_transformations()
192
200
  if has_hop_transformations or has_self_reference_transformations:
193
201
  msg = (
194
202
  f"Rules contain [{'Hop' if has_hop_transformations else '' }"
@@ -205,12 +213,22 @@ class NeatGraphStore:
205
213
  )
206
214
  return None
207
215
 
208
- instance_ids = self.queries.list_instances_ids_of_class(self.rules.metadata.namespace[class_])
216
+ # get all the instances for give class_uri
217
+ instance_ids = self.queries.list_instances_ids_of_class(class_uri)
209
218
 
219
+ # get potential property renaming config
210
220
  property_renaming_config = InformationAnalysis(self.rules).define_property_renaming_config(class_entity)
211
221
 
222
+ # get property types to guide process of removing or not namespaces from results
223
+ property_types = InformationAnalysis(self.rules).property_types(class_entity)
224
+
212
225
  for instance_id in instance_ids:
213
- if res := self.queries.describe(instance_id, property_renaming_config):
226
+ if res := self.queries.describe(
227
+ instance_id=instance_id,
228
+ instance_type=class_,
229
+ property_renaming_config=property_renaming_config,
230
+ property_types=property_types,
231
+ ):
214
232
  yield res
215
233
 
216
234
  def _parse_file(
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "cognite-neat"
3
- version = "0.92.0"
3
+ version = "0.92.2"
4
4
  readme = "README.md"
5
5
  description = "Knowledge graph transformation"
6
6
  authors = [
@@ -1 +0,0 @@
1
- __version__ = "0.92.0"
File without changes