cognite-neat 0.90.1__tar.gz → 0.91.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

Files changed (226) hide show
  1. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/PKG-INFO +1 -1
  2. cognite_neat-0.91.0/cognite/neat/_version.py +1 -0
  3. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/extractors/__init__.py +3 -0
  4. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/extractors/_dexpi.py +4 -4
  5. cognite_neat-0.91.0/cognite/neat/graph/extractors/_iodd.py +160 -0
  6. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/issues/_base.py +6 -2
  7. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/exporters/_rules2excel.py +3 -3
  8. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/exporters/_rules2yaml.py +5 -1
  9. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/models/__init__.py +2 -2
  10. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/models/_base_input.py +2 -2
  11. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/models/_base_rules.py +142 -142
  12. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/models/asset/_rules.py +1 -34
  13. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/models/dms/_rules.py +127 -46
  14. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/models/dms/_validation.py +2 -2
  15. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/models/domain.py +16 -19
  16. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/models/entities/_single_value.py +25 -11
  17. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/models/entities/_types.py +0 -10
  18. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/models/information/_rules.py +68 -43
  19. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/models/information/_validation.py +5 -5
  20. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/transformers/_converters.py +6 -8
  21. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/transformers/_pipelines.py +8 -4
  22. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/store/_base.py +1 -1
  23. cognite_neat-0.91.0/cognite/neat/utils/xml_.py +52 -0
  24. {cognite_neat-0.90.1/cognite/neat/workflows/examples/Visualize_Semantic_Data_Model → cognite_neat-0.91.0/cognite/neat/workflows/examples/Export_Semantic_Data_Model}/workflow.yaml +1 -46
  25. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/pyproject.toml +1 -1
  26. cognite_neat-0.90.1/cognite/neat/_version.py +0 -1
  27. cognite_neat-0.90.1/cognite/neat/rules/models/asset/_serializer.py +0 -73
  28. cognite_neat-0.90.1/cognite/neat/rules/models/dms/_serializer.py +0 -157
  29. cognite_neat-0.90.1/cognite/neat/rules/models/information/_serializer.py +0 -73
  30. cognite_neat-0.90.1/cognite/neat/utils/xml_.py +0 -37
  31. cognite_neat-0.90.1/cognite/neat/workflows/examples/Visualize_Data_Model_Using_Mock_Graph/workflow.yaml +0 -95
  32. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/LICENSE +0 -0
  33. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/README.md +0 -0
  34. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/__init__.py +0 -0
  35. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/_shared.py +0 -0
  36. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/api/__init__.py +0 -0
  37. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/api/asgi/metrics.py +0 -0
  38. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/api/configuration.py +0 -0
  39. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/api/context_manager/__init__.py +0 -0
  40. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/api/context_manager/manager.py +0 -0
  41. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/api/data_classes/__init__.py +0 -0
  42. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/api/data_classes/rest.py +0 -0
  43. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/api/explorer.py +0 -0
  44. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/api/routers/configuration.py +0 -0
  45. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/api/routers/crud.py +0 -0
  46. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/api/routers/metrics.py +0 -0
  47. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/api/routers/workflows.py +0 -0
  48. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/api/utils/__init__.py +0 -0
  49. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/api/utils/data_mapping.py +0 -0
  50. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/api/utils/logging.py +0 -0
  51. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/api/utils/query_templates.py +0 -0
  52. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/main.py +0 -0
  53. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/monitoring/__init__.py +0 -0
  54. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/monitoring/metrics.py +0 -0
  55. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/ui/index.html +0 -0
  56. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/ui/neat-app/.gitignore +0 -0
  57. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/ui/neat-app/README.md +0 -0
  58. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/ui/neat-app/build/asset-manifest.json +0 -0
  59. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/ui/neat-app/build/favicon.ico +0 -0
  60. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/ui/neat-app/build/img/architect-icon.svg +0 -0
  61. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/ui/neat-app/build/img/developer-icon.svg +0 -0
  62. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/ui/neat-app/build/img/sme-icon.svg +0 -0
  63. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/ui/neat-app/build/index.html +0 -0
  64. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/ui/neat-app/build/logo192.png +0 -0
  65. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/ui/neat-app/build/manifest.json +0 -0
  66. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/ui/neat-app/build/robots.txt +0 -0
  67. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/ui/neat-app/build/static/css/main.72e3d92e.css +0 -0
  68. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/ui/neat-app/build/static/css/main.72e3d92e.css.map +0 -0
  69. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/ui/neat-app/build/static/js/main.5a52cf09.js +0 -0
  70. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/ui/neat-app/build/static/js/main.5a52cf09.js.LICENSE.txt +0 -0
  71. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/ui/neat-app/build/static/js/main.5a52cf09.js.map +0 -0
  72. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/app/ui/neat-app/build/static/media/logo.8093b84df9ed36a174c629d6fe0b730d.svg +0 -0
  73. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/config.py +0 -0
  74. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/constants.py +0 -0
  75. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/__init__.py +0 -0
  76. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/_shared.py +0 -0
  77. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/_tracking/__init__.py +0 -0
  78. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/_tracking/base.py +0 -0
  79. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/_tracking/log.py +0 -0
  80. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/examples/Knowledge-Graph-Nordic44-dirty.xml +0 -0
  81. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/examples/Knowledge-Graph-Nordic44.xml +0 -0
  82. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/examples/__init__.py +0 -0
  83. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/examples/skos-capturing-sheet-wind-topics.xlsx +0 -0
  84. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/extractors/_base.py +0 -0
  85. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/extractors/_classic_cdf/__init__.py +0 -0
  86. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/extractors/_classic_cdf/_assets.py +0 -0
  87. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/extractors/_classic_cdf/_base.py +0 -0
  88. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/extractors/_classic_cdf/_events.py +0 -0
  89. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/extractors/_classic_cdf/_files.py +0 -0
  90. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/extractors/_classic_cdf/_labels.py +0 -0
  91. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/extractors/_classic_cdf/_relationships.py +0 -0
  92. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/extractors/_classic_cdf/_sequences.py +0 -0
  93. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/extractors/_classic_cdf/_timeseries.py +0 -0
  94. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/extractors/_dms.py +0 -0
  95. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/extractors/_mock_graph_generator.py +0 -0
  96. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/extractors/_rdf_file.py +0 -0
  97. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/loaders/__init__.py +0 -0
  98. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/loaders/_base.py +0 -0
  99. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/loaders/_rdf2asset.py +0 -0
  100. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/loaders/_rdf2dms.py +0 -0
  101. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/models.py +0 -0
  102. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/queries/__init__.py +0 -0
  103. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/queries/_base.py +0 -0
  104. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/queries/_construct.py +0 -0
  105. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/queries/_shared.py +0 -0
  106. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/transformers/__init__.py +0 -0
  107. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/transformers/_base.py +0 -0
  108. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/transformers/_classic_cdf.py +0 -0
  109. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/graph/transformers/_rdfpath.py +0 -0
  110. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/issues/__init__.py +0 -0
  111. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/issues/errors/__init__.py +0 -0
  112. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/issues/errors/_external.py +0 -0
  113. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/issues/errors/_general.py +0 -0
  114. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/issues/errors/_properties.py +0 -0
  115. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/issues/errors/_resources.py +0 -0
  116. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/issues/errors/_workflow.py +0 -0
  117. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/issues/formatters.py +0 -0
  118. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/issues/warnings/__init__.py +0 -0
  119. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/issues/warnings/_external.py +0 -0
  120. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/issues/warnings/_general.py +0 -0
  121. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/issues/warnings/_models.py +0 -0
  122. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/issues/warnings/_properties.py +0 -0
  123. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/issues/warnings/_resources.py +0 -0
  124. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/issues/warnings/user_modeling.py +0 -0
  125. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/py.typed +0 -0
  126. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/__init__.py +0 -0
  127. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/_shared.py +0 -0
  128. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/analysis/__init__.py +0 -0
  129. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/analysis/_asset.py +0 -0
  130. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/analysis/_base.py +0 -0
  131. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/analysis/_information.py +0 -0
  132. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/examples/__init__.py +0 -0
  133. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/examples/wind-energy.owl +0 -0
  134. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/exporters/__init__.py +0 -0
  135. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/exporters/_base.py +0 -0
  136. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/exporters/_rules2dms.py +0 -0
  137. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/exporters/_rules2ontology.py +0 -0
  138. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/exporters/_validation.py +0 -0
  139. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/importers/__init__.py +0 -0
  140. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/importers/_base.py +0 -0
  141. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/importers/_dms2rules.py +0 -0
  142. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/importers/_dtdl2rules/__init__.py +0 -0
  143. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/importers/_dtdl2rules/_unit_lookup.py +0 -0
  144. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/importers/_dtdl2rules/dtdl_converter.py +0 -0
  145. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/importers/_dtdl2rules/dtdl_importer.py +0 -0
  146. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/importers/_dtdl2rules/spec.py +0 -0
  147. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/importers/_rdf/__init__.py +0 -0
  148. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/importers/_rdf/_imf2rules/__init__.py +0 -0
  149. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/importers/_rdf/_imf2rules/_imf2classes.py +0 -0
  150. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/importers/_rdf/_imf2rules/_imf2metadata.py +0 -0
  151. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/importers/_rdf/_imf2rules/_imf2properties.py +0 -0
  152. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/importers/_rdf/_imf2rules/_imf2rules.py +0 -0
  153. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/importers/_rdf/_inference2rules.py +0 -0
  154. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/importers/_rdf/_owl2rules/__init__.py +0 -0
  155. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/importers/_rdf/_owl2rules/_owl2classes.py +0 -0
  156. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/importers/_rdf/_owl2rules/_owl2metadata.py +0 -0
  157. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/importers/_rdf/_owl2rules/_owl2properties.py +0 -0
  158. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/importers/_rdf/_owl2rules/_owl2rules.py +0 -0
  159. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/importers/_rdf/_shared.py +0 -0
  160. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/importers/_spreadsheet2rules.py +0 -0
  161. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/importers/_yaml2rules.py +0 -0
  162. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/models/_rdfpath.py +0 -0
  163. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/models/_types.py +0 -0
  164. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/models/asset/__init__.py +0 -0
  165. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/models/asset/_rules_input.py +0 -0
  166. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/models/asset/_validation.py +0 -0
  167. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/models/data_types.py +0 -0
  168. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/models/dms/__init__.py +0 -0
  169. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/models/dms/_exporter.py +0 -0
  170. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/models/dms/_rules_input.py +0 -0
  171. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/models/dms/_schema.py +0 -0
  172. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/models/entities/__init__.py +0 -0
  173. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/models/entities/_constants.py +0 -0
  174. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/models/entities/_loaders.py +0 -0
  175. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/models/entities/_multi_value.py +0 -0
  176. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/models/entities/_wrapped.py +0 -0
  177. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/models/information/__init__.py +0 -0
  178. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/models/information/_rules_input.py +0 -0
  179. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/transformers/__init__.py +0 -0
  180. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/transformers/_base.py +0 -0
  181. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/transformers/_map_onto.py +0 -0
  182. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/rules/transformers/_verification.py +0 -0
  183. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/store/__init__.py +0 -0
  184. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/store/_provenance.py +0 -0
  185. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/utils/__init__.py +0 -0
  186. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/utils/auth.py +0 -0
  187. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/utils/auxiliary.py +0 -0
  188. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/utils/cdf/__init__.py +0 -0
  189. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/utils/cdf/data_classes.py +0 -0
  190. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/utils/cdf/loaders/__init__.py +0 -0
  191. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/utils/cdf/loaders/_base.py +0 -0
  192. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/utils/cdf/loaders/_data_modeling.py +0 -0
  193. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/utils/cdf/loaders/_ingestion.py +0 -0
  194. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/utils/collection_.py +0 -0
  195. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/utils/rdf_.py +0 -0
  196. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/utils/regex_patterns.py +0 -0
  197. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/utils/spreadsheet.py +0 -0
  198. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/utils/text.py +0 -0
  199. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/utils/time_.py +0 -0
  200. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/utils/upload.py +0 -0
  201. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/workflows/__init__.py +0 -0
  202. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/workflows/base.py +0 -0
  203. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/workflows/cdf_store.py +0 -0
  204. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/workflows/examples/Export_DMS/workflow.yaml +0 -0
  205. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/workflows/examples/Import_DMS/workflow.yaml +0 -0
  206. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/workflows/examples/Validate_Rules/workflow.yaml +0 -0
  207. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/workflows/examples/Validate_Solution_Model/workflow.yaml +0 -0
  208. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/workflows/manager.py +0 -0
  209. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/workflows/model.py +0 -0
  210. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/workflows/steps/__init__.py +0 -0
  211. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/workflows/steps/data_contracts.py +0 -0
  212. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/workflows/steps/lib/__init__.py +0 -0
  213. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/workflows/steps/lib/current/__init__.py +0 -0
  214. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/workflows/steps/lib/current/graph_extractor.py +0 -0
  215. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/workflows/steps/lib/current/graph_loader.py +0 -0
  216. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/workflows/steps/lib/current/graph_store.py +0 -0
  217. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/workflows/steps/lib/current/rules_exporter.py +0 -0
  218. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/workflows/steps/lib/current/rules_importer.py +0 -0
  219. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/workflows/steps/lib/current/rules_validator.py +0 -0
  220. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/workflows/steps/lib/io/__init__.py +0 -0
  221. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/workflows/steps/lib/io/io_steps.py +0 -0
  222. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/workflows/steps/step_model.py +0 -0
  223. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/workflows/steps_registry.py +0 -0
  224. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/workflows/tasks.py +0 -0
  225. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/cognite/neat/workflows/triggers.py +0 -0
  226. {cognite_neat-0.90.1 → cognite_neat-0.91.0}/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.90.1
