pyegeria 5.4.0.20__py3-none-any.whl → 5.4.0.22__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.
- pyegeria/_client_new.py +396 -98
- pyegeria/_exceptions_new.py +16 -13
- pyegeria/_output_formats.py +3 -3
- pyegeria/collection_manager.py +562 -1392
- pyegeria/collection_manager_omvs.py +1 -1
- pyegeria/models.py +4 -3
- {pyegeria-5.4.0.20.dist-info → pyegeria-5.4.0.22.dist-info}/METADATA +1 -1
- {pyegeria-5.4.0.20.dist-info → pyegeria-5.4.0.22.dist-info}/RECORD +11 -11
- {pyegeria-5.4.0.20.dist-info → pyegeria-5.4.0.22.dist-info}/LICENSE +0 -0
- {pyegeria-5.4.0.20.dist-info → pyegeria-5.4.0.22.dist-info}/WHEEL +0 -0
- {pyegeria-5.4.0.20.dist-info → pyegeria-5.4.0.22.dist-info}/entry_points.txt +0 -0
pyegeria/_exceptions_new.py
CHANGED
@@ -114,12 +114,15 @@ def print_bullet_list(items)->Text:
|
|
114
114
|
def flatten_dict_to_string(d: dict) -> str:
|
115
115
|
"""Flatten a dictionary into a string and replace quotes with backticks."""
|
116
116
|
try:
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
117
|
+
if d:
|
118
|
+
flat_string = "\n\t".join(
|
119
|
+
# Change replace(\"'\", '`') to replace("'", '`')
|
120
|
+
f"\t* {key}=`{str(value).replace('\"', '`').replace("'", '`')}`"
|
121
|
+
for key, value in d.items()
|
122
|
+
)
|
123
|
+
return flat_string
|
124
|
+
else:
|
125
|
+
return ""
|
123
126
|
except Exception as e:
|
124
127
|
# Corrected syntax for exception chaining
|
125
128
|
raise Exception("Error flattening dictionary") from e
|
@@ -380,17 +383,17 @@ def print_basic_exception(e: PyegeriaException):
|
|
380
383
|
if isinstance(e, PyegeriaException):
|
381
384
|
table.add_row("HTTP Code", str(e.response_code))
|
382
385
|
table.add_row("Egeria Code", str(related_code))
|
383
|
-
table.add_row("Caller Method", e.context.get("caller method", "---"))
|
386
|
+
table.add_row("Caller Method", e.context.get("caller method", "---")) if e.context else ""
|
384
387
|
table.add_row("Request URL", str(e.response_url))
|
385
388
|
table.add_row("Egeria Message",
|
386
|
-
format_dict_to_string(related_response.get('exceptionErrorMessage',"")))
|
389
|
+
format_dict_to_string(related_response.get('exceptionErrorMessage',"")) if isinstance(related_response,dict) else related_response)
|
387
390
|
table.add_row("Egeria User Action",
|
388
|
-
format_dict_to_string(related_response.get('exceptionUserAction',"")))
|
391
|
+
format_dict_to_string(related_response.get('exceptionUserAction',"")) if isinstance(related_response,dict) else related_response)
|
389
392
|
|
390
|
-
exception_msg_id = related_response.get("exceptionErrorMessageId", None)
|
393
|
+
exception_msg_id = related_response.get("exceptionErrorMessageId", None) if isinstance(related_response,dict) else related_response
|
391
394
|
table.add_row("Pyegeria Exception", exception_msg_id)
|
392
|
-
table.add_row("Pyegeria Message",
|
393
|
-
|
395
|
+
table.add_row("Pyegeria Message", e.message)
|
396
|
+
console.print(table)
|
394
397
|
|
395
398
|
|
396
399
|
console.print(table)
|
@@ -408,7 +411,7 @@ def print_validation_error(e: ValidationError):
|
|
408
411
|
|
409
412
|
for error in e.errors():
|
410
413
|
error_type = error["type"]
|
411
|
-
attribute = " ".join(error["loc"])
|
414
|
+
attribute = " ".join(str(part) for part in error["loc"])
|
412
415
|
message = error["msg"]
|
413
416
|
table.add_row(error_type, attribute, message)
|
414
417
|
|
pyegeria/_output_formats.py
CHANGED
@@ -248,7 +248,7 @@ output_format_sets = FormatSetDict({
|
|
248
248
|
action=[ActionParameter(
|
249
249
|
function="CollectionManager.find_collections",
|
250
250
|
user_params=["search_string"],
|
251
|
-
spec_params={"
|
251
|
+
spec_params={"initial_classifications": "DigitalProducts"},
|
252
252
|
)]
|
253
253
|
),
|
254
254
|
|
@@ -269,7 +269,7 @@ output_format_sets = FormatSetDict({
|
|
269
269
|
action=[ActionParameter(
|
270
270
|
function="CollectionManager.find_collections",
|
271
271
|
user_params=["search_string"],
|
272
|
-
spec_params={"
|
272
|
+
spec_params={"initial_classifications": "DataDictionary"},
|
273
273
|
)]
|
274
274
|
),
|
275
275
|
|
@@ -288,7 +288,7 @@ output_format_sets = FormatSetDict({
|
|
288
288
|
action=[ActionParameter(
|
289
289
|
function="CollectionManager.find_collections",
|
290
290
|
user_params=["search_string"],
|
291
|
-
spec_params={"
|
291
|
+
spec_params={"initial_classifications": "DataSpec"},
|
292
292
|
)]
|
293
293
|
),
|
294
294
|
|