pyegeria 5.2.1.1__py3-none-any.whl → 5.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (311) hide show
  1. commands/cat/.DS_Store +0 -0
  2. commands/cat/Dr-Egeria_md-orig.py +166 -0
  3. commands/cat/__init__.py +23 -0
  4. commands/cat/dr_egeria_jupyter.py +122 -0
  5. commands/cat/dr_egeria_md.py +247 -0
  6. {pyegeria/commands → commands}/cat/exp_list_glossaries.py +3 -4
  7. {pyegeria/commands → commands}/cat/get_asset_graph.py +4 -4
  8. {pyegeria/commands → commands}/cat/get_collection.py +8 -9
  9. {pyegeria/commands → commands}/cat/get_project_dependencies.py +6 -8
  10. {pyegeria/commands → commands}/cat/get_project_structure.py +6 -8
  11. {pyegeria/commands → commands}/cat/get_tech_type_elements.py +13 -15
  12. {pyegeria/commands → commands}/cat/glossary_actions.py +184 -34
  13. {pyegeria/commands → commands}/cat/list_assets.py +9 -6
  14. commands/cat/list_categories.py +192 -0
  15. {pyegeria/commands → commands}/cat/list_cert_types.py +6 -6
  16. {pyegeria/commands → commands}/cat/list_collections.py +62 -19
  17. commands/cat/list_data_structures.py +223 -0
  18. {pyegeria/commands → commands}/cat/list_deployed_catalogs.py +9 -8
  19. {pyegeria/commands → commands}/cat/list_deployed_database_schemas.py +10 -9
  20. {pyegeria/commands → commands}/cat/list_deployed_databases.py +9 -8
  21. pyegeria/commands/cat/list_servers_deployed_imp.py → commands/cat/list_deployed_servers.py +3 -3
  22. {pyegeria/commands → commands}/cat/list_glossaries.py +57 -15
  23. {pyegeria/commands → commands}/cat/list_projects.py +5 -5
  24. {pyegeria/commands → commands}/cat/list_tech_type_elements.py +3 -3
  25. {pyegeria/commands → commands}/cat/list_tech_types.py +4 -4
  26. {pyegeria/commands → commands}/cat/list_terms.py +93 -45
  27. {pyegeria/commands → commands}/cat/list_todos.py +3 -3
  28. {pyegeria/commands → commands}/cat/list_user_ids.py +9 -8
  29. {pyegeria/commands → commands}/cli/__init__.py +1 -1
  30. {pyegeria/commands → commands}/cli/egeria.py +506 -250
  31. {pyegeria/commands → commands}/cli/egeria_cat.py +127 -50
  32. {pyegeria/commands → commands}/cli/egeria_login_tui.py +15 -17
  33. {pyegeria/commands → commands}/cli/egeria_my.py +22 -15
  34. {pyegeria/commands → commands}/cli/egeria_ops.py +54 -55
  35. {pyegeria/commands → commands}/cli/egeria_tech.py +364 -152
  36. {pyegeria/commands → commands}/cli/ops_config.py +11 -4
  37. commands/cli/txt_custom_v2.tcss +19 -0
  38. commands/my/__init__.py +22 -0
  39. {pyegeria/commands → commands}/my/list_my_profile.py +6 -8
  40. {pyegeria/commands → commands}/my/list_my_roles.py +4 -4
  41. {pyegeria/commands → commands}/my/monitor_my_todos.py +7 -7
  42. {pyegeria/commands → commands}/my/monitor_open_todos.py +7 -7
  43. {pyegeria/commands → commands}/my/todo_actions.py +3 -2
  44. commands/ops/__init__.py +23 -0
  45. {pyegeria/commands → commands}/ops/gov_server_actions.py +5 -4
  46. {pyegeria/commands → commands}/ops/list_archives.py +7 -6
  47. {pyegeria/commands → commands}/ops/list_catalog_targets.py +4 -4
  48. {pyegeria/commands → commands}/ops/load_archive.py +4 -2
  49. {pyegeria/commands → commands}/ops/monitor_asset_events.py +8 -7
  50. {pyegeria/commands → commands}/ops/monitor_engine_activity.py +5 -5
  51. {pyegeria/commands → commands}/ops/monitor_engine_activity_c.py +3 -3
  52. {pyegeria/commands → commands}/ops/monitor_gov_eng_status.py +3 -2
  53. {pyegeria/commands → commands}/ops/monitor_integ_daemon_status.py +23 -15
  54. {pyegeria/commands → commands}/ops/monitor_platform_status.py +5 -4
  55. {pyegeria/commands → commands}/ops/monitor_server_startup.py +7 -7
  56. {pyegeria/commands → commands}/ops/monitor_server_status.py +16 -11
  57. {pyegeria/commands → commands}/ops/orig_monitor_server_list.py +2 -2
  58. {pyegeria/commands → commands}/ops/orig_monitor_server_status.py +3 -3
  59. {pyegeria/commands → commands}/ops/refresh_integration_daemon.py +4 -4
  60. {pyegeria/commands → commands}/ops/restart_integration_daemon.py +3 -3
  61. {pyegeria/commands → commands}/ops/table_integ_daemon_status.py +3 -3
  62. commands/tech/__init__.py +22 -0
  63. commands/tech/generic_actions.py +74 -0
  64. {pyegeria/commands → commands}/tech/get_element_info.py +5 -7
  65. {pyegeria/commands → commands}/tech/get_guid_info.py +4 -5
  66. {pyegeria/commands → commands}/tech/get_tech_details.py +8 -9
  67. {pyegeria/commands → commands}/tech/get_tech_type_template.py +4 -4
  68. pyegeria/commands/tech/list_elements.py → commands/tech/list_all_om_type_elements.py +11 -10
  69. pyegeria/commands/tech/list_elements_x.py → commands/tech/list_all_om_type_elements_x.py +11 -12
  70. pyegeria/commands/tech/list_related_elements.py → commands/tech/list_all_related_elements.py +11 -9
  71. {pyegeria/commands → commands}/tech/list_anchored_elements.py +16 -16
  72. {pyegeria/commands → commands}/tech/list_asset_types.py +4 -4
  73. commands/tech/list_elements_by_classification_by_property_value.py +200 -0
  74. commands/tech/list_elements_by_property_value.py +180 -0
  75. commands/tech/list_elements_by_property_value_x.py +201 -0
  76. {pyegeria/commands → commands}/tech/list_elements_for_classification.py +11 -9
  77. {pyegeria/commands → commands}/tech/list_gov_action_processes.py +5 -6
  78. commands/tech/list_information_supply_chains.py +167 -0
  79. {pyegeria/commands → commands}/tech/list_registered_services.py +3 -3
  80. commands/tech/list_related_elements_with_prop_value.py +221 -0
  81. {pyegeria/commands → commands}/tech/list_related_specification.py +3 -3
  82. {pyegeria/commands → commands}/tech/list_relationship_types.py +4 -5
  83. {pyegeria/commands → commands}/tech/list_relationships.py +3 -3
  84. commands/tech/list_solution_blueprints.py +181 -0
  85. commands/tech/list_solution_components.py +185 -0
  86. commands/tech/list_solution_roles.py +184 -0
  87. {pyegeria/commands → commands}/tech/list_tech_templates.py +3 -3
  88. {pyegeria/commands → commands}/tech/list_valid_metadata_values.py +5 -6
  89. {pyegeria/commands → commands}/tech/table_tech_templates.py +16 -13
  90. {pyegeria/commands → commands}/tech/x_list_related_elements.py +6 -4
  91. md_processing/__init__.py +49 -0
  92. md_processing/data/commands.json +3252 -0
  93. md_processing/dr_egeria_inbox/archive/dr_egeria_intro.md +254 -0
  94. md_processing/dr_egeria_inbox/archive/dr_egeria_intro_more_terms.md +696 -0
  95. md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part1.md +254 -0
  96. md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part2.md +298 -0
  97. md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part3.md +608 -0
  98. md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part4.md +94 -0
  99. md_processing/dr_egeria_inbox/archive/freddie_intro.md +284 -0
  100. md_processing/dr_egeria_inbox/archive/freddie_intro_orig.md +275 -0
  101. md_processing/dr_egeria_inbox/archive/test-term.md +110 -0
  102. md_processing/dr_egeria_inbox/cat_test.md +100 -0
  103. md_processing/dr_egeria_inbox/data_field.md +54 -0
  104. md_processing/dr_egeria_inbox/data_spec.md +77 -0
  105. md_processing/dr_egeria_inbox/data_spec_test.md +2406 -0
  106. md_processing/dr_egeria_inbox/data_test.md +86 -0
  107. md_processing/dr_egeria_inbox/dr_egeria_intro_categories.md +168 -0
  108. md_processing/dr_egeria_inbox/dr_egeria_intro_part1.md +280 -0
  109. md_processing/dr_egeria_inbox/dr_egeria_intro_part2.md +313 -0
  110. md_processing/dr_egeria_inbox/dr_egeria_intro_part3.md +1073 -0
  111. md_processing/dr_egeria_inbox/dr_egeria_isc1.md +44 -0
  112. md_processing/dr_egeria_inbox/glossary_creation_experiment.ipynb +341 -0
  113. md_processing/dr_egeria_inbox/glossary_test1.md +324 -0
  114. md_processing/dr_egeria_inbox/rel.md +8 -0
  115. md_processing/dr_egeria_inbox/sb.md +119 -0
  116. md_processing/dr_egeria_inbox/search_test.md +39 -0
  117. md_processing/dr_egeria_inbox/solution-components.md +154 -0
  118. md_processing/dr_egeria_inbox/solution_blueprints.md +118 -0
  119. md_processing/dr_egeria_inbox/synonym_test.md +42 -0
  120. md_processing/dr_egeria_inbox/t2.md +268 -0
  121. md_processing/dr_egeria_outbox/processed-2025-05-15 19:52-data_test.md +94 -0
  122. md_processing/dr_egeria_outbox/processed-2025-05-16 07:39-data_test.md +88 -0
  123. md_processing/dr_egeria_outbox/processed-2025-05-17 16:01-data_field.md +56 -0
  124. md_processing/dr_egeria_outbox/processed-2025-05-18 15:51-data_test.md +103 -0
  125. md_processing/dr_egeria_outbox/processed-2025-05-18 16:47-data_test.md +94 -0
  126. md_processing/dr_egeria_outbox/processed-2025-05-19 07:14-data_test.md +96 -0
  127. md_processing/dr_egeria_outbox/processed-2025-05-19 07:20-data_test.md +100 -0
  128. md_processing/dr_egeria_outbox/processed-2025-05-19 07:22-data_test.md +88 -0
  129. md_processing/dr_egeria_outbox/processed-2025-05-19 09:26-data_test.md +91 -0
  130. md_processing/dr_egeria_outbox/processed-2025-05-19 10:27-data_test.md +91 -0
  131. md_processing/dr_egeria_outbox/processed-2025-05-19 14:04-data_test.md +91 -0
  132. md_processing/md_commands/__init__.py +3 -0
  133. md_processing/md_commands/blueprint_commands.py +303 -0
  134. md_processing/md_commands/data_designer_commands.py +1182 -0
  135. md_processing/md_commands/glossary_commands.py +1144 -0
  136. md_processing/md_commands/project_commands.py +163 -0
  137. md_processing/md_processing_utils/__init__.py +4 -0
  138. md_processing/md_processing_utils/common_md_proc_utils.py +724 -0
  139. md_processing/md_processing_utils/common_md_utils.py +172 -0
  140. md_processing/md_processing_utils/extraction_utils.py +486 -0
  141. md_processing/md_processing_utils/md_processing_constants.py +128 -0
  142. md_processing/md_processing_utils/message_constants.py +19 -0
  143. pyegeria/.DS_Store +0 -0
  144. pyegeria/__init__.py +231 -146
  145. pyegeria/_client.py +36 -13
  146. pyegeria/_exceptions.py +55 -46
  147. pyegeria/_globals.py +11 -1
  148. pyegeria/_validators.py +5 -5
  149. pyegeria/asset_catalog_omvs.py +78 -21
  150. pyegeria/automated_curation_omvs.py +11 -6
  151. pyegeria/classification_manager_omvs.py +41 -37
  152. pyegeria/collection_manager_omvs.py +722 -705
  153. pyegeria/core_omag_server_config.py +1 -1
  154. pyegeria/create_tech_guid_lists.py +13 -13
  155. pyegeria/data_designer_omvs.py +5104 -0
  156. pyegeria/dr.egeria spec.md +9 -0
  157. pyegeria/egeria_cat_client.py +5 -8
  158. pyegeria/egeria_client.py +39 -24
  159. pyegeria/egeria_config_client.py +2 -1
  160. pyegeria/egeria_my_client.py +4 -4
  161. pyegeria/egeria_tech_client.py +40 -18
  162. pyegeria/feedback_manager_omvs.py +1 -1
  163. pyegeria/full_omag_server_config.py +5 -3
  164. pyegeria/glossary_browser_omvs.py +1915 -694
  165. pyegeria/glossary_manager_omvs.py +685 -1842
  166. pyegeria/m_test.py +118 -0
  167. pyegeria/md_processing_helpers.py +58 -0
  168. pyegeria/md_processing_utils.py +2147 -0
  169. pyegeria/md_processing_utils_orig.py +1103 -0
  170. pyegeria/mermaid_utilities.py +1194 -14
  171. pyegeria/metadata_explorer_omvs.py +5 -50
  172. pyegeria/my_profile_omvs.py +3 -2
  173. pyegeria/output_formatter.py +389 -0
  174. pyegeria/platform_services.py +5 -5
  175. pyegeria/project_manager_omvs.py +97 -18
  176. pyegeria/runtime_manager_omvs.py +8 -10
  177. pyegeria/server_operations.py +2 -2
  178. pyegeria/solution_architect_omvs.py +2156 -0
  179. pyegeria/template_manager_omvs.py +13 -13
  180. pyegeria/utils.py +3 -1
  181. pyegeria/valid_metadata_omvs.py +5 -4
  182. pyegeria/x_action_author_omvs.py +3 -6
  183. {pyegeria-5.2.1.1.dist-info → pyegeria-5.3.dist-info}/METADATA +9 -8
  184. pyegeria-5.3.dist-info/RECORD +196 -0
  185. {pyegeria-5.2.1.1.dist-info → pyegeria-5.3.dist-info}/WHEEL +1 -1
  186. pyegeria-5.3.dist-info/entry_points.txt +99 -0
  187. pyegeria/commands/README.md +0 -47
  188. pyegeria/commands/__init__.py +0 -22
  189. pyegeria/commands/cat/__init__.py +0 -1
  190. pyegeria/commands/doc/README.md +0 -145
  191. pyegeria/commands/doc/Visual Command Reference/README.md +0 -511
  192. pyegeria/commands/doc/Visual Command Reference/cat/show/assets/asset-graph 2024-11-20 at 15.56.42.png +0 -0
  193. pyegeria/commands/doc/Visual Command Reference/cat/show/assets/assets-in-domain 2024-11-20 at 15.49.55@2x.png +0 -0
  194. pyegeria/commands/doc/Visual Command Reference/cat/show/assets/elements-of-type 2024-11-20 at 16.01.35.png +0 -0
  195. pyegeria/commands/doc/Visual Command Reference/cat/show/assets/tech-type-elements 2024-11-20 at 16.05.05.png +0 -0
  196. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-data-catalogs 2024-12-17 at 15.43.27@2x.png +0 -0
  197. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-data-catalogs-2024-11-20 at 16.17.43@2x.png +0 -0
  198. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-schemas 2024-11-25 at 20.14.50@2x.png +0 -0
  199. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-schemas 2024-12-17 at 15.48.38@2x.png +0 -0
  200. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-servers 2024-11-25 at 20.21.25@2x.png +0 -0
  201. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-servers 2024-12-17 at 15.52.16@2x.png +0 -0
  202. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed_databases 2024-12-16 at 16.40.31@2x.png +0 -0
  203. pyegeria/commands/doc/Visual Command Reference/cat/show/glossary/list-glossaries 2024-11-25 at 20.30.02.png +0 -0
  204. pyegeria/commands/doc/Visual Command Reference/cat/show/glossary/list-terms 2024-11-25 at 20.32.11.png +0 -0
  205. pyegeria/commands/doc/Visual Command Reference/cat/show/info/asset-types 2024-11-25 at 20.34.19@2x.png +0 -0
  206. pyegeria/commands/doc/Visual Command Reference/cat/show/info/certification-types 2024-11-25 at 20.37.07.png +0 -0
  207. pyegeria/commands/doc/Visual Command Reference/cat/show/info/collection-graph 2024-12-12 at 11.33.18@2x.png +0 -0
  208. pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-collections 2024-12-10 at 14.25.51@2x.png +0 -0
  209. pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-todos 2024-12-12 at 11.46.30@2x.png +0 -0
  210. pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-user-ids 2024-12-12 at 11.51.09@2x.png +0 -0
  211. pyegeria/commands/doc/Visual Command Reference/cat/show/info/tech-types 2024-12-12 at 11.37.20@2x.png +0 -0
  212. pyegeria/commands/doc/Visual Command Reference/cat/show/projects/project_dependencies 2024-12-14 at 16.24.39@2x.png +0 -0
  213. pyegeria/commands/doc/Visual Command Reference/cat/show/projects/project_structure 2024-12-14 at 16.21.35@2x.png +0 -0
  214. pyegeria/commands/doc/Visual Command Reference/cat/show/projects/projects 2024-12-14 at 16.18.10@2x.png +0 -0
  215. pyegeria/commands/doc/Visual Command Reference/hey_egeria tui 2024-12-16 at 16.58.22@2x.png +0 -0
  216. pyegeria/commands/doc/Visual Command Reference/my/show/my_profile 2024-12-14 at 16.29.27@2x.png +0 -0
  217. pyegeria/commands/doc/Visual Command Reference/my/show/my_roles 2024-12-14 at 16.32.10@2x.png +0 -0
  218. pyegeria/commands/doc/Visual Command Reference/my/show/my_todos 2024-12-15 at 16.24.13@2x.png +0 -0
  219. pyegeria/commands/doc/Visual Command Reference/my/show/open_todos 2024-12-14 at 16.36.12@2x.png +0 -0
  220. pyegeria/commands/doc/Visual Command Reference/ops/show/engines/list_engine_activity compressed 2024-12-15 at 16.48.48@2x.png +0 -0
  221. pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_activity 2024-12-15 at 16.32.55@2x.png +0 -0
  222. pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_activity compressed 2024-12-15 at 16.38.29@2x.png +0 -0
  223. pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_status 2024-12-15 at 16.51.26.jpeg +0 -0
  224. pyegeria/commands/doc/Visual Command Reference/ops/show/integrations/monitor_integration_daemon_status 2024-12-15 at 16.57.12@2x.png +0 -0
  225. pyegeria/commands/doc/Visual Command Reference/ops/show/integrations/monitor_integration_targets 2024-12-15 at 17.02.19@2x.png +0 -0
  226. pyegeria/commands/doc/Visual Command Reference/ops/show/platforms/monitor_platform_status 2024-12-15 at 19.53.18@2x.png +0 -0
  227. pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_server_status 2024-12-15 at 19.59.39@2x.png +0 -0
  228. pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_server_status full 2024-12-15 at 20.01.57@2x.png +0 -0
  229. pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_startup_servers 2024-12-15 at 19.56.07@2x.png +0 -0
  230. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/get_anchored_elements 2024-12-15 at 21.25.41@2x.png +0 -0
  231. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/get_elements_of_om_type 2024-12-16 at 14.39.59@2x.png +0 -0
  232. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/info_for_guid 2024-12-16 at 11.35.29@2x.png +0 -0
  233. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_by_om-type 2024-12-16 at 14.24.18@2x.png +0 -0
  234. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_by_om-type extended 2024-12-16 at 14.28.46@2x.png +0 -0
  235. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_of_om_type_by_classification 2024-12-16 at 14.35.26@2x.png +0 -0
  236. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/related_elements 2024-12-16 at 14.55.01@2x.png +0 -0
  237. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/show_related_specifications 2024-12-16 at 15.04.55@2x.png +0 -0
  238. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/asset_types 2024-12-16 at 15.10.16@2x.png +0 -0
  239. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/detailed_governance_action_processes 2024-12-16 at 15.16.26@2x.png +0 -0
  240. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/governance_action_processes 2024-12-16 at 15.13.01@2x.png +0 -0
  241. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/registered_services 2024-12-16 at 16.44.54@2x.png +0 -0
  242. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/relationship_types 2024-12-16 at 16.20.34@2x.png +0 -0
  243. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/relationship_types 2024-12-19 at 10.51.54@2x.png +0 -0
  244. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/valid_metadata_values 2024-12-16 at 15.31.56@2x.png +0 -0
  245. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/list_tech_type_template_specs 2024-12-16 at 16.03.22@2x.png +0 -0
  246. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/list_technology_types 2024-12-16 at 15.39.20@2x.png +0 -0
  247. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/tech_type_details 2024-12-16 at 15.37.21@2x.png +0 -0
  248. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/tech_type_templates 2024-12-16 at 16.11.48@2x.png +0 -0
  249. pyegeria/commands/doc/glossary/basic-glossary-tui.md +0 -109
  250. pyegeria/commands/doc/glossary/images/delete-glossary-step1 2024-11-06 at 15.47.23@2x.png +0 -0
  251. pyegeria/commands/doc/glossary/images/delete-glossary-step2 2024-11-06 at 15.51.29@2x.png +0 -0
  252. pyegeria/commands/doc/glossary/images/delete-glossary-step3 2024-11-06 at 15.53.19@2x.png +0 -0
  253. pyegeria/commands/doc/glossary/images/delete-glossary-step4 2024-11-06 at 15.55.11@2x.png +0 -0
  254. pyegeria/commands/doc/glossary/images/out-create-glossary example 2024-11-05 at 20.38.04@2x.png +0 -0
  255. pyegeria/commands/doc/glossary/images/out-create-term 2024-11-06 at 20.48.29.png +0 -0
  256. pyegeria/commands/doc/glossary/images/out-delete-term 2024-11-07 at 03.57.25.png +0 -0
  257. pyegeria/commands/doc/glossary/images/out-display-terms-for-glossary-test 2024-11-06 at 20.51.28.png +0 -0
  258. pyegeria/commands/doc/glossary/images/out-export-example 2024-11-07 at 09.54.57.png +0 -0
  259. pyegeria/commands/doc/glossary/images/out-exported-terms 2024-11-06 at 21.06.32.png +0 -0
  260. pyegeria/commands/doc/glossary/images/out-glossary-list example 2024-11-05 at 20.41.02@2x.png +0 -0
  261. pyegeria/commands/doc/glossary/images/out-import-terms 2024-11-07 at 08.15.18.png +0 -0
  262. pyegeria/commands/doc/glossary/images/out-list-all-terms 2024-11-06 at 16.22.20@2x.png +0 -0
  263. pyegeria/commands/doc/glossary/images/out-list-terms-for-example 2024-11-06 at 16.40.12.png +0 -0
  264. pyegeria/commands/doc/glossary/images/out-list-terms-second 2024-11-06 at 16.45.13.png +0 -0
  265. pyegeria/commands/doc/glossary/images/out-pipx install pyegeria 2024-11-10 at 18.12.21.png +0 -0
  266. pyegeria/commands/doc/glossary/images/out-server-status-full 2024-11-10 at 18.25.14.png +0 -0
  267. pyegeria/commands/doc/glossary/images/out-servers-status 2024-11-10 at 18.15.42.png +0 -0
  268. pyegeria/commands/doc/glossary/images/out-upsert-import 2024-11-07 at 19.37.00.png +0 -0
  269. pyegeria/commands/doc/glossary/images/tui-2024-11-10 at 18.26.29.png +0 -0
  270. pyegeria/commands/doc/glossary/images/tui-create-glossary example 2024-11-05 at 20.34.24@2x.png +0 -0
  271. pyegeria/commands/doc/glossary/images/tui-create-term 2024-11-06 at 20.46.35.png +0 -0
  272. pyegeria/commands/doc/glossary/images/tui-delete-term 2024-11-07 at 03.51.57.png +0 -0
  273. pyegeria/commands/doc/glossary/images/tui-display-terms-for-example 2024-11-06 at 20.56.49.png +0 -0
  274. pyegeria/commands/doc/glossary/images/tui-export-example 2024-11-07 at 09.52.59.png +0 -0
  275. pyegeria/commands/doc/glossary/images/tui-hey-egeria 2024-11-10 at 18.31.01.png +0 -0
  276. pyegeria/commands/doc/glossary/images/tui-import-upsert-example 2024-11-07 at 10.08.37.png +0 -0
  277. pyegeria/commands/doc/glossary/images/tui-list-terms-second 2024-11-06 at 16.46.34.png +0 -0
  278. pyegeria/commands/doc/glossary/images/tui-load-archive.png +0 -0
  279. pyegeria/commands/doc/glossary/images/tui-server-status-full 2024-11-10 at 19.14.36.png +0 -0
  280. pyegeria/commands/doc/glossary/images/tui-show-glossaries 2024-11-07 at 20.00.05.png +0 -0
  281. pyegeria/commands/doc/glossary/images/tui-show-glossary-terms 2024-11-05 at 19.37.53@2x.png +0 -0
  282. pyegeria/commands/doc/glossary/images/tui-upsert 2024-11-07 at 11.49.04.png +0 -0
  283. pyegeria/commands/doc/glossary/images/upsert-example.om-terms 2024-11-07 at 11.44.05.png +0 -0
  284. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/README.md +0 -346
  285. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/CleanShot 2024-11-18 at 21.32.03@2x.png +0 -0
  286. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/Xmind 1731421782704.png +0 -0
  287. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/Xmind 1731422134920.png +0 -0
  288. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/hey_egeria 2024-11-12 at 20.38.43.png +0 -0
  289. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/hey_egeria cat 2024-11-12 at 21.41.43.png +0 -0
  290. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/out-integ-status-list 2024-11-12 at 16.45.26.png +0 -0
  291. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/out-integ-status-live 2024-11-12 at 16.44.12@2x.png +0 -0
  292. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/out-server-status 2024-11-10 at 18.15.42@2x.png +0 -0
  293. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/out-server-status-full 2024-11-10 at 18.25.14@2x.png +0 -0
  294. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/short-cut commands 2024-11-12 at 22.22.13.png +0 -0
  295. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-hey-egeria.png +0 -0
  296. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-integration-status-paging.png +0 -0
  297. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-load-archive 2024-11-10 at 19.19.09@2x.png +0 -0
  298. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-show-server-status 2024-11-10 at 18.52.01@2x.png +0 -0
  299. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-show-server-status-full 2024-11-10.png +0 -0
  300. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-status-paging 2024-11-12 at 16.26.14@2x.png +0 -0
  301. pyegeria/commands/ops/__init__.py +0 -22
  302. pyegeria/commands/tech/__init__.py +0 -0
  303. pyegeria-5.2.1.1.dist-info/RECORD +0 -231
  304. pyegeria-5.2.1.1.dist-info/entry_points.txt +0 -81
  305. {pyegeria/commands → commands}/cat/README.md +0 -0
  306. {pyegeria/commands → commands}/my/README.md +0 -0
  307. {pyegeria/commands → commands}/ops/README.md +0 -0
  308. {pyegeria/commands → commands}/ops/x_engine_actions.py +0 -0
  309. {pyegeria/commands → commands}/tech/README.md +0 -0
  310. /pyegeria/commands/my/__init__.py → /md_processing/dr_egeria_inbox/t1.md +0 -0
  311. {pyegeria-5.2.1.1.dist-info → pyegeria-5.3.dist-info}/LICENSE +0 -0