3
+ Version: 0.91.0
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.91.0"
@@ -8,6 +8,7 @@ from ._classic_cdf._sequences import SequencesExtractor
8
8
  from ._classic_cdf._timeseries import TimeSeriesExtractor
9
9
  from ._dexpi import DexpiExtractor
10
10
  from ._dms import DMSExtractor
11
+ from ._iodd import IODDExtractor
11
12
  from ._mock_graph_generator import MockGraphGenerator
12
13
  from ._rdf_file import RdfFileExtractor
13
14
 
@@ -24,6 +25,7 @@ __all__ = [
24
25
  "RdfFileExtractor",
25
26
  "DexpiExtractor",
26
27
  "DMSExtractor",
28
+ "IODDExtractor",
27
29
  ]
28
30
 
29
31
 
@@ -38,6 +40,7 @@ TripleExtractors = (
38
40
  | LabelsExtractor
39
41
  | RdfFileExtractor
40
42
  | DexpiExtractor
43
+ | IODDExtractor
41
44
  )
42
45
 
43
46
 
@@ -202,13 +202,13 @@ class DexpiExtractor(BaseExtractor):
202
202
 
203
203
  @classmethod
204
204
  def _get_element_label(cls, element: Element) -> str | None:
205
- if children := get_children(element, "Label", 1):
206
- if grandchildren := get_children(children[0], "Text", 1):
205
+ if children := get_children(element, "Label", no_children=1):
206
+ if grandchildren := get_children(children[0], "Text", no_children=1):
207
207
  if "String" in grandchildren[0].attrib:
