pyegeria 5.4.0.1__py3-none-any.whl → 5.4.0.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/__init__.py +1 -1
- commands/cat/dr_egeria_md.py +6 -4
- commands/cat/list_collections.py +47 -36
- md_processing/__init__.py +5 -2
- md_processing/data/commands-working.json +34850 -0
- md_processing/data/commands.json +1750 -530
- md_processing/md_commands/product_manager_commands.py +171 -220
- md_processing/md_processing_utils/common_md_proc_utils.py +9 -0
- md_processing/md_processing_utils/common_md_utils.py +15 -2
- md_processing/md_processing_utils/md_processing_constants.py +44 -6
- pyegeria/__init__.py +8 -4
- pyegeria/_client.py +2 -1
- pyegeria/_client_new.py +688 -0
- pyegeria/_exceptions_new.py +362 -0
- pyegeria/_globals.py +3 -1
- pyegeria/_output_formats.py +196 -0
- pyegeria/_validators.py +72 -199
- pyegeria/collection_manager_omvs.py +602 -324
- pyegeria/data_designer_omvs.py +251 -203
- pyegeria/load_config.py +217 -0
- pyegeria/logging_configuration.py +204 -0
- pyegeria/output_formatter.py +162 -31
- pyegeria/utils.py +99 -61
- {pyegeria-5.4.0.1.dist-info → pyegeria-5.4.0.3.dist-info}/METADATA +3 -1
- {pyegeria-5.4.0.1.dist-info → pyegeria-5.4.0.3.dist-info}/RECORD +28 -37
- commands/cat/debug_log +0 -2806
- 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
- md_processing/dr_egeria_outbox-pycharm/.obsidian/app.json +0 -1
- md_processing/dr_egeria_outbox-pycharm/.obsidian/appearance.json +0 -1
- md_processing/dr_egeria_outbox-pycharm/.obsidian/core-plugins.json +0 -31
- md_processing/dr_egeria_outbox-pycharm/.obsidian/workspace.json +0 -177
- md_processing/dr_egeria_outbox-pycharm/monday/processed-2025-07-14 12:38-data_designer_out.md +0 -663
- md_processing/dr_egeria_outbox-pycharm/thursday/processed-2025-07-17 15:00-Derive-Dr-Gov-Defs.md +0 -719
- md_processing/dr_egeria_outbox-pycharm/thursday/processed-2025-07-17 20:13-Derive-Dr-Gov-Defs.md +0 -41
- md_processing/dr_egeria_outbox-pycharm/thursday/processed-2025-07-17 20:14-Derive-Dr-Gov-Defs.md +0 -33
- md_processing/dr_egeria_outbox-pycharm/thursday/processed-2025-07-17 20:50-Derive-Dr-Gov-Defs.md +0 -192
- md_processing/dr_egeria_outbox-pycharm/tuesday/processed-2025-07-16 19:15-gov_def2.md +0 -527
- md_processing/dr_egeria_outbox-pycharm/tuesday/processed-2025-07-17 12:08-gov_def2.md +0 -527
- md_processing/dr_egeria_outbox-pycharm/tuesday/processed-2025-07-17 14:27-gov_def2.md +0 -474
- {pyegeria-5.4.0.1.dist-info → pyegeria-5.4.0.3.dist-info}/LICENSE +0 -0
- {pyegeria-5.4.0.1.dist-info → pyegeria-5.4.0.3.dist-info}/WHEEL +0 -0
- {pyegeria-5.4.0.1.dist-info → pyegeria-5.4.0.3.dist-info}/entry_points.txt +0 -0
commands/cat/__init__.py
CHANGED
commands/cat/dr_egeria_md.py
CHANGED
@@ -28,9 +28,10 @@ from md_processing import (extract_command, process_glossary_upsert_command, pro
|
|
28
28
|
process_information_supply_chain_upsert_command,
|
29
29
|
process_information_supply_chain_link_unlink_command, process_sol_arch_list_command,
|
30
30
|
process_digital_product_upsert_command, process_agreement_upsert_command,
|
31
|
+
process_collection_list_command, process_collection_upsert_command, process_link_agreement_item_command,
|
31
32
|
process_gov_definition_upsert_command, GOV_COM_LIST, GOV_LINK_LIST,
|
32
33
|
process_gov_def_link_detach_command, process_gov_definition_list_command,
|
33
|
-
process_gov_def_context_command)
|
34
|
+
process_gov_def_context_command, COLLECTIONS_LIST, SIMPLE_COLLECTIONS)
|
34
35
|
from md_processing.md_commands.data_designer_commands import (process_data_spec_upsert_command,
|
35
36
|
process_data_dict_upsert_command,
|
36
37
|
process_data_collection_list_command,
|
@@ -190,14 +191,15 @@ def process_markdown_file(input_file: str, output_folder:str, directive: str, se
|
|
190
191
|
result = process_digital_product_upsert_command(client, current_block, directive)
|
191
192
|
elif potential_command in ["Create Agreement", "Create Data Sharing Agreement", "Update Agreement", "Update Data Sharing Agreement"]:
|
192
193
|
result = process_agreement_upsert_command(client, current_block, directive)
|
194
|
+
elif potential_command in SIMPLE_COLLECTIONS:
|
195
|
+
result = process_collection_upsert_command(client, current_block, directive)
|
193
196
|
elif potential_command in GOV_COM_LIST:
|
194
197
|
result = process_gov_definition_upsert_command(client, current_block, directive)
|
195
198
|
elif potential_command in ['View Governance Definitions', 'List Governance Definitions',
|
196
199
|
'View Gov Definitions', 'List Gov Definitions']:
|
197
200
|
result = process_gov_definition_list_command(client, current_block, directive)
|
198
|
-
elif potential_command in
|
199
|
-
|
200
|
-
result = process_gov_def_context_command(client, current_block, directive)
|
201
|
+
elif potential_command in COLLECTIONS_LIST:
|
202
|
+
result = process_collection_list_command(client, current_block, directive)
|
201
203
|
|
202
204
|
|
203
205
|
|
commands/cat/list_collections.py
CHANGED
@@ -18,43 +18,50 @@ from rich.table import Table
|
|
18
18
|
from rich.text import Text
|
19
19
|
|
20
20
|
from pyegeria import (
|
21
|
-
EgeriaTech,
|
22
|
-
InvalidParameterException,
|
23
|
-
PropertyServerException,
|
24
|
-
UserNotAuthorizedException,
|
25
|
-
|
21
|
+
# EgeriaTech,
|
22
|
+
# InvalidParameterException,
|
23
|
+
# PropertyServerException,
|
24
|
+
# UserNotAuthorizedException,
|
25
|
+
CollectionManager,
|
26
|
+
NO_ELEMENTS_FOUND,config_logging, get_app_config
|
26
27
|
)
|
28
|
+
from pyegeria._exceptions_new import PyegeriaException, print_exception_response
|
27
29
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
30
|
+
|
31
|
+
|
32
|
+
# disable_ssl_warnings = True
|
33
|
+
|
34
|
+
# EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
35
|
+
# EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
|
36
|
+
# EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
|
37
|
+
# EGERIA_VIEW_SERVER = os.environ.get("EGERIA_VIEW_SERVER", "view-server")
|
38
|
+
# EGERIA_VIEW_SERVER_URL = os.environ.get(
|
39
|
+
# "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
40
|
+
# )
|
41
|
+
# EGERIA_INTEGRATION_DAEMON = os.environ.get("EGERIA_INTEGRATION_DAEMON", "integration-daemon")
|
42
|
+
# EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
|
43
|
+
# EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
|
40
44
|
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
41
45
|
EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
|
42
|
-
EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
|
43
|
-
EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
|
44
|
-
EGERIA_GLOSSARY_PATH = os.environ.get("EGERIA_GLOSSARY_PATH", None)
|
45
|
-
EGERIA_ROOT_PATH = os.environ.get("EGERIA_ROOT_PATH", "../../")
|
46
|
-
EGERIA_INBOX_PATH = os.environ.get("EGERIA_INBOX_PATH", "md_processing/dr_egeria_inbox")
|
47
|
-
EGERIA_OUTBOX_PATH = os.environ.get("EGERIA_OUTBOX_PATH", "md_processing/dr_egeria_outbox")
|
46
|
+
# EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
|
47
|
+
# EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
|
48
|
+
# EGERIA_GLOSSARY_PATH = os.environ.get("EGERIA_GLOSSARY_PATH", None)
|
49
|
+
# EGERIA_ROOT_PATH = os.environ.get("EGERIA_ROOT_PATH", "../../")
|
50
|
+
# EGERIA_INBOX_PATH = os.environ.get("EGERIA_INBOX_PATH", "md_processing/dr_egeria_inbox")
|
51
|
+
# EGERIA_OUTBOX_PATH = os.environ.get("EGERIA_OUTBOX_PATH", "md_processing/dr_egeria_outbox")
|
52
|
+
app_settings = get_app_config()
|
53
|
+
app_config = app_settings["Environment"]
|
54
|
+
config_logging()
|
48
55
|
|
49
56
|
|
50
57
|
def display_collections(
|
51
58
|
search_string: str = "*",
|
52
|
-
view_server: str =
|
53
|
-
view_url: str =
|
59
|
+
view_server: str = app_config['Egeria View Server'],
|
60
|
+
view_url: str = app_config['Egeria View Server URL'],
|
54
61
|
user: str = EGERIA_USER,
|
55
62
|
user_pass: str = EGERIA_USER_PASSWORD,
|
56
|
-
jupyter: bool =
|
57
|
-
width: int =
|
63
|
+
jupyter: bool = app_config['Egeria Jupyter'],
|
64
|
+
width: int = app_config['Console Width'],
|
58
65
|
output_format: str = "TABLE"
|
59
66
|
):
|
60
67
|
"""Display either a specified glossary or all collections if the search_string is '*'.
|
@@ -77,7 +84,7 @@ def display_collections(
|
|
77
84
|
output_format : str, optional
|
78
85
|
Format of the output. Default is TABLE.
|
79
86
|
"""
|
80
|
-
m_client =
|
87
|
+
m_client = CollectionManager(view_server, view_url, user_id=user, user_pwd=user_pass)
|
81
88
|
m_client.create_egeria_bearer_token()
|
82
89
|
try:
|
83
90
|
|
@@ -93,7 +100,7 @@ def display_collections(
|
|
93
100
|
action = "List"
|
94
101
|
|
95
102
|
if output_format != "TABLE":
|
96
|
-
file_path = os.path.join(
|
103
|
+
file_path = os.path.join(app_config['Pyegeria Root'], app_config['Dr.Egeria Outbox'])
|
97
104
|
if output_format == "HTML":
|
98
105
|
file_name = f"Collections-{time.strftime('%Y-%m-%d-%H-%M-%S')}-{action}.html"
|
99
106
|
else:
|
@@ -144,6 +151,7 @@ def display_collections(
|
|
144
151
|
collections, key=lambda k: k["display_name"]
|
145
152
|
)
|
146
153
|
for collection in sorted_collection_list:
|
154
|
+
|
147
155
|
display_name = collection["display_name"]
|
148
156
|
qualified_name = collection["qualified_name"]
|
149
157
|
guid = collection["GUID"]
|
@@ -180,9 +188,7 @@ def display_collections(
|
|
180
188
|
print("==> No collections with that name found")
|
181
189
|
|
182
190
|
except (
|
183
|
-
|
184
|
-
UserNotAuthorizedException,
|
185
|
-
PropertyServerException,
|
191
|
+
PyegeriaException
|
186
192
|
) as e:
|
187
193
|
print_exception_response(e)
|
188
194
|
finally:
|
@@ -197,23 +203,28 @@ def main():
|
|
197
203
|
parser.add_argument("--password", help="User Password")
|
198
204
|
|
199
205
|
args = parser.parse_args()
|
206
|
+
app_settings = get_app_config()
|
207
|
+
app_config = app_settings["Environment"]
|
200
208
|
|
201
|
-
server = args.server if args.server is not None else
|
202
|
-
url = args.url if args.url is not None else
|
209
|
+
server = args.server if args.server is not None else app_config['Egeria View Server']
|
210
|
+
url = args.url if args.url is not None else app_config['Egeria View Server URL']
|
203
211
|
userid = args.userid if args.userid is not None else EGERIA_USER
|
204
212
|
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
205
213
|
|
206
214
|
try:
|
207
215
|
search_string = Prompt.ask(
|
208
|
-
"Enter the collection you are
|
216
|
+
"Enter the collection you are looking for or '*' for all:", default="*"
|
209
217
|
).strip()
|
210
|
-
output_format = Prompt.ask("
|
218
|
+
output_format = Prompt.ask("Which output format do you want?", choices=["DICT", "TABLE", "FORM", "REPORT", "HTML", "LIST"], default="TABLE")
|
211
219
|
|
212
220
|
display_collections(search_string, server, url, userid, user_pass, output_format = output_format)
|
213
221
|
|
214
222
|
except KeyboardInterrupt:
|
215
223
|
pass
|
216
224
|
|
225
|
+
except PyegeriaException as e:
|
226
|
+
print_exception_response(e)
|
227
|
+
|
217
228
|
|
218
229
|
if __name__ == "__main__":
|
219
230
|
main()
|
md_processing/__init__.py
CHANGED
@@ -8,7 +8,10 @@ from md_processing.md_commands.governance_officer_commands import (process_gov_d
|
|
8
8
|
|
9
9
|
|
10
10
|
from md_processing.md_commands.product_manager_commands import (process_digital_product_upsert_command,
|
11
|
-
process_agreement_upsert_command
|
11
|
+
process_agreement_upsert_command,
|
12
|
+
process_collection_list_command,
|
13
|
+
process_collection_upsert_command,
|
14
|
+
process_link_agreement_item_command)
|
12
15
|
|
13
16
|
from md_processing.md_commands.solution_architect_commands import (process_blueprint_upsert_command,
|
14
17
|
process_solution_component_upsert_command,
|
@@ -63,7 +66,7 @@ from md_processing.md_processing_utils.md_processing_constants import (ALWAYS, E
|
|
63
66
|
SEARCH_LABELS, GUID_LABELS,
|
64
67
|
ELEMENT_OUTPUT_FORMATS, TERM_RELATIONSHPS,
|
65
68
|
command_list, COMMAND_DEFINITIONS, GOV_COM_LIST,
|
66
|
-
GOV_LINK_LIST)
|
69
|
+
GOV_LINK_LIST, COLLECTIONS_LIST, SIMPLE_COLLECTIONS,)
|
67
70
|
# Import functions from md_processing_constants
|
68
71
|
from md_processing.md_processing_utils.md_processing_constants import (load_commands, get_command_spec, get_attribute,
|
69
72
|
get_attribute_labels, get_alternate_names)
|