pyegeria/_client.py CHANGED
@@ -6,31 +6,33 @@ This is a simple class to create and manage a connection to an Egeria backend. I
6
6
  different client capabilities. It also provides the common methods used to make restful self.session to Egeria.
7
7
 
8
8
  """
9
+
9
10
  import asyncio
10
11
  import inspect
11
12
  import json
12
13
  import os
13
- from pyegeria import body_slimmer
14
+ import re
15
+ from datetime import datetime
16
+
14
17
  import httpx
15
18
  from httpx import AsyncClient, Response
16
19
 
20
+ from pyegeria.utils import body_slimmer
17
21
  from pyegeria._exceptions import (
18
- OMAGCommonErrorCode,
19
22
  InvalidParameterException,
23
+ OMAGCommonErrorCode,
20
24
  PropertyServerException,
21
25
  UserNotAuthorizedException,
22
26
  )
23
- from pyegeria._globals import (
24
- max_paging_size,
25
- enable_ssl_check,
26
- )
27
+ from pyegeria._globals import enable_ssl_check, max_paging_size, NO_ELEMENTS_FOUND
27
28
  from pyegeria._validators import (
29
+ is_json,
28
30
  validate_name,
29
31
  validate_server_name,
30
32
  validate_url,
31
33
  validate_user_id,
32
- is_json,
33
34
  )
35
+ from pyegeria.output_formatter import make_preamble, make_md_attribute
34
36
 
35
37
  ...
36
38
 
@@ -147,6 +149,10 @@ class Client:
147
149
 
148
150
  return False # allows exceptions to propagate
149
151
 
152
+ def __str__(self):
153
+ return (f"EgeriaClient(server_name={self.server_name}, platform_url={self.platform_url}, "
154
+ f"user_id={self.user_id}, page_size={self.page_size})")
155
+
150
156
  async def _async_close_session(self) -> None:
151
157
  """Close the session"""
152
158
  await self.session.aclose()
@@ -469,7 +475,9 @@ class Client:
469
475
  msg = OMAGCommonErrorCode.CLIENT_SIDE_REST_API_ERROR.value[
470
476
  "message_template"
471
477
  ].format(
472
- str(response.status_code),
478
+ str(response.status_code)
479
+ + " "
480
+ + datetime.now().strftime("%H: %M: %S"),
473
481
  caller_method,
474
482
  class_name,
475
483
  endpoint,
@@ -691,16 +699,16 @@ class Client:
691
699
  )
692
700
 
693
701
  result = await self._async_make_request("POST", url, body_slimmer(body))
694
- return result.json().get("guid", "No elements found")
702
+ return result.json().get("guid", NO_ELEMENTS_FOUND)
695
703
 
696
704
  try:
697
705
  view_server = self.view_server
698
706
  except AttributeError:
699
- view_server = os.environ.get("VIEW_SERVER", "view-server")
707
+ view_server = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
700
708
 
701
709
  if (not qualified_name) and display_name:
702
710
  if (tech_type) and (property_name == "qualifiedName"):
703
- name = f"{tech_type}:{display_name}"
711
+ name = f"{tech_type}::{display_name}"
704
712
  body = {
705
713
  "class": "NameRequestBody",
706
714
  "name": name,
@@ -715,7 +723,7 @@ class Client:
715
723
  )
716
724
 
717
725
  result = await self._async_make_request("POST", url, body_slimmer(body))
718
- return result.json().get("guid", "No elements found")
726
+ return result.json().get("guid", NO_ELEMENTS_FOUND)
719
727
  else:
720
728
  body = {
721
729
  "class": "NameRequestBody",
@@ -731,7 +739,7 @@ class Client:
731
739
  )
732
740
 
733
741
  result = await self._async_make_request("POST", url, body_slimmer(body))
734
- return result.json().get("guid", "No elements found")
742
+ return result.json().get("guid", NO_ELEMENTS_FOUND)
735
743
  else:
736
744
  raise InvalidParameterException(
737
745
  "Neither server_guid nor server_name were provided - please provide."
@@ -763,6 +771,21 @@ class Client:
763
771
  )
764
772
  return result
765
773
 
774
+ def __create_qualified_name__(self, type: str, display_name: str, local_qualifier: str = None,
775
+ version_identifier: str = None) -> str:
776
+ """Helper function to create a qualified name for a given type and display name.
777
+ If present, the local qualifier will be prepended to the qualified name."""
778
+ EGERIA_LOCAL_QUALIFIER = os.environ.get("EGERIA_LOCAL_QUALIFIER", local_qualifier)
779
+ # display_name = re.sub(r'\s','-',display_name.strip()) # This changes spaces between words to -; removing
780
+
781
+ q_name = f"{type}::{display_name.strip()}"
782
+ if EGERIA_LOCAL_QUALIFIER:
783
+ q_name = f"{EGERIA_LOCAL_QUALIFIER}::{q_name}"
784
+ if version_identifier:
785
+ q_name = f"{q_name}::{version_identifier}"
786
+ return q_name
787
+
788
+
766
789
 
767
790
  if __name__ == "__main__":
768
791
  print("Main-__client")
pyegeria/_exceptions.py CHANGED
@@ -19,31 +19,31 @@ Note that not all of the definitions are currently used - they merely serve as p
19
19
 
20
20
 
21
21
  class EgeriaErrorCode(Enum):
22
- """ Egeria error codes """
22
+ """Egeria error codes"""
23
23
 
24
24
  def __str__(self):
25
25
  return (
26
- "http_error_code="
27
- + self.value["http_error_code"]
28
- + "messageId="
29
- + self.value["message_id"]
30
- + ", message="
31
- + self.value["message_template"]
32
- + ", systemAction="
33
- + self.value["system_action"]
34
- + ", userAction="
35
- + self.value["user_action"]
26
+ "http_error_code="
27
+ + self.value["http_error_code"]
28
+ + "messageId="
29
+ + self.value["message_id"]
30
+ + ", message="
31
+ + self.value["message_template"]
32
+ + ", systemAction="
33
+ + self.value["system_action"]
34
+ + ", userAction="
35
+ + self.value["user_action"]
36
36
  )
37
37
 
38
38
 
39
39
  class OMAGServerInstanceErrorCode(EgeriaErrorCode):
40
- """ OMAGServer instance error codes """
40
+ """OMAGServer instance error codes"""
41
41
 
42
42
  BAD_SERVER_SECURITY_CONNECTION = dict(
43
43
  https_error_code="400",
44
44
  message_id="OMAG-MULTI-TENANT-400-001",
45
45
  message_template="The OMAG server {0} has been configured with a bad connection to its security connector."
46
- + " Error message is {1}. Connection is {2}",
46
+ + " Error message is {1}. Connection is {2}",
47
47
  system_action="The system is unable to validate the users issuing requests to this server.",
48
48
  user_action="Review the error message to determine the cause of the problem.",
49
49
  )
@@ -55,11 +55,11 @@ class OMAGServerInstanceErrorCode(EgeriaErrorCode):
55
55
  SERVICES_NOT_SHUTDOWN = dict(
56
56
  https_error_code="400",
57
57
  message_id="OMAG-MULTI-TENANT-400-002",
58
- message_template="The OMAG server {0} has been requested to shutdown but the following services " +
59
- "are still running: {1}",
58
+ message_template="The OMAG server {0} has been requested to shutdown but the following services "
59
+ + "are still running: {1}",
60
60
  system_action="The system is unable to shutdown the server correctly.",
61
61
  user_action="Review other error messages to determine the cause of the problem."
62
- + " This is likely to be a logic error in the services listed in the message",
62
+ + " This is likely to be a logic error in the services listed in the message",
63
63
  )
64
64
 
65
65
  """
