pyegeria 5.3.9.9.7__py3-none-any.whl → 5.4.0__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/debug_log +2806 -0
- commands/cat/debug_log.2025-07-15_14-28-38_087378.zip +0 -0
- commands/cat/debug_log.2025-07-16_15-48-50_037087.zip +0 -0
- commands/cat/dr_egeria_command_help.py +273 -0
- commands/cat/dr_egeria_md.py +90 -20
- commands/cat/glossary_actions.py +2 -2
- commands/cat/list_collections.py +24 -10
- commands/cat/list_data_designer.py +183 -0
- md_processing/__init__.py +28 -5
- md_processing/data/commands.json +31474 -1096
- md_processing/dr_egeria_outbox-pycharm/.obsidian/app.json +1 -0
- md_processing/dr_egeria_outbox-pycharm/.obsidian/appearance.json +1 -0
- md_processing/dr_egeria_outbox-pycharm/.obsidian/core-plugins.json +31 -0
- md_processing/dr_egeria_outbox-pycharm/.obsidian/workspace.json +177 -0
- md_processing/dr_egeria_outbox-pycharm/monday/processed-2025-07-14 12:38-data_designer_out.md +663 -0
- md_processing/dr_egeria_outbox-pycharm/thursday/processed-2025-07-17 15:00-Derive-Dr-Gov-Defs.md +719 -0
- md_processing/dr_egeria_outbox-pycharm/thursday/processed-2025-07-17 20:13-Derive-Dr-Gov-Defs.md +41 -0
- md_processing/dr_egeria_outbox-pycharm/thursday/processed-2025-07-17 20:14-Derive-Dr-Gov-Defs.md +33 -0
- md_processing/dr_egeria_outbox-pycharm/thursday/processed-2025-07-17 20:50-Derive-Dr-Gov-Defs.md +192 -0
- md_processing/dr_egeria_outbox-pycharm/tuesday/processed-2025-07-16 19:15-gov_def2.md +527 -0
- md_processing/dr_egeria_outbox-pycharm/tuesday/processed-2025-07-17 12:08-gov_def2.md +527 -0
- md_processing/dr_egeria_outbox-pycharm/tuesday/processed-2025-07-17 14:27-gov_def2.md +474 -0
- md_processing/family_docs/Data Designer/Create_Data_Class.md +164 -0
- md_processing/family_docs/Data Designer/Create_Data_Dictionary.md +30 -0
- md_processing/family_docs/Data Designer/Create_Data_Field.md +162 -0
- md_processing/family_docs/Data Designer/Create_Data_Specification.md +36 -0
- md_processing/family_docs/Data Designer/Create_Data_Structure.md +38 -0
- md_processing/family_docs/Data Designer/View_Data_Classes.md +78 -0
- md_processing/family_docs/Data Designer/View_Data_Dictionaries.md +78 -0
- md_processing/family_docs/Data Designer/View_Data_Fields.md +78 -0
- md_processing/family_docs/Data Designer/View_Data_Specifications.md +78 -0
- md_processing/family_docs/Data Designer/View_Data_Structures.md +78 -0
- md_processing/family_docs/Data Designer.md +842 -0
- md_processing/family_docs/Digital Product Manager/Add_Member->Collection.md +42 -0
- md_processing/family_docs/Digital Product Manager/Attach_Collection->Resource.md +36 -0
- md_processing/family_docs/Digital Product Manager/Create_Agreement.md +96 -0
- md_processing/family_docs/Digital Product Manager/Create_Data_Sharing_Agreement.md +72 -0
- md_processing/family_docs/Digital Product Manager/Create_DigitalSubscription.md +102 -0
- md_processing/family_docs/Digital Product Manager/Create_Digital_Product.md +134 -0
- md_processing/family_docs/Digital Product Manager/Link_Agreement_Items.md +60 -0
- md_processing/family_docs/Digital Product Manager/Link_Contracts.md +26 -0
- md_processing/family_docs/Digital Product Manager/Link_Digital_Product_-_Digital_Product.md +30 -0
- md_processing/family_docs/Digital Product Manager/Link_Subscribers.md +48 -0
- md_processing/family_docs/Digital Product Manager.md +668 -0
- md_processing/family_docs/Glossary/Attach_Category_Parent.md +18 -0
- md_processing/family_docs/Glossary/Attach_Term-Term_Relationship.md +26 -0
- md_processing/family_docs/Glossary/Create_Category.md +38 -0
- md_processing/family_docs/Glossary/Create_Glossary.md +42 -0
- md_processing/family_docs/Glossary/Create_Term.md +70 -0
- md_processing/family_docs/Glossary.md +206 -0
- md_processing/family_docs/Governance Officer/Create_Business_Imperative.md +106 -0
- md_processing/family_docs/Governance Officer/Create_Certification_Type.md +112 -0
- md_processing/family_docs/Governance Officer/Create_Governance_Approach.md +114 -0
- md_processing/family_docs/Governance Officer/Create_Governance_Obligation.md +114 -0
- md_processing/family_docs/Governance Officer/Create_Governance_Principle.md +114 -0
- md_processing/family_docs/Governance Officer/Create_Governance_Procedure.md +128 -0
- md_processing/family_docs/Governance Officer/Create_Governance_Process.md +122 -0
- md_processing/family_docs/Governance Officer/Create_Governance_Processing_Purpose.md +106 -0
- md_processing/family_docs/Governance Officer/Create_Governance_Responsibility.md +122 -0
- md_processing/family_docs/Governance Officer/Create_Governance_Rule.md +122 -0
- md_processing/family_docs/Governance Officer/Create_Governance_Strategy.md +106 -0
- md_processing/family_docs/Governance Officer/Create_License_Type.md +112 -0
- md_processing/family_docs/Governance Officer/Create_Naming_Standard_Rule.md +122 -0
- md_processing/family_docs/Governance Officer/Create_Regulation_Article.md +106 -0
- md_processing/family_docs/Governance Officer/Create_Regulation_Definition.md +118 -0
- md_processing/family_docs/Governance Officer/Create_Security_Access_Control.md +114 -0
- md_processing/family_docs/Governance Officer/Create_Security_Group.md +120 -0
- md_processing/family_docs/Governance Officer/Create_Service_Level_Objectives.md +122 -0
- md_processing/family_docs/Governance Officer/Create_Threat_Definition.md +106 -0
- md_processing/family_docs/Governance Officer/Link_Governance_Controls.md +32 -0
- md_processing/family_docs/Governance Officer/Link_Governance_Drivers.md +32 -0
- md_processing/family_docs/Governance Officer/Link_Governance_Policies.md +32 -0
- md_processing/family_docs/Governance Officer/View_Governance_Definitions.md +82 -0
- md_processing/family_docs/Governance Officer.md +2412 -0
- md_processing/family_docs/Solution Architect/Create_Information_Supply_Chain.md +70 -0
- md_processing/family_docs/Solution Architect/Create_Solution_Blueprint.md +44 -0
- md_processing/family_docs/Solution Architect/Create_Solution_Component.md +96 -0
- md_processing/family_docs/Solution Architect/Create_Solution_Role.md +66 -0
- md_processing/family_docs/Solution Architect/Link_Information_Supply_Chain_Peers.md +32 -0
- md_processing/family_docs/Solution Architect/Link_Solution_Component_Peers.md +32 -0
- md_processing/family_docs/Solution Architect/View_Information_Supply_Chains.md +32 -0
- md_processing/family_docs/Solution Architect/View_Solution_Blueprints.md +32 -0
- md_processing/family_docs/Solution Architect/View_Solution_Components.md +32 -0
- md_processing/family_docs/Solution Architect/View_Solution_Roles.md +32 -0
- md_processing/family_docs/Solution Architect.md +490 -0
- md_processing/md_commands/data_designer_commands.py +1192 -710
- md_processing/md_commands/glossary_commands.py +19 -32
- md_processing/md_commands/governance_officer_commands.py +420 -0
- md_processing/md_commands/product_manager_commands.py +1180 -0
- md_processing/md_commands/project_commands.py +5 -2
- md_processing/md_commands/solution_architect_commands.py +1140 -0
- md_processing/md_processing_utils/common_md_proc_utils.py +288 -96
- md_processing/md_processing_utils/common_md_utils.py +205 -6
- md_processing/md_processing_utils/debug_log +574 -0
- md_processing/md_processing_utils/dr-egeria-help-2025-07-17T17:22:09.md +2065 -0
- md_processing/md_processing_utils/extraction_utils.py +1 -1
- md_processing/md_processing_utils/generate_dr_help.py +165 -0
- md_processing/md_processing_utils/generate_md_cmd_templates.py +143 -0
- md_processing/md_processing_utils/generate_md_templates.py +92 -0
- md_processing/md_processing_utils/generated_help_terms.md +842 -0
- md_processing/md_processing_utils/md_processing_constants.py +94 -17
- pyegeria/__init__.py +1 -0
- pyegeria/_client.py +39 -1
- pyegeria/classification_manager_omvs.py +1 -1
- pyegeria/collection_manager_omvs.py +4667 -1178
- pyegeria/data_designer_omvs.py +348 -31
- pyegeria/egeria_tech_client.py +9 -25
- pyegeria/glossary_browser_omvs.py +5 -6
- pyegeria/glossary_manager_omvs.py +2 -2
- pyegeria/governance_officer_omvs.py +2367 -0
- pyegeria/output_formatter.py +157 -32
- pyegeria/solution_architect_omvs.py +5063 -1110
- pyegeria/utils.py +22 -2
- {pyegeria-5.3.9.9.7.dist-info → pyegeria-5.4.0.dist-info}/METADATA +3 -1
- pyegeria-5.4.0.dist-info/RECORD +243 -0
- {pyegeria-5.3.9.9.7.dist-info → pyegeria-5.4.0.dist-info}/entry_points.txt +5 -0
- commands/cat/.DS_Store +0 -0
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro.md +0 -254
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro_more_terms.md +0 -696
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part1.md +0 -254
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part2.md +0 -298
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part3.md +0 -608
- md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part4.md +0 -94
- md_processing/dr_egeria_inbox/archive/freddie_intro.md +0 -284
- md_processing/dr_egeria_inbox/archive/freddie_intro_orig.md +0 -275
- md_processing/dr_egeria_inbox/archive/test-term.md +0 -110
- md_processing/dr_egeria_inbox/cat_test.md +0 -100
- md_processing/dr_egeria_inbox/data_field.md +0 -54
- md_processing/dr_egeria_inbox/data_spec.md +0 -77
- md_processing/dr_egeria_inbox/data_spec_test.md +0 -2406
- md_processing/dr_egeria_inbox/data_test.md +0 -86
- md_processing/dr_egeria_inbox/dr_egeria_intro_categories.md +0 -168
- md_processing/dr_egeria_inbox/dr_egeria_intro_part1.md +0 -280
- md_processing/dr_egeria_inbox/dr_egeria_intro_part2.md +0 -313
- md_processing/dr_egeria_inbox/dr_egeria_intro_part3.md +0 -1073
- md_processing/dr_egeria_inbox/dr_egeria_isc1.md +0 -44
- md_processing/dr_egeria_inbox/glossary_test1.md +0 -324
- md_processing/dr_egeria_inbox/rel.md +0 -8
- md_processing/dr_egeria_inbox/sb.md +0 -119
- md_processing/dr_egeria_inbox/search_test.md +0 -39
- md_processing/dr_egeria_inbox/solution-components.md +0 -154
- md_processing/dr_egeria_inbox/solution_blueprints.md +0 -118
- md_processing/dr_egeria_inbox/synonym_test.md +0 -42
- md_processing/dr_egeria_inbox/t1.md +0 -0
- md_processing/dr_egeria_inbox/t2.md +0 -268
- md_processing/dr_egeria_outbox/processed-2025-05-15 19:52-data_test.md +0 -94
- md_processing/dr_egeria_outbox/processed-2025-05-16 07:39-data_test.md +0 -88
- md_processing/dr_egeria_outbox/processed-2025-05-17 16:01-data_field.md +0 -56
- md_processing/dr_egeria_outbox/processed-2025-05-18 15:51-data_test.md +0 -103
- md_processing/dr_egeria_outbox/processed-2025-05-18 16:47-data_test.md +0 -94
- md_processing/dr_egeria_outbox/processed-2025-05-19 07:14-data_test.md +0 -96
- md_processing/dr_egeria_outbox/processed-2025-05-19 07:20-data_test.md +0 -100
- md_processing/dr_egeria_outbox/processed-2025-05-19 07:22-data_test.md +0 -88
- md_processing/dr_egeria_outbox/processed-2025-05-19 09:26-data_test.md +0 -91
- md_processing/dr_egeria_outbox/processed-2025-05-19 10:27-data_test.md +0 -91
- md_processing/dr_egeria_outbox/processed-2025-05-19 14:04-data_test.md +0 -91
- md_processing/md_commands/blueprint_commands.py +0 -303
- pyegeria/.DS_Store +0 -0
- pyegeria/m_test.py +0 -118
- pyegeria-5.3.9.9.7.dist-info/RECORD +0 -196
- /commands/cat/{list_data_structures.py → list_data_structures_full.py} +0 -0
- {pyegeria-5.3.9.9.7.dist-info → pyegeria-5.4.0.dist-info}/LICENSE +0 -0
- {pyegeria-5.3.9.9.7.dist-info → pyegeria-5.4.0.dist-info}/WHEEL +0 -0
@@ -1,19 +1,19 @@
|
|
1
1
|
"""
|
2
2
|
This file contains display-related constants and formatting functions for Egeria Markdown processing
|
3
3
|
"""
|
4
|
+
import importlib.resources
|
4
5
|
import json
|
5
6
|
import os
|
6
|
-
|
7
|
+
|
7
8
|
from rich.markdown import Markdown
|
8
9
|
|
10
|
+
from md_processing.md_processing_utils.message_constants import ERROR
|
9
11
|
from pyegeria._globals import DEBUG_LEVEL
|
10
12
|
from md_processing.md_processing_utils.message_constants import message_types, ALWAYS, ERROR, INFO, WARNING
|
11
13
|
|
12
14
|
EGERIA_ROOT_PATH = os.environ.get("EGERIA_ROOT_PATH", "/home/jovyan")
|
13
15
|
EGERIA_INBOX_PATH = os.environ.get("EGERIA_INBOX_PATH", "loading-bay/dr_egeria_inbox")
|
14
16
|
|
15
|
-
|
16
|
-
|
17
17
|
# Constants for element labels
|
18
18
|
GLOSSARY_NAME_LABELS = ["Glossary Name", "Glossary", "Glossaries", "Owning Glossary", "In Glossary"]
|
19
19
|
CATEGORY_NAME_LABELS = ["Glossary Category Name", "Glossary Category", "Glossary Categories", "Category Name",
|
@@ -43,18 +43,98 @@ ELEMENT_OUTPUT_FORMATS = ["LIST", "DICT", "MD", "FORM", "REPORT"]
|
|
43
43
|
|
44
44
|
# Constants for term relationships
|
45
45
|
TERM_RELATIONSHPS = ["Synonym", "Translation", "PreferredTerm", "TermISATYPEOFRelationship", "TermTYPEDBYRelationship",
|
46
|
-
|
46
|
+
"Antonym", "ReplacementTerm", "ValidValue", "TermHASARelationship", "RelatedTerm",
|
47
|
+
"ISARelationship"]
|
47
48
|
|
48
49
|
# List of supported md_commands
|
50
|
+
GOV_LINK_LIST = [ "Link Governance Drivers", "Detach Governance Drivers",
|
51
|
+
"Link Governance Policies", "Detach Governance Policies",
|
52
|
+
"Link Governance Controls", "Detach Governance Controls",]
|
53
|
+
|
54
|
+
GOV_COM_LIST = [ "Create Business Imperative", "Update Business Imperative",
|
55
|
+
"Create Regulation Article Definition", "Update Regulation Article Definition",
|
56
|
+
"Create Threat Definition", "Update Threat Definition",
|
57
|
+
"Create Governance Principle", "Update Governance Principle",
|
58
|
+
"Create Governance Obligation", "Update Governance Obligation",
|
59
|
+
"Create Governance Approach", "Update Governance Approach",
|
60
|
+
"Create Governance Strategy", "Update Governance Strategy",
|
61
|
+
"Create Regulation", "Create Regulation Definition", "Update Regulation", "Update Regulation Definition",
|
62
|
+
"Create Governance Control:", "Update Governance Control",
|
63
|
+
"Create Governance Rule:", "Update Governance Rule",
|
64
|
+
"Create Service Level Objective", "Update Service Level Objective",
|
65
|
+
"Create Governance Process", "Update Governance Process",
|
66
|
+
"Create Governance Responsibility", "Update Governance Responsibility",
|
67
|
+
"Create Governance Procedure", "Update Governance Procedure",
|
68
|
+
"Create Security Access Control", "Update Security Access Control",
|
69
|
+
"Create Security Group", "Update Security Group",
|
70
|
+
"Create Naming Standard Rule", "Update Naming Standard Rule",
|
71
|
+
"Create Certification Type", "Update Certification Type",
|
72
|
+
"Create License Type", "Update License Type",]
|
73
|
+
|
49
74
|
command_list = ["Provenance", "Create Glossary", "Update Glossary", "Create Term", "Update Term", "List Terms",
|
50
75
|
"List Term Details", "List Glossary Terms", "List Term History", "List Term Revision History",
|
51
76
|
"List Term Update History", "List Glossary Structure", "List Glossaries", "List Categories",
|
52
77
|
"List Glossary Categories", "Create Personal Project", "Update Personal Project", "Create Category",
|
53
|
-
"Update Category", "Create Solution Blueprint", "Update Solution Blueprint",
|
54
|
-
"
|
55
|
-
"
|
56
|
-
"
|
57
|
-
"Create
|
78
|
+
"Update Category", "Create Solution Blueprint", "Update Solution Blueprint", "View Solution Blueprint",
|
79
|
+
"View Solution Blueprints", "View Blueprints",
|
80
|
+
"View Information Supply Chain", "View Information Supply Chains", "View Supply Chains", "View Supply Chain",
|
81
|
+
"View Solution Components", "View Solution Component", "View Solution Roles", "View Solution Role",
|
82
|
+
"Create Information Supply Chain", "Update Information Supply Chain",
|
83
|
+
"Link Information Supply Chain Peers", "Link Supply Chains", "Link Information Supply Chains",
|
84
|
+
"Unlink Information Supply Chain Peers", "Unlink Information Supply Chains", "Unlink Supply Chains",
|
85
|
+
"Create Solution Component", "Update Solution Component", "Link Solution Components", "Wire Solution Components",
|
86
|
+
"Detach Solution Components", "Unlink Solution Components", "Create Term-Term Relationship",
|
87
|
+
"Update Term-Term Relationship", "Create Data Spec", "Create Data Specification", "Update Data Spec",
|
88
|
+
"Update Data Specification", "Create Data Field", "Update Data Field", "Create Data Structure",
|
89
|
+
"Update Data Structure", "Create Data Dictionary", "Update Data Dictionary", "Create Data Dict",
|
90
|
+
"Update Data Dict", " View Data Dictionary", "View Data Dictionaries", "View Data Specifications",
|
91
|
+
"View Data Specs", "View Data Structures", "View Data Structure", "View Data Fields", "View Data Field",
|
92
|
+
"View Dataa Classes", "View Data Class", "Create Data Class", "Update Data Class",
|
93
|
+
"Create Digital Product", "Create Data Product", "Update Digital Product", "Update Data Product",
|
94
|
+
"Create Agreement", "Update Agreement",
|
95
|
+
"Link Digital Products", "Link Data Products", "Detach Digital Products", "Detach Data Products",
|
96
|
+
"Create Data Sharing Agreement", "Update Data Sharing Agreement",
|
97
|
+
"Create Digital Subscription", "Create Product Subscription", "Update Digital Subscription", "Update Product Subscription",
|
98
|
+
"Attach Agreement Items", "Detach Agreement Items",
|
99
|
+
"Attach Contract", "Detach Contract",
|
100
|
+
"Attach Subscriber", "Detach Subscriber",
|
101
|
+
"Link Collection to Resource", "Attach Collection to Resource",
|
102
|
+
"Unlink Collection From Resource", "Detach Collection From Resource",
|
103
|
+
"Add Member to Collection", "Add Member", "Member->Collection",
|
104
|
+
"Remove Member from Collection","Remove Member from Collection",
|
105
|
+
"View Digital Products", "View Data Products", "List Data Products", "List Digtal Products",
|
106
|
+
"View Agreements", "View Data Sharing Agreements", "List Agreements", "List Data Sharing Agreements",
|
107
|
+
"View Subscriptions", "List Subscriptions", "View Governance Definitions", "View Gov Definitions",
|
108
|
+
"List Governance Definitions", "List Gov Definitions",
|
109
|
+
"View Governance Definition Context","List Governance Definition Context",
|
110
|
+
"View Governance Def Context", "List Governance Def Context",
|
111
|
+
# "Create Business Imperative", "Update Business Imperative",
|
112
|
+
# "Create Regulation Article Definition", "Update Regulation Article Definition",
|
113
|
+
# "Create Threat Definition", "Update Threat Definition",
|
114
|
+
# "Create Governance Principle", "Update Governance Principle",
|
115
|
+
# "Create Governance Obligation", "Update Governance Obligation",
|
116
|
+
# "Create Governance Approach", "Update Governance Approach",
|
117
|
+
# "Create Governance Strategy", "Update Governance Strategy",
|
118
|
+
# "Create Regulation", "Create Regulation Definition", "Update Regulation", "Update Regulation Definition",
|
119
|
+
# "Create Governance Control:", "Update Governance Control",
|
120
|
+
# "Create Governance Rule:", "Update Governance Rule",
|
121
|
+
# "Create Service Level Objective", "Update Service Level Objective",
|
122
|
+
# "Create Governance Process", "Update Governance Process",
|
123
|
+
# "Create Governance Responsibility", "Update Governance Responsibility",
|
124
|
+
# "Create Governance Procedure", "Update Governance Procedure",
|
125
|
+
# "Create Security Access Control", "Update Security Access Control",
|
126
|
+
# "Create Security Group", "Update Security Group",
|
127
|
+
# "Create Naming Standard Rule", "Update Naming Standard Rule",
|
128
|
+
# "Create Certification Type", "Update Certification Type",
|
129
|
+
# "Create License Type", "Update License Type",
|
130
|
+
# "Link Governance Drivers", "Detach Governance Drivers",
|
131
|
+
# "Link Governance Policies", "Detach Governance Policies",
|
132
|
+
# "Link Governance Controls", "Detach Governance Controls",
|
133
|
+
|
134
|
+
]
|
135
|
+
|
136
|
+
command_list.extend(GOV_COM_LIST)
|
137
|
+
command_list.extend(GOV_LINK_LIST)
|
58
138
|
|
59
139
|
pre_command = "\n---\n==> Processing object_action:"
|
60
140
|
command_seperator = Markdown("\n---\n")
|
@@ -64,21 +144,14 @@ COMMAND_DEFINITIONS = {}
|
|
64
144
|
debug_level = DEBUG_LEVEL
|
65
145
|
|
66
146
|
|
67
|
-
|
68
147
|
def load_commands(filename: str) -> None:
|
69
148
|
global COMMAND_DEFINITIONS
|
70
|
-
# print("EGERIA_INBOX_PATH: ", EGERIA_INBOX_PATH)
|
71
|
-
|
72
|
-
# full_file_path = os.path.join(EGERIA_ROOT_PATH, EGERIA_INBOX_PATH, filename)
|
73
149
|
|
74
|
-
# print("Loading commands from: ", full_file_path)
|
75
150
|
try:
|
76
151
|
config_path = importlib.resources.files("md_processing") / "data" / filename
|
77
152
|
config_str = config_path.read_text(encoding="utf-8")
|
78
153
|
COMMAND_DEFINITIONS = json.loads(config_str)
|
79
154
|
|
80
|
-
# with open(full_file_path, 'r') as file:
|
81
|
-
# COMMAND_DEFINITIONS = json.load(file)
|
82
155
|
except FileNotFoundError:
|
83
156
|
msg = f"ERROR: File {filename} not found."
|
84
157
|
print(ERROR, msg, debug_level)
|
@@ -86,6 +159,7 @@ def load_commands(filename: str) -> None:
|
|
86
159
|
|
87
160
|
def get_command_spec(command: str) -> dict | None:
|
88
161
|
global COMMAND_DEFINITIONS
|
162
|
+
|
89
163
|
com = COMMAND_DEFINITIONS.get('Command Specifications', {}).get(command, None)
|
90
164
|
if com:
|
91
165
|
return com
|
@@ -94,16 +168,19 @@ def get_command_spec(command: str) -> dict | None:
|
|
94
168
|
if obj:
|
95
169
|
return COMMAND_DEFINITIONS.get('Command Specifications', {}).get(obj, None)
|
96
170
|
|
171
|
+
|
97
172
|
def find_alternate_names(command: str) -> str | None:
|
98
173
|
global COMMAND_DEFINITIONS
|
174
|
+
|
99
175
|
comm_spec = COMMAND_DEFINITIONS.get('Command Specifications', {})
|
100
176
|
for key, value in comm_spec.items():
|
101
177
|
if isinstance(value, dict):
|
102
|
-
v = value.get('alternate_names',"")
|
178
|
+
v = value.get('alternate_names', "")
|
103
179
|
if command in v:
|
104
180
|
return key
|
105
181
|
return None
|
106
182
|
|
183
|
+
|
107
184
|
def get_alternate_names(command: str) -> list | None:
|
108
185
|
global COMMAND_DEFINITIONS
|
109
186
|
return get_command_spec(command).get('alternate_names', None)
|
pyegeria/__init__.py
CHANGED
@@ -43,6 +43,7 @@ from .feedback_manager_omvs import FeedbackManager
|
|
43
43
|
from .full_omag_server_config import FullServerConfig
|
44
44
|
from .glossary_browser_omvs import GlossaryBrowser
|
45
45
|
from .glossary_manager_omvs import GlossaryManager
|
46
|
+
from .governance_officer_omvs import GovernanceOfficer
|
46
47
|
from .mermaid_utilities import (construct_mermaid_web, construct_mermaid_jup, generate_process_graph, load_mermaid,
|
47
48
|
parse_mermaid_code, render_mermaid, save_mermaid_graph, save_mermaid_html, )
|
48
49
|
from .metadata_explorer_omvs import MetadataExplorer
|
pyegeria/_client.py
CHANGED
@@ -32,7 +32,6 @@ from pyegeria._validators import (
|
|
32
32
|
validate_url,
|
33
33
|
validate_user_id,
|
34
34
|
)
|
35
|
-
from pyegeria.output_formatter import make_preamble, make_md_attribute
|
36
35
|
|
37
36
|
...
|
38
37
|
|
@@ -786,6 +785,45 @@ class Client:
|
|
786
785
|
return q_name
|
787
786
|
|
788
787
|
|
788
|
+
async def _async_get_element_by_guid_(self, element_guid: str) -> dict | str:
|
789
|
+
"""
|
790
|
+
Simplified, internal version of get_element_by_guid found in Classification Manager.
|
791
|
+
Retrieve an element by its guid. Async version.
|
792
|
+
|
793
|
+
Parameters
|
794
|
+
----------
|
795
|
+
element_guid: str
|
796
|
+
- unique identifier for the element
|
797
|
+
|
798
|
+
Returns
|
799
|
+
-------
|
800
|
+
dict | str
|
801
|
+
Returns a string if no element found; otherwise a dict of the element.
|
802
|
+
|
803
|
+
Raises
|
804
|
+
------
|
805
|
+
InvalidParameterException
|
806
|
+
one of the parameters is null or invalid or
|
807
|
+
PropertyServerException
|
808
|
+
There is a problem adding the element properties to the metadata repository or
|
809
|
+
UserNotAuthorizedException
|
810
|
+
the requesting user is not authorized to issue this request.
|
811
|
+
"""
|
812
|
+
|
813
|
+
body = {
|
814
|
+
"class": "EffectiveTimeQueryRequestBody",
|
815
|
+
"effectiveTime": None,
|
816
|
+
}
|
817
|
+
|
818
|
+
url = (f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/classification-manager/elements/"
|
819
|
+
f"{element_guid}?forLineage=false&forDuplicateProcessing=false")
|
820
|
+
|
821
|
+
response: Response = await self._async_make_request("POST", url, body_slimmer(body))
|
822
|
+
|
823
|
+
elements = response.json().get("element", NO_ELEMENTS_FOUND)
|
824
|
+
|
825
|
+
return elements
|
826
|
+
|
789
827
|
|
790
828
|
if __name__ == "__main__":
|
791
829
|
print("Main-__client")
|
@@ -961,7 +961,7 @@ class ClassificationManager(Client):
|
|
961
961
|
the requesting user is not authorized to issue this request.
|
962
962
|
"""
|
963
963
|
|
964
|
-
property_name = ["name", "displayName", "title"]
|
964
|
+
property_name = ["name", "displayName", "title","qualifiedName"]
|
965
965
|
elements = await self._async_get_elements_by_property_value(
|
966
966
|
name, property_name, None
|
967
967
|
)
|