208
208
  return grandchildren[0].attrib["String"]
209
209
 
210
210
  # extension for schema version 3.3, where text is used to "label" without a <label> parent
211
- elif children := get_children(element, "Text", 1):
211
+ elif children := get_children(element, "Text", no_children=1):
212
212
  if "String" in children[0].attrib:
213
213
  return children[0].attrib["String"]
214
214
 
@@ -219,7 +219,7 @@ class DexpiExtractor(BaseExtractor):
219
219
  # TODO: This requires more work as there are multiple groupings of GenericAttributes
220
220
 
221
221
  attributes = defaultdict(list)
222
- if children := get_children(element, "GenericAttributes", 1):
222
+ if children := get_children(element, "GenericAttributes", no_children=1):
223
223
  if grandchildren := get_children(children[0], "GenericAttribute"):
224
224
  for generic_attribute in grandchildren:
225
225
  # extension for schema version 3.3, where "AttributeURI" is not included
@@ -0,0 +1,160 @@
1
+ import xml.etree.ElementTree as ET
2
+ from pathlib import Path
3
+ from typing import ClassVar
4
+ from xml.etree.ElementTree import Element
5
+
6
+ from rdflib import RDF, Literal, Namespace, URIRef
7
+
8
+ from cognite.neat.constants import DEFAULT_NAMESPACE
9
+ from cognite.neat.graph.extractors._base import BaseExtractor
10
+ from cognite.neat.graph.models import Triple
11
+ from cognite.neat.utils.rdf_ import as_neat_compliant_uri
12
+ from cognite.neat.utils.text import to_camel
13
+ from cognite.neat.utils.xml_ import get_children
14
+
15
+ IODD = Namespace("http://www.io-link.com/IODD/2010/10/")
16
+ XSI = Namespace("http://www.w3.org/2001/XMLSchema-instance/")
17
+
18
+
19
+ class IODDExtractor(BaseExtractor):
20
+ """
21
+ IODD-XML extractor of RDF triples
22
+
23
+ Each IODD sheet describes an IODD device. This extractor extracts rdf triples that describes the device, and the
24
+ sensors connected to the device.
25
+ This data is described under the elements "DeviceIdentity" and "ProcessDataCollection".
26
+ In addition, triples extacted from "DeviceIdentity" and
27
+ "ProcessDataCollection" may reference "Text" elements which are found under "ExternalTextCollection". Edges to
28
+ these Text element nodes are also extracted.
29
+
30
+ Args:
31
+ root: XML root element of IODD XML file.
32
+ namespace: Optional custom namespace to use for extracted triples that define data
33
+ model instances. Defaults to DEFAULT_NAMESPACE.
34
+ """
35
+
36
+ device_elements_with_text_nodes: ClassVar[list[str]] = ["VendorText", "VendorUrl", "DeviceName", "DeviceFamily"]
37
+
38
+ def __init__(self, root: Element, namespace: Namespace | None = None):
39
+ self.root = root
40
+ self.namespace = namespace or DEFAULT_NAMESPACE
41
+
42
+ @classmethod
43
+ def from_file(cls, filepath: str | Path, namespace: Namespace | None = None):
44
+ return cls(ET.parse(filepath).getroot(), namespace)
45
+
46
+ @classmethod
47
+ def _from_root2triples(cls, root: Element, namespace: Namespace) -> list[Triple]:
48
+ """Loops through the relevant elements of the IODD XML sheet to create rdf triples that describes the IODD
49
+ device by starting at the root element.
50
+ """
51
+ triples: list[Triple] = []
52
+
53
+ # Extract DeviceIdentity triples
54
+ if di_root := get_children(
55
+ root, "DeviceIdentity", ignore_namespace=True, include_nested_children=True, no_children=1
56
+ ):
57
+ triples.extend(cls._iodd_device_identity2triples(di_root[0], namespace))
58
+
59
+ # Extract ProcessDataCollection triples -
60
+ # this element holds the information about the sensors with data coming from MQTT
61
+ if pc_root := get_children(
62
+ root, "ProcessDataCollection", ignore_namespace=True, include_nested_children=True, no_children=1
63
+ ):
64
+ triples.extend(cls._process_data_collection2triples(pc_root[0], namespace))
65
+
66
+ if et_root := get_children(
67
+ root, "ExternalTextCollection", ignore_namespace=True, include_nested_children=True, no_children=1
68
+ ):
69
+ triples.extend(cls._text_elements2triples(et_root[0], namespace))
70
+
71
+ return triples
72
+
73
+ @classmethod
74
+ def _device_2text_elements_edges(cls, di_root: Element, id: URIRef, namespace: Namespace) -> list[Triple]:
75
+ """
76
+ Create edges from the device node to text nodes.
77
+ """
78
+ triples: list[Triple] = []
79
+
80
+ for element_tag in cls.device_elements_with_text_nodes:
81
+ if child := get_children(
82
+ di_root, child_tag=element_tag, ignore_namespace=True, include_nested_children=True, no_children=1
83
+ ):
84
+ if text_id := child[0].attrib.get("textId"):
85
+ # Create connection from device to textId node
86
+ element_tag = to_camel(element_tag)
87
+ triples.append((id, IODD[element_tag], namespace[text_id]))
88
+
89
+ return triples
90
+
91
+ @classmethod
92
+ def _text_elements2triples(cls, et_root: Element, namespace: Namespace) -> list[Triple]:
93
+ """
94
+ This method extracts all text item triples under the ExternalTextCollection element. This will create a node
95
+ for each text item, and add the text value as a property to the node.
96
+ """
97
+ triples: list[Triple] = []
98
+
99
+ if text_elements := get_children(
100
+ et_root, child_tag="Text", ignore_namespace=True, include_nested_children=True
101
+ ):
102
+ for element in text_elements:
103
+ if id := element.attrib.get("id"):
104
+ text_id = namespace[id]
105
+
106
+ # Create Text node
107
+ triples.append((text_id, RDF.type, as_neat_compliant_uri(IODD["Text"])))
108
+
109
+ # Resolve text value related to the text item
110
+ if value := element.attrib.get("value"):
111
+ triples.append((text_id, IODD.value, Literal(value)))
112
+
113
+ return triples
114
+
115
+ # TODO
116
+ @classmethod
117
+ def _process_data_collection2triples(cls, pc_root: Element, namespace: Namespace) -> list[Triple]:
118
+ """
119
+ ProcessDataCollection contains both ProcessDataIn and ProcessDataOut. Here, we are interested in the elements
120
+ that corresponds to actual sensor values that we will rececive from the MQTT connection.
121
+
122
+ Most likely this is ProcessDataOut elements (to be verified).
123
+ """
124
+ triples: list[Triple] = []
125
+
126
+ return triples
127
+
128
+ @classmethod
129
+ def _iodd_device_identity2triples(cls, di_root: Element, namespace: Namespace) -> list[Triple]:
130
+ """
131
+ Properties and metadata related to the IO Device are described under the 'DeviceIdentity' element in the XML.
132
+ This method extracts the triples that describe the device's identity which is found under the
133
+ DeviceIdentity element and its child elements.
134
+
135
+ """
136
+ triples: list[Triple] = []
137
+
138
+ if device_id := di_root.attrib.get("deviceId"):
139
+ id_ = namespace[device_id]
140
+
141
+ for attribute_name, attribute_value in di_root.attrib.items():
142
+ if attribute_name == "deviceId":
143
+ # Create rdf type triple for IODD
144
+ triples.append(
145
+ (
146
+ id_,
147
+ RDF.type,
148
+ as_neat_compliant_uri(IODD["IoddDevice"]),
149
+ )
150
+ )
151
+ else:
152
+ # Collect attributes at root element
153
+ triples.append((id_, IODD[attribute_name], Literal(attribute_value)))
154
+
155
+ triples.extend(cls._device_2text_elements_edges(di_root, id_, namespace))
156
+ return triples
157
+
158
+ def extract(self) -> list[Triple]:
159
+ # Extract triples from IODD device XML
160
+ return self._from_root2triples(self.root, self.namespace)
@@ -190,6 +190,10 @@ class NeatError(NeatIssue, Exception):
190
190
  read_info_by_sheet = kwargs.get("read_info_by_sheet")