@@ -70,8 +70,8 @@ class OMAGServerInstanceErrorCode(EgeriaErrorCode):
70
70
  https_error_code="400",
71
71
  message_id="OMAG-MULTI-TENANT-400-003",
72
72
  message_template="Method {0} called on behalf of the {1} service is unable to create a client-side open "
73
- + "metadata topic connection because the topic name is not configured in the configuration "
74
- + "for this service.",
73
+ + "metadata topic connection because the topic name is not configured in the configuration "
74
+ + "for this service.",
75
75
  system_action="This is a configuration error and an exception is sent to the requester.",
76
76
  user_action="Correct the configuration of the access service to include the name of the topic.",
77
77
  )
@@ -84,10 +84,10 @@ class OMAGServerInstanceErrorCode(EgeriaErrorCode):
84
84
  https_error_code="400",
85
85
  message_id="OMAG-MULTI-TENANT-400-004",
86
86
  message_template="The connector provider class name {0} does not create a connector of class {1} which is"
87
- + " required for the {2}",
87
+ + " required for the {2}",
88
88
  system_action="An invalid parameter exception is returned to the caller.",
89
89
  user_action="Either change the connector or the hosting environment because the current"
90
- + " combination is not compatible.",
90
+ + " combination is not compatible.",
91
91
  )
