pyegeria 5.2.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 +513 -250
  31. {pyegeria/commands → commands}/cli/egeria_cat.py +128 -51
  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 +18 -11
  37. commands/my/__init__.py +22 -0
  38. {pyegeria/commands → commands}/my/list_my_profile.py +6 -8
  39. {pyegeria/commands → commands}/my/list_my_roles.py +4 -4
  40. {pyegeria/commands → commands}/my/monitor_my_todos.py +7 -7
  41. {pyegeria/commands → commands}/my/monitor_open_todos.py +7 -7
  42. {pyegeria/commands → commands}/my/todo_actions.py +3 -2
  43. commands/ops/__init__.py +23 -0
  44. {pyegeria/commands → commands}/ops/gov_server_actions.py +5 -4
  45. {pyegeria/commands → commands}/ops/list_archives.py +7 -6
  46. {pyegeria/commands → commands}/ops/list_catalog_targets.py +4 -4
  47. {pyegeria/commands → commands}/ops/load_archive.py +4 -2
  48. {pyegeria/commands → commands}/ops/monitor_asset_events.py +8 -7
  49. {pyegeria/commands → commands}/ops/monitor_engine_activity.py +5 -5
  50. {pyegeria/commands → commands}/ops/monitor_engine_activity_c.py +3 -3
  51. {pyegeria/commands → commands}/ops/monitor_gov_eng_status.py +3 -2
  52. {pyegeria/commands → commands}/ops/monitor_integ_daemon_status.py +23 -15
  53. {pyegeria/commands → commands}/ops/monitor_platform_status.py +5 -4
  54. {pyegeria/commands → commands}/ops/monitor_server_startup.py +7 -7
  55. {pyegeria/commands → commands}/ops/monitor_server_status.py +16 -11
  56. {pyegeria/commands → commands}/ops/orig_monitor_server_list.py +2 -2
  57. {pyegeria/commands → commands}/ops/orig_monitor_server_status.py +3 -3
  58. {pyegeria/commands → commands}/ops/refresh_integration_daemon.py +4 -4
  59. {pyegeria/commands → commands}/ops/restart_integration_daemon.py +3 -3
  60. {pyegeria/commands → commands}/ops/table_integ_daemon_status.py +3 -3
  61. commands/tech/__init__.py +22 -0
  62. commands/tech/generic_actions.py +74 -0
  63. {pyegeria/commands → commands}/tech/get_element_info.py +5 -7
  64. {pyegeria/commands → commands}/tech/get_guid_info.py +4 -5
  65. {pyegeria/commands → commands}/tech/get_tech_details.py +8 -9
  66. {pyegeria/commands → commands}/tech/get_tech_type_template.py +4 -4
  67. pyegeria/commands/tech/list_elements.py → commands/tech/list_all_om_type_elements.py +11 -10
  68. pyegeria/commands/tech/list_elements_x.py → commands/tech/list_all_om_type_elements_x.py +11 -12
  69. pyegeria/commands/tech/list_related_elements.py → commands/tech/list_all_related_elements.py +11 -9
  70. {pyegeria/commands → commands}/tech/list_anchored_elements.py +16 -16
  71. {pyegeria/commands → commands}/tech/list_asset_types.py +4 -4
  72. commands/tech/list_elements_by_classification_by_property_value.py +200 -0
  73. commands/tech/list_elements_by_property_value.py +180 -0
  74. commands/tech/list_elements_by_property_value_x.py +201 -0
  75. {pyegeria/commands → commands}/tech/list_elements_for_classification.py +11 -9
  76. {pyegeria/commands → commands}/tech/list_gov_action_processes.py +5 -6
  77. commands/tech/list_information_supply_chains.py +167 -0
  78. {pyegeria/commands → commands}/tech/list_registered_services.py +3 -3
  79. commands/tech/list_related_elements_with_prop_value.py +221 -0
  80. {pyegeria/commands → commands}/tech/list_related_specification.py +3 -3
  81. {pyegeria/commands → commands}/tech/list_relationship_types.py +4 -5
  82. {pyegeria/commands → commands}/tech/list_relationships.py +3 -3
  83. commands/tech/list_solution_blueprints.py +181 -0
  84. commands/tech/list_solution_components.py +185 -0
  85. commands/tech/list_solution_roles.py +184 -0
  86. {pyegeria/commands → commands}/tech/list_tech_templates.py +3 -3
  87. {pyegeria/commands → commands}/tech/list_valid_metadata_values.py +5 -6
  88. {pyegeria/commands → commands}/tech/table_tech_templates.py +16 -13
  89. {pyegeria/commands → commands}/tech/x_list_related_elements.py +6 -4
  90. md_processing/__init__.py +49 -0
  91. md_processing/data/commands.json +3252 -0
  92. md_processing/dr_egeria_inbox/archive/dr_egeria_intro.md +254 -0
  93. md_processing/dr_egeria_inbox/archive/dr_egeria_intro_more_terms.md +696 -0
  94. md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part1.md +254 -0
  95. md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part2.md +298 -0
  96. md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part3.md +608 -0
  97. md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part4.md +94 -0
  98. md_processing/dr_egeria_inbox/archive/freddie_intro.md +284 -0
  99. md_processing/dr_egeria_inbox/archive/freddie_intro_orig.md +275 -0
  100. md_processing/dr_egeria_inbox/archive/test-term.md +110 -0
  101. md_processing/dr_egeria_inbox/cat_test.md +100 -0
  102. md_processing/dr_egeria_inbox/data_field.md +54 -0
  103. md_processing/dr_egeria_inbox/data_spec.md +77 -0
  104. md_processing/dr_egeria_inbox/data_spec_test.md +2406 -0
  105. md_processing/dr_egeria_inbox/data_test.md +86 -0
  106. md_processing/dr_egeria_inbox/dr_egeria_intro_categories.md +168 -0
  107. md_processing/dr_egeria_inbox/dr_egeria_intro_part1.md +280 -0
  108. md_processing/dr_egeria_inbox/dr_egeria_intro_part2.md +313 -0
  109. md_processing/dr_egeria_inbox/dr_egeria_intro_part3.md +1073 -0
  110. md_processing/dr_egeria_inbox/dr_egeria_isc1.md +44 -0
  111. md_processing/dr_egeria_inbox/glossary_creation_experiment.ipynb +341 -0
  112. md_processing/dr_egeria_inbox/glossary_test1.md +324 -0
  113. md_processing/dr_egeria_inbox/rel.md +8 -0
  114. md_processing/dr_egeria_inbox/sb.md +119 -0
  115. md_processing/dr_egeria_inbox/search_test.md +39 -0
  116. md_processing/dr_egeria_inbox/solution-components.md +154 -0
  117. md_processing/dr_egeria_inbox/solution_blueprints.md +118 -0
  118. md_processing/dr_egeria_inbox/synonym_test.md +42 -0
  119. md_processing/dr_egeria_inbox/t2.md +268 -0
  120. md_processing/dr_egeria_outbox/processed-2025-05-15 19:52-data_test.md +94 -0
  121. md_processing/dr_egeria_outbox/processed-2025-05-16 07:39-data_test.md +88 -0
  122. md_processing/dr_egeria_outbox/processed-2025-05-17 16:01-data_field.md +56 -0
  123. md_processing/dr_egeria_outbox/processed-2025-05-18 15:51-data_test.md +103 -0
  124. md_processing/dr_egeria_outbox/processed-2025-05-18 16:47-data_test.md +94 -0
  125. md_processing/dr_egeria_outbox/processed-2025-05-19 07:14-data_test.md +96 -0
  126. md_processing/dr_egeria_outbox/processed-2025-05-19 07:20-data_test.md +100 -0
  127. md_processing/dr_egeria_outbox/processed-2025-05-19 07:22-data_test.md +88 -0
  128. md_processing/dr_egeria_outbox/processed-2025-05-19 09:26-data_test.md +91 -0
  129. md_processing/dr_egeria_outbox/processed-2025-05-19 10:27-data_test.md +91 -0
  130. md_processing/dr_egeria_outbox/processed-2025-05-19 14:04-data_test.md +91 -0
  131. md_processing/md_commands/__init__.py +3 -0
  132. md_processing/md_commands/blueprint_commands.py +303 -0
  133. md_processing/md_commands/data_designer_commands.py +1182 -0
  134. md_processing/md_commands/glossary_commands.py +1144 -0
  135. md_processing/md_commands/project_commands.py +163 -0
  136. md_processing/md_processing_utils/__init__.py +4 -0
  137. md_processing/md_processing_utils/common_md_proc_utils.py +724 -0
  138. md_processing/md_processing_utils/common_md_utils.py +172 -0
  139. md_processing/md_processing_utils/extraction_utils.py +486 -0
  140. md_processing/md_processing_utils/md_processing_constants.py +128 -0
  141. md_processing/md_processing_utils/message_constants.py +19 -0
  142. pyegeria/.DS_Store +0 -0
  143. pyegeria/__init__.py +231 -146
  144. pyegeria/_client.py +36 -13
  145. pyegeria/_exceptions.py +55 -46
  146. pyegeria/_globals.py +11 -1
  147. pyegeria/_validators.py +5 -5
  148. pyegeria/asset_catalog_omvs.py +78 -21
  149. pyegeria/automated_curation_omvs.py +11 -6
  150. pyegeria/classification_manager_omvs.py +41 -37
  151. pyegeria/collection_manager_omvs.py +722 -705
  152. pyegeria/core_omag_server_config.py +1 -1
  153. pyegeria/create_tech_guid_lists.py +13 -13
  154. pyegeria/data_designer_omvs.py +5104 -0
  155. pyegeria/dr.egeria spec.md +9 -0
  156. pyegeria/egeria_cat_client.py +5 -8
  157. pyegeria/egeria_client.py +39 -24
  158. pyegeria/egeria_config_client.py +2 -1
  159. pyegeria/egeria_my_client.py +4 -4
  160. pyegeria/egeria_tech_client.py +40 -18
  161. pyegeria/feedback_manager_omvs.py +1 -1
  162. pyegeria/full_omag_server_config.py +5 -3
  163. pyegeria/glossary_browser_omvs.py +1915 -694
  164. pyegeria/glossary_manager_omvs.py +685 -1842
  165. pyegeria/m_test.py +118 -0
  166. pyegeria/md_processing_helpers.py +58 -0
  167. pyegeria/md_processing_utils.py +2147 -0
  168. pyegeria/md_processing_utils_orig.py +1103 -0
  169. pyegeria/mermaid_utilities.py +1194 -14
  170. pyegeria/metadata_explorer_omvs.py +5 -50
  171. pyegeria/my_profile_omvs.py +3 -2
  172. pyegeria/output_formatter.py +389 -0
  173. pyegeria/platform_services.py +5 -5
  174. pyegeria/project_manager_omvs.py +97 -18
  175. pyegeria/runtime_manager_omvs.py +8 -10
  176. pyegeria/server_operations.py +2 -2
  177. pyegeria/solution_architect_omvs.py +2156 -0
  178. pyegeria/template_manager_omvs.py +13 -13
  179. pyegeria/utils.py +3 -1
  180. pyegeria/valid_metadata_omvs.py +5 -4
  181. pyegeria/x_action_author_omvs.py +3 -6
  182. {pyegeria-5.2.1.dist-info → pyegeria-5.3.dist-info}/METADATA +9 -8
  183. pyegeria-5.3.dist-info/RECORD +196 -0
  184. {pyegeria-5.2.1.dist-info → pyegeria-5.3.dist-info}/WHEEL +1 -1
  185. pyegeria-5.3.dist-info/entry_points.txt +99 -0
  186. pyegeria/commands/README.md +0 -47
  187. pyegeria/commands/__init__.py +0 -22
  188. pyegeria/commands/cat/__init__.py +0 -1
  189. pyegeria/commands/doc/README.md +0 -145
  190. pyegeria/commands/doc/Visual Command Reference/README.md +0 -511
  191. pyegeria/commands/doc/Visual Command Reference/cat/show/assets/asset-graph 2024-11-20 at 15.56.42.png +0 -0
  192. pyegeria/commands/doc/Visual Command Reference/cat/show/assets/assets-in-domain 2024-11-20 at 15.49.55@2x.png +0 -0
  193. pyegeria/commands/doc/Visual Command Reference/cat/show/assets/elements-of-type 2024-11-20 at 16.01.35.png +0 -0
  194. pyegeria/commands/doc/Visual Command Reference/cat/show/assets/tech-type-elements 2024-11-20 at 16.05.05.png +0 -0
  195. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-data-catalogs 2024-12-17 at 15.43.27@2x.png +0 -0
  196. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-data-catalogs-2024-11-20 at 16.17.43@2x.png +0 -0
  197. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-schemas 2024-11-25 at 20.14.50@2x.png +0 -0
  198. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-schemas 2024-12-17 at 15.48.38@2x.png +0 -0
  199. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-servers 2024-11-25 at 20.21.25@2x.png +0 -0
  200. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-servers 2024-12-17 at 15.52.16@2x.png +0 -0
  201. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed_databases 2024-12-16 at 16.40.31@2x.png +0 -0
  202. pyegeria/commands/doc/Visual Command Reference/cat/show/glossary/list-glossaries 2024-11-25 at 20.30.02.png +0 -0
  203. pyegeria/commands/doc/Visual Command Reference/cat/show/glossary/list-terms 2024-11-25 at 20.32.11.png +0 -0
  204. pyegeria/commands/doc/Visual Command Reference/cat/show/info/asset-types 2024-11-25 at 20.34.19@2x.png +0 -0
  205. pyegeria/commands/doc/Visual Command Reference/cat/show/info/certification-types 2024-11-25 at 20.37.07.png +0 -0
  206. pyegeria/commands/doc/Visual Command Reference/cat/show/info/collection-graph 2024-12-12 at 11.33.18@2x.png +0 -0
  207. pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-collections 2024-12-10 at 14.25.51@2x.png +0 -0
  208. pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-todos 2024-12-12 at 11.46.30@2x.png +0 -0
  209. pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-user-ids 2024-12-12 at 11.51.09@2x.png +0 -0
  210. pyegeria/commands/doc/Visual Command Reference/cat/show/info/tech-types 2024-12-12 at 11.37.20@2x.png +0 -0
  211. pyegeria/commands/doc/Visual Command Reference/cat/show/projects/project_dependencies 2024-12-14 at 16.24.39@2x.png +0 -0
  212. pyegeria/commands/doc/Visual Command Reference/cat/show/projects/project_structure 2024-12-14 at 16.21.35@2x.png +0 -0
  213. pyegeria/commands/doc/Visual Command Reference/cat/show/projects/projects 2024-12-14 at 16.18.10@2x.png +0 -0
  214. pyegeria/commands/doc/Visual Command Reference/hey_egeria tui 2024-12-16 at 16.58.22@2x.png +0 -0
  215. pyegeria/commands/doc/Visual Command Reference/my/show/my_profile 2024-12-14 at 16.29.27@2x.png +0 -0
  216. pyegeria/commands/doc/Visual Command Reference/my/show/my_roles 2024-12-14 at 16.32.10@2x.png +0 -0
  217. pyegeria/commands/doc/Visual Command Reference/my/show/my_todos 2024-12-15 at 16.24.13@2x.png +0 -0
  218. pyegeria/commands/doc/Visual Command Reference/my/show/open_todos 2024-12-14 at 16.36.12@2x.png +0 -0
  219. pyegeria/commands/doc/Visual Command Reference/ops/show/engines/list_engine_activity compressed 2024-12-15 at 16.48.48@2x.png +0 -0
  220. pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_activity 2024-12-15 at 16.32.55@2x.png +0 -0
  221. pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_activity compressed 2024-12-15 at 16.38.29@2x.png +0 -0
  222. pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_status 2024-12-15 at 16.51.26.jpeg +0 -0
  223. pyegeria/commands/doc/Visual Command Reference/ops/show/integrations/monitor_integration_daemon_status 2024-12-15 at 16.57.12@2x.png +0 -0
  224. pyegeria/commands/doc/Visual Command Reference/ops/show/integrations/monitor_integration_targets 2024-12-15 at 17.02.19@2x.png +0 -0
  225. pyegeria/commands/doc/Visual Command Reference/ops/show/platforms/monitor_platform_status 2024-12-15 at 19.53.18@2x.png +0 -0
  226. pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_server_status 2024-12-15 at 19.59.39@2x.png +0 -0
  227. pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_server_status full 2024-12-15 at 20.01.57@2x.png +0 -0
  228. pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_startup_servers 2024-12-15 at 19.56.07@2x.png +0 -0
  229. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/get_anchored_elements 2024-12-15 at 21.25.41@2x.png +0 -0
  230. 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
  231. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/info_for_guid 2024-12-16 at 11.35.29@2x.png +0 -0
  232. 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
  233. 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
  234. 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
  235. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/related_elements 2024-12-16 at 14.55.01@2x.png +0 -0
  236. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/show_related_specifications 2024-12-16 at 15.04.55@2x.png +0 -0
  237. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/asset_types 2024-12-16 at 15.10.16@2x.png +0 -0
  238. 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
  239. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/governance_action_processes 2024-12-16 at 15.13.01@2x.png +0 -0
  240. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/registered_services 2024-12-16 at 16.44.54@2x.png +0 -0
  241. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/relationship_types 2024-12-16 at 16.20.34@2x.png +0 -0
  242. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/relationship_types 2024-12-19 at 10.51.54@2x.png +0 -0
  243. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/valid_metadata_values 2024-12-16 at 15.31.56@2x.png +0 -0
  244. 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
  245. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/list_technology_types 2024-12-16 at 15.39.20@2x.png +0 -0
  246. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/tech_type_details 2024-12-16 at 15.37.21@2x.png +0 -0
  247. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/tech_type_templates 2024-12-16 at 16.11.48@2x.png +0 -0
  248. pyegeria/commands/doc/glossary/basic-glossary-tui.md +0 -109
  249. pyegeria/commands/doc/glossary/images/delete-glossary-step1 2024-11-06 at 15.47.23@2x.png +0 -0
  250. pyegeria/commands/doc/glossary/images/delete-glossary-step2 2024-11-06 at 15.51.29@2x.png +0 -0
  251. pyegeria/commands/doc/glossary/images/delete-glossary-step3 2024-11-06 at 15.53.19@2x.png +0 -0
  252. pyegeria/commands/doc/glossary/images/delete-glossary-step4 2024-11-06 at 15.55.11@2x.png +0 -0
  253. pyegeria/commands/doc/glossary/images/out-create-glossary example 2024-11-05 at 20.38.04@2x.png +0 -0
  254. pyegeria/commands/doc/glossary/images/out-create-term 2024-11-06 at 20.48.29.png +0 -0
  255. pyegeria/commands/doc/glossary/images/out-delete-term 2024-11-07 at 03.57.25.png +0 -0
  256. pyegeria/commands/doc/glossary/images/out-display-terms-for-glossary-test 2024-11-06 at 20.51.28.png +0 -0
  257. pyegeria/commands/doc/glossary/images/out-export-example 2024-11-07 at 09.54.57.png +0 -0
  258. pyegeria/commands/doc/glossary/images/out-exported-terms 2024-11-06 at 21.06.32.png +0 -0
  259. pyegeria/commands/doc/glossary/images/out-glossary-list example 2024-11-05 at 20.41.02@2x.png +0 -0
  260. pyegeria/commands/doc/glossary/images/out-import-terms 2024-11-07 at 08.15.18.png +0 -0
  261. pyegeria/commands/doc/glossary/images/out-list-all-terms 2024-11-06 at 16.22.20@2x.png +0 -0
  262. pyegeria/commands/doc/glossary/images/out-list-terms-for-example 2024-11-06 at 16.40.12.png +0 -0
  263. pyegeria/commands/doc/glossary/images/out-list-terms-second 2024-11-06 at 16.45.13.png +0 -0
  264. pyegeria/commands/doc/glossary/images/out-pipx install pyegeria 2024-11-10 at 18.12.21.png +0 -0
  265. pyegeria/commands/doc/glossary/images/out-server-status-full 2024-11-10 at 18.25.14.png +0 -0
  266. pyegeria/commands/doc/glossary/images/out-servers-status 2024-11-10 at 18.15.42.png +0 -0
  267. pyegeria/commands/doc/glossary/images/out-upsert-import 2024-11-07 at 19.37.00.png +0 -0
  268. pyegeria/commands/doc/glossary/images/tui-2024-11-10 at 18.26.29.png +0 -0
  269. pyegeria/commands/doc/glossary/images/tui-create-glossary example 2024-11-05 at 20.34.24@2x.png +0 -0
  270. pyegeria/commands/doc/glossary/images/tui-create-term 2024-11-06 at 20.46.35.png +0 -0
  271. pyegeria/commands/doc/glossary/images/tui-delete-term 2024-11-07 at 03.51.57.png +0 -0
  272. pyegeria/commands/doc/glossary/images/tui-display-terms-for-example 2024-11-06 at 20.56.49.png +0 -0
  273. pyegeria/commands/doc/glossary/images/tui-export-example 2024-11-07 at 09.52.59.png +0 -0
  274. pyegeria/commands/doc/glossary/images/tui-hey-egeria 2024-11-10 at 18.31.01.png +0 -0
  275. pyegeria/commands/doc/glossary/images/tui-import-upsert-example 2024-11-07 at 10.08.37.png +0 -0
  276. pyegeria/commands/doc/glossary/images/tui-list-terms-second 2024-11-06 at 16.46.34.png +0 -0
  277. pyegeria/commands/doc/glossary/images/tui-load-archive.png +0 -0
  278. pyegeria/commands/doc/glossary/images/tui-server-status-full 2024-11-10 at 19.14.36.png +0 -0
  279. pyegeria/commands/doc/glossary/images/tui-show-glossaries 2024-11-07 at 20.00.05.png +0 -0
  280. pyegeria/commands/doc/glossary/images/tui-show-glossary-terms 2024-11-05 at 19.37.53@2x.png +0 -0
  281. pyegeria/commands/doc/glossary/images/tui-upsert 2024-11-07 at 11.49.04.png +0 -0
  282. pyegeria/commands/doc/glossary/images/upsert-example.om-terms 2024-11-07 at 11.44.05.png +0 -0
  283. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/README.md +0 -346
  284. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/CleanShot 2024-11-18 at 21.32.03@2x.png +0 -0
  285. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/Xmind 1731421782704.png +0 -0
  286. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/Xmind 1731422134920.png +0 -0
  287. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/hey_egeria 2024-11-12 at 20.38.43.png +0 -0
  288. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/hey_egeria cat 2024-11-12 at 21.41.43.png +0 -0
  289. 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
  290. 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
  291. 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
  292. 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
  293. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/short-cut commands 2024-11-12 at 22.22.13.png +0 -0
  294. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-hey-egeria.png +0 -0
  295. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-integration-status-paging.png +0 -0
  296. 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
  297. 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
  298. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-show-server-status-full 2024-11-10.png +0 -0
  299. 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
  300. pyegeria/commands/ops/__init__.py +0 -22
  301. pyegeria/commands/tech/__init__.py +0 -0
  302. pyegeria-5.2.1.dist-info/RECORD +0 -232
  303. pyegeria-5.2.1.dist-info/entry_points.txt +0 -81
  304. {pyegeria/commands → commands}/cat/README.md +0 -0
  305. {pyegeria/commands → commands}/cli/txt_custom_v2.tcss +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.dist-info → pyegeria-5.3.dist-info}/LICENSE +0 -0
@@ -0,0 +1,192 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ SPDX-License-Identifier: Apache-2.0
4
+ Copyright Contributors to the ODPi Egeria project.
5
+
6
+ List categories for a category.
7
+
8
+
9
+ A simple display for category terms
10
+ """
11
+ import argparse
12
+ import os
13
+ import sys
14
+ import time
15
+
16
+ from rich import box
17
+ from rich.console import Console
18
+ from rich.prompt import Prompt
19
+ from rich.table import Table
20
+ from rich.text import Text
21
+
22
+ from pyegeria import (
23
+ EgeriaTech,
24
+ InvalidParameterException,
25
+ PropertyServerException,
26
+ UserNotAuthorizedException,
27
+ print_exception_response,
28
+ )
29
+
30
+ disable_ssl_warnings = True
31
+
32
+ EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
33
+ EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
34
+ EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
35
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
36
+ EGERIA_VIEW_SERVER_URL = os.environ.get(
37
+ "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
38
+ )
39
+ EGERIA_INTEGRATION_DAEMON = os.environ.get("EGERIA_INTEGRATION_DAEMON", "integration-daemon")
40
+ EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
41
+ EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
42
+ EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
43
+ EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
44
+ EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
45
+ EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "150"))
46
+ EGERIA_category_PATH = os.environ.get("EGERIA_category_PATH", None)
47
+ EGERIA_ROOT_PATH = os.environ.get("EGERIA_ROOT_PATH", "../../")
48
+ EGERIA_INBOX_PATH = os.environ.get("EGERIA_INBOX_PATH", "md_processing/dr_egeria_inbox")
49
+ EGERIA_OUTBOX_PATH = os.environ.get("EGERIA_OUTBOX_PATH", "md_processing/dr_egeria_outbox")
50
+
51
+
52
+
53
+ def display_categories(
54
+ search_string: str = "*",
55
+ view_server: str = EGERIA_VIEW_SERVER,
56
+ view_url: str = EGERIA_VIEW_SERVER_URL,
57
+ user: str = EGERIA_USER,
58
+ user_pass: str = EGERIA_USER_PASSWORD,
59
+ jupyter: bool = EGERIA_JUPYTER,
60
+ width: int = EGERIA_WIDTH,
61
+ output_format: str = "TABLE",
62
+ ):
63
+ """Display either a specified category or all categories if the search_string is '*'.
64
+ Parameters
65
+ ----------
66
+ search_string : str, default is '*'
67
+ The string used to search for categories.
68
+ view_server : str
69
+ The view server name or address where the Egeria services are hosted.
70
+ view_url : str
71
+ The URL of the platform the view server is on.
72
+ user : str
73
+ The user ID for authentication with the Egeria server.
74
+ user_pass : str
75
+ The password for authentication with the Egeria server.
76
+ jupyter : bool, optional
77
+ A boolean indicating whether the output is intended for a Jupyter notebook (default is EGERIA_JUPYTER).
78
+ width : int, optional
79
+ The width of the console output (default is EGERIA_WIDTH).
80
+ output_format: str, optional, default is 'JSON'
81
+ One of FORM, REPORT, TABLE
82
+ """
83
+ m_client = EgeriaTech(view_server, view_url, user_id=user, user_pwd=user_pass)
84
+ token = m_client.create_egeria_bearer_token()
85
+
86
+
87
+ try:
88
+ if output_format == "FORM":
89
+ action = "Update-Form"
90
+ elif output_format == "REPORT":
91
+ action = "Report"
92
+ if output_format != "TABLE":
93
+ file_path = os.path.join(EGERIA_ROOT_PATH, EGERIA_OUTBOX_PATH)
94
+ file_name = f"Categories-{time.strftime('%Y-%m-%d-%H-%M-%S')}-{action}.md"
95
+ full_file_path = os.path.join(file_path, file_name)
96
+ os.makedirs(os.path.dirname(full_file_path), exist_ok=True)
97
+ output = m_client.find_glossary_categories(search_string, output_format=output_format)
98
+ if output == "NO_CATEGORIES_FOUND":
99
+ print(f"\n==> No categories found for search string '{search_string}'")
100
+ return
101
+ with open(full_file_path, 'w') as f:
102
+ f.write(output)
103
+ print(f"\n==> Categories output written to {full_file_path}")
104
+ return
105
+
106
+ table = Table(
107
+ title=f"Category List @ {time.asctime()}",
108
+ style="bright_white on black",
109
+ header_style="bright_white on dark_blue",
110
+ title_style="bold white on black",
111
+ caption_style="white on black",
112
+ show_lines=True,
113
+ box=box.ROUNDED,
114
+ caption=f"View Server '{view_server}' @ Platform - {view_url}",
115
+ expand=True,
116
+ )
117
+ table.add_column("Category Name")
118
+ table.add_column(
119
+ "Qualified Name & GUID", width=38, no_wrap=True, justify="center"
120
+ )
121
+ table.add_column("Description")
122
+ table.add_column("In Glossary")
123
+ table.add_column("Parent Category")
124
+
125
+ categories = m_client.find_glossary_categories(search_string)
126
+ if type(categories) is list:
127
+ sorted_category_list = sorted(
128
+ categories, key=lambda k: k["glossaryCategoryProperties"]["displayName"]
129
+ )
130
+ for category in sorted_category_list:
131
+ display_name = category["glossaryCategoryProperties"].get("displayName",'---')
132
+ qualified_name = category["glossaryCategoryProperties"]["qualifiedName"]
133
+ category_guid = category["elementHeader"]["guid"]
134
+ q_name = Text(f"{qualified_name}\n&\n{category_guid}", justify="center")
135
+ description = category["glossaryCategoryProperties"].get("description",'---')
136
+ classification_props = category["elementHeader"]['classifications'][0].get('classificationProperties',None)
137
+ glossary_qualified_name = '---'
138
+ if classification_props is not None:
139
+ glossary_guid = classification_props.get('anchorScopeGUID','---')
140
+ glossary_qualified_name = (
141
+ m_client.get_glossary_by_guid(glossary_guid))['glossaryProperties']['qualifiedName']
142
+ cat_info = m_client.get_category_parent(category_guid)
143
+ if type(cat_info) is dict:
144
+ parent_qn = cat_info['glossaryCategoryProperties']['qualifiedName']
145
+ else:
146
+ parent_qn = '---'
147
+
148
+
149
+ table.add_row(display_name, q_name, description, glossary_qualified_name, parent_qn)
150
+ console = Console(
151
+ style="bold bright_white on black",
152
+ width=width,
153
+ force_terminal=not jupyter,
154
+ )
155
+ console.print(table)
156
+
157
+ except (InvalidParameterException, PropertyServerException) as e:
158
+ print_exception_response(e)
159
+ finally:
160
+ m_client.close_session()
161
+
162
+
163
+ def main():
164
+ parser = argparse.ArgumentParser()
165
+ parser.add_argument("--server", help="Name of the server to display status for")
166
+ parser.add_argument("--url", help="URL Platform to connect to")
167
+ parser.add_argument("--userid", help="User Id")
168
+ parser.add_argument("--password", help="User Password")
169
+
170
+ args = parser.parse_args()
171
+
172
+ server = args.server if args.server is not None else EGERIA_VIEW_SERVER
173
+ url = args.url if args.url is not None else EGERIA_PLATFORM_URL
174
+ userid = args.userid if args.userid is not None else EGERIA_USER
175
+ user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
176
+
177
+ try:
178
+ search_string = Prompt.ask(
179
+ "Enter the category you are searching for or '*' for all:", default="*"
180
+ )
181
+ output_format = Prompt.ask("What output format do you want?", choices=["TABLE", "FORM", "REPORT"],
182
+ default="TABLE")
183
+
184
+ display_categories(search_string, server, url, userid,
185
+ user_pass, output_format = output_format)
186
+
187
+ except KeyboardInterrupt:
188
+ pass
189
+
190
+
191
+ if __name__ == "__main__":
192
+ main()
@@ -9,34 +9,34 @@ List certification types
9
9
  A simple display for certification types
10
10
  """
11
11
  import argparse
12
+ import json
12
13
  import os
13
14
  import sys
14
15
  import time
15
- import json
16
16
 
17
17
  from rich import box
18
18
  from rich.console import Console
19
- from rich.prompt import Prompt
20
19
  from rich.markdown import Markdown
20
+ from rich.prompt import Prompt
21
21
  from rich.table import Table
22
22
 
23
23
  from pyegeria import (
24
+ AssetCatalog,
25
+ ClassificationManager,
24
26
  InvalidParameterException,
25
27
  PropertyServerException,
26
28
  UserNotAuthorizedException,
27
29
  print_exception_response,
28
- AssetCatalog,
29
- ClassificationManager,
30
30
  )
31
31
 
32
32
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
33
33
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
34
34
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
35
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
35
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
36
36
  EGERIA_VIEW_SERVER_URL = os.environ.get(
37
37
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
38
38
  )
39
- EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
39
+ EGERIA_INTEGRATION_DAEMON = os.environ.get("EGERIA_INTEGRATION_DAEMON", "integration-daemon")
40
40
  EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
41
41
  EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
42
42
  EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
@@ -6,39 +6,45 @@ Copyright Contributors to the ODPi Egeria project.
6
6
  A simple display for collections
7
7
  """
8
8
  import argparse
9
+ import json
9
10
  import os
10
11
  import time
11
12
 
12
13
  from rich import box
13
14
  from rich.console import Console
15
+ from rich.markdown import Markdown
14
16
  from rich.prompt import Prompt
15
17
  from rich.table import Table
16
18
  from rich.text import Text
17
19
 
18
20
  from pyegeria import (
21
+ EgeriaTech,
19
22
  InvalidParameterException,
20
23
  PropertyServerException,
21
24
  UserNotAuthorizedException,
22
- EgeriaTech,
23
- print_exception_response,
24
- )
25
+ print_exception_response, NO_ELEMENTS_FOUND,
26
+ )
25
27
 
26
28
  disable_ssl_warnings = True
27
29
 
28
30
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
29
31
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
30
32
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
31
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
33
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
32
34
  EGERIA_VIEW_SERVER_URL = os.environ.get(
33
35
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
34
36
  )
35
- EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
37
+ EGERIA_INTEGRATION_DAEMON = os.environ.get("EGERIA_INTEGRATION_DAEMON", "integration-daemon")
36
38
  EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
37
39
  EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
38
40
  EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
39
41
  EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
40
42
  EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
41
43
  EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
44
+ EGERIA_GLOSSARY_PATH = os.environ.get("EGERIA_GLOSSARY_PATH", None)
45
+ EGERIA_ROOT_PATH = os.environ.get("EGERIA_ROOT_PATH", "../../")
46
+ EGERIA_INBOX_PATH = os.environ.get("EGERIA_INBOX_PATH", "md_processing/dr_egeria_inbox")
47
+ EGERIA_OUTBOX_PATH = os.environ.get("EGERIA_OUTBOX_PATH", "md_processing/dr_egeria_outbox")
42
48
 
43
49
 
44
50
  def display_collections(
@@ -49,6 +55,7 @@ def display_collections(
49
55
  user_pass: str = EGERIA_USER_PASSWORD,
50
56
  jupyter: bool = EGERIA_JUPYTER,
51
57
  width: int = EGERIA_WIDTH,
58
+ output_format: str = "TABLE"
52
59
  ):
53
60
  """Display either a specified glossary or all collections if the search_string is '*'.
54
61
  Parameters
@@ -67,10 +74,40 @@ def display_collections(
67
74
  A boolean indicating whether the output is intended for a Jupyter notebook (default is EGERIA_JUPYTER).
68
75
  width : int, optional
69
76
  The width of the console output (default is EGERIA_WIDTH).
77
+ output_format : str, optional
78
+ Format of the output. Default is TABLE.
70
79
  """
71
80
  m_client = EgeriaTech(view_server, view_url, user_id=user, user_pwd=user_pass)
72
- token = m_client.create_egeria_bearer_token()
81
+ m_client.create_egeria_bearer_token()
73
82
  try:
83
+
84
+ if output_format == "FORM":
85
+ action = "Update-Form"
86
+ elif output_format == "REPORT":
87
+ action = "Report"
88
+ elif output_format == "DICT":
89
+ action = "Dict"
90
+
91
+ if output_format != "TABLE":
92
+ file_path = os.path.join(EGERIA_ROOT_PATH, EGERIA_OUTBOX_PATH)
93
+ file_name = f"Terms-{time.strftime('%Y-%m-%d-%H-%M-%S')}-{action}.md"
94
+ full_file_path = os.path.join(file_path, file_name)
95
+ os.makedirs(os.path.dirname(full_file_path), exist_ok=True)
96
+ output = m_client.find_collections(
97
+ search_string.strip(), None, False, ends_with=False, ignore_case=True,
98
+ output_format=output_format
99
+ )
100
+ if output == NO_ELEMENTS_FOUND:
101
+ print(f"\n==> No collections found for search string '{search_string}'")
102
+ return
103
+ elif isinstance(output, str | list) and output_format == "DICT":
104
+ output = json.dumps(output, indent=4)
105
+
106
+ with open(full_file_path, 'w') as f:
107
+ f.write(output)
108
+ print(f"\n==> Collections output written to {full_file_path}")
109
+ return
110
+
74
111
  table = Table(
75
112
  title=f"Collection List @ {time.asctime()}",
76
113
  style="bright_white on black",
@@ -86,33 +123,38 @@ def display_collections(
86
123
  table.add_column(
87
124
  "Qualified Name & GUID", width=38, no_wrap=True, justify="center"
88
125
  )
89
- table.add_column("Home Metadata Collection")
90
126
  table.add_column("Description")
91
127
  table.add_column("Collection Type")
128
+ table.add_column("Classifications")
129
+ table.add_column("Members")
92
130
 
93
131
  collections = m_client.find_collections(
94
- search_string.strip(), None, False, ends_with=False, ignore_case=True
132
+ search_string.strip(), None, False, ends_with=False, ignore_case=True,
133
+ output_format = "DICT"
95
134
  )
96
135
  if type(collections) is list:
97
136
  sorted_collection_list = sorted(
98
- collections, key=lambda k: k["properties"]["name"]
137
+ collections, key=lambda k: k["name"]
99
138
  )
100
139
  for collection in sorted_collection_list:
101
- display_name = collection["properties"]["name"]
102
- qualified_name = collection["properties"]["qualifiedName"]
103
- home_metadata_collection = collection["elementHeader"]["origin"][
104
- "homeMetadataCollectionName"
105
- ]
106
- guid = collection["elementHeader"]["guid"]
140
+ display_name = collection["name"]
141
+ qualified_name = collection["qualifiedName"]
142
+ guid = collection["guid"]
107
143
  q_name = Text(f"{qualified_name}\n&\n{guid}", justify="center")
108
- description = collection["properties"]["description"]
109
- collection_type = collection["properties"].get("collectionType", "---")
144
+ description = collection.get("description",'---')
145
+ collection_type = collection.get("collectionType", "---")
146
+ classifications = collection.get("classifications", "---")
147
+ classifications_md = Markdown(classifications)
148
+ members = "\n* ".join(collection.get("members", []))
149
+ members_md = Markdown(members)
150
+
110
151
  table.add_row(
111
152
  display_name,
112
153
  q_name,
113
- home_metadata_collection,
114
154
  description,
115
155
  collection_type,
156
+ classifications_md,
157
+ members_md,
116
158
  )
117
159
  console = Console(
118
160
  style="bold bright_white on black",
@@ -151,8 +193,9 @@ def main():
151
193
  search_string = Prompt.ask(
152
194
  "Enter the collection you are searching for or '*' for all:", default="*"
153
195
  ).strip()
196
+ output_format = Prompt.ask("What output format do you want?", choices=["DICT", "TABLE", "FORM", "REPORT"], default="TABLE")
154
197
 
155
- display_collections(search_string, server, url, userid, user_pass)
198
+ display_collections(search_string, server, url, userid, user_pass, output_format = output_format)
156
199
 
157
200
  except KeyboardInterrupt:
158
201
  pass
@@ -0,0 +1,223 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ SPDX-License-Identifier: Apache-2.0
4
+ Copyright Contributors to the ODPi Egeria project.
5
+
6
+ A simple display for Data Structures
7
+ """
8
+ import argparse
9
+ import json
10
+ import os
11
+ import time
12
+
13
+ from rich import box
14
+ from rich.console import Console
15
+ from rich.markdown import Markdown
16
+ from rich.prompt import Prompt
17
+ from rich.table import Table
18
+ from rich.text import Text
19
+
20
+ from pyegeria import (
21
+ EgeriaTech,
22
+ InvalidParameterException,
23
+ PropertyServerException,
24
+ UserNotAuthorizedException,
25
+ print_exception_response, NO_ELEMENTS_FOUND,
26
+ )
27
+
28
+ disable_ssl_warnings = True
29
+
30
+ EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
31
+ EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
32
+ EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
33
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
34
+ EGERIA_VIEW_SERVER_URL = os.environ.get(
35
+ "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
36
+ )
37
+ EGERIA_INTEGRATION_DAEMON = os.environ.get("EGERIA_INTEGRATION_DAEMON", "integration-daemon")
38
+ EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
39
+ EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
40
+ EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
41
+ EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
42
+ EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
43
+ EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
44
+ EGERIA_GLOSSARY_PATH = os.environ.get("EGERIA_GLOSSARY_PATH", None)
45
+ EGERIA_ROOT_PATH = os.environ.get("EGERIA_ROOT_PATH", "../../")
46
+ EGERIA_INBOX_PATH = os.environ.get("EGERIA_INBOX_PATH", "md_processing/dr_egeria_inbox")
47
+ EGERIA_OUTBOX_PATH = os.environ.get("EGERIA_OUTBOX_PATH", "md_processing/dr_egeria_outbox")
48
+
49
+
50
+ def display_data_struct(
51
+ search_string: str = "*",
52
+ view_server: str = EGERIA_VIEW_SERVER,
53
+ view_url: str = EGERIA_VIEW_SERVER_URL,
54
+ user: str = EGERIA_USER,
55
+ user_pass: str = EGERIA_USER_PASSWORD,
56
+ jupyter: bool = EGERIA_JUPYTER,
57
+ width: int = EGERIA_WIDTH,
58
+ output_format: str = "TABLE"
59
+ ):
60
+ """Display data structures filtered by search_string. If search_string is not specified, all data structures are displayed.
61
+ Parameters
62
+ ----------
63
+ search_string : str, default is '*'
64
+ The string used to search for structures.
65
+ view_server : str
66
+ The view server name or address where the Egeria services are hosted.
67
+ view_url : str
68
+ The URL of the platform the view server is on.
69
+ user : str
70
+ The user ID for authentication with the Egeria server.
71
+ user_pass : str
72
+ The password for authentication with the Egeria server.
73
+ jupyter : bool, optional
74
+ A boolean indicating whether the output is intended for a Jupyter notebook (default is EGERIA_JUPYTER).
75
+ width : int, optional
76
+ The width of the console output (default is EGERIA_WIDTH).
77
+ output_format : str, optional
78
+ Format of the output. Default is TABLE.
79
+ """
80
+ m_client = EgeriaTech(view_server, view_url, user_id=user, user_pwd=user_pass)
81
+ m_client.create_egeria_bearer_token()
82
+ try:
83
+
84
+ if output_format == "FORM":
85
+ action = "Update-Form"
86
+ elif output_format == "REPORT":
87
+ action = "Report"
88
+ elif output_format == "DICT":
89
+ action = "Dict"
90
+ elif output_format == "MERMAID":
91
+ action = "Mermaid"
92
+ filter = search_string.strip() if search_string != "*" else None
93
+
94
+ body = {
95
+ "class": "FilterRequestBody",
96
+ "asOfTime": None,
97
+ "effectiveTime": None,
98
+ "forLineage": False,
99
+ "forDuplicateProcessing" : False,
100
+ "limitResultsByStatus": ["ACTIVE"],
101
+ "sequencingOrder": "PROPERTY_ASCENDING",
102
+ "sequencingProperty": "qualifiedName",
103
+ "filter": filter
104
+ }
105
+
106
+ if output_format != "TABLE":
107
+ file_path = os.path.join(EGERIA_ROOT_PATH, EGERIA_OUTBOX_PATH)
108
+ file_name = f"Terms-{time.strftime('%Y-%m-%d-%H-%M-%S')}-{action}.md"
109
+ full_file_path = os.path.join(file_path, file_name)
110
+ os.makedirs(os.path.dirname(full_file_path), exist_ok=True)
111
+ output = m_client.find_data_structures_w_body(
112
+ body, 0, None, starts_with= True, ends_with=False, ignore_case=False,
113
+ output_format=output_format
114
+ )
115
+ if output == NO_ELEMENTS_FOUND:
116
+ print(f"\n==> No structures found for search string '{search_string}'")
117
+ return
118
+ elif isinstance(output, str | list) and output_format == "DICT":
119
+ output = json.dumps(output, indent=4)
120
+ elif isinstance(output, list) and output_format == "MERMAID":
121
+ output = "\n\n".join(output)
122
+
123
+ with open(full_file_path, 'w') as f:
124
+ f.write(output)
125
+ print(f"\n==> structures output written to {full_file_path}")
126
+ return
127
+
128
+ table = Table(
129
+ title=f"Data Structure List @ {time.asctime()}",
130
+ style="bright_white on black",
131
+ header_style="bright_white on dark_blue",
132
+ title_style="bold white on black",
133
+ caption_style="white on black",
134
+ show_lines=True,
135
+ box=box.ROUNDED,
136
+ caption=f"View Server '{view_server}' @ Platform - {view_url}",
137
+ expand=True,
138
+ )
139
+ table.add_column("Data Structure Name")
140
+ table.add_column("Namespace")
141
+ table.add_column(
142
+ "Qualified Name & GUID", width=38, no_wrap=True, justify="center"
143
+ )
144
+ table.add_column("Description")
145
+ table.add_column("Classifications")
146
+ table.add_column("Version Id")
147
+
148
+
149
+ structures = m_client.find_data_structures_w_body(
150
+ body, 0, None, starts_with = True, ends_with=False, ignore_case=False,
151
+ output_format = "DICT"
152
+ )
153
+ if type(structures) is list:
154
+ sorted_structures_list = sorted(
155
+ structures, key=lambda k: k["displayName"]
156
+ )
157
+ for structure in sorted_structures_list:
158
+ display_name = structure["displayName"]
159
+ qualified_name = structure["qualifiedName"]
160
+ namespace = structure.get("namespace",'---')
161
+ version_id = structure.get("versionId",'---')
162
+
163
+ guid = structure["guid"]
164
+ q_name = Text(f"{qualified_name}\n&\n{guid}", justify="center")
165
+ description = structure.get("description",'---')
166
+ classifications = structure.get("classifications", "---")
167
+ classifications_md = Markdown(classifications)
168
+
169
+ table.add_row(
170
+ display_name,
171
+ namespace,
172
+ q_name,
173
+ description,
174
+ classifications_md,
175
+ version_id
176
+ )
177
+ console = Console(
178
+ style="bold bright_white on black",
179
+ width=width,
180
+ force_terminal=not jupyter,
181
+ )
182
+ console.print(table)
183
+ else:
184
+ print("==> No structures with that name found")
185
+
186
+ except (
187
+ InvalidParameterException,
188
+ UserNotAuthorizedException,
189
+ PropertyServerException,
190
+ ) as e:
191
+ print_exception_response(e)
192
+ finally:
193
+ m_client.close_session()
194
+
195
+
196
+ def main():
197
+ parser = argparse.ArgumentParser()
198
+ parser.add_argument("--server", help="Name of the server to display status for")
199
+ parser.add_argument("--url", help="URL Platform to connect to")
200
+ parser.add_argument("--userid", help="User Id")
201
+ parser.add_argument("--password", help="User Password")
202
+
203
+ args = parser.parse_args()
204
+
205
+ server = args.server if args.server is not None else EGERIA_VIEW_SERVER
206
+ url = args.url if args.url is not None else EGERIA_PLATFORM_URL
207
+ userid = args.userid if args.userid is not None else EGERIA_USER
208
+ user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
209
+
210
+ try:
211
+ search_string = Prompt.ask(
212
+ "Enter the data structures you are searching for or '*' for all:", default="*"
213
+ ).strip()
214
+ output_format = Prompt.ask("What output format do you want?", choices=["DICT", "TABLE", "FORM", "REPORT", "MERMAID"], default="TABLE")
215
+
216
+ display_data_struct(search_string, server, url, userid, user_pass, output_format = output_format)
217
+
218
+ except KeyboardInterrupt:
219
+ pass
220
+
221
+
222
+ if __name__ == "__main__":
223
+ main()
@@ -1,32 +1,33 @@
1
1
  """This creates a templates guid file from the core metadata archive"""
2
- from rich.markdown import Markdown
3
- from rich.prompt import Prompt
4
- import os
2
+
5
3
  import argparse
6
- import time
4
+ import os
7
5
  import sys
6
+ import time
7
+
8
8
  from rich import box
9
9
  from rich.console import Console
10
+ from rich.markdown import Markdown
11
+ from rich.prompt import Prompt
10
12
  from rich.table import Table
11
13
 
12
14
  from pyegeria import (
15
+ EgeriaTech,
13
16
  InvalidParameterException,
14
17
  PropertyServerException,
15
18
  UserNotAuthorizedException,
16
19
  print_exception_response,
17
- EgeriaTech,
18
20
  )
19
21
 
20
-
21
22
  console = Console()
22
23
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
23
24
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
24
25
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
25
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
26
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
26
27
  EGERIA_VIEW_SERVER_URL = os.environ.get(
27
28
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
28
29
  )
29
- EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
30
+ EGERIA_INTEGRATION_DAEMON = os.environ.get("EGERIA_INTEGRATION_DAEMON", "integration-daemon")
30
31
  EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
31
32
  EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
32
33
  EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")