191
191
 
192
192
  for error in errors:
193
+ if error["type"] == "is_instance_of" and error["loc"][1] == "is-instance[SheetList]":
194
+ # Skip the error for SheetList, as it is not relevant for the user. This is an
195
+ # internal class used to have helper methods for a lists as .to_pandas()
196
+ continue
193
197
  ctx = error.get("ctx")
194
198
  if isinstance(ctx, dict) and isinstance(multi_error := ctx.get("error"), MultiValueError):
195
199
  if read_info_by_sheet:
@@ -363,10 +367,10 @@ class NeatIssueList(UserList[T_NeatIssue], Sequence[T_NeatIssue], ABC):
363
367
  """Return all the warnings in this list."""
364
368
  return type(self)([issue for issue in self if isinstance(issue, NeatWarning)]) # type: ignore[misc]
365
369
 
366
- def as_errors(self) -> ExceptionGroup:
370
+ def as_errors(self, operation: str = "Operation failed") -> ExceptionGroup:
367
371
  """Return an ExceptionGroup with all the errors in this list."""
368
372
  return ExceptionGroup(
369
- "Operation failed",
373
+ operation,
370
374
  [issue for issue in self if isinstance(issue, NeatError)],
371
375
  )
372
376
 
@@ -17,7 +17,7 @@ from cognite.neat.rules.models import (
17
17
  DataModelType,
18
18
  ExtensionCategory,
19
19
  SchemaCompleteness,
20
- SheetEntity,
20
+ SheetRow,
21
21
  )