92
92
 
93
93
  """
@@ -98,9 +98,9 @@ class OMAGServerInstanceErrorCode(EgeriaErrorCode):
98
98
  message_id="OMAG-MULTI-TENANT-404-001",
99
99
  message_template="The OMAG Server {0} is not available to service a request from user {1}",
100
100
  system_action="The system is unable to process the request because the server"
101
- + " is not running on the called platform.",
101
+ + " is not running on the called platform.",
102
102
  user_action="Verify that the correct server is being called on the correct platform and that this server "
103
- + "is running. Retry the request when the server is available.",
103
+ + "is running. Retry the request when the server is available.",
104
104
  )
105
105
 
106
106
  """
@@ -112,8 +112,8 @@ class OMAGServerInstanceErrorCode(EgeriaErrorCode):
112
112
  message_template="The {0} service is not available on OMAG Server {1} to handle a request from user {2}",
113
113
  system_action="The system is unable to process the request because the service is not available.",
114
114
  user_action="Verify that the correct server is being called on the correct platform and that the "
115
- + "requested service is configured to run there. "
116
- + "Once the correct environment is in place, retry the request.",
115
+ + "requested service is configured to run there. "
116
+ + "Once the correct environment is in place, retry the request.",
117
117
  )
118
118
 
119
119
  """
@@ -136,7 +136,7 @@ class OMAGServerInstanceErrorCode(EgeriaErrorCode):
136
136
  message_id="OMAG-MULTI-TENANT-404-004",
137
137
  message_template="The open metadata repository services are not initialized for the {0} operation",
138
138
  system_action="The system is unable to connect to the open metadata repository services because"
139
- + " they are not running in this server.",
139
+ + " they are not running in this server.",
140
140
  user_action="Check that the server where the called service is running initialized correctly. "
141
141
  + "Correct any errors discovered and retry the request when the open metadata services are available.",
142
142
  )
@@ -150,10 +150,10 @@ class OMAGServerInstanceErrorCode(EgeriaErrorCode):
150
150
  message_id="OMAG-MULTI-TENANT-404-005",
151
151
  message_template="The open metadata repository services are not available for the {0} operation",
152
152
  system_action="The system is unable to connect to the open metadata repository services because"
153
- " they are not in the correct state to be called.",
153
+ " they are not in the correct state to be called.",
154
154
  user_action="Check that the server where the called service is running initialized correctly and is not"
155
- + " in the process of shutting down. Correct any errors discovered and retry the"
156
- + " request when the open metadata repository services are available.",
155
+ + " in the process of shutting down. Correct any errors discovered and retry the"
156
+ + " request when the open metadata repository services are available.",
157
157
  ),
158
158
  )
159
159
 
@@ -177,12 +177,12 @@ class OMAGCommonErrorCode(EgeriaErrorCode):
177
177
  http_error_code="503",
178
178
  message_id="CLIENT-SIDE-REST-API-CONNECTOR-503-002",
179
179
  message_template="A client-side error {0} was received by method {1} from API call {2} during the call {3}."
180
- + " The error message was {4}",
180
+ + " The error message was {4}",
181
181
  system_action="The client has issued a call to the open metadata access service REST API in a remote server"
182
- + " and has received an exception from the local client libraries.",
182
+ + " and has received an exception from the local client libraries.",
183
183
  user_action="Review the error message to determine the cause of the error. Check that the server is running"
184
- + " and the URL is correct. Look for errors in the local server's console to understand and"
185
- + " correct the cause of the error. Then rerun the request",
184
+ + " and the URL is correct. Look for errors in the local server's console to understand and"
185
+ + " correct the cause of the error. Then rerun the request",
186
186
  )
187
187
 
188
188
  EXCEPTION_RESPONSE_FROM_API = dict(
@@ -190,10 +190,10 @@ class OMAGCommonErrorCode(EgeriaErrorCode):
190
190
  message_id="SERVER-SIDE-REST-API-ERROR-503-003 ",
191
191
  message_template="A {0} exception was received from REST API call {1} to server {2}: error message was: {3}",
192
192
  system_action="The system has issued a call to an open metadata access service REST API in a remote server"
193
- + " and has received an exception response.",
193
+ + " and has received an exception response.",
194
194
  user_action="The error message should indicate the cause of the error. "
195
- + "Otherwise look for errors in the remote server's audit log and console to understand and "
196
- + "correct the source of the error.",
195
+ + "Otherwise look for errors in the remote server's audit log and console to understand and "
196
+ + "correct the source of the error.",
197
197
  )
198
198
 
199
199
  SERVER_URL_NOT_SPECIFIED = dict(
@@ -256,7 +256,7 @@ class OMAGCommonErrorCode(EgeriaErrorCode):
256
256
  http_error_code="400",
257
257
  message_id="OMAG-COMMON-400-008",
258
258
  message_template="The starting point for the results {0}, passed on the {1} parameter of the {2}"
259
- + " operation, is negative",
259
+ + " operation, is negative",
260
260
  system_action="The system is unable to process the request with this invalid value."
261
261
  + "It should be zero for the start of the values, or a number greater than 0"
262
262
  + "to start partway down the list.",
@@ -266,10 +266,10 @@ class OMAGCommonErrorCode(EgeriaErrorCode):
266
266
  NEGATIVE_PAGE_SIZE = dict(
267
267
  http_error_code="400",
268
268
  message_id="OMAG-COMMON-400-009",
269
- message_template="The page size for the results {0}, passed on the {1} parameter of the {2} operation, " +
270
- "is negative",
269
+ message_template="The page size for the results {0}, passed on the {1} parameter of the {2} operation, "
270
+ + "is negative",
271
271
  system_action="The system is unable to process the request with this invalid value. "
272
- + "It should be zero to return all the result, or greater than zero to set a maximum.",
272
+ + "It should be zero to return all the result, or greater than zero to set a maximum.",
273
273
  user_action="Correct the code in the caller to provide a non-negative value for the page size.",
274
274
  )
275
275
 
@@ -277,8 +277,8 @@ class OMAGCommonErrorCode(EgeriaErrorCode):
277
277
  http_error_code="400",
278
278
  message_id="OMAG-COMMON-400-010",
279
279
  message_template=(
280
- "The number of records to return, {0}, passed on the {1} parameter of the {2} operation, "
281
- + "is greater than the allowable maximum of {3}"
280
+ "The number of records to return, {0}, passed on the {1} parameter of the {2} operation, "
281
+ + "is greater than the allowable maximum of {3}"
282
282
  ),
283
283
  system_action="The system is unable to process the request with this page size value.",
284
284
  user_action="Correct the code in the caller to provide a smaller page size.",
@@ -322,6 +322,7 @@ class EgeriaException(Exception):
322
322
  Define the Egeria exceptions raised during error handling. Modeled on the exceptions defined in the Egeria core.
323
323
 
324
324
  """
