pyegeria 5.4.3.3__py3-none-any.whl → 5.4.3.4__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.
Files changed (41) hide show
  1. commands/cat/debug_log.2025-09-02_07-44-39_567276.log.zip +0 -0
  2. commands/cat/debug_log.2025-09-03_07-45-21_986388.log.zip +0 -0
  3. commands/cat/debug_log.log +5314 -4140
  4. commands/cat/list_format_set.py +2 -2
  5. commands/tech/list_information_supply_chains.py +1 -1
  6. commands/tech/list_solution_blueprints.py +1 -1
  7. commands/tech/list_solution_components.py +1 -1
  8. commands/tech/list_solution_roles.py +1 -1
  9. md_processing/__init__.py +0 -4
  10. md_processing/data/commands.json +4 -4
  11. md_processing/dr_egeria.py +6 -9
  12. md_processing/dr_egeria_inbox/data_spec_test.md +38 -364
  13. md_processing/dr_egeria_inbox/gov_def.md +3 -3
  14. md_processing/dr_egeria_inbox/product.md +10 -2
  15. md_processing/md_commands/data_designer_commands.py +90 -425
  16. md_processing/md_processing_utils/common_md_utils.py +50 -1
  17. md_processing/md_processing_utils/extraction_utils.py +14 -7
  18. md_processing/md_processing_utils/md_processing_constants.py +1 -1
  19. pyegeria/___external_references.py +2943 -2955
  20. pyegeria/__init__.py +1 -1
  21. pyegeria/_client_new.py +9 -7
  22. pyegeria/_output_formats.py +124 -3
  23. pyegeria/collection_manager.py +17 -56
  24. pyegeria/config.py +10 -1
  25. pyegeria/data_designer.py +166 -117
  26. pyegeria/egeria_client.py +1 -1
  27. pyegeria/egeria_tech_client.py +1 -1
  28. pyegeria/glossary_manager.py +71 -85
  29. pyegeria/governance_officer.py +26 -29
  30. pyegeria/output_formatter.py +127 -1
  31. pyegeria/project_manager.py +33 -36
  32. pyegeria/{solution_architect_omvs.py → solution_architect.py} +443 -388
  33. {pyegeria-5.4.3.3.dist-info → pyegeria-5.4.3.4.dist-info}/METADATA +1 -1
  34. {pyegeria-5.4.3.3.dist-info → pyegeria-5.4.3.4.dist-info}/RECORD +37 -39
  35. md_processing/dr_egeria_outbox/tuesday/processed-2025-09-02 13:07-gov_def.md +0 -492
  36. md_processing/dr_egeria_outbox/tuesday/processed-2025-09-02 13:25-gov_def.md +0 -520
  37. md_processing/dr_egeria_outbox/tuesday/processed-2025-09-02 16:43-gov_def.md +0 -636
  38. md_processing/dr_egeria_outbox/tuesday/processed-2025-09-02 16:46-gov_def.md +0 -636
  39. {pyegeria-5.4.3.3.dist-info → pyegeria-5.4.3.4.dist-info}/LICENSE +0 -0
  40. {pyegeria-5.4.3.3.dist-info → pyegeria-5.4.3.4.dist-info}/WHEEL +0 -0
  41. {pyegeria-5.4.3.3.dist-info → pyegeria-5.4.3.4.dist-info}/entry_points.txt +0 -0
@@ -240,6 +240,14 @@ def set_find_body(object_type: str, attributes: dict)->dict:
240
240
 
241
241
 
242
242
  def set_create_body(object_type: str, attributes: dict)->dict:
243
+ """
244
+ Build the OUTER request body for a create action (NewElementRequestBody).
245
+
246
+ Notes on two-layer convention:
247
+ - Outer layer (this function): action wrapper with metadata like externalSource*, effectiveTime, anchor/parent hints, and an empty "properties" field.
248
+ - Inner layer: an element-type-specific Properties structure built by set_element_prop_body, set_product_body, set_data_field_body, etc.
249
+ Callers should build the inner body separately with the appropriate helper and then assign it to body["properties"].
250
+ """
243
251
  prop_name = object_type.replace(" ", "")
