pyegeria 5.4.4.2__py3-none-any.whl → 5.4.4.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/list_format_set.py +6 -2
- md_processing/.obsidian/plugins/obsidian-sample-plugin/.git/index +0 -0
- md_processing/md_commands/data_designer_commands.py +17 -11
- md_processing/md_commands/ext_ref_commands.py +9 -6
- md_processing/md_commands/glossary_commands.py +6 -2
- md_processing/md_commands/governance_officer_commands.py +4 -2
- md_processing/md_commands/product_manager_commands.py +9 -6
- md_processing/md_commands/project_commands.py +5 -2
- pyegeria/__init__.py +1 -1
- pyegeria/_client_new.py +469 -44
- pyegeria/_output_formats.py +1338 -141
- pyegeria/external_references.py +100 -209
- pyegeria/glossary_manager.py +2 -1
- pyegeria/output_formatter.py +4 -0
- pyegeria/utils.py +5 -64
- {pyegeria-5.4.4.2.dist-info → pyegeria-5.4.4.3.dist-info}/METADATA +1 -1
- {pyegeria-5.4.4.2.dist-info → pyegeria-5.4.4.3.dist-info}/RECORD +20 -23
- commands/cat/debug_log.2025-09-10_13-48-37_153090.log.zip +0 -0
- md_processing/dr-egeria-outbox/Business-Imperative-DrE-2025-09-11-21-21-15.md +0 -33
- md_processing/md_commands/old_solution_architect_commands.py +0 -1139
- {pyegeria-5.4.4.2.dist-info → pyegeria-5.4.4.3.dist-info}/LICENSE +0 -0
- {pyegeria-5.4.4.2.dist-info → pyegeria-5.4.4.3.dist-info}/WHEEL +0 -0
- {pyegeria-5.4.4.2.dist-info → pyegeria-5.4.4.3.dist-info}/entry_points.txt +0 -0
commands/cat/list_format_set.py
CHANGED
@@ -54,10 +54,12 @@ from pyegeria import (
|
|
54
54
|
NO_ELEMENTS_FOUND, GovernanceOfficer, GlossaryManager,
|
55
55
|
)
|
56
56
|
from pyegeria.config import settings
|
57
|
+
from pyegeria.external_references import ExternalReferences
|
57
58
|
from pyegeria.logging_configuration import config_logging
|
59
|
+
from pyegeria._output_format_models import load_format_sets_from_json
|
58
60
|
from pyegeria._output_formats import (select_output_format_set, get_output_format_set_heading,
|
59
61
|
load_user_format_sets, load_output_format_sets,
|
60
|
-
|
62
|
+
get_output_format_set_description)
|
61
63
|
from pyegeria._exceptions_new import PyegeriaException, print_exception_response
|
62
64
|
|
63
65
|
# pydevd_pycharm.settrace('host.docker.internal', # Use 'host.docker.internal' to connect to the host machine
|
@@ -166,6 +168,8 @@ def execute_format_set_action(
|
|
166
168
|
client_class = GovernanceOfficer
|
167
169
|
elif class_name == "GlossaryManager":
|
168
170
|
client_class = GlossaryManager
|
171
|
+
elif class_name == "ExternalReference":
|
172
|
+
client_class = ExternalReferences
|
169
173
|
else:
|
170
174
|
client_class = EgeriaTech
|
171
175
|
|
@@ -258,7 +262,7 @@ def execute_format_set_action(
|
|
258
262
|
return
|
259
263
|
else:
|
260
264
|
# For TABLE output, add output_format to params
|
261
|
-
params['output_format'] = "
|
265
|
+
params['output_format'] = "TABLE"
|
262
266
|
print(f"\n==> Calling function: {func} with parameters:{params}")
|
263
267
|
# Call the function and create a table
|
264
268
|
try:
|
Binary file
|
@@ -31,6 +31,7 @@ from md_processing.md_processing_utils.extraction_utils import (extract_command_
|
|
31
31
|
from md_processing.md_processing_utils.md_processing_constants import (load_commands, ERROR)
|
32
32
|
from pyegeria import DEBUG_LEVEL, body_slimmer
|
33
33
|
from pyegeria.egeria_tech_client import EgeriaTech
|
34
|
+
from pyegeria.utils import make_format_set_name_from_type
|
34
35
|
|
35
36
|
GERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
36
37
|
EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
|
@@ -451,6 +452,7 @@ def process_data_spec_upsert_command(egeria_client: EgeriaTech, txt: str, direct
|
|
451
452
|
in_data_spec_list = attributes.get('In Data Specification', {}).get('value', None)
|
452
453
|
in_data_spec_valid = attributes.get('In Data Specification', {}).get('valid', None)
|
453
454
|
in_data_spec_exists = attributes.get('In Data Specification', {}).get('exists', None)
|
455
|
+
output_set = make_format_set_name_from_type(object_type)
|
454
456
|
|
455
457
|
if directive == "display":
|
456
458
|
|
@@ -489,7 +491,7 @@ def process_data_spec_upsert_command(egeria_client: EgeriaTech, txt: str, direct
|
|
489
491
|
'guid': guid, 'display_name': display_name
|
490
492
|
})
|
491
493
|
return egeria_client.get_collection_by_guid(guid, element_type='Data Specification',
|
492
|
-
output_format='MD')
|
494
|
+
output_format='MD', output_format_set=output_set)
|
493
495
|
|
494
496
|
elif object_action == "Create":
|
495
497
|
if valid is False and exists:
|
@@ -517,7 +519,7 @@ def process_data_spec_upsert_command(egeria_client: EgeriaTech, txt: str, direct
|
|
517
519
|
})
|
518
520
|
msg = f"Created Element `{display_name}` with GUID {guid}\n\n___"
|
519
521
|
logger.success(msg)
|
520
|
-
return egeria_client.get_collection_by_guid(guid, object_type, output_format='MD')
|
522
|
+
return egeria_client.get_collection_by_guid(guid, object_type, output_format='MD', output_format_set=output_set)
|
521
523
|
else:
|
522
524
|
msg = f"Failed to create element `{display_name}` with GUID {guid}\n\n___"
|
523
525
|
logger.error(msg)
|
@@ -562,6 +564,7 @@ def process_data_dict_upsert_command(egeria_client: EgeriaTech, txt: str, direct
|
|
562
564
|
attributes = parsed_output['attributes']
|
563
565
|
display_name = attributes.get('Display Name', {}).get('value', "None Found")
|
564
566
|
status = attributes.get('Status', {}).get('value', None)
|
567
|
+
output_set = make_format_set_name_from_type(object_type)
|
565
568
|
|
566
569
|
if directive == "display":
|
567
570
|
|
@@ -600,7 +603,7 @@ def process_data_dict_upsert_command(egeria_client: EgeriaTech, txt: str, direct
|
|
600
603
|
'guid': guid, 'display_name': display_name
|
601
604
|
})
|
602
605
|
return egeria_client.get_collection_by_guid(guid, element_type='Data Specification',
|
603
|
-
output_format='MD')
|
606
|
+
output_format='MD', output_format_set=output_set)
|
604
607
|
|
605
608
|
elif object_action == "Create":
|
606
609
|
if valid is False and exists:
|
@@ -627,7 +630,7 @@ def process_data_dict_upsert_command(egeria_client: EgeriaTech, txt: str, direct
|
|
627
630
|
})
|
628
631
|
msg = f"Created Element `{display_name}` with GUID {guid}\n\n___"
|
629
632
|
logger.success(msg)
|
630
|
-
return egeria_client.get_collection_by_guid(guid, object_type, output_format='MD')
|
633
|
+
return egeria_client.get_collection_by_guid(guid, object_type, output_format='MD', output_format_set=output_set)
|
631
634
|
else:
|
632
635
|
msg = f"Failed to create element `{display_name}` with GUID {guid}\n\n___"
|
633
636
|
logger.error(msg)
|
@@ -665,7 +668,7 @@ def process_data_structure_upsert_command(egeria_client: EgeriaTech, txt: str,
|
|
665
668
|
|
666
669
|
qualified_name = parsed_output.get('qualified_name', None)
|
667
670
|
guid = parsed_output.get('guid', None)
|
668
|
-
|
671
|
+
output_set = make_format_set_name_from_type(object_type)
|
669
672
|
|
670
673
|
|
671
674
|
if directive == "display":
|
@@ -720,7 +723,7 @@ def process_data_structure_upsert_command(egeria_client: EgeriaTech, txt: str,
|
|
720
723
|
})
|
721
724
|
logger.success(f"Updated {object_type} `{display_name}` with GUID {guid}\n\n___")
|
722
725
|
|
723
|
-
core_props = egeria_client.get_data_structure_by_guid(guid, output_format='MD')
|
726
|
+
core_props = egeria_client.get_data_structure_by_guid(guid, output_format='MD', output_format_set=output_set)
|
724
727
|
|
725
728
|
update_element_dictionary(qualified_name, {
|
726
729
|
'guid': guid, 'display_name': display_name
|
@@ -757,7 +760,7 @@ def process_data_structure_upsert_command(egeria_client: EgeriaTech, txt: str,
|
|
757
760
|
'guid': guid, 'display_name': display_name
|
758
761
|
})
|
759
762
|
|
760
|
-
core_props = egeria_client.get_data_structure_by_guid(guid, output_format='MD')
|
763
|
+
core_props = egeria_client.get_data_structure_by_guid(guid, output_format='MD', output_format_set=output_set)
|
761
764
|
|
762
765
|
if in_data_dictionary:
|
763
766
|
logger.info(f"Will add to data dictionary(s) `{in_data_dictionary}`")
|
@@ -809,6 +812,7 @@ def process_data_field_upsert_command(egeria_client: EgeriaTech, txt: str, direc
|
|
809
812
|
guid = parsed_output.get('guid', None)
|
810
813
|
valid = parsed_output['valid']
|
811
814
|
exists = parsed_output['exists']
|
815
|
+
output_set = make_format_set_name_from_type(object_type)
|
812
816
|
|
813
817
|
print(Markdown(parsed_output['display']))
|
814
818
|
|
@@ -893,7 +897,7 @@ def process_data_field_upsert_command(egeria_client: EgeriaTech, txt: str, direc
|
|
893
897
|
update_element_dictionary(qualified_name, {
|
894
898
|
'guid': guid, 'display_name': display_name
|
895
899
|
})
|
896
|
-
core_props = egeria_client.get_data_field_by_guid(guid, output_format='MD') ## update back to by_guid?
|
900
|
+
core_props = egeria_client.get_data_field_by_guid(guid, output_format='MD', output_format_set=output_set) ## update back to by_guid?
|
897
901
|
|
898
902
|
# existing_data_field = egeria_client.get_data_field_by_guid(guid, output_format='JSON')
|
899
903
|
|
@@ -935,7 +939,7 @@ def process_data_field_upsert_command(egeria_client: EgeriaTech, txt: str, direc
|
|
935
939
|
'guid': guid, 'display_name': display_name
|
936
940
|
})
|
937
941
|
# Start assembling the information we will present back out
|
938
|
-
core_props = egeria_client.get_data_field_by_guid(guid, 'MD')
|
942
|
+
core_props = egeria_client.get_data_field_by_guid(guid, 'MD', output_format_set=output_set)
|
939
943
|
|
940
944
|
# Add the field to any data dictionaries
|
941
945
|
if in_data_dictionary:
|
@@ -1032,6 +1036,7 @@ def process_data_class_upsert_command(egeria_client: EgeriaTech, txt: str, direc
|
|
1032
1036
|
guid = parsed_output.get('guid', None)
|
1033
1037
|
valid = parsed_output['valid']
|
1034
1038
|
exists = parsed_output['exists']
|
1039
|
+
output_set = make_format_set_name_from_type(object_type)
|
1035
1040
|
|
1036
1041
|
print(Markdown(parsed_output['display']))
|
1037
1042
|
|
@@ -1082,6 +1087,7 @@ def process_data_class_upsert_command(egeria_client: EgeriaTech, txt: str, direc
|
|
1082
1087
|
sample_values = attributes.get('Sample Values', {}).get('value', [])
|
1083
1088
|
data_patterns = attributes.get('Data Patterns', {}).get('value', [])
|
1084
1089
|
additional_properties = attributes.get('Additional Properties', {}).get('value', {})
|
1090
|
+
output_set = make_format_set_name_from_type(object_type)
|
1085
1091
|
|
1086
1092
|
###############
|
1087
1093
|
aliases = attributes.get('Aliases', {}).get('value', None)
|
@@ -1171,7 +1177,7 @@ def process_data_class_upsert_command(egeria_client: EgeriaTech, txt: str, direc
|
|
1171
1177
|
update_element_dictionary(qualified_name, {
|
1172
1178
|
'guid': guid, 'display_name': display_name
|
1173
1179
|
})
|
1174
|
-
core_props = egeria_client.get_data_class_by_guid(guid, None, 'MD')
|
1180
|
+
core_props = egeria_client.get_data_class_by_guid(guid, None, 'MD', output_format_set=output_set)
|
1175
1181
|
|
1176
1182
|
# Sync membership in data dictionaries
|
1177
1183
|
update_data_collection_memberships(egeria_client, object_type, data_dict_guid_list, "DataDictionary",
|
@@ -1219,7 +1225,7 @@ def process_data_class_upsert_command(egeria_client: EgeriaTech, txt: str, direc
|
|
1219
1225
|
'guid': guid, 'display_name': display_name
|
1220
1226
|
})
|
1221
1227
|
# Start assembling the information we will present back out
|
1222
|
-
core_props = egeria_client.get_data_class_by_guid(guid, None, 'MD')
|
1228
|
+
core_props = egeria_client.get_data_class_by_guid(guid, None, 'MD', output_format_set=output_set)
|
1223
1229
|
|
1224
1230
|
# Add the field to any data dictionaries
|
1225
1231
|
if in_data_dictionary:
|
@@ -44,6 +44,8 @@ from md_processing.md_processing_utils.md_processing_constants import (GLOSSARY_
|
|
44
44
|
from pyegeria import body_slimmer
|
45
45
|
from pyegeria._globals import (NO_GLOSSARIES_FOUND, NO_ELEMENTS_FOUND, NO_CATEGORIES_FOUND)
|
46
46
|
from pyegeria.egeria_tech_client import EgeriaTech
|
47
|
+
from pyegeria.utils import make_format_set_name_from_type
|
48
|
+
|
47
49
|
|
48
50
|
# EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "170"))
|
49
51
|
# console = Console(width=EGERIA_WIDTH)
|
@@ -84,6 +86,7 @@ def process_external_reference_upsert_command(egeria_client: EgeriaTech, txt: st
|
|
84
86
|
|
85
87
|
display_name = attributes['Display Name'].get('value', None)
|
86
88
|
status = attributes.get('Status', {}).get('value', None)
|
89
|
+
output_set = make_format_set_name_from_type(object_type)
|
87
90
|
#
|
88
91
|
|
89
92
|
if directive == "display":
|
@@ -111,7 +114,7 @@ def process_external_reference_upsert_command(egeria_client: EgeriaTech, txt: st
|
|
111
114
|
prop_body = set_element_prop_body(obj, qualified_name, attributes)
|
112
115
|
prop_body["referenceTitle"] = attributes.get('Reference Title', {}).get('value', None)
|
113
116
|
prop_body["referenceAbstract"] = attributes.get('Reference Abstract', {}).get('value', None)
|
114
|
-
prop_body["authors"] = attributes.get('Authors', {}).get('
|
117
|
+
prop_body["authors"] = attributes.get('Authors', {}).get('value', None)
|
115
118
|
prop_body["organization"] = attributes.get('Organization', {}).get('value', None)
|
116
119
|
prop_body["url"] = attributes.get('URL', {}).get('value', None)
|
117
120
|
prop_body["sources"] = attributes.get('Sources', {}).get('value', None)
|
@@ -161,16 +164,16 @@ def process_external_reference_upsert_command(egeria_client: EgeriaTech, txt: st
|
|
161
164
|
body = set_update_body(obj, attributes)
|
162
165
|
body['properties'] = prop_body
|
163
166
|
|
164
|
-
egeria_client.
|
165
|
-
if status:
|
166
|
-
|
167
|
+
egeria_client.update_external_reference(guid, body)
|
168
|
+
# if status:
|
169
|
+
# egeria_client.update_external_reference_status(guid, status)
|
167
170
|
|
168
171
|
logger.success(f"Updated {object_type} `{display_name}` with GUID {guid}\n\n___")
|
169
172
|
update_element_dictionary(qualified_name, {
|
170
173
|
'guid': guid, 'display_name': display_name
|
171
174
|
})
|
172
175
|
return egeria_client.get_external_reference_by_guid(guid, element_type= object_type,
|
173
|
-
output_format='MD', output_format_set =
|
176
|
+
output_format='MD', output_format_set = output_set)
|
174
177
|
|
175
178
|
|
176
179
|
elif object_action == "Create":
|
@@ -203,7 +206,7 @@ def process_external_reference_upsert_command(egeria_client: EgeriaTech, txt: st
|
|
203
206
|
logger.success(msg)
|
204
207
|
return egeria_client.get_external_reference_by_guid(guid, element_type=object_type,
|
205
208
|
output_format='MD',
|
206
|
-
output_format_set=
|
209
|
+
output_format_set=output_set)
|
207
210
|
else:
|
208
211
|
msg = f"Failed to create element `{display_name}` with GUID {guid}\n\n___"
|
209
212
|
logger.error(msg)
|
@@ -39,6 +39,8 @@ from md_processing.md_processing_utils.md_processing_constants import (GLOSSARY_
|
|
39
39
|
from pyegeria import body_slimmer
|
40
40
|
from pyegeria._globals import (NO_GLOSSARIES_FOUND, NO_ELEMENTS_FOUND, NO_CATEGORIES_FOUND)
|
41
41
|
from pyegeria.egeria_tech_client import EgeriaTech
|
42
|
+
from pyegeria.utils import make_format_set_name_from_type
|
43
|
+
|
42
44
|
|
43
45
|
# EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "170"))
|
44
46
|
# console = Console(width=EGERIA_WIDTH)
|
@@ -543,6 +545,8 @@ def process_term_upsert_command(egeria_client: EgeriaTech, txt: str, directive:
|
|
543
545
|
get_method = egeria_client.get_term_by_guid
|
544
546
|
collection_types = ["Glossary", "Folder"]
|
545
547
|
|
548
|
+
output_set = make_format_set_name_from_type(object_type)
|
549
|
+
|
546
550
|
if object_action == "Update":
|
547
551
|
if not exists:
|
548
552
|
msg = (f" Element `{display_name}` does not exist! Updating result document with Create "
|
@@ -571,7 +575,7 @@ def process_term_upsert_command(egeria_client: EgeriaTech, txt: str, directive:
|
|
571
575
|
'guid': guid, 'display_name': display_name
|
572
576
|
})
|
573
577
|
return egeria_client.get_term_by_guid(guid, element_type='GlossaryTerm',
|
574
|
-
output_format='MD', output_format_set=
|
578
|
+
output_format='MD', output_format_set=output_set)
|
575
579
|
|
576
580
|
|
577
581
|
elif object_action == "Create":
|
@@ -600,7 +604,7 @@ def process_term_upsert_command(egeria_client: EgeriaTech, txt: str, directive:
|
|
600
604
|
})
|
601
605
|
msg = f"Created Element `{display_name}` with GUID {guid}\n\n___"
|
602
606
|
logger.success(msg)
|
603
|
-
return egeria_client.get_term_by_guid(guid, obj, output_format='MD')
|
607
|
+
return egeria_client.get_term_by_guid(guid, obj, output_format='MD', output_format_set=output_set)
|
604
608
|
else:
|
605
609
|
msg = f"Failed to create element `{display_name}` with GUID {guid}\n\n___"
|
606
610
|
logger.error(msg)
|
@@ -132,6 +132,8 @@ def process_gov_definition_upsert_command(egeria_client: EgeriaTech, txt: str, d
|
|
132
132
|
return valid
|
133
133
|
|
134
134
|
elif directive == "process":
|
135
|
+
output_set = make_format_set_name_from_type(object_type)
|
136
|
+
|
135
137
|
if object_action == "Update":
|
136
138
|
if not guid:
|
137
139
|
msg = (f"The `{object_type}` '{display_name}' does not yet exist.\n The result document has been "
|
@@ -153,7 +155,7 @@ def process_gov_definition_upsert_command(egeria_client: EgeriaTech, txt: str, d
|
|
153
155
|
egeria_client.update_governance_definition_status(guid, status)
|
154
156
|
logger.success(f"Updated {object_type} `{display_name}` with GUID {guid}")
|
155
157
|
return egeria_client.get_governance_definition_by_guid(guid, output_format='MD',
|
156
|
-
output_format_set =
|
158
|
+
output_format_set = output_set)
|
157
159
|
|
158
160
|
elif object_action == "Create":
|
159
161
|
if valid is False and exists:
|
@@ -173,7 +175,7 @@ def process_gov_definition_upsert_command(egeria_client: EgeriaTech, txt: str, d
|
|
173
175
|
guid = egeria_client.create_governance_definition(body_slimmer(create_body))
|
174
176
|
if guid:
|
175
177
|
logger.success(f"Created {object_type} `{display_name}` with GUID {guid}")
|
176
|
-
return egeria_client.get_governance_definition_by_guid(guid, output_format='MD')
|
178
|
+
return egeria_client.get_governance_definition_by_guid(guid, output_format='MD', output_format_set = output_set)
|
177
179
|
else:
|
178
180
|
logger.error(f"Failed to create {object_type} `{display_name}`.")
|
179
181
|
return None
|
@@ -179,6 +179,7 @@ def process_collection_upsert_command(egeria_client: EgeriaTech, txt: str, direc
|
|
179
179
|
|
180
180
|
display_name = attributes['Display Name'].get('value', None)
|
181
181
|
status = attributes.get('Status', {}).get('value', None)
|
182
|
+
output_set = make_format_set_name_from_type(object_type)
|
182
183
|
|
183
184
|
if directive == "display":
|
184
185
|
|
@@ -222,7 +223,7 @@ def process_collection_upsert_command(egeria_client: EgeriaTech, txt: str, direc
|
|
222
223
|
'guid': guid, 'display_name': display_name
|
223
224
|
})
|
224
225
|
return egeria_client.get_collection_by_guid(guid, element_type='Data Specification',
|
225
|
-
output_format='MD')
|
226
|
+
output_format='MD', output_format_set=output_set)
|
226
227
|
|
227
228
|
|
228
229
|
elif object_action == "Create":
|
@@ -250,7 +251,7 @@ def process_collection_upsert_command(egeria_client: EgeriaTech, txt: str, direc
|
|
250
251
|
})
|
251
252
|
msg = f"Created Element `{display_name}` with GUID {guid}\n\n___"
|
252
253
|
logger.success(msg)
|
253
|
-
return egeria_client.get_collection_by_guid(guid, obj, output_format='MD')
|
254
|
+
return egeria_client.get_collection_by_guid(guid, obj, output_format='MD', output_format_set=output_set)
|
254
255
|
else:
|
255
256
|
msg = f"Failed to create element `{display_name}` with GUID {guid}\n\n___"
|
256
257
|
logger.error(msg)
|
@@ -299,6 +300,7 @@ def process_digital_product_upsert_command(egeria_client: EgeriaTech, txt: str,
|
|
299
300
|
display_name = attributes['Display Name'].get('value', None)
|
300
301
|
product_manager = attributes.get('Product Manager',{}).get('value', None)
|
301
302
|
product_status = attributes.get('Product Status',{}).get('value', None)
|
303
|
+
output_set = make_format_set_name_from_type(object_type)
|
302
304
|
|
303
305
|
if directive == "display":
|
304
306
|
|
@@ -340,7 +342,7 @@ def process_digital_product_upsert_command(egeria_client: EgeriaTech, txt: str,
|
|
340
342
|
'guid': guid, 'display_name': display_name
|
341
343
|
})
|
342
344
|
return egeria_client.get_collection_by_guid(guid, element_type='Digital Product',
|
343
|
-
output_format='MD')
|
345
|
+
output_format='MD', output_format_set=output_set)
|
344
346
|
|
345
347
|
|
346
348
|
elif object_action == "Create":
|
@@ -366,7 +368,7 @@ def process_digital_product_upsert_command(egeria_client: EgeriaTech, txt: str,
|
|
366
368
|
msg = f"Created Element `{display_name}` with GUID {guid}\n\n___"
|
367
369
|
logger.success(msg)
|
368
370
|
return egeria_client.get_collection_by_guid(guid, element_type='Digital Product',
|
369
|
-
output_format='MD')
|
371
|
+
output_format='MD', output_format_set=output_set)
|
370
372
|
else:
|
371
373
|
msg = f"Failed to create element `{display_name}` with GUID {guid}\n\n___"
|
372
374
|
logger.error(msg)
|
@@ -411,6 +413,7 @@ def process_agreement_upsert_command(egeria_client: EgeriaTech, txt: str, direct
|
|
411
413
|
|
412
414
|
display_name = attributes['Display Name'].get('value', None)
|
413
415
|
status = attributes.get('Status', {}).get('value', None)
|
416
|
+
output_set = make_format_set_name_from_type(object_type)
|
414
417
|
|
415
418
|
if directive == "display":
|
416
419
|
|
@@ -454,7 +457,7 @@ def process_agreement_upsert_command(egeria_client: EgeriaTech, txt: str, direct
|
|
454
457
|
'guid': guid, 'display_name': display_name
|
455
458
|
})
|
456
459
|
return egeria_client.get_collection_by_guid(guid, element_type='Data Specification',
|
457
|
-
output_format='MD')
|
460
|
+
output_format='MD', output_format_set=output_set)
|
458
461
|
|
459
462
|
|
460
463
|
elif object_action == "Create":
|
@@ -479,7 +482,7 @@ def process_agreement_upsert_command(egeria_client: EgeriaTech, txt: str, direct
|
|
479
482
|
})
|
480
483
|
msg = f"Created Element `{display_name}` with GUID {guid}\n\n___"
|
481
484
|
logger.success(msg)
|
482
|
-
return egeria_client.get_collection_by_guid(guid, obj, output_format='MD')
|
485
|
+
return egeria_client.get_collection_by_guid(guid, obj, output_format='MD', output_format_set=output_set)
|
483
486
|
else:
|
484
487
|
msg = f"Failed to create element `{display_name}` with GUID {guid}\n\n___"
|
485
488
|
logger.error(msg)
|
@@ -44,6 +44,8 @@ from md_processing.md_processing_utils.md_processing_constants import (GLOSSARY_
|
|
44
44
|
from pyegeria import body_slimmer
|
45
45
|
from pyegeria._globals import (NO_GLOSSARIES_FOUND, NO_ELEMENTS_FOUND, NO_CATEGORIES_FOUND)
|
46
46
|
from pyegeria.egeria_tech_client import EgeriaTech
|
47
|
+
from pyegeria.utils import make_format_set_name_from_type
|
48
|
+
|
47
49
|
|
48
50
|
# EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "170"))
|
49
51
|
# console = Console(width=EGERIA_WIDTH)
|
@@ -83,6 +85,7 @@ def process_project_upsert_command(egeria_client: EgeriaTech, txt: str, directiv
|
|
83
85
|
|
84
86
|
display_name = attributes['Display Name'].get('value', None)
|
85
87
|
status = attributes.get('Status', {}).get('value', None)
|
88
|
+
output_set = make_format_set_name_from_type(object_type)
|
86
89
|
#
|
87
90
|
|
88
91
|
if directive == "display":
|
@@ -142,7 +145,7 @@ def process_project_upsert_command(egeria_client: EgeriaTech, txt: str, directiv
|
|
142
145
|
'guid': guid, 'display_name': display_name
|
143
146
|
})
|
144
147
|
return egeria_client.get_project_by_guid(guid, element_type='Project',
|
145
|
-
output_format='MD', output_format_set =
|
148
|
+
output_format='MD', output_format_set = output_set)
|
146
149
|
|
147
150
|
|
148
151
|
elif object_action == "Create":
|
@@ -173,7 +176,7 @@ def process_project_upsert_command(egeria_client: EgeriaTech, txt: str, directiv
|
|
173
176
|
})
|
174
177
|
msg = f"Created Element `{display_name}` with GUID {guid}\n\n___"
|
175
178
|
logger.success(msg)
|
176
|
-
return egeria_client.get_project_by_guid(guid, output_format='MD', output_format_set =
|
179
|
+
return egeria_client.get_project_by_guid(guid, output_format='MD', output_format_set = output_set)
|
177
180
|
else:
|
178
181
|
msg = f"Failed to create element `{display_name}` with GUID {guid}\n\n___"
|
179
182
|
logger.error(msg)
|
pyegeria/__init__.py
CHANGED
@@ -62,7 +62,7 @@ from .registered_info import RegisteredInfo
|
|
62
62
|
from .runtime_manager_omvs import RuntimeManager
|
63
63
|
from .server_operations import ServerOps
|
64
64
|
from .solution_architect import SolutionArchitect
|
65
|
-
from .utils import body_slimmer,
|
65
|
+
from .utils import body_slimmer,to_pascal_case, to_camel_case, camel_to_title_case
|
66
66
|
from .valid_metadata_omvs import ValidMetadataManager
|
67
67
|
from .x_action_author_omvs import ActionAuthor
|
68
68
|
from .template_manager_omvs import TemplateManager
|