325
+
325
326
  raw_error_message = ""
326
327
 
327
328
  def __init__(self, response_body) -> None:
@@ -331,12 +332,20 @@ class EgeriaException(Exception):
331
332
  self.exception_class_name = response_dict["exceptionClassName"]
332
333
  self.action_description = response_dict["actionDescription"]
333
334
  self.exception_error_message = response_dict["exceptionErrorMessage"]
334
- self.exception_error_message_id = response_dict.get("exceptionErrorMessageId", "UNKNOWN-ERROR-CODE")
335
+ self.exception_error_message_id = response_dict.get(
336
+ "exceptionErrorMessageId", "UNKNOWN-ERROR-CODE"
337
+ )
335
338
 
336
339
  # self.exception_error_message_id = response_dict["exceptionErrorMessageId"]
337
- self.exception_error_message_parameters = response_dict.get("exceptionErrorMessageParameters", "{}")
338
- self.exception_system_action = response_dict.get("exceptionSystemAction", "UNKNOWN-SYSTEM-ACTION")
339
- self.exception_user_action = response_dict.get("exceptionUserAction", "UNKNOWN-USER-ACTION")
340
+ self.exception_error_message_parameters = response_dict.get(
341
+ "exceptionErrorMessageParameters", "{}"
342
+ )
343
+ self.exception_system_action = response_dict.get(
344
+ "exceptionSystemAction", "UNKNOWN-SYSTEM-ACTION"
345
+ )
346
+ self.exception_user_action = response_dict.get(
347
+ "exceptionUserAction", "UNKNOWN-USER-ACTION"
348
+ )
340
349
 
