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.
- commands/cat/.DS_Store +0 -0
- commands/cat/Dr-Egeria_md-orig.py +166 -0
- commands/cat/__init__.py +23 -0
- commands/cat/dr_egeria_jupyter.py +122 -0
- commands/cat/dr_egeria_md.py +247 -0
- {pyegeria/commands → commands}/cat/exp_list_glossaries.py +3 -4
- {pyegeria/commands → commands}/cat/get_asset_graph.py +4 -4
- {pyegeria/commands → commands}/cat/get_collection.py +8 -9
- {pyegeria/commands → commands}/cat/get_project_dependencies.py +6 -8
- {pyegeria/commands → commands}/cat/get_project_structure.py +6 -8
- {pyegeria/commands → commands}/cat/get_tech_type_elements.py +13 -15
- {pyegeria/commands → commands}/cat/glossary_actions.py +184 -34
- {pyegeria/commands → commands}/cat/list_assets.py +9 -6
- commands/cat/list_categories.py +192 -0
- {pyegeria/commands → commands}/cat/list_cert_types.py +6 -6
- {pyegeria/commands → commands}/cat/list_collections.py +62 -19
- commands/cat/list_data_structures.py +223 -0
- {pyegeria/commands → commands}/cat/list_deployed_catalogs.py +9 -8
- {pyegeria/commands → commands}/cat/list_deployed_database_schemas.py +10 -9
- {pyegeria/commands → commands}/cat/list_deployed_databases.py +9 -8
- pyegeria/commands/cat/list_servers_deployed_imp.py → commands/cat/list_deployed_servers.py +3 -3
- {pyegeria/commands → commands}/cat/list_glossaries.py +57 -15
- {pyegeria/commands → commands}/cat/list_projects.py +5 -5
- {pyegeria/commands → commands}/cat/list_tech_type_elements.py +3 -3
- {pyegeria/commands → commands}/cat/list_tech_types.py +4 -4
- {pyegeria/commands → commands}/cat/list_terms.py +93 -45
- {pyegeria/commands → commands}/cat/list_todos.py +3 -3
- {pyegeria/commands → commands}/cat/list_user_ids.py +9 -8
- {pyegeria/commands → commands}/cli/__init__.py +1 -1
- {pyegeria/commands → commands}/cli/egeria.py +513 -250
- {pyegeria/commands → commands}/cli/egeria_cat.py +128 -51
- {pyegeria/commands → commands}/cli/egeria_login_tui.py +15 -17
- {pyegeria/commands → commands}/cli/egeria_my.py +22 -15
- {pyegeria/commands → commands}/cli/egeria_ops.py +54 -55
- {pyegeria/commands → commands}/cli/egeria_tech.py +364 -152
- {pyegeria/commands → commands}/cli/ops_config.py +18 -11
- commands/my/__init__.py +22 -0
- {pyegeria/commands → commands}/my/list_my_profile.py +6 -8
- {pyegeria/commands → commands}/my/list_my_roles.py +4 -4
- {pyegeria/commands → commands}/my/monitor_my_todos.py +7 -7
- {pyegeria/commands → commands}/my/monitor_open_todos.py +7 -7
- {pyegeria/commands → commands}/my/todo_actions.py +3 -2
- commands/ops/__init__.py +23 -0
- {pyegeria/commands → commands}/ops/gov_server_actions.py +5 -4
- {pyegeria/commands → commands}/ops/list_archives.py +7 -6
- {pyegeria/commands → commands}/ops/list_catalog_targets.py +4 -4
- {pyegeria/commands → commands}/ops/load_archive.py +4 -2
- {pyegeria/commands → commands}/ops/monitor_asset_events.py +8 -7
- {pyegeria/commands → commands}/ops/monitor_engine_activity.py +5 -5
- {pyegeria/commands → commands}/ops/monitor_engine_activity_c.py +3 -3
- {pyegeria/commands → commands}/ops/monitor_gov_eng_status.py +3 -2
- {pyegeria/commands → commands}/ops/monitor_integ_daemon_status.py +23 -15
- {pyegeria/commands → commands}/ops/monitor_platform_status.py +5 -4
- {pyegeria/commands → commands}/ops/monitor_server_startup.py +7 -7
- {pyegeria/commands → commands}/ops/monitor_server_status.py +16 -11
- {pyegeria/commands → commands}/ops/orig_monitor_server_list.py +2 -2
- {pyegeria/commands → commands}/ops/orig_monitor_server_status.py +3 -3
- {pyegeria/commands → commands}/ops/refresh_integration_daemon.py +4 -4
- {pyegeria/commands → commands}/ops/restart_integration_daemon.py +3 -3
- {pyegeria/commands → commands}/ops/table_integ_daemon_status.py +3 -3
- commands/tech/__init__.py +22 -0
- commands/tech/generic_actions.py +74 -0
- {pyegeria/commands → commands}/tech/get_element_info.py +5 -7
- {pyegeria/commands → commands}/tech/get_guid_info.py +4 -5
- {pyegeria/commands → commands}/tech/get_tech_details.py +8 -9
- {pyegeria/commands → commands}/tech/get_tech_type_template.py +4 -4
- pyegeria/commands/tech/list_elements.py → commands/tech/list_all_om_type_elements.py +11 -10
- pyegeria/commands/tech/list_elements_x.py → commands/tech/list_all_om_type_elements_x.py +11 -12
- pyegeria/commands/tech/list_related_elements.py → commands/tech/list_all_related_elements.py +11 -9
- {pyegeria/commands → commands}/tech/list_anchored_elements.py +16 -16
- {pyegeria/commands → commands}/tech/list_asset_types.py +4 -4
- commands/tech/list_elements_by_classification_by_property_value.py +200 -0
- commands/tech/list_elements_by_property_value.py +180 -0
- commands/tech/list_elements_by_property_value_x.py +201 -0
- {pyegeria/commands → commands}/tech/list_elements_for_classification.py +11 -9
- {pyegeria/commands → commands}/tech/list_gov_action_processes.py +5 -6
- commands/tech/list_information_supply_chains.py +167 -0
- {pyegeria/commands → commands}/tech/list_registered_services.py +3 -3
- commands/tech/list_related_elements_with_prop_value.py +221 -0
- {pyegeria/commands → commands}/tech/list_related_specification.py +3 -3
- {pyegeria/commands → commands}/tech/list_relationship_types.py +4 -5
- {pyegeria/commands → commands}/tech/list_relationships.py +3 -3
- commands/tech/list_solution_blueprints.py +181 -0
- commands/tech/list_solution_components.py +185 -0
- commands/tech/list_solution_roles.py +184 -0
- {pyegeria/commands → commands}/tech/list_tech_templates.py +3 -3
- {pyegeria/commands → commands}/tech/list_valid_metadata_values.py +5 -6
- {pyegeria/commands → commands}/tech/table_tech_templates.py +16 -13
- {pyegeria/commands → commands}/tech/x_list_related_elements.py +6 -4
- md_processing/__init__.py +49 -0
- md_processing/data/commands.json +3252 -0
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro.md +254 -0
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro_more_terms.md +696 -0
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part1.md +254 -0
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part2.md +298 -0
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part3.md +608 -0
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part4.md +94 -0
- md_processing/dr_egeria_inbox/archive/freddie_intro.md +284 -0
- md_processing/dr_egeria_inbox/archive/freddie_intro_orig.md +275 -0
- md_processing/dr_egeria_inbox/archive/test-term.md +110 -0
- md_processing/dr_egeria_inbox/cat_test.md +100 -0
- md_processing/dr_egeria_inbox/data_field.md +54 -0
- md_processing/dr_egeria_inbox/data_spec.md +77 -0
- md_processing/dr_egeria_inbox/data_spec_test.md +2406 -0
- md_processing/dr_egeria_inbox/data_test.md +86 -0
- md_processing/dr_egeria_inbox/dr_egeria_intro_categories.md +168 -0
- md_processing/dr_egeria_inbox/dr_egeria_intro_part1.md +280 -0
- md_processing/dr_egeria_inbox/dr_egeria_intro_part2.md +313 -0
- md_processing/dr_egeria_inbox/dr_egeria_intro_part3.md +1073 -0
- md_processing/dr_egeria_inbox/dr_egeria_isc1.md +44 -0
- md_processing/dr_egeria_inbox/glossary_creation_experiment.ipynb +341 -0
- md_processing/dr_egeria_inbox/glossary_test1.md +324 -0
- md_processing/dr_egeria_inbox/rel.md +8 -0
- md_processing/dr_egeria_inbox/sb.md +119 -0
- md_processing/dr_egeria_inbox/search_test.md +39 -0
- md_processing/dr_egeria_inbox/solution-components.md +154 -0
- md_processing/dr_egeria_inbox/solution_blueprints.md +118 -0
- md_processing/dr_egeria_inbox/synonym_test.md +42 -0
- md_processing/dr_egeria_inbox/t2.md +268 -0
- md_processing/dr_egeria_outbox/processed-2025-05-15 19:52-data_test.md +94 -0
- md_processing/dr_egeria_outbox/processed-2025-05-16 07:39-data_test.md +88 -0
- md_processing/dr_egeria_outbox/processed-2025-05-17 16:01-data_field.md +56 -0
- md_processing/dr_egeria_outbox/processed-2025-05-18 15:51-data_test.md +103 -0
- md_processing/dr_egeria_outbox/processed-2025-05-18 16:47-data_test.md +94 -0
- md_processing/dr_egeria_outbox/processed-2025-05-19 07:14-data_test.md +96 -0
- md_processing/dr_egeria_outbox/processed-2025-05-19 07:20-data_test.md +100 -0
- md_processing/dr_egeria_outbox/processed-2025-05-19 07:22-data_test.md +88 -0
- md_processing/dr_egeria_outbox/processed-2025-05-19 09:26-data_test.md +91 -0
- md_processing/dr_egeria_outbox/processed-2025-05-19 10:27-data_test.md +91 -0
- md_processing/dr_egeria_outbox/processed-2025-05-19 14:04-data_test.md +91 -0
- md_processing/md_commands/__init__.py +3 -0
- md_processing/md_commands/blueprint_commands.py +303 -0
- md_processing/md_commands/data_designer_commands.py +1182 -0
- md_processing/md_commands/glossary_commands.py +1144 -0
- md_processing/md_commands/project_commands.py +163 -0
- md_processing/md_processing_utils/__init__.py +4 -0
- md_processing/md_processing_utils/common_md_proc_utils.py +724 -0
- md_processing/md_processing_utils/common_md_utils.py +172 -0
- md_processing/md_processing_utils/extraction_utils.py +486 -0
- md_processing/md_processing_utils/md_processing_constants.py +128 -0
- md_processing/md_processing_utils/message_constants.py +19 -0
- pyegeria/.DS_Store +0 -0
- pyegeria/__init__.py +231 -146
- pyegeria/_client.py +36 -13
- pyegeria/_exceptions.py +55 -46
- pyegeria/_globals.py +11 -1
- pyegeria/_validators.py +5 -5
- pyegeria/asset_catalog_omvs.py +78 -21
- pyegeria/automated_curation_omvs.py +11 -6
- pyegeria/classification_manager_omvs.py +41 -37
- pyegeria/collection_manager_omvs.py +722 -705
- pyegeria/core_omag_server_config.py +1 -1
- pyegeria/create_tech_guid_lists.py +13 -13
- pyegeria/data_designer_omvs.py +5104 -0
- pyegeria/dr.egeria spec.md +9 -0
- pyegeria/egeria_cat_client.py +5 -8
- pyegeria/egeria_client.py +39 -24
- pyegeria/egeria_config_client.py +2 -1
- pyegeria/egeria_my_client.py +4 -4
- pyegeria/egeria_tech_client.py +40 -18
- pyegeria/feedback_manager_omvs.py +1 -1
- pyegeria/full_omag_server_config.py +5 -3
- pyegeria/glossary_browser_omvs.py +1915 -694
- pyegeria/glossary_manager_omvs.py +685 -1842
- pyegeria/m_test.py +118 -0
- pyegeria/md_processing_helpers.py +58 -0
- pyegeria/md_processing_utils.py +2147 -0
- pyegeria/md_processing_utils_orig.py +1103 -0
- pyegeria/mermaid_utilities.py +1194 -14
- pyegeria/metadata_explorer_omvs.py +5 -50
- pyegeria/my_profile_omvs.py +3 -2
- pyegeria/output_formatter.py +389 -0
- pyegeria/platform_services.py +5 -5
- pyegeria/project_manager_omvs.py +97 -18
- pyegeria/runtime_manager_omvs.py +8 -10
- pyegeria/server_operations.py +2 -2
- pyegeria/solution_architect_omvs.py +2156 -0
- pyegeria/template_manager_omvs.py +13 -13
- pyegeria/utils.py +3 -1
- pyegeria/valid_metadata_omvs.py +5 -4
- pyegeria/x_action_author_omvs.py +3 -6
- {pyegeria-5.2.1.dist-info → pyegeria-5.3.dist-info}/METADATA +9 -8
- pyegeria-5.3.dist-info/RECORD +196 -0
- {pyegeria-5.2.1.dist-info → pyegeria-5.3.dist-info}/WHEEL +1 -1
- pyegeria-5.3.dist-info/entry_points.txt +99 -0
- pyegeria/commands/README.md +0 -47
- pyegeria/commands/__init__.py +0 -22
- pyegeria/commands/cat/__init__.py +0 -1
- pyegeria/commands/doc/README.md +0 -145
- pyegeria/commands/doc/Visual Command Reference/README.md +0 -511
- pyegeria/commands/doc/Visual Command Reference/cat/show/assets/asset-graph 2024-11-20 at 15.56.42.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/assets/assets-in-domain 2024-11-20 at 15.49.55@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/assets/elements-of-type 2024-11-20 at 16.01.35.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/assets/tech-type-elements 2024-11-20 at 16.05.05.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-data-catalogs 2024-12-17 at 15.43.27@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-data-catalogs-2024-11-20 at 16.17.43@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-schemas 2024-11-25 at 20.14.50@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-schemas 2024-12-17 at 15.48.38@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-servers 2024-11-25 at 20.21.25@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-servers 2024-12-17 at 15.52.16@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed_databases 2024-12-16 at 16.40.31@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/glossary/list-glossaries 2024-11-25 at 20.30.02.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/glossary/list-terms 2024-11-25 at 20.32.11.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/asset-types 2024-11-25 at 20.34.19@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/certification-types 2024-11-25 at 20.37.07.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/collection-graph 2024-12-12 at 11.33.18@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-collections 2024-12-10 at 14.25.51@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-todos 2024-12-12 at 11.46.30@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-user-ids 2024-12-12 at 11.51.09@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/tech-types 2024-12-12 at 11.37.20@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/projects/project_dependencies 2024-12-14 at 16.24.39@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/projects/project_structure 2024-12-14 at 16.21.35@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/projects/projects 2024-12-14 at 16.18.10@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/hey_egeria tui 2024-12-16 at 16.58.22@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/my/show/my_profile 2024-12-14 at 16.29.27@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/my/show/my_roles 2024-12-14 at 16.32.10@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/my/show/my_todos 2024-12-15 at 16.24.13@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/my/show/open_todos 2024-12-14 at 16.36.12@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/engines/list_engine_activity compressed 2024-12-15 at 16.48.48@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_activity 2024-12-15 at 16.32.55@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_activity compressed 2024-12-15 at 16.38.29@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_status 2024-12-15 at 16.51.26.jpeg +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/integrations/monitor_integration_daemon_status 2024-12-15 at 16.57.12@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/integrations/monitor_integration_targets 2024-12-15 at 17.02.19@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/platforms/monitor_platform_status 2024-12-15 at 19.53.18@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_server_status 2024-12-15 at 19.59.39@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_server_status full 2024-12-15 at 20.01.57@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_startup_servers 2024-12-15 at 19.56.07@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/get_anchored_elements 2024-12-15 at 21.25.41@2x.png +0 -0
- 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
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/info_for_guid 2024-12-16 at 11.35.29@2x.png +0 -0
- 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
- 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
- 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
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/related_elements 2024-12-16 at 14.55.01@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/show_related_specifications 2024-12-16 at 15.04.55@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/asset_types 2024-12-16 at 15.10.16@2x.png +0 -0
- 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
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/governance_action_processes 2024-12-16 at 15.13.01@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/registered_services 2024-12-16 at 16.44.54@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/relationship_types 2024-12-16 at 16.20.34@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/relationship_types 2024-12-19 at 10.51.54@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/valid_metadata_values 2024-12-16 at 15.31.56@2x.png +0 -0
- 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
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/list_technology_types 2024-12-16 at 15.39.20@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/tech_type_details 2024-12-16 at 15.37.21@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/tech_type_templates 2024-12-16 at 16.11.48@2x.png +0 -0
- pyegeria/commands/doc/glossary/basic-glossary-tui.md +0 -109
- pyegeria/commands/doc/glossary/images/delete-glossary-step1 2024-11-06 at 15.47.23@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/delete-glossary-step2 2024-11-06 at 15.51.29@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/delete-glossary-step3 2024-11-06 at 15.53.19@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/delete-glossary-step4 2024-11-06 at 15.55.11@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/out-create-glossary example 2024-11-05 at 20.38.04@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/out-create-term 2024-11-06 at 20.48.29.png +0 -0
- pyegeria/commands/doc/glossary/images/out-delete-term 2024-11-07 at 03.57.25.png +0 -0
- pyegeria/commands/doc/glossary/images/out-display-terms-for-glossary-test 2024-11-06 at 20.51.28.png +0 -0
- pyegeria/commands/doc/glossary/images/out-export-example 2024-11-07 at 09.54.57.png +0 -0
- pyegeria/commands/doc/glossary/images/out-exported-terms 2024-11-06 at 21.06.32.png +0 -0
- pyegeria/commands/doc/glossary/images/out-glossary-list example 2024-11-05 at 20.41.02@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/out-import-terms 2024-11-07 at 08.15.18.png +0 -0
- pyegeria/commands/doc/glossary/images/out-list-all-terms 2024-11-06 at 16.22.20@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/out-list-terms-for-example 2024-11-06 at 16.40.12.png +0 -0
- pyegeria/commands/doc/glossary/images/out-list-terms-second 2024-11-06 at 16.45.13.png +0 -0
- pyegeria/commands/doc/glossary/images/out-pipx install pyegeria 2024-11-10 at 18.12.21.png +0 -0
- pyegeria/commands/doc/glossary/images/out-server-status-full 2024-11-10 at 18.25.14.png +0 -0
- pyegeria/commands/doc/glossary/images/out-servers-status 2024-11-10 at 18.15.42.png +0 -0
- pyegeria/commands/doc/glossary/images/out-upsert-import 2024-11-07 at 19.37.00.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-2024-11-10 at 18.26.29.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-create-glossary example 2024-11-05 at 20.34.24@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-create-term 2024-11-06 at 20.46.35.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-delete-term 2024-11-07 at 03.51.57.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-display-terms-for-example 2024-11-06 at 20.56.49.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-export-example 2024-11-07 at 09.52.59.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-hey-egeria 2024-11-10 at 18.31.01.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-import-upsert-example 2024-11-07 at 10.08.37.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-list-terms-second 2024-11-06 at 16.46.34.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-load-archive.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-server-status-full 2024-11-10 at 19.14.36.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-show-glossaries 2024-11-07 at 20.00.05.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-show-glossary-terms 2024-11-05 at 19.37.53@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-upsert 2024-11-07 at 11.49.04.png +0 -0
- pyegeria/commands/doc/glossary/images/upsert-example.om-terms 2024-11-07 at 11.44.05.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/README.md +0 -346
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/CleanShot 2024-11-18 at 21.32.03@2x.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/Xmind 1731421782704.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/Xmind 1731422134920.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/hey_egeria 2024-11-12 at 20.38.43.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/hey_egeria cat 2024-11-12 at 21.41.43.png +0 -0
- 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
- 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
- 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
- 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
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/short-cut commands 2024-11-12 at 22.22.13.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-hey-egeria.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-integration-status-paging.png +0 -0
- 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
- 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
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-show-server-status-full 2024-11-10.png +0 -0
- 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
- pyegeria/commands/ops/__init__.py +0 -22
- pyegeria/commands/tech/__init__.py +0 -0
- pyegeria-5.2.1.dist-info/RECORD +0 -232
- pyegeria-5.2.1.dist-info/entry_points.txt +0 -81
- {pyegeria/commands → commands}/cat/README.md +0 -0
- {pyegeria/commands → commands}/cli/txt_custom_v2.tcss +0 -0
- {pyegeria/commands → commands}/my/README.md +0 -0
- {pyegeria/commands → commands}/ops/README.md +0 -0
- {pyegeria/commands → commands}/ops/x_engine_actions.py +0 -0
- {pyegeria/commands → commands}/tech/README.md +0 -0
- /pyegeria/commands/my/__init__.py → /md_processing/dr_egeria_inbox/t1.md +0 -0
- {pyegeria-5.2.1.dist-info → pyegeria-5.3.dist-info}/LICENSE +0 -0
@@ -11,13 +11,10 @@ import asyncio
|
|
11
11
|
|
12
12
|
from httpx import Response
|
13
13
|
|
14
|
-
from pyegeria import body_slimmer
|
15
|
-
|
16
|
-
|
14
|
+
from pyegeria.utils import body_slimmer
|
17
15
|
from pyegeria._client import Client, max_paging_size
|
18
|
-
from pyegeria._globals import default_time_out
|
16
|
+
from pyegeria._globals import default_time_out, NO_ELEMENTS_FOUND
|
19
17
|
|
20
|
-
NO_ELEMENTS_FOUND = "No_elements_found"
|
21
18
|
|
22
19
|
|
23
20
|
def query_seperator(current_string):
|
@@ -112,7 +109,9 @@ class MetadataExplorer(Client):
|
|
112
109
|
self.platform_url = platform_url
|
113
110
|
self.user_id = user_id
|
114
111
|
self.user_pwd = user_pwd
|
115
|
-
self.metadata_explorer_command_root: str =
|
112
|
+
self.metadata_explorer_command_root: str = (
|
113
|
+
f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/metadata-explorer"
|
114
|
+
)
|
116
115
|
Client.__init__(
|
117
116
|
self,
|
118
117
|
view_server,
|
@@ -489,50 +488,6 @@ class MetadataExplorer(Client):
|
|
489
488
|
)
|
490
489
|
return response
|
491
490
|
|
492
|
-
# def get_metadata_element_mermaid_graph(
|
493
|
-
# self,
|
494
|
-
# guid: str,
|
495
|
-
# effective_time: str = None,
|
496
|
-
# as_of_time: str = None,
|
497
|
-
# for_lineage: bool = None,
|
498
|
-
# for_duplicate_processing: bool = None,
|
499
|
-
# ) -> dict | str:
|
500
|
-
# """
|
501
|
-
# Retrieve the metadata element using its unique identifier.
|
502
|
-
#
|
503
|
-
# Parameters
|
504
|
-
# ----------
|
505
|
-
# guid : str
|
506
|
-
# - unique identifier of the element to retrieve
|
507
|
-
# effective_time: str, default = None
|
508
|
-
# - Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
509
|
-
# as_of_time: str, default = None
|
510
|
-
# - Query the element as of this time. If None, then use current time.
|
511
|
-
# for_lineage: bool, default is set by server
|
512
|
-
# - determines if elements classified as Memento should be returned - normally false
|
513
|
-
# for_duplicate_processing: bool, default is set by server
|
514
|
-
# - Normally false. Set true when the caller is part of a deduplication function
|
515
|
-
#
|
516
|
-
# Returns
|
517
|
-
# -------
|
518
|
-
# dict | str
|
519
|
-
# If the element is found, a dict of the element details is returned. Otherwise the string "No element found".
|
520
|
-
#
|
521
|
-
# Raises
|
522
|
-
# ------
|
523
|
-
# InvalidParameterException
|
524
|
-
# one of the parameters is null or invalid or
|
525
|
-
# PropertyServerException
|
526
|
-
# There is a problem adding the element properties to the metadata repository or
|
527
|
-
# UserNotAuthorizedException
|
528
|
-
# the requesting user is not authorized to issue this request.
|
529
|
-
# """
|
530
|
-
#
|
531
|
-
# response = self.get_metadata_element_graph(
|
532
|
-
# guid, effective_time, as_of_time, for_lineage, for_duplicate_processing
|
533
|
-
# )
|
534
|
-
# return response.get("mermaidGraph", NO_ELEMENTS_FOUND)
|
535
|
-
|
536
491
|
async def _async_get_metadata_element_by_unique_name(
|
537
492
|
self,
|
538
493
|
name: str,
|
pyegeria/my_profile_omvs.py
CHANGED
@@ -3,13 +3,14 @@
|
|
3
3
|
This module contains the MyProfile class and its methods.
|
4
4
|
|
5
5
|
"""
|
6
|
+
|
6
7
|
import asyncio
|
7
8
|
import json
|
8
9
|
|
9
|
-
from pyegeria import body_slimmer
|
10
|
+
from pyegeria.utils import body_slimmer
|
10
11
|
from pyegeria._client import Client
|
11
12
|
from pyegeria._validators import validate_name, validate_search_string
|
12
|
-
|
13
|
+
from pyegeria._globals import NO_ELEMENTS_FOUND
|
13
14
|
|
14
15
|
class MyProfile(Client):
|
15
16
|
"""A class representing the profile of a user.
|
@@ -0,0 +1,389 @@
|
|
1
|
+
from datetime import datetime
|
2
|
+
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
|
3
|
+
from rich.console import Console
|
4
|
+
|
5
|
+
console = Console(width= 250)
|
6
|
+
# Constants
|
7
|
+
MD_SEPARATOR = "\n---\n\n"
|
8
|
+
|
9
|
+
def make_preamble(obj_type: str, search_string: str, output_format: str = 'MD') -> Tuple[str, Optional[str]]:
|
10
|
+
"""
|
11
|
+
Creates a preamble string and an elements action based on the given object type, search string,
|
12
|
+
and output format.
|
13
|
+
|
14
|
+
Args:
|
15
|
+
obj_type: The type of object being updated or reported on (e.g., "Product", "Category").
|
16
|
+
search_string: The search string used to filter objects. Defaults to "All Elements" if None.
|
17
|
+
output_format: A format identifier determining the output structure.
|
18
|
+
JSON - output standard json
|
19
|
+
MD - output standard markdown with no preamble
|
20
|
+
FORM - output markdown with a preamble for a form
|
21
|
+
REPORT - output markdown with a preamble for a report
|
22
|
+
|
23
|
+
Returns:
|
24
|
+
tuple: A tuple containing:
|
25
|
+
- A string representing the formatted update or report preamble.
|
26
|
+
- A string or None indicating the action description for the elements,
|
27
|
+
depending on the output format.
|
28
|
+
"""
|
29
|
+
search_string = search_string if search_string else "All Elements"
|
30
|
+
elements_action = "Update " + obj_type
|
31
|
+
if output_format == "FORM":
|
32
|
+
preamble = (f"\n# Update {obj_type} Form - created at {datetime.now().strftime('%Y-%m-%d %H:%M')}\n"
|
33
|
+
f"\t {obj_type} found from the search string: `{search_string}`\n\n")
|
34
|
+
return preamble, elements_action
|
35
|
+
elif output_format == "REPORT":
|
36
|
+
elements_md = (f"# {obj_type} Report - created at {datetime.now().strftime('%Y-%m-%d %H:%M')}\n"
|
37
|
+
f"\t{obj_type} found from the search string: `{search_string}`\n\n")
|
38
|
+
elements_action = None
|
39
|
+
return elements_md, elements_action
|
40
|
+
else:
|
41
|
+
return "\n", elements_action
|
42
|
+
|
43
|
+
def make_md_attribute(attribute_name: str, attribute_value: str, output_type: str) -> Optional[str]:
|
44
|
+
"""
|
45
|
+
Create a markdown attribute line for a given attribute name and value.
|
46
|
+
|
47
|
+
Args:
|
48
|
+
attribute_name: The name of the attribute
|
49
|
+
attribute_value: The value of the attribute
|
50
|
+
output_type: The output format (FORM, MD, REPORT)
|
51
|
+
|
52
|
+
Returns:
|
53
|
+
str: Formatted markdown for the attribute
|
54
|
+
"""
|
55
|
+
output = ""
|
56
|
+
attribute_value = attribute_value.strip() if attribute_value else ""
|
57
|
+
attribute_title = attribute_name.title() if attribute_name else ""
|
58
|
+
if output_type in ["FORM", "MD"]:
|
59
|
+
output = f"## {attribute_title}\n{attribute_value}\n\n"
|
60
|
+
elif output_type == "REPORT":
|
61
|
+
if attribute_value:
|
62
|
+
output = f"## {attribute_title}\n{attribute_value}\n\n"
|
63
|
+
return output
|
64
|
+
|
65
|
+
def format_for_markdown_table(text: str) -> str:
|
66
|
+
"""
|
67
|
+
Format text for markdown tables by replacing newlines with spaces and escaping pipe characters.
|
68
|
+
No truncation is applied to allow full-length text display regardless of console width.
|
69
|
+
|
70
|
+
Args:
|
71
|
+
text (str): The text to format
|
72
|
+
|
73
|
+
Returns:
|
74
|
+
str: Formatted text safe for markdown tables
|
75
|
+
"""
|
76
|
+
if not text:
|
77
|
+
return ""
|
78
|
+
# Replace newlines with spaces and escape pipe characters
|
79
|
+
return text.replace("\n", " ").replace("|", "\\|")
|
80
|
+
|
81
|
+
def generate_entity_md(elements: List[Dict],
|
82
|
+
elements_action: str,
|
83
|
+
output_format: str,
|
84
|
+
entity_type: str,
|
85
|
+
extract_properties_func: Callable,
|
86
|
+
get_additional_props_func: Optional[Callable] = None) -> str:
|
87
|
+
"""
|
88
|
+
Generic method to generate markdown for entities.
|
89
|
+
|
90
|
+
Args:
|
91
|
+
elements (list): List of entity elements
|
92
|
+
elements_action (str): Action description for elements
|
93
|
+
output_format (str): Output format
|
94
|
+
entity_type (str): Type of entity (Glossary, Term, Category, etc.)
|
95
|
+
extract_properties_func: Function to extract properties from an element
|
96
|
+
get_additional_props_func: Optional function to get additional properties
|
97
|
+
|
98
|
+
Returns:
|
99
|
+
str: Markdown representation
|
100
|
+
"""
|
101
|
+
elements_md = ""
|
102
|
+
|
103
|
+
for element in elements:
|
104
|
+
props = extract_properties_func(element)
|
105
|
+
|
106
|
+
# Get additional properties if function is provided
|
107
|
+
additional_props = {}
|
108
|
+
if get_additional_props_func:
|
109
|
+
additional_props = get_additional_props_func(element, props['guid'], output_format)
|
110
|
+
|
111
|
+
# Format header based on output format
|
112
|
+
if output_format in ['FORM', 'MD']:
|
113
|
+
elements_md += f"# {elements_action}\n\n"
|
114
|
+
elements_md += f"## {entity_type} Name \n\n{props['display_name']}\n\n"
|
115
|
+
elif output_format == 'REPORT':
|
116
|
+
elements_md += f"# {entity_type} Name: {props['display_name']}\n\n"
|
117
|
+
else:
|
118
|
+
elements_md += f"## {entity_type} Name \n\n{props['display_name']}\n\n"
|
119
|
+
|
120
|
+
# Add common attributes
|
121
|
+
for key, value in props.items():
|
122
|
+
if key not in ['guid', 'properties', 'display_name']:
|
123
|
+
elements_md += make_md_attribute(key.replace('_', ' '), value, output_format)
|
124
|
+
|
125
|
+
# Add additional properties
|
126
|
+
for key, value in additional_props.items():
|
127
|
+
elements_md += make_md_attribute(key.replace('_', ' '), value, output_format)
|
128
|
+
|
129
|
+
# Add GUID
|
130
|
+
elements_md += make_md_attribute("GUID", props['guid'], output_format)
|
131
|
+
|
132
|
+
# Add separator if not the last element
|
133
|
+
if element != elements[-1]:
|
134
|
+
elements_md += MD_SEPARATOR
|
135
|
+
|
136
|
+
return elements_md
|
137
|
+
|
138
|
+
def generate_entity_md_table(elements: List[Dict],
|
139
|
+
search_string: str,
|
140
|
+
entity_type: str,
|
141
|
+
extract_properties_func: Callable,
|
142
|
+
columns: List[Dict],
|
143
|
+
get_additional_props_func: Optional[Callable] = None,
|
144
|
+
output_format: str = 'LIST') -> str:
|
145
|
+
"""
|
146
|
+
Generic method to generate a markdown table for entities.
|
147
|
+
|
148
|
+
Args:
|
149
|
+
elements (list): List of entity elements
|
150
|
+
search_string (str): The search string used
|
151
|
+
entity_type (str): Type of entity (Glossary, Term, Category, etc.)
|
152
|
+
extract_properties_func: Function to extract properties from an element
|
153
|
+
columns: List of column definitions, each containing 'name', 'key', and 'format' (optional)
|
154
|
+
get_additional_props_func: Optional function to get additional properties
|
155
|
+
output_format (str): Output format (FORM, REPORT, LIST, etc.)
|
156
|
+
|
157
|
+
Returns:
|
158
|
+
str: Markdown table
|
159
|
+
"""
|
160
|
+
# Handle pluralization - if entity_type ends with 'y', use 'ies' instead of 's'
|
161
|
+
entity_type_plural = f"{entity_type[:-1]}ies" if entity_type.endswith('y') else f"{entity_type}s"
|
162
|
+
|
163
|
+
elements_md = f"# {entity_type_plural} Table\n\n"
|
164
|
+
elements_md += f"{entity_type_plural} found from the search string: `{search_string}`\n\n"
|
165
|
+
|
166
|
+
# Add column headers
|
167
|
+
header_row = "| "
|
168
|
+
separator_row = "|"
|
169
|
+
for column in columns:
|
170
|
+
header_row += f"{column['name']} | "
|
171
|
+
separator_row += "-------------|"
|
172
|
+
|
173
|
+
elements_md += header_row + "\n"
|
174
|
+
elements_md += separator_row + "\n"
|
175
|
+
|
176
|
+
# Add rows
|
177
|
+
for element in elements:
|
178
|
+
props = extract_properties_func(element)
|
179
|
+
|
180
|
+
# Get additional properties if function is provided
|
181
|
+
additional_props = {}
|
182
|
+
if get_additional_props_func:
|
183
|
+
additional_props = get_additional_props_func(element, props['guid'], output_format)
|
184
|
+
|
185
|
+
# Build row
|
186
|
+
row = "| "
|
187
|
+
for column in columns:
|
188
|
+
key = column['key']
|
189
|
+
value = ""
|
190
|
+
|
191
|
+
# Check if the key is in props or additional_props
|
192
|
+
if key in props:
|
193
|
+
value = props[key]
|
194
|
+
elif key in additional_props:
|
195
|
+
value = additional_props[key]
|
196
|
+
|
197
|
+
# Format the value if needed
|
198
|
+
if 'format' in column and column['format']:
|
199
|
+
value = format_for_markdown_table(value)
|
200
|
+
|
201
|
+
row += f"{value} | "
|
202
|
+
|
203
|
+
elements_md += row + "\n"
|
204
|
+
|
205
|
+
return elements_md
|
206
|
+
|
207
|
+
def generate_entity_dict(elements: List[Dict],
|
208
|
+
extract_properties_func: Callable,
|
209
|
+
get_additional_props_func: Optional[Callable] = None,
|
210
|
+
include_keys: Optional[List[str]] = None,
|
211
|
+
exclude_keys: Optional[List[str]] = None,
|
212
|
+
output_format: str = 'DICT') -> List[Dict]:
|
213
|
+
"""
|
214
|
+
Generic method to generate a dictionary representation of entities.
|
215
|
+
|
216
|
+
Args:
|
217
|
+
elements (list): List of entity elements
|
218
|
+
extract_properties_func: Function to extract properties from an element
|
219
|
+
get_additional_props_func: Optional function to get additional properties
|
220
|
+
include_keys: Optional list of keys to include in the result (if None, include all)
|
221
|
+
exclude_keys: Optional list of keys to exclude from the result (if None, exclude none)
|
222
|
+
output_format (str): Output format (FORM, REPORT, DICT, etc.)
|
223
|
+
|
224
|
+
Returns:
|
225
|
+
list: List of entity dictionaries
|
226
|
+
"""
|
227
|
+
result = []
|
228
|
+
|
229
|
+
for element in elements:
|
230
|
+
props = extract_properties_func(element)
|
231
|
+
|
232
|
+
# Get additional properties if function is provided
|
233
|
+
additional_props = {}
|
234
|
+
if get_additional_props_func:
|
235
|
+
additional_props = get_additional_props_func(element, props['guid'], output_format)
|
236
|
+
|
237
|
+
# Create entity dictionary
|
238
|
+
entity_dict = {}
|
239
|
+
|
240
|
+
# Add properties based on include/exclude lists
|
241
|
+
for key, value in props.items():
|
242
|
+
if key != 'properties': # Skip the raw properties object
|
243
|
+
if (include_keys is None or key in include_keys) and (
|
244
|
+
exclude_keys is None or key not in exclude_keys):
|
245
|
+
entity_dict[key] = value
|
246
|
+
|
247
|
+
# Add additional properties
|
248
|
+
for key, value in additional_props.items():
|
249
|
+
if (include_keys is None or key in include_keys) and (exclude_keys is None or key not in exclude_keys):
|
250
|
+
entity_dict[key] = value
|
251
|
+
|
252
|
+
result.append(entity_dict)
|
253
|
+
|
254
|
+
return result
|
255
|
+
|
256
|
+
def extract_mermaid_only(elements: Union[Dict, List[Dict]]) -> Union[str, List[str]]:
|
257
|
+
"""
|
258
|
+
Extract mermaid graph data from elements.
|
259
|
+
|
260
|
+
Args:
|
261
|
+
elements: Dictionary or list of dictionaries containing element data
|
262
|
+
|
263
|
+
Returns:
|
264
|
+
String or list of strings containing mermaid graph data
|
265
|
+
"""
|
266
|
+
if isinstance(elements, dict):
|
267
|
+
return elements.get('mermaidGraph', '___')
|
268
|
+
|
269
|
+
result = []
|
270
|
+
for element in elements:
|
271
|
+
result.append(element.get('mermaidGraph', '___'))
|
272
|
+
return result
|
273
|
+
|
274
|
+
def extract_basic_dict(elements: Union[Dict, List[Dict]]) -> Union[Dict, List[Dict]]:
|
275
|
+
"""
|
276
|
+
Extract basic dictionary data from elements.
|
277
|
+
|
278
|
+
Args:
|
279
|
+
elements: Dictionary or list of dictionaries containing element data
|
280
|
+
|
281
|
+
Returns:
|
282
|
+
Dictionary or list of dictionaries with extracted data
|
283
|
+
"""
|
284
|
+
if isinstance(elements, dict):
|
285
|
+
body = {'guid': elements['elementHeader']['guid']}
|
286
|
+
for key in elements['properties']:
|
287
|
+
body[key] = elements['properties'][key]
|
288
|
+
|
289
|
+
# Add classifications if present
|
290
|
+
classifications = elements['elementHeader'].get('classifications', [])
|
291
|
+
if classifications:
|
292
|
+
classification_names = ""
|
293
|
+
for classification in classifications:
|
294
|
+
classification_names += f"* {classification['classificationName']}\n"
|
295
|
+
body['classification_names'] = classification_names
|
296
|
+
|
297
|
+
return body
|
298
|
+
|
299
|
+
result = []
|
300
|
+
for element in elements:
|
301
|
+
body = {'guid': element['elementHeader']['guid']}
|
302
|
+
for key in element['properties']:
|
303
|
+
body[key] = element['properties'][key]
|
304
|
+
|
305
|
+
# Add classifications if present
|
306
|
+
classifications = element['elementHeader'].get('classifications', [])
|
307
|
+
if classifications:
|
308
|
+
classification_names = ""
|
309
|
+
for classification in classifications:
|
310
|
+
classification_names += f"* {classification['classificationName']}\n"
|
311
|
+
body['classifications'] = classification_names
|
312
|
+
|
313
|
+
result.append(body)
|
314
|
+
return result
|
315
|
+
|
316
|
+
def generate_output(elements: Union[Dict, List[Dict]],
|
317
|
+
search_string: str,
|
318
|
+
entity_type: str,
|
319
|
+
output_format: str,
|
320
|
+
extract_properties_func: Callable,
|
321
|
+
get_additional_props_func: Optional[Callable] = None,
|
322
|
+
columns: Optional[List[Dict]] = None) -> Union[str, List[Dict]]:
|
323
|
+
"""
|
324
|
+
Generate output in the specified format for the given elements.
|
325
|
+
|
326
|
+
Args:
|
327
|
+
elements: Dictionary or list of dictionaries containing element data
|
328
|
+
search_string: The search string used to find the elements
|
329
|
+
entity_type: The type of entity (e.g., "Glossary", "Term", "Category")
|
330
|
+
output_format: The desired output format (MD, FORM, REPORT, LIST, DICT, MERMAID)
|
331
|
+
extract_properties_func: Function to extract properties from an element
|
332
|
+
get_additional_props_func: Optional function to get additional properties
|
333
|
+
columns: Optional list of column definitions for table output
|
334
|
+
|
335
|
+
Returns:
|
336
|
+
Formatted output as string or list of dictionaries
|
337
|
+
"""
|
338
|
+
# Ensure elements is a list
|
339
|
+
if isinstance(elements, dict):
|
340
|
+
elements = [elements]
|
341
|
+
|
342
|
+
# Handle empty search string
|
343
|
+
if search_string is None or search_string == '':
|
344
|
+
search_string = "All"
|
345
|
+
|
346
|
+
# Generate output based on format
|
347
|
+
if output_format == 'MERMAID':
|
348
|
+
return extract_mermaid_only(elements)
|
349
|
+
|
350
|
+
elif output_format == 'DICT':
|
351
|
+
return generate_entity_dict(
|
352
|
+
elements=elements,
|
353
|
+
extract_properties_func=extract_properties_func,
|
354
|
+
get_additional_props_func=get_additional_props_func,
|
355
|
+
exclude_keys=['properties'],
|
356
|
+
output_format=output_format
|
357
|
+
)
|
358
|
+
|
359
|
+
elif output_format == 'LIST':
|
360
|
+
if columns is None:
|
361
|
+
raise ValueError("Columns must be provided for LIST output format")
|
362
|
+
|
363
|
+
return generate_entity_md_table(
|
364
|
+
elements=elements,
|
365
|
+
search_string=search_string,
|
366
|
+
entity_type=entity_type,
|
367
|
+
extract_properties_func=extract_properties_func,
|
368
|
+
columns=columns,
|
369
|
+
get_additional_props_func=get_additional_props_func,
|
370
|
+
output_format=output_format
|
371
|
+
)
|
372
|
+
|
373
|
+
else: # MD, FORM, REPORT
|
374
|
+
elements_md, elements_action = make_preamble(
|
375
|
+
obj_type=entity_type,
|
376
|
+
search_string=search_string,
|
377
|
+
output_format=output_format
|
378
|
+
)
|
379
|
+
|
380
|
+
elements_md += generate_entity_md(
|
381
|
+
elements=elements,
|
382
|
+
elements_action=elements_action,
|
383
|
+
output_format=output_format,
|
384
|
+
entity_type=entity_type,
|
385
|
+
extract_properties_func=extract_properties_func,
|
386
|
+
get_additional_props_func=get_additional_props_func
|
387
|
+
)
|
388
|
+
|
389
|
+
return elements_md
|
pyegeria/platform_services.py
CHANGED
@@ -12,16 +12,16 @@ import json
|
|
12
12
|
|
13
13
|
import httpx
|
14
14
|
|
15
|
-
from pyegeria import Client, enable_ssl_check
|
16
|
-
from pyegeria._validators import validate_user_id
|
15
|
+
from pyegeria._client import Client, enable_ssl_check
|
17
16
|
from pyegeria._exceptions import (
|
18
|
-
OMAGCommonErrorCode,
|
19
17
|
InvalidParameterException,
|
20
|
-
|
18
|
+
OMAGCommonErrorCode,
|
21
19
|
PropertyServerException,
|
20
|
+
UserNotAuthorizedException,
|
22
21
|
print_exception_response,
|
23
22
|
)
|
24
|
-
|
23
|
+
from pyegeria._validators import validate_user_id
|
24
|
+
from pyegeria._globals import NO_ELEMENTS_FOUND
|
25
25
|
|
26
26
|
class Platform(Client):
|
27
27
|
"""
|