pyegeria 5.4.0.dev8__py3-none-any.whl → 5.4.0.dev10__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 +5906 -3076
- commands/cat/debug_log.2025-06-24_15-51-28_769553.zip +0 -0
- commands/cat/debug_log.2025-06-26_11-18-40_644650.zip +0 -0
- commands/cat/dr_egeria_md.py +7 -7
- commands/cat/glossary_actions.py +2 -2
- md_processing/md_commands/data_designer_commands.py +17 -12
- md_processing/md_commands/glossary_commands.py +1 -0
- pyegeria/collection_manager_omvs.py +4568 -1145
- pyegeria/glossary_manager_omvs.py +2 -2
- {pyegeria-5.4.0.dev8.dist-info → pyegeria-5.4.0.dev10.dist-info}/METADATA +1 -1
- {pyegeria-5.4.0.dev8.dist-info → pyegeria-5.4.0.dev10.dist-info}/RECORD +14 -12
- {pyegeria-5.4.0.dev8.dist-info → pyegeria-5.4.0.dev10.dist-info}/LICENSE +0 -0
- {pyegeria-5.4.0.dev8.dist-info → pyegeria-5.4.0.dev10.dist-info}/WHEEL +0 -0
- {pyegeria-5.4.0.dev8.dist-info → pyegeria-5.4.0.dev10.dist-info}/entry_points.txt +0 -0
Binary file
|
Binary file
|
commands/cat/dr_egeria_md.py
CHANGED
@@ -64,7 +64,7 @@ EGERIA_OUTBOX_PATH = os.environ.get("EGERIA_OUTBOX_PATH", "md_processing/dr_eger
|
|
64
64
|
@click.option("--userid", default=EGERIA_USER, help="Egeria user")
|
65
65
|
@click.option("--user_pass", default=EGERIA_USER_PASSWORD, help="Egeria user password")
|
66
66
|
@logger.catch
|
67
|
-
def process_markdown_file(
|
67
|
+
def process_markdown_file(input_file: str, directive: str, server: str, url: str, userid: str, user_pass: str, ) -> None:
|
68
68
|
"""
|
69
69
|
Process a markdown file by parsing and executing Dr. Egeria md_commands. Write output to a new file.
|
70
70
|
"""
|
@@ -75,7 +75,7 @@ def process_markdown_file(file_path: str, directive: str, server: str, url: str,
|
|
75
75
|
token = client.create_egeria_bearer_token(userid, user_pass)
|
76
76
|
|
77
77
|
updated = False
|
78
|
-
full_file_path = os.path.join(EGERIA_ROOT_PATH, EGERIA_INBOX_PATH,
|
78
|
+
full_file_path = os.path.join(EGERIA_ROOT_PATH, EGERIA_INBOX_PATH, input_file)
|
79
79
|
logger.info("\n\n====================================================\n\n")
|
80
80
|
logger.info(f"Processing Markdown File: {full_file_path}")
|
81
81
|
try:
|
@@ -87,7 +87,7 @@ def process_markdown_file(file_path: str, directive: str, server: str, url: str,
|
|
87
87
|
|
88
88
|
final_output = []
|
89
89
|
prov_found = False
|
90
|
-
prov_output = (f"\n# Provenance\n\n* Results from processing file {
|
90
|
+
prov_output = (f"\n# Provenance\n\n* Results from processing file {input_file} on "
|
91
91
|
f"{datetime.now().strftime("%Y-%m-%d %H:%M")}\n")
|
92
92
|
h1_blocks = []
|
93
93
|
current_block = ""
|
@@ -104,7 +104,7 @@ def process_markdown_file(file_path: str, directive: str, server: str, url: str,
|
|
104
104
|
if potential_command in cmd_list:
|
105
105
|
# Process the block based on the object_action
|
106
106
|
if potential_command == "Provenance":
|
107
|
-
result = process_provenance_command(
|
107
|
+
result = process_provenance_command(input_file, current_block)
|
108
108
|
prov_found = True
|
109
109
|
|
110
110
|
elif potential_command in ["Create Glossary", "Update Glossary"]:
|
@@ -233,7 +233,7 @@ def process_markdown_file(file_path: str, directive: str, server: str, url: str,
|
|
233
233
|
|
234
234
|
try:
|
235
235
|
if updated:
|
236
|
-
path, filename = os.path.split(
|
236
|
+
path, filename = os.path.split(input_file) # Get both parts
|
237
237
|
new_filename = f"processed-{get_current_datetime_string()}-{filename}" # Create the new filename
|
238
238
|
new_file_path = os.path.join(EGERIA_ROOT_PATH, EGERIA_OUTBOX_PATH, new_filename) # Construct the new path
|
239
239
|
os.makedirs(os.path.dirname(new_file_path), exist_ok=True)
|
@@ -267,11 +267,11 @@ def process_markdown_file(file_path: str, directive: str, server: str, url: str,
|
|
267
267
|
# user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
268
268
|
# time_out = args.time_out if args.time_out is not None else 60
|
269
269
|
# try:
|
270
|
-
#
|
270
|
+
# input_file = Prompt.ask("Markdown File name to process:", default="")
|
271
271
|
# directive = Prompt.ask("Processing Directive:", choices=[ "display", "validate", "process"],
|
272
272
|
# default="validate")
|
273
273
|
#
|
274
|
-
# process_markdown_file(
|
274
|
+
# process_markdown_file(input_file, directive, server, url, userid, user_pass)
|
275
275
|
# except KeyboardInterrupt:
|
276
276
|
# pass
|
277
277
|
#
|
commands/cat/glossary_actions.py
CHANGED
@@ -315,7 +315,7 @@ def remove_term_from_category(server, url, userid, password, timeout, term_guid,
|
|
315
315
|
@click.option("--glossary_name", help="Name of Glossary", required=True)
|
316
316
|
@click.option("--file_name", help="Name of CSV file", required=True)
|
317
317
|
@click.option(
|
318
|
-
"--
|
318
|
+
"--input_file", help="Path of CSV file", default=EGERIA_GLOSSARY_PATH, required=False
|
319
319
|
)
|
320
320
|
@click.option(
|
321
321
|
"--verbose",
|
@@ -380,7 +380,7 @@ def import_terms_csv(
|
|
380
380
|
)
|
381
381
|
@click.option("--file_name", help="Name of CSV file", required=True)
|
382
382
|
@click.option(
|
383
|
-
"--
|
383
|
+
"--input_file", help="Path of CSV file", default=EGERIA_GLOSSARY_PATH, required=False
|
384
384
|
)
|
385
385
|
@click.option("--server", default=EGERIA_VIEW_SERVER, help="Egeria view server to use")
|
386
386
|
@click.option(
|
@@ -63,8 +63,12 @@ def add_member_to_data_collections(egeria_client: EgeriaTech, collection_list: l
|
|
63
63
|
Add member to data dictionaries and data specifications.
|
64
64
|
"""
|
65
65
|
body = {
|
66
|
-
"class": "
|
67
|
-
"
|
66
|
+
"class": "RelationshipRequestBody",
|
67
|
+
"properties": {
|
68
|
+
"class": "CollectionMembershipProperties",
|
69
|
+
"membershipRationale": "User Specified",
|
70
|
+
"notes": "Added by Dr.Egeria"
|
71
|
+
}
|
68
72
|
}
|
69
73
|
try:
|
70
74
|
if collection_list is not None:
|
@@ -526,10 +530,11 @@ def process_data_spec_upsert_command(egeria_client: EgeriaTech, txt: str, direct
|
|
526
530
|
logger.error(msg)
|
527
531
|
return None
|
528
532
|
else:
|
529
|
-
guid = egeria_client.create_data_spec_collection(
|
530
|
-
|
531
|
-
|
532
|
-
anchor_scope_guid,
|
533
|
+
guid = egeria_client.create_data_spec_collection(display_name, description,
|
534
|
+
is_own_anchor, anchor_guid, parent_guid, parent_relationship_type_name,
|
535
|
+
parent_at_end1, collection_type,
|
536
|
+
anchor_scope_guid, collection_ordering,order_property_name,
|
537
|
+
additional_properties, extended_properties)
|
533
538
|
if guid:
|
534
539
|
update_element_dictionary(qualified_name, {
|
535
540
|
'guid': guid, 'display_name': display_name
|
@@ -639,12 +644,12 @@ def process_data_dict_upsert_command(egeria_client: EgeriaTech, txt: str, direct
|
|
639
644
|
f"`Create` to `Update` in processed output\n\n___")
|
640
645
|
return update_a_command(txt, object_action, object_type, qualified_name, guid)
|
641
646
|
else:
|
642
|
-
guid = egeria_client.create_data_dictionary_collection(
|
643
|
-
parent_relationship_type_name,
|
644
|
-
parent_at_end1,
|
645
|
-
|
646
|
-
|
647
|
-
|
647
|
+
guid = egeria_client.create_data_dictionary_collection(display_name,description, is_own_anchor, anchor_guid,
|
648
|
+
parent_guid, parent_relationship_type_name,
|
649
|
+
parent_at_end1, collection_type,
|
650
|
+
anchor_scope_guid, collection_ordering,
|
651
|
+
order_property_name, additional_properties,
|
652
|
+
extended_properties)
|
648
653
|
if guid:
|
649
654
|
update_element_dictionary(qualified_name, {
|
650
655
|
'guid': guid, 'display_name': display_name
|
@@ -527,6 +527,7 @@ def process_term_upsert_command(egeria_client: EgeriaTech, txt: str, directive:
|
|
527
527
|
else:
|
528
528
|
known_glossary_q_name, known_glossary_guid, glossary_valid, glossary_exists = process_element_identifiers(
|
529
529
|
egeria_client, "Glossary", GLOSSARY_NAME_LABELS, txt, EXISTS_REQUIRED, None)
|
530
|
+
# Todo - add logic to fail if no valid glossary provided.
|
530
531
|
|
531
532
|
# process categories, if present
|
532
533
|
categories = process_simple_attribute(txt, ['Glossary Categories', 'Glossary Category', 'Category', 'Categories'])
|