341
350
  def __str__(self):
342
351
  return self.exception_error_message
@@ -364,7 +373,7 @@ class UserNotAuthorizedException(EgeriaException):
364
373
 
365
374
 
366
375
  def print_exception_response(e: EgeriaException):
367
- """ Prints the exception response """
376
+ """Prints the exception response"""
368
377
 
369
378
  if isinstance(e, EgeriaException):
370
379
  print(f"\n\nException: {e.response_class}")
pyegeria/_globals.py CHANGED
@@ -14,7 +14,7 @@ disable_ssl_warnings = True
14
14
  enable_ssl_check = False
15
15
  max_paging_size = 500
16
16
  default_time_out = 30
17
-
17
+ DEBUG_LEVEL = "quiet"
18
18
  comment_types = (
19
19
  "ANSWER",
20
20
  "OTHER",
@@ -35,3 +35,13 @@ star_ratings = (
35
35
  TEMPLATE_GUIDS: dict = {}
36
36
  INTEGRATION_GUIDS: dict = {}
37
37
 
38
+ NO_ELEMENTS_FOUND = "No elements found"
39
+ NO_ASSETS_FOUND = "No assets found"
40
+ NO_SERVERS_FOUND = "No servers found"
41
+ NO_CATALOGS_FOUND = "No catalogs found"
42
+ NO_GLOSSARIES_FOUND = "No glossaries found"
43
+ NO_TERMS_FOUND = "No terms found"
44
+ NO_CATEGORIES_FOUND = "No categories found"
45
+ NO_ELEMENT_FOUND = "No element found"
46
+ NO_PROJECTS_FOUND = "No projects found"
47
+ NO_COLLECTION_FOUND = "No collection found"
pyegeria/_validators.py CHANGED
@@ -2,14 +2,14 @@
2
2
  SPDX-License-Identifier: Apache-2.0
3
3
  Copyright Contributors to the ODPi Egeria project.
4
4
  """
5
+
5
6
  import inspect
6
7
  import json
7
- import validators
8
8
  from json import JSONDecodeError
9
- from pyegeria._exceptions import (
10
- OMAGCommonErrorCode,
11
- InvalidParameterException,
12
- )
9
+
10
+ import validators
11
+
12
+ from pyegeria._exceptions import InvalidParameterException, OMAGCommonErrorCode
13
13
 
14
14
  """
15
15
  This package contains internally used validators.
@@ -8,15 +8,16 @@ Copyright Contributors to the ODPi Egeria project.
8
8
  This file is in active development...
9
9
 
10
10
  """
11
+
11
12
  import asyncio
12
13
  import json
13
14
 
14
15
  from httpx import Response
15
-
16
- from pyegeria import Client, max_paging_size, body_slimmer, TEMPLATE_GUIDS
17
- from pyegeria._exceptions import (
18
- InvalidParameterException,
19
- )
16
+ from pyegeria.utils import body_slimmer
17
+ from pyegeria._client import Client
18
+ from pyegeria import TEMPLATE_GUIDS, max_paging_size
19
+ from pyegeria._exceptions import InvalidParameterException
20
+ from pyegeria._globals import NO_ELEMENTS_FOUND, NO_ASSETS_FOUND
20
21
  from ._validators import validate_search_string
21
22
 
22
23
 
@@ -365,7 +366,7 @@ class AssetCatalog(Client):
365
366
  )
366
367
  body = {"filter": search_string}
367
368
  response = await self._async_make_request("POST", url, body, time_out=time_out)
368
- return response.json().get("searchMatches", "no assets found")
369
+ return response.json().get("searchMatches", "NO_ASSETS_FOUND")
369
370
 
370
371
  def find_in_asset_domain(
371
372
  self,
@@ -466,7 +467,7 @@ class AssetCatalog(Client):
466
467
  )
467
468
 
468
469
  response = await self._async_make_request("GET", url)
469
- return response.json().get("assetGraph", "no asset found")
470
+ return response.json().get("assetGraph", NO_ASSETS_FOUND)
470
471
 
471
472
  def get_asset_graph(
472
473
  self,
@@ -543,6 +544,11 @@ class AssetCatalog(Client):
543
544
  async def _async_get_asset_lineage_graph(
544
545
  self,
545
546
  asset_guid: str,
547
+ effective_time: str = None,
548
+ as_of_time: str = None,
549
+ relationship_types: [str] = None,
550
+ limit_to_isc_q_name: str = None,
551
+ hilight_isc_q_name: str = None,
546
552
  start_from: int = 0,
547
553
  page_size: int = max_paging_size,
548
554
  ) -> str | dict:
@@ -551,6 +557,16 @@ class AssetCatalog(Client):
551
557
  ----------
552
558
  asset_guid : str
553
559
  The unique identity of the asset to get the graph for.
560
+ effective_time: str, default is None
561
+ Effective time to query on. If not specified, the current time is used.
562
+ as_of_time: str = None
563
+ as_of_time to query on. If not specified, the current time is used.
564
+ relationship_types: [str], default is None,
565
+ relationship types to include in the lineage graph. If not specified, all relationship types are included.
566
+ limit_to_isc_q_name: str = None,
567
+ if specified, filters results to only include information supply chains with the given name.
568
+ hilight_isc_q_name: str = None,
569
+ if specified, highlights the information supply chain with the given name.
554
570
 
555
571
  start_from : int, optional
556
572
  The index from which to start fetching the engine actions. Default is 0.
@@ -575,27 +591,48 @@ class AssetCatalog(Client):
575
591
  f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/asset-catalog/assets/{asset_guid}/"
576
592
  f"as-lineage-graph?startFrom={start_from}&pageSize={page_size}"
577
593
  )
578
-
579
- response = await self._async_make_request("POST", url)
580
- return response.json().get("assetLineageGraph", "no asset found")
594
+ body = {
595
+ "effectiveTime": effective_time,
596
+ "asOfTime": as_of_time,
597
+ "relationshipTypes": relationship_types,
598
+ "limitToISCQualifiedName": limit_to_isc_q_name,
599
+ "highlightISCQualifiedName": hilight_isc_q_name,
600
+ }
601
+ response = await self._async_make_request("POST", url, body_slimmer(body))
602
+ return response.json().get("assetLineageGraph", NO_ASSETS_FOUND)
581
603
 
582
604
  def get_asset_lineage_graph(
583
605
  self,
584
606
  asset_guid: str,
607
+ effective_time: str = None,
608
+ as_of_time: str = None,
609
+ relationship_types: [str] = None,
610
+ limit_to_isc_q_name: str = None,
611
+ hilight_isc_q_name: str = None,
585
612
  start_from: int = 0,
586
613
  page_size: int = max_paging_size,
587
- ) -> str | dict:
614
+ ) -> str | dict:
588
615
  """Return the asset lineage including a mermaid markdown string. Async Version.
589
616
  Parameters
590
617
  ----------
591
618
  asset_guid : str
592
619
  The unique identity of the asset to get the graph for.
620
+ effective_time: str, default is None
621
+ Effective time to query on. If not specified, the current time is used.
622
+ as_of_time: str = None
623
+ as_of_time to query on. If not specified, the current time is used.
624
+ relationship_types: [str], default is None,
625
+ relationship types to include in the lineage graph. If not specified, all relationship types are included.
626
+ limit_to_isc_q_name: str = None,
627
+ if specified, filters results to only include information supply chains with the given name.
628
+ hilight_isc_q_name: str = None,
629
+ if speficied, highlights the information supply chain with the given name.
593
630
 
594
631
  start_from : int, optional
595
632
  The index from which to start fetching the engine actions. Default is 0.
596
633
 
597
634
  page_size : int, optional
598
- The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
635
+ The maximum number of elements to fetch in a single request. Default is `max_paging_size`.
599
636
 
600
637
  Returns
601
638
  -------
@@ -612,29 +649,46 @@ class AssetCatalog(Client):
612
649
 
613
650
  loop = asyncio.get_event_loop()
614
651
  response = loop.run_until_complete(
615
- self._async_get_asset_lineage_graph(asset_guid, start_from, page_size)
652
+ self._async_get_asset_lineage_graph(asset_guid, effective_time, as_of_time, relationship_types,
653
+ limit_to_isc_q_name, hilight_isc_q_name, start_from, page_size)
616
654
  )
617
655
  return response
618
656
 
619
657
  def get_asset_lineage_mermaid_graph(
620
658
  self,
621
659
  asset_guid: str,
660
+ effective_time: str = None,
661
+ as_of_time: str = None,
662
+ relationship_types: [str] = None,
663
+ limit_to_isc_q_name: str = None,
664
+ hilight_isc_q_name: str = None,
622
665
  start_from: int = 0,
623
666
  page_size: int = max_paging_size,
624
- ) -> str:
625
- """Return the lineage as mermaid markdown string. Async Version.
667
+ ) -> str:
668
+ """Return the asset lineage including a mermaid markdown string. Async Version.
626
669
  Parameters
627
670
  ----------
628
671
  asset_guid : str
629
672
  The unique identity of the asset to get the graph for.
673
+ effective_time: str, default is None
674
+ Effective time to query on. If not specified, the current time is used.
675
+ as_of_time: str = None
676
+ as_of_time to query on. If not specified, the current time is used.
677
+ relationship_types: [str], default is None,
678
+ relationship types to include in the lineage graph. If not specified, all relationship types are included.
679
+ limit_to_isc_q_name: str = None,
680
+ if specified, filters results to only include information supply chains with the given name.
681
+ hilight_isc_q_name: str = None,
682
+ if specified, highlights the information supply chain with the given name.
630
683
 
631
684
  start_from : int, optional
632
685
  The index from which to start fetching the engine actions. Default is 0.
633
686
 
634
687
  page_size : int, optional
635
- The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
688
+ The maximum number of elements to fetch in a single request.
689
+ Default is `max_paging_size`.
636
690
 
637
- Returns
691
+ Returns
638
692
  -------
639
693
  str
640
694
  A mermaid string representing the lineage.
@@ -645,9 +699,12 @@ class AssetCatalog(Client):
645
699
  PropertyServerException
646
700
  UserNotAuthorizedException
647
701
 
648
- """
702
+ """
649
703
 
650
- asset_graph = self.get_asset_lineage_graph(asset_guid, start_from, page_size)
704
+ asset_graph = self.get_asset_lineage_graph(asset_guid, effective_time,
705
+ as_of_time, relationship_types,
706
+ limit_to_isc_q_name, hilight_isc_q_name,
707
+ start_from, page_size)
651
708
  return asset_graph.get("mermaidGraph")
652
709
 
653
710
  async def _async_get_assets_by_metadata_collection_id(
@@ -699,7 +756,7 @@ class AssetCatalog(Client):
699
756
  body = {"filter": type_name, "effectiveTime": effective_time}
700
757
  body_s = body_slimmer(body)
701
758
  response = await self._async_make_request("POST", url, body_s)
702
- return response.json().get("assets", "no assets found")
759
+ return response.json().get("assets", "NO_ASSETS_FOUND")
703
760
 
704
761
  def get_assets_by_metadata_collection_id(
705
762
  self,
@@ -777,7 +834,7 @@ class AssetCatalog(Client):
777
834
 
778
835
  response = await self._async_make_request("GET", url)
779
836
 
780
- return response.json().get("types", "No assets found")
837
+ return response.json().get("types", "NO_ASSETS_FOUND")
781
838
 
782
839
  def get_asset_catalog_types(self) -> str | dict:
783
840
  """Return all the elements that are anchored to an asset plus relationships between these elements and to
@@ -5,18 +5,23 @@ Copyright Contributors to the ODPi Egeria project.
5
5
  Automated Curation View Service Methods
6
6
 
7
7
  """
8
+
8
9
  import asyncio
9
10
  import datetime
10
11
 
11
12
  from httpx import Response
12
13
 
13
- from pyegeria import Client, max_paging_size, body_slimmer, TEMPLATE_GUIDS
14
+ from pyegeria.utils import body_slimmer
15
+ from pyegeria._globals import NO_ELEMENTS_FOUND
16
+ from pyegeria._client import Client
17
+ from pyegeria import TEMPLATE_GUIDS, max_paging_size
14
18
  from pyegeria._exceptions import (
15
19
  InvalidParameterException,
16
20
  PropertyServerException,
17
21
  UserNotAuthorizedException,
18
22
  )
19
- from ._validators import validate_name, validate_guid, validate_search_string
23
+
24
+ from ._validators import validate_guid, validate_name, validate_search_string
20
25
 
21
26
 
22
27
  class AutomatedCuration(Client):
@@ -1997,7 +2002,7 @@ class AutomatedCuration(Client):
1997
2002
  datetime.datetime.now() if start_time is None else start_time
1998
2003
  )
1999
2004
 
2000
- url = f"{self.curation_command_root}/governance-action-processes/" f"initiate"
2005
+ url = f"{self.curation_command_root}/governance-action-processes/initiate"
2001
2006
  body = {
2002
2007
  "class": "GovernanceActionProcessRequestBody",
2003
2008
  "processQualifiedName": action_type_qualified_name,
@@ -2456,7 +2461,7 @@ class AutomatedCuration(Client):
2456
2461
  {
2457
2462
  "class": "NewActionTarget",
2458
2463
  "actionTargetName": "serverToSurvey",
2459
- "actionTargetGUID": resource_guid,
2464
+ "actionTargetGUID": resource_guid.strip(),
2460
2465
  }
2461
2466
  ],
2462
2467
  }
@@ -2468,7 +2473,7 @@ class AutomatedCuration(Client):
2468
2473
  loop = asyncio.get_event_loop()
2469
2474
  response = loop.run_until_complete(
2470
2475
  self._async_initiate_survey(
2471
- "PostgreSQLSurveys:survey-postgres-database", postgres_database_guid
2476
+ "PostgreSQLSurvey:survey-postgres-database", postgres_database_guid
2472
2477
  )
2473
2478
  )
2474
2479
  return response
@@ -2478,7 +2483,7 @@ class AutomatedCuration(Client):
2478
2483
  loop = asyncio.get_event_loop()
2479
2484
  response = loop.run_until_complete(
2480
2485
  self._async_initiate_survey(
2481
- "PostgreSQLSurveys:survey-postgres-server", postgres_server_guid
2486
+ "PostgreSQLSurvey:survey-postgres-server", postgres_server_guid
2482
2487
  )
2483
2488
  )
2484
2489
  return response