22
22
  from cognite.neat.rules.models.dms import DMSMetadata
23
23
  from cognite.neat.rules.models.domain import DomainMetadata
@@ -210,14 +210,14 @@ class ExcelExporter(BaseExporter[VerifiedRules, Workbook]):
210
210
  cell.font = Font(bold=True, size=12)
211
211
 
212
212
  @classmethod
213
- def _get_item_class(cls, annotation: GenericAlias) -> type[SheetEntity]:
213
+ def _get_item_class(cls, annotation: GenericAlias) -> type[SheetRow]:
214
214
  if not isinstance(annotation, GenericAlias):
215
215
  raise ValueError(f"Expected annotation to be a GenericAlias, but got {type(annotation)}")
216
216
  args = get_args(annotation)
217
217
  if len(args) != 1:
218
218
  raise ValueError(f"Expected annotation to have exactly one argument, but got {len(args)}")
219
219
  arg = args[0]
220
- if not issubclass(arg, SheetEntity):
220
+ if not issubclass(arg, SheetRow):
221
221
  raise ValueError(f"Expected annotation to have a BaseModel argument, but got {type(arg)}")
222
222
  return arg
223
223
 
@@ -58,6 +58,10 @@ class YAMLExporter(BaseExporter[VerifiedRules, str]):
58
58
  def export(self, rules: VerifiedRules) -> str:
59
59
  """Export rules to YAML (or JSON) format.
60
60
 
61
+ This will export the rules to YAML format if the output is set to "yaml" and JSON format if the output is set.
62
+ All None and Unset values are excluded from the output to keep the output clean, i.e., only the values the user
63
+ has set.
64
+
61
65
  Args:
62
66
  rules: The rules to be exported.
63
67
 
@@ -66,7 +70,7 @@ class YAMLExporter(BaseExporter[VerifiedRules, str]):
66
70
  """
67
71
  # model_dump_json ensures that the output is in JSON format,
68
72
  # if we don't do this, we will get Enums and other types that are not serializable to YAML
69
- json_output = rules.dump(mode="json")
73
+ json_output = rules.dump(mode="json", exclude_none=True, exclude_unset=True)
70
74
  if self.output == "json":
71
75
  return json.dumps(json_output)
72
76
  elif self.output == "yaml":
@@ -4,7 +4,7 @@ from cognite.neat.rules.models.domain import DomainInputRules, DomainRules
4
4
  from cognite.neat.rules.models.information._rules import InformationRules
5
5
  from cognite.neat.rules.models.information._rules_input import InformationInputRules
6
6
 
7
- from ._base_rules import DataModelType, ExtensionCategory, RoleTypes, SchemaCompleteness, SheetEntity, SheetList
7
+ from ._base_rules import DataModelType, ExtensionCategory, RoleTypes, SchemaCompleteness, SheetList, SheetRow
8
8
  from .dms._rules import DMSRules
9
9
  from .dms._rules_input import DMSInputRules
10
10
  from .dms._schema import DMSSchema
@@ -42,5 +42,5 @@ __all__ = [
42
42
  "ExtensionCategory",
43
43
  "DataModelType",
44
44
  "SheetList",
45
- "SheetEntity",
45
+ "SheetRow",
46
46
  ]
@@ -18,7 +18,7 @@ from dataclasses import Field, dataclass, fields, is_dataclass
18
18
  from types import GenericAlias, UnionType
19
19
  from typing import Any, Generic, TypeVar, Union, cast, get_args, get_origin, overload
20
20
 
21
- from ._base_rules import BaseRules, RuleModel
21
+ from ._base_rules import BaseRules, SchemaModel
22
22
 
23
23
  if sys.version_info >= (3, 11):
24
24
  from typing import Self
@@ -26,7 +26,7 @@ else:
26
26
  from typing_extensions import Self
27
27
 
28
28
  T_BaseRules = TypeVar("T_BaseRules", bound=BaseRules)
29
- T_RuleModel = TypeVar("T_RuleModel", bound=RuleModel)
29
+ T_RuleModel = TypeVar("T_RuleModel", bound=SchemaModel)
30
30
 
31
31
 
32
32
  @dataclass