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
commands/cat/.DS_Store ADDED
Binary file
@@ -0,0 +1,166 @@
1
+ """
2
+ This is an ongoing experiment in parsing and playing with Freddie docs
3
+ """
4
+ import json
5
+ import os
6
+ from rich import print
7
+ from rich.console import Console
8
+
9
+ from pyegeria.md_processing_utils import (commands,
10
+ process_provenance_command)
11
+
12
+ import click
13
+ from pyegeria import (extract_command, process_glossary_upsert_command, process_term_upsert_command,
14
+ process_category_upsert_command,
15
+ get_current_datetime_string, process_per_proj_upsert_command, EgeriaTech
16
+ )
17
+ import commands
18
+ from datetime import datetime
19
+
20
+ EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
21
+ EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
22
+ EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
23
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
24
+ EGERIA_VIEW_SERVER_URL = os.environ.get(
25
+ "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
26
+ )
27
+ EGERIA_INTEGRATION_DAEMON = os.environ.get("EGERIA_INTEGRATION_DAEMON", "integration-daemon")
28
+ EGERIA_INTEGRATION_DAEMON_URL = os.environ.get(
29
+ "EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"
30
+ )
31
+ EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
32
+ EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
33
+ EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
34
+ EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
35
+ EGERIA_WIDTH = os.environ.get("EGERIA_WIDTH", 220)
36
+ EGERIA_JUPYTER = os.environ.get("EGERIA_JUPYTER", False)
37
+ EGERIA_HOME_GLOSSARY_GUID = os.environ.get("EGERIA_HOME_GLOSSARY_GUID", None)
38
+ EGERIA_GLOSSARY_PATH = os.environ.get("EGERIA_GLOSSARY_PATH", None)
39
+ EGERIA_ROOT_PATH = os.environ.get("EGERIA_ROOT_PATH", "../../")
40
+ EGERIA_INBOX_PATH = os.environ.get("EGERIA_INBOX_PATH", "md_processing/dr_egeria_inbox")
41
+ EGERIA_OUTBOX_PATH = os.environ.get("EGERIA_OUTBOX_PATH", "md_processing/dr_egeria_outbox")
42
+
43
+ console = Console(width=int(EGERIA_WIDTH))
44
+
45
+
46
+
47
+ @click.command("process-markdown-file", help="Process a markdown file and return the output as a string.")
48
+ @click.option("--file-path", help="File path to markdown file",
49
+ default="glossary_test1.md")
50
+ @click.option("--directive", default="display-only", help="How to process the file")
51
+ @click.option("--server", default=EGERIA_VIEW_SERVER, help="Egeria view server to use.")
52
+ @click.option(
53
+ "--url", default=EGERIA_VIEW_SERVER_URL, help="URL of Egeria platform to connect to"
54
+ )
55
+ @click.option("--userid", default=EGERIA_USER, help="Egeria user")
56
+ @click.option("--user_pass", default=EGERIA_USER_PASSWORD, help="Egeria user password")
57
+ def process_markdown_file(
58
+ file_path: str,
59
+ directive: str,
60
+ server: str,
61
+ url: str,
62
+ userid: str,
63
+ user_pass: str,
64
+ ):
65
+
66
+ client = EgeriaTech(server, url, user_id=userid)
67
+ token = client.create_egeria_bearer_token(userid, user_pass)
68
+
69
+ updated = False
70
+ full_file_path = os.path.join(EGERIA_ROOT_PATH, EGERIA_INBOX_PATH, file_path)
71
+ print(f"Processing Markdown File: {full_file_path}")
72
+ try:
73
+ with open(full_file_path, 'r') as f:
74
+ lines = f.readlines()
75
+ except FileNotFoundError:
76
+ print(f"Error: File not found at path: {full_file_path}")
77
+ return {} # Return empty dict if file not found
78
+
79
+ final_output =""
80
+ prov_output = (f"\n* Results from processing file {file_path} on "
81
+ f"{datetime.now().strftime("%Y-%m-%d %H:%M")}\n")
82
+ h1_blocks = []
83
+ current_block = ""
84
+ in_h1_block = False
85
+ element_dictionary = {}
86
+
87
+ for line in lines:
88
+ line = line.strip() # Remove leading/trailing whitespace
89
+
90
+ if line.startswith("# ") and not in_h1_block: # Start of a new H1 block
91
+ if current_block:
92
+ h1_blocks.append(current_block)
93
+ current_block = line
94
+ in_h1_block = True
95
+ elif line.startswith("---") and in_h1_block: # End of the current H1 block
96
+ h1_blocks.append(current_block)
97
+ current_block = ""
98
+ in_h1_block = False
99
+ elif in_h1_block: # Add line to the current H1 block
100
+ current_block += "\n" + line
101
+ else:
102
+ # Add non-H1 blocks directly to the final output
103
+ final_output += line
104
+
105
+ if current_block: # Add the last H1 block
106
+ h1_blocks.append(current_block)
107
+ prov_found = False
108
+ # Process each identified H1 block
109
+ for block in h1_blocks:
110
+ potential_command = extract_command(block) # Extract potential object_action
111
+
112
+ if potential_command in commands:
113
+ # Process the block based on the object_action
114
+ if potential_command == "Provenance":
115
+ prov_found = True
116
+ result = process_provenance_command(file_path, block)
117
+ elif potential_command in ["Create Glossary", "Update Glossary"]:
118
+ result = process_glossary_upsert_command(client, block, directive)
119
+ elif potential_command in ["Create Category", "Update Category"]:
120
+ result = process_category_upsert_command(client, block, directive)
121
+ elif potential_command in ["Create Term", "Update Term"]:
122
+ result = process_term_upsert_command(client, block, directive)
123
+ elif potential_command in ["Create Personal Project", "Update Personal Project"]:
124
+ result = process_per_proj_upsert_command(client, block, directive)
125
+ else:
126
+ # If object_action is not recognized, copy the block as-is
127
+ result = None
128
+
129
+ if result:
130
+ if directive == "process":
131
+ updated = True
132
+ final_output += f"\n---\n{result}\n"
133
+ print(json.dumps(element_dictionary, indent=4))
134
+ elif directive == "process":
135
+ # Handle case with errors (skip this block but notify the user)
136
+ print(f"\n==>\tErrors found while processing command: \'{potential_command}\'\n"
137
+ f"\tPlease correct and try again. \n")
138
+ final_output += f"\n---\n{block}\n"
139
+ else:
140
+ # If no object_action is detected, add the block to the final output as-is
141
+ final_output += f"\n---\n{block}\n"
142
+
143
+
144
+ # Write the final_output to a new file if updated
145
+ try:
146
+ if updated:
147
+ path, filename = os.path.split(file_path) # Get both parts
148
+ new_filename = f"processed-{get_current_datetime_string()}-{filename}" # Create the new filename
149
+ new_file_path = os.path.join(EGERIA_ROOT_PATH, EGERIA_OUTBOX_PATH, new_filename) # Construct the new path
150
+ os.makedirs(os.path.dirname(new_file_path), exist_ok=True)
151
+
152
+ with open(new_file_path, 'w') as f2:
153
+ f2.write(final_output)
154
+ if not prov_found:
155
+ prov_output += f"\n# Provenance:\n{prov_output}\n"
156
+ f2.write(prov_output)
157
+ click.echo(f"\n==> Notebook written to {new_file_path}")
158
+ else:
159
+ click.echo("\nNo updates detected. New File not created.")
160
+
161
+ except (Exception):
162
+ console.print_exception(show_locals=True)
163
+
164
+
165
+ if __name__ == "__main__":
166
+ process_markdown_file()
@@ -0,0 +1,23 @@
1
+ """
2
+ SPDX-License-Identifier: Apache-2.0
3
+ Copyright Contributors to the ODPi Egeria project.
4
+ """
5
+ from pyegeria import (
6
+ INTEGRATION_GUIDS,
7
+ TEMPLATE_GUIDS,
8
+ default_time_out,
9
+ disable_ssl_warnings,
10
+ enable_ssl_check,
11
+ is_debug,
12
+ max_paging_size,
13
+ NO_ELEMENTS_FOUND,
14
+ NO_ASSETS_FOUND,
15
+ NO_SERVERS_FOUND,
16
+ NO_CATALOGS_FOUND,
17
+ NO_GLOSSARIES_FOUND,
18
+ NO_TERMS_FOUND,
19
+ NO_CATEGORIES_FOUND,
20
+ NO_ELEMENT_FOUND,
21
+ )
22
+
23
+
@@ -0,0 +1,122 @@
1
+ """
2
+ This is an ongoing experiment in parsing and playing with Freddie docs
3
+ """
4
+
5
+ import nbformat
6
+ import os
7
+ from rich import print
8
+ from rich.console import Console
9
+
10
+ from pyegeria.egeria_tech_client import EgeriaTech
11
+ from pyegeria.md_processing_utils import (extract_command, process_glossary_upsert_command, process_term_upsert_command,
12
+ get_current_datetime_string, process_per_proj_upsert_command, command_list,
13
+ )
14
+ import click
15
+
16
+ from pyegeria._exceptions import (
17
+ print_exception_response,
18
+ )
19
+
20
+ EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
21
+ EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
22
+ EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
23
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
24
+ EGERIA_VIEW_SERVER_URL = os.environ.get(
25
+ "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
26
+ )
27
+ EGERIA_INTEGRATION_DAEMON = os.environ.get("EGERIA_INTEGRATION_DAEMON", "integration-daemon")
28
+ EGERIA_INTEGRATION_DAEMON_URL = os.environ.get(
29
+ "EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"
30
+ )
31
+ EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
32
+ EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
33
+ EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
34
+ EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
35
+ EGERIA_WIDTH = os.environ.get("EGERIA_WIDTH", 220)
36
+ EGERIA_JUPYTER = os.environ.get("EGERIA_JUPYTER", False)
37
+ EGERIA_HOME_GLOSSARY_GUID = os.environ.get("EGERIA_HOME_GLOSSARY_GUID", None)
38
+ EGERIA_GLOSSARY_PATH = os.environ.get("EGERIA_GLOSSARY_PATH", None)
39
+ EGERIA_ROOT_PATH = os.environ.get("EGERIA_ROOT_PATH", "../../")
40
+ EGERIA_INBOX_PATH = os.environ.get("EGERIA_INBOX_PATH", "md_processing/dr_egeria_inbox")
41
+ EGERIA_OUTBOX_PATH = os.environ.get("EGERIA_OUTBOX_PATH", "md_processing/dr_egeria_outbox")
42
+
43
+ console = Console(width=int(EGERIA_WIDTH))
44
+
45
+
46
+
47
+ @click.command("process-jupyter")
48
+ @click.option("--file-path", help="File path to notebook",
49
+ default="glossary_creation_experiment.ipynb")
50
+ @click.option("--directive", default="display-only", help="How to process the file")
51
+ @click.option("--server", default=EGERIA_VIEW_SERVER, help="Egeria view server to use.")
52
+ @click.option(
53
+ "--url", default=EGERIA_VIEW_SERVER_URL, help="URL of Egeria platform to connect to"
54
+ )
55
+ @click.option("--userid", default=EGERIA_USER, help="Egeria user")
56
+ @click.option("--user_pass", default=EGERIA_USER_PASSWORD, help="Egeria user password")
57
+ def process_jupyter_notebook(
58
+ file_path: str,
59
+ directive: str,
60
+ server: str,
61
+ url: str,
62
+ userid: str,
63
+ user_pass: str,
64
+ ):
65
+ client = EgeriaTech(server, url, user_id=userid)
66
+ token = client.create_egeria_bearer_token(userid, user_pass)
67
+
68
+ element_dictionary = {}
69
+
70
+ try:
71
+ updated = False
72
+ full_file_path = os.path.join(EGERIA_ROOT_PATH, EGERIA_INBOX_PATH, file_path)
73
+ click.echo(f"Processing notebook: {full_file_path}")
74
+ with open(full_file_path, 'r') as f:
75
+ nb = nbformat.read(f, as_version=4)
76
+ for cell in nb.cells:
77
+ if cell.cell_type == 'markdown':
78
+ if cell.source.strip().startswith('#'):
79
+ potential_command = extract_command(cell.source)
80
+ if potential_command in command_list:
81
+ if potential_command in ["Create Glossary", "Update Glossary"]:
82
+ result = process_glossary_upsert_command(client, cell.source, directive)
83
+
84
+ elif potential_command in ["Create Term", "Update Term"]:
85
+ result = process_term_upsert_command(client, cell.source, directive)
86
+ elif potential_command in ["Create Personal Project", "Update Personal Project"]:
87
+ result = process_per_proj_upsert_command(client, cell.source, directive)
88
+ else:
89
+ # If object_action is not recognized, copy the block as-is
90
+ result = None
91
+
92
+ if result:
93
+ if directive == "process":
94
+ updated = True
95
+ cell.source = result
96
+ # print(json.dumps(element_dictionary, indent=4))
97
+ elif directive == "process":
98
+ # Handle case with errors (skip this block but notify the user)
99
+ print(f"\n==>\tErrors found while processing command: \'{potential_command}\'\n"
100
+ f"\tPlease correct and try again. \n")
101
+
102
+
103
+ if updated:
104
+ path, filename = os.path.split(file_path) # Get both parts
105
+ new_filename = f"processed-{get_current_datetime_string()}-{filename}" # Create the new filename
106
+ new_file_path = os.path.join(EGERIA_ROOT_PATH, EGERIA_OUTBOX_PATH, new_filename) # Construct the new path
107
+ os.makedirs(os.path.dirname(new_file_path), exist_ok=True)
108
+
109
+
110
+ with open(new_file_path, 'w') as f2:
111
+ nbformat.write(nb, f2)
112
+ click.echo(f"\n==>Notebook written to {new_file_path}")
113
+ else:
114
+ click.echo("\nNo updates detected. New file not created.")
115
+
116
+ except Exception as e:
117
+ print_exception_response(e)
118
+ return
119
+
120
+
121
+ if __name__ == "__main__":
122
+ process_jupyter_notebook()
@@ -0,0 +1,247 @@
1
+ """
2
+ This is an ongoing experiment in parsing and playing with Freddie docs
3
+ """
4
+ import os
5
+ from datetime import datetime
6
+
7
+ import click
8
+ from rich import print
9
+ from rich.console import Console
10
+
11
+ from md_processing import (extract_command, process_glossary_upsert_command, process_term_upsert_command,
12
+ process_category_upsert_command, process_provenance_command, get_current_datetime_string,
13
+ process_per_proj_upsert_command, command_list, process_blueprint_upsert_command,
14
+ process_solution_component_upsert_command, process_term_list_command,
15
+ process_category_list_command, process_glossary_list_command, process_term_history_command,
16
+ process_glossary_structure_command, process_term_revision_history_command,
17
+ process_create_term_term_relationship_command, process_term_details_command,
18
+ )
19
+ from md_processing.md_commands.data_designer_commands import (process_data_spec_upsert_command,
20
+ process_data_dict_upsert_command,
21
+ process_data_dict_list_command,
22
+ process_data_field_upsert_command,
23
+ process_data_structure_upsert_command)
24
+
25
+ from pyegeria import EgeriaTech
26
+
27
+ EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
28
+ EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
29
+ EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
30
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
31
+ EGERIA_VIEW_SERVER_URL = os.environ.get("EGERIA_VIEW_SERVER_URL", "https://localhost:9443")
32
+ EGERIA_INTEGRATION_DAEMON = os.environ.get("EGERIA_INTEGRATION_DAEMON", "integration-daemon")
33
+ EGERIA_INTEGRATION_DAEMON_URL = os.environ.get("EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443")
34
+ EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
35
+ EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
36
+ EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
37
+ EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
38
+ EGERIA_WIDTH = os.environ.get("EGERIA_WIDTH", 220)
39
+ EGERIA_JUPYTER = os.environ.get("EGERIA_JUPYTER", False)
40
+ EGERIA_HOME_GLOSSARY_GUID = os.environ.get("EGERIA_HOME_GLOSSARY_GUID", None)
41
+ EGERIA_GLOSSARY_PATH = os.environ.get("EGERIA_GLOSSARY_PATH", None)
42
+ EGERIA_ROOT_PATH = os.environ.get("EGERIA_ROOT_PATH", "../../")
43
+ EGERIA_INBOX_PATH = os.environ.get("EGERIA_INBOX_PATH", "md_processing/dr_egeria_inbox")
44
+ EGERIA_OUTBOX_PATH = os.environ.get("EGERIA_OUTBOX_PATH", "md_processing/dr_egeria_outbox")
45
+
46
+
47
+ @click.command("process_markdown_file", help="Process a markdown file and return the output as a string.")
48
+ @click.option("--file-path", help="File path to markdown file", default="glossary_test1.md", required=True,
49
+ prompt=False)
50
+ @click.option("--directive", default="display", help="How to process the file",
51
+ type=click.Choice(["display", "validate", "process"], case_sensitive=False), prompt=False, )
52
+ @click.option("--server", default=EGERIA_VIEW_SERVER, help="Egeria view server to use.")
53
+ @click.option("--url", default=EGERIA_VIEW_SERVER_URL, help="URL of Egeria platform to connect to")
54
+ @click.option("--userid", default=EGERIA_USER, help="Egeria user")
55
+ @click.option("--user_pass", default=EGERIA_USER_PASSWORD, help="Egeria user password")
56
+ def process_markdown_file(file_path: str, directive: str, server: str, url: str, userid: str, user_pass: str, ) -> None:
57
+ """
58
+ Process a markdown file by parsing and executing Dr. Egeria md_commands. Write output to a new file.
59
+ """
60
+ cmd_list = command_list
61
+ console = Console(width=int(EGERIA_WIDTH))
62
+ client = EgeriaTech(server, url, user_id=userid)
63
+ token = client.create_egeria_bearer_token(userid, user_pass)
64
+
65
+ updated = False
66
+ full_file_path = os.path.join(EGERIA_ROOT_PATH, EGERIA_INBOX_PATH, file_path)
67
+ print(f"Processing Markdown File: {full_file_path}")
68
+ try:
69
+ with open(full_file_path, 'r') as f:
70
+ lines = f.readlines()
71
+ except FileNotFoundError:
72
+ print(f"Error: File not found at path: {full_file_path}")
73
+ return {} # Return empty dict if file not found
74
+
75
+ final_output = []
76
+ prov_found = False
77
+ prov_output = (f"\n# Provenance\n\n* Results from processing file {file_path} on "
78
+ f"{datetime.now().strftime("%Y-%m-%d %H:%M")}\n")
79
+ h1_blocks = []
80
+ current_block = ""
81
+ in_h1_block = False
82
+
83
+ # Helper function to process the current block
84
+ def process_current_block(current_block):
85
+ nonlocal updated, final_output, prov_found, prov_output, h1_blocks, in_h1_block
86
+
87
+ if not current_block:
88
+ return # No block to process
89
+
90
+ potential_command = extract_command(current_block) # Extract object_action
91
+ if potential_command in cmd_list:
92
+ # Process the block based on the object_action
93
+ if potential_command == "Provenance":
94
+ result = process_provenance_command(file_path, current_block)
95
+ prov_found = True
96
+
97
+ elif potential_command in ["Create Glossary", "Update Glossary"]:
98
+ result = process_glossary_upsert_command(client, current_block, directive)
99
+ elif potential_command in ["Create Category", "Update Category"]:
100
+ result = process_category_upsert_command(client, current_block, directive)
101
+ elif potential_command in ["Create Term", "Update Term"]:
102
+ result = process_term_upsert_command(client, current_block, directive)
103
+ elif potential_command in ["Create Term-Term Relationship", "Update Term-Term Relationship"]:
104
+ result = process_create_term_term_relationship_command(client, current_block, directive)
105
+ elif potential_command in ["List Term History", "Term History"]:
106
+ result = process_term_history_command(client, current_block, directive)
107
+ elif potential_command in ["List Term Details"]:
108
+ result = process_term_details_command(client, current_block, directive)
109
+ elif potential_command in ["List Term Update History", "List Term Revision History"]:
110
+ result = process_term_revision_history_command(client, current_block, directive)
111
+ elif potential_command in ["List Terms", "List Glossary Terms"]:
112
+ result = process_term_list_command(client, current_block, directive)
113
+ elif potential_command in ["List Categories", "List Glossary Categories"]:
114
+ result = process_category_list_command(client, current_block, directive)
115
+ elif potential_command in ["List Glossary Structure"]:
116
+ result = process_glossary_structure_command(client, current_block, directive)
117
+ elif potential_command in ["List Glossaries"]:
118
+ result = process_glossary_list_command(client, current_block, directive)
119
+ elif potential_command in ["Create Personal Project", "Update Personal Project"]:
120
+ result = process_per_proj_upsert_command(client, current_block, directive)
121
+ elif potential_command in ["Create Blueprint", "Update Blueprint", "Create Solution Blueprint",
122
+ "Update Solution Blueprint"]:
123
+ result = process_blueprint_upsert_command(client, current_block, directive)
124
+ elif potential_command in ["Create Solution Component", "Update Solution Component"]:
125
+ result = process_solution_component_upsert_command(client, current_block, directive)
126
+ elif potential_command in ["Create Data Spec", "Create Data Specification", "Update Data Spec",
127
+ "Update Data Specification"]:
128
+ result = process_data_spec_upsert_command(client, current_block, directive)
129
+ elif potential_command in ["Create Data Dict", "Create Data Dictionary", "Update Data Spec",
130
+ "Update Data Dictionary"]:
131
+ result = process_data_dict_upsert_command(client, current_block, directive)
132
+ elif potential_command in ["Create Data Field", "Update Data Field"]:
133
+ result = process_data_field_upsert_command(client, current_block, directive)
134
+ elif potential_command in ["Create Data Structure", "Update Data Structure"]:
135
+ result = process_data_structure_upsert_command(client, current_block, directive)
136
+ elif potential_command in ["View Data Dictionaries", "View Data Dictionary"]:
137
+ result = process_data_dict_list_command(client, current_block, directive)
138
+
139
+
140
+ else:
141
+ # If object_action is not recognized, keep the block as-is
142
+ result = None
143
+ # print(json.dumps(dr_egeria_state.get_element_dictionary(), indent=4))
144
+ if result:
145
+ if directive == "process":
146
+ updated = True
147
+ final_output.append(result) # print(json.dumps(dr_egeria_state.get_element_dictionary(), indent=4))
148
+ elif directive == "validate":
149
+ pass # print(json.dumps(dr_egeria_state.get_element_dictionary(), indent=4))
150
+ elif directive == "process":
151
+ # Handle errors (skip this block but notify the user)
152
+ print(f"\n==>\tErrors found while processing command: \'{potential_command}\'\n"
153
+ f"\tPlease correct and try again. \n")
154
+ final_output.append(current_block)
155
+ final_output.append('\n___\n')
156
+ else:
157
+ # If there is no object_action, append the block as-is
158
+ final_output.append(current_block)
159
+
160
+ # Main parsing loop
161
+ for line in lines:
162
+ line = line.strip() # Remove leading/trailing whitespace
163
+
164
+ # Handle a new H1 block (starting with `# `)
165
+ if line.startswith("# "):
166
+ if in_h1_block:
167
+ # Process the current block before starting a new one
168
+ process_current_block(current_block)
169
+
170
+ # Start a new H1 block
171
+ current_block = line
172
+ in_h1_block = True
173
+
174
+ # Handle the end of a block (line starts with `---`)
175
+ elif line.startswith("___"):
176
+ if in_h1_block:
177
+ # Process the current block when it ends with `---`
178
+ current_block += f"\n{line}"
179
+ process_current_block(current_block)
180
+ current_block = "" # Clear the block
181
+ in_h1_block = False
182
+
183
+ # Add lines to the current H1 block
184
+ elif in_h1_block:
185
+ current_block += f"\n{line}"
186
+
187
+ # Append non-H1 content directly to the output
188
+ else:
189
+ final_output.append(line)
190
+
191
+ # Ensure the final H1 block is processed if the file doesn't end with `---`
192
+ if in_h1_block:
193
+ process_current_block(current_block)
194
+
195
+ # Join the final output list into a single string
196
+ final_output = "\n".join(final_output)
197
+
198
+ try:
199
+ if updated:
200
+ path, filename = os.path.split(file_path) # Get both parts
201
+ new_filename = f"processed-{get_current_datetime_string()}-{filename}" # Create the new filename
202
+ new_file_path = os.path.join(EGERIA_ROOT_PATH, EGERIA_OUTBOX_PATH, new_filename) # Construct the new path
203
+ os.makedirs(os.path.dirname(new_file_path), exist_ok=True)
204
+
205
+ with open(new_file_path, 'w') as f2:
206
+ f2.write(final_output)
207
+ if not prov_found:
208
+ f2.write(prov_output)
209
+ click.echo(f"\n==> Output written to {new_file_path}")
210
+ else:
211
+ if directive != 'display':
212
+ click.echo("\nNo updates detected. New File not created.")
213
+
214
+ except (Exception):
215
+ console.print_exception(show_locals=True)
216
+
217
+
218
+ # def main():
219
+ # parser = argparse.ArgumentParser()
220
+ # parser.add_argument("--server", help="Name of the server to display status for")
221
+ # parser.add_argument("--url", help="URL Platform to connect to")
222
+ # parser.add_argument("--userid", help="User Id")
223
+ # parser.add_argument("--password", help="User Password")
224
+ # parser.add_argument("--time_out", help="Time Out")
225
+ #
226
+ # args = parser.parse_args()
227
+ #
228
+ # server = args.server if args.server is not None else EGERIA_VIEW_SERVER
229
+ # url = args.url if args.url is not None else EGERIA_PLATFORM_URL
230
+ # userid = args.userid if args.userid is not None else EGERIA_USER
231
+ # user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
232
+ # time_out = args.time_out if args.time_out is not None else 60
233
+ # try:
234
+ # file_path = Prompt.ask("Markdown File name to process:", default="")
235
+ # directive = Prompt.ask("Processing Directive:", choices=[ "display", "validate", "process"],
236
+ # default="validate")
237
+ #
238
+ # process_markdown_file(file_path, directive, server, url, userid, user_pass)
239
+ # except KeyboardInterrupt:
240
+ # pass
241
+ #
242
+ #
243
+ # if __name__ == "__main__":
244
+ # main()
245
+
246
+ if __name__ == "__main__":
247
+ process_markdown_file()
@@ -21,12 +21,11 @@ from rich.table import Table
21
21
  from rich.text import Text