244
252
  body = {
245
253
  "class": "NewElementRequestBody",
@@ -266,6 +274,13 @@ def set_create_body(object_type: str, attributes: dict)->dict:
266
274
 
267
275
 
268
276
  def set_update_body(object_type: str, attributes: dict)->dict:
277
+ """
278
+ Build the OUTER request body for an update action (UpdateElementRequestBody).
279
+
280
+ Two-layer convention:
281
+ - Outer layer (this function) provides action metadata and an empty "properties" slot.
282
+ - Inner layer must be constructed via element-specific helpers (e.g., set_element_prop_body) and assigned to the returned dict's "properties" key by the caller before invoking the client.
283
+ """
269
284
  return {
270
285
  "class" : "UpdateElementRequestBody",
271
286
  "externalSourceGUID": attributes.get('External Source GUID', {}).get('guid', None),
@@ -292,6 +307,16 @@ def set_rel_prop_body(object_type: str, attributes: dict)->dict:
292
307
  }
293
308
 
294
309
  def set_element_prop_body(object_type: str, qualified_name: str, attributes: dict)->dict:
310
+ """
311
+ Build the INNER element-specific Properties body to be placed under the outer body's "properties" key.
312
+
313
+ This returns the typed properties structure (e.g., "ReferenceableProperties" subtypes) appropriate for the object_type.
314
+ Usage example:
315
+ - outer = set_create_body(object_type, attributes)
316
+ - props = set_element_prop_body(object_type, qualified_name, attributes)
317
+ - outer["properties"] = props
318
+ - client.create_xxx(outer)
319
+ """
295
320
  prop_name = object_type.replace(" ", "")
296
321
  display_name = attributes.get('Display Name', {}).get('value', None)
297
322
 
@@ -323,7 +348,21 @@ def set_product_body(object_type: str, qualified_name: str, attributes: dict)->d
323
348
  prop_bod["nextVersion"] = attributes.get('Next Version Date', {}).get('value', [])
324
349
  return prop_bod
325
350
 
326
-
351
+ def set_data_field_body(object_type: str, qualified_name: str, attributes: dict)->dict:
352
+ prop_bod = set_element_prop_body(object_type, qualified_name, attributes)
353
+ prop_bod["namespace"] = attributes.get('Namespace', {}).get('value', None)
354
+ prop_bod["aliases"] = attributes.get('Aliases', {}).get('value', [])
355
+ prop_bod["namePatterns"] = attributes.get('Name Patterns', {}).get('value', [])
356
+ prop_bod["defaultValue"] = attributes.get('Default Value', {}).get('value', None)
357
+ prop_bod["isNullable"] = attributes.get('Is Nullable', {}).get('value', None)
358
+ prop_bod["dataType"] = attributes.get('Data Type', {}).get('value', None)
359
+ prop_bod["units"] = attributes.get('Units', {}).get('value', None)
360
+ prop_bod["minimumLength"] = attributes.get('Minimum Length', {}).get('value', None)
361
+ prop_bod["length"] = attributes.get('Length', {}).get('value', None)
362
+ prop_bod["precision"] = attributes.get('Precision', {}).get('value', None)
363
+ prop_bod["orderedValues"] = attributes.get('Ordered Values', {}).get('value', [])
364
+ prop_bod["sortOrder"] = attributes.get('Sort Order', {}).get('value', None)
365
+ return prop_bod
327
366
 
328
367
  def set_update_status_body(object_type: str, attributes: dict)->dict:
329
368
  return {
@@ -394,6 +433,11 @@ def update_gov_body_for_type(object_type: str, body: dict, attributes: dict) ->
394
433
 
395
434
 
396
435
  def set_rel_request_body(object_type: str, attributes: dict)->dict:
436
+ """
437
+ Build the OUTER request body for creating a relationship (NewRelationshipRequestBody).
438
+ The inner relationship properties must be assigned to the returned dict under the "properties" key,
439
+ commonly via set_rel_prop_body or set_rel_request_body_for_type.
440
+ """
397
441
  return {
398
442
  "class" : "NewRelationshipRequestBody",
399
443
  "externalSourceGUID": attributes.get('External Source GUID', {}).get('guid', None),
@@ -416,6 +460,11 @@ def set_peer_gov_def_request_body(object_type: str, attributes: dict)->dict:
416
460
  return rel_body
417
461
 
418
462
  def set_rel_request_body_for_type(object_type: str, attributes: dict)->dict:
463
+ """
464
+ Convenience helper that builds both layers (outer + inner) for a relationship of a known type.
465
+ It creates the outer NewRelationshipRequestBody via set_rel_request_body and fills rel_body["properties"]
466
+ with a typed properties structure under the "class" of f"{object_type}Properties".
467
+ """
419
468
  rel_body = set_rel_request_body(object_type, attributes)
420
469
  # class_prop = camel_to_title_case(object_type) + "Properties"
421
470
  class_prop = f"{object_type}Properties"
@@ -421,7 +421,7 @@ def get_element_by_name(egeria_client, element_type: str, element_name: str) ->
421
421
  return q_name, guid, unique, exists
422
422
 
423
423
  # Haven't seen this element before
424
- property_names = ['qualifiedName', 'name', 'displayName', 'title']
424
+ property_names = ['qualifiedName', 'displayName', 'title']
425
425
  open_metadata_type_name = None
426
426
  details = egeria_client.get_elements_by_property_value(element_name, property_names, open_metadata_type_name)
427
427
  if isinstance(details, str):
@@ -430,12 +430,19 @@ def get_element_by_name(egeria_client, element_type: str, element_name: str) ->
430
430
  exists = False
431
431
  return None, None, unique, exists
432
432
  if len(details) > 1:
433
- msg = (f"More than one element with name {element_name} found, please specify a "
434
- f"**Qualified Name**")
435
- print_msg("DEBUG-ERROR", msg, debug_level)
436
- unique = False
437
- exists = None
438
- return element_name, None, unique, exists
433
+ if q_name is None:
434
+ q_name = egeria_client.__create_qualified_name__(element_type, element_name)
435
+ guid = egeria_client.__get_guid__(qualified_name=q_name)
436
+ update_element_dictionary(q_name, {'guid': guid})
437
+ exists = True if guid != "No elements found" else False
438
+ return q_name, guid, unique, exists
439
+ else:
440
+ msg = (f"More than one element with name {element_name} found, please specify a "
441
+ f"**Qualified Name**")
442
+ print_msg("DEBUG-ERROR", msg, debug_level)
443
+ unique = False
444
+ exists = None
445
+ return element_name, None, unique, exists
439
446
 
440
447
  el_qname = details[0]["properties"].get('qualifiedName', None)
441
448
  el_guid = details[0]['elementHeader']['guid']
@@ -150,7 +150,7 @@ command_list = ["Provenance", "Create Glossary", "Update Glossary", "Create Term
150
150
  "Update Data Structure", "Create Data Dictionary", "Update Data Dictionary", "Create Data Dict",
151
151
  "Update Data Dict",
152
152
  "View Data Structures", "View Data Structure", "View Data Fields", "View Data Field",
153
- "View Dataa Classes", "View Data Class", "Create Data Class", "Update Data Class",
153
+ "View Data Classes", "View Data Class", "Create Data Class", "Update Data Class",
154
154
  "Create Digital Product", "Create Data Product", "Update Digital Product", "Update Data Product",
155
155
  "Create Agreement", "Update Agreement",
156
156
  "Link Digital Products", "Link Product-Product", "Detach Digital Products", "Detach Product-Product",