22
22
  from rich_pixels import Pixels
23
23
 
24
-
25
24
  from pyegeria import (
25
+ EgeriaTech,
26
26
  InvalidParameterException,
27
27
  PropertyServerException,
28
28
  UserNotAuthorizedException,
29
- EgeriaTech,
30
29
  print_exception_response,
31
30
  )
32
31
 
@@ -35,11 +34,11 @@ disable_ssl_warnings = True
35
34
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
36
35
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
37
36
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
38
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
37
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
39
38
  EGERIA_VIEW_SERVER_URL = os.environ.get(
40
39
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
41
40
  )
42
- EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
41
+ EGERIA_INTEGRATION_DAEMON = os.environ.get("EGERIA_INTEGRATION_DAEMON", "integration-daemon")
43
42
  EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
44
43
  EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
45
44
  EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
@@ -9,28 +9,28 @@ import argparse
9
9
  import os
10
10
  import sys
11
11
 
12
+ from rich import print
12
13
  from rich.console import Console
13
14
  from rich.markdown import Markdown
14
15
  from rich.panel import Panel
15
16
  from rich.prompt import Prompt
16
17
  from rich.tree import Tree
17
- from rich import print
18
18
 
19
19
  from pyegeria import (
20
+ AssetCatalog,
20
21
  InvalidParameterException,
21
22
  PropertyServerException,
22
23
  UserNotAuthorizedException,
23
- AssetCatalog,
24
24
  )
25
25
 
26
26
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
27
27
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
28
28
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
29
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
29
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
30
30
  EGERIA_VIEW_SERVER_URL = os.environ.get(
31
31
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
32
32
  )
33
- EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
33
+ EGERIA_INTEGRATION_DAEMON = os.environ.get("EGERIA_INTEGRATION_DAEMON", "integration-daemon")
34
34
  EGERIA_INTEGRATION_DAEMON_URL = os.environ.get(
35
35
  "EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"
36
36
  )
@@ -9,6 +9,7 @@ A simple viewer for collections - provide the root and we display the hierarchy
9
9
 
10
10
  import argparse
11
11
  import os
12
+
12
13
  from rich import print
13
14
  from rich.panel import Panel
14
15
  from rich.prompt import Prompt
@@ -17,23 +18,21 @@ from rich.tree import Tree
17
18
 
18
19
  from pyegeria import (
19
20
  CollectionManager,
20
- UserNotAuthorizedException,
21
- PropertyServerException,
22
21
  InvalidParameterException,
23
- )
24
- from pyegeria._exceptions import (
25
- print_exception_response,
26
- )
22
+ PropertyServerException,
23
+ UserNotAuthorizedException, NO_ELEMENTS_FOUND,
24
+ )
25
+ from pyegeria._exceptions import print_exception_response
27
26
 
28
27
  disable_ssl_warnings = True
29
28
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
30
29
  EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
31
30
  EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
32
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
31
+ EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
33
32
  EGERIA_VIEW_SERVER_URL = os.environ.get(
34
33
  "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
35
34
  )
36
- EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
35
+ EGERIA_INTEGRATION_DAEMON = os.environ.get("EGERIA_INTEGRATION_DAEMON", "integration-daemon")
37
36
  EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
38
37
  EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
39
38
  EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
@@ -112,7 +111,7 @@ def collection_viewer(
112
111
  PropertyServerException,
113
112
  UserNotAuthorizedException,
114
113
  ) as e:
115
- if e.exception_error_message_parameters[1] == "No elements found":
114
+ if e.exception_error_message_parameters[1] == NO_ELEMENTS_FOUND:
116
115
  print("The collection was not found.")
117
116
  else:
118
117
  print_exception_response(e)