pyegeria 5.3.9.9.7__py3-none-any.whl → 5.4.0.dev2__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 (69) hide show
  1. commands/cat/debug_log.2025-06-05_20-24-18_123924.log.zip +0 -0
  2. commands/cat/debug_log.2025-06-10_08-45-03_929921.log.zip +0 -0
  3. commands/cat/debug_log.2025-06-11_09-57-21_247890.log.zip +0 -0
  4. commands/cat/debug_log.2025-06-12_16-14-31_212042.log.zip +0 -0
  5. commands/cat/dr_egeria_md.py +32 -5
  6. commands/cat/list_collections.py +10 -4
  7. commands/cat/list_data_designer.py +171 -0
  8. md_processing/__init__.py +7 -2
  9. md_processing/data/commands.json +4666 -848
  10. md_processing/md_commands/data_designer_commands.py +840 -557
  11. md_processing/md_commands/solution_architect_commands.py +985 -0
  12. md_processing/md_processing_utils/common_md_proc_utils.py +262 -89
  13. md_processing/md_processing_utils/common_md_utils.py +11 -4
  14. md_processing/md_processing_utils/md_processing_constants.py +18 -16
  15. pyegeria/_client.py +39 -0
  16. pyegeria/classification_manager_omvs.py +1 -1
  17. pyegeria/collection_manager_omvs.py +248 -188
  18. pyegeria/data_designer_omvs.py +217 -9
  19. pyegeria/governance_officer_omvs.py +2349 -0
  20. pyegeria/output_formatter.py +24 -12
  21. pyegeria/solution_architect_omvs.py +4219 -1084
  22. pyegeria/utils.py +15 -2
  23. {pyegeria-5.3.9.9.7.dist-info → pyegeria-5.4.0.dev2.dist-info}/METADATA +2 -1
  24. {pyegeria-5.3.9.9.7.dist-info → pyegeria-5.4.0.dev2.dist-info}/RECORD +27 -62
  25. {pyegeria-5.3.9.9.7.dist-info → pyegeria-5.4.0.dev2.dist-info}/entry_points.txt +3 -0
  26. commands/cat/.DS_Store +0 -0
  27. md_processing/dr_egeria_inbox/archive/dr_egeria_intro.md +0 -254
  28. md_processing/dr_egeria_inbox/archive/dr_egeria_intro_more_terms.md +0 -696
  29. md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part1.md +0 -254
  30. md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part2.md +0 -298
  31. md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part3.md +0 -608
  32. md_processing/dr_egeria_inbox/archive/dr_egeria_intro_part4.md +0 -94
  33. md_processing/dr_egeria_inbox/archive/freddie_intro.md +0 -284
  34. md_processing/dr_egeria_inbox/archive/freddie_intro_orig.md +0 -275
  35. md_processing/dr_egeria_inbox/archive/test-term.md +0 -110
  36. md_processing/dr_egeria_inbox/cat_test.md +0 -100
  37. md_processing/dr_egeria_inbox/data_field.md +0 -54
  38. md_processing/dr_egeria_inbox/data_spec.md +0 -77
  39. md_processing/dr_egeria_inbox/data_spec_test.md +0 -2406
  40. md_processing/dr_egeria_inbox/data_test.md +0 -86
  41. md_processing/dr_egeria_inbox/dr_egeria_intro_categories.md +0 -168
  42. md_processing/dr_egeria_inbox/dr_egeria_intro_part1.md +0 -280
  43. md_processing/dr_egeria_inbox/dr_egeria_intro_part2.md +0 -313
  44. md_processing/dr_egeria_inbox/dr_egeria_intro_part3.md +0 -1073
  45. md_processing/dr_egeria_inbox/dr_egeria_isc1.md +0 -44
  46. md_processing/dr_egeria_inbox/glossary_test1.md +0 -324
  47. md_processing/dr_egeria_inbox/rel.md +0 -8
  48. md_processing/dr_egeria_inbox/sb.md +0 -119
  49. md_processing/dr_egeria_inbox/search_test.md +0 -39
  50. md_processing/dr_egeria_inbox/solution-components.md +0 -154
  51. md_processing/dr_egeria_inbox/solution_blueprints.md +0 -118
  52. md_processing/dr_egeria_inbox/synonym_test.md +0 -42
  53. md_processing/dr_egeria_inbox/t1.md +0 -0
  54. md_processing/dr_egeria_inbox/t2.md +0 -268
  55. md_processing/dr_egeria_outbox/processed-2025-05-15 19:52-data_test.md +0 -94
  56. md_processing/dr_egeria_outbox/processed-2025-05-16 07:39-data_test.md +0 -88
  57. md_processing/dr_egeria_outbox/processed-2025-05-17 16:01-data_field.md +0 -56
  58. md_processing/dr_egeria_outbox/processed-2025-05-18 15:51-data_test.md +0 -103
  59. md_processing/dr_egeria_outbox/processed-2025-05-18 16:47-data_test.md +0 -94
  60. md_processing/dr_egeria_outbox/processed-2025-05-19 07:14-data_test.md +0 -96
  61. md_processing/dr_egeria_outbox/processed-2025-05-19 07:20-data_test.md +0 -100
  62. md_processing/dr_egeria_outbox/processed-2025-05-19 07:22-data_test.md +0 -88
  63. md_processing/dr_egeria_outbox/processed-2025-05-19 09:26-data_test.md +0 -91
  64. md_processing/dr_egeria_outbox/processed-2025-05-19 10:27-data_test.md +0 -91
  65. md_processing/dr_egeria_outbox/processed-2025-05-19 14:04-data_test.md +0 -91
  66. md_processing/md_commands/blueprint_commands.py +0 -303
  67. pyegeria/.DS_Store +0 -0
  68. {pyegeria-5.3.9.9.7.dist-info → pyegeria-5.4.0.dev2.dist-info}/LICENSE +0 -0
  69. {pyegeria-5.3.9.9.7.dist-info → pyegeria-5.4.0.dev2.dist-info}/WHEEL +0 -0
@@ -1,91 +0,0 @@
1
-
2
-
3
-
4
-
5
-
6
-
7
- Data Specification for the Teddy Bear Drop Foot Clinical Trial
8
-
9
- # foo Create Data Specification
10
-
11
- ## Data Specification
12
-
13
-
14
- Data Specification for the Teddy Bear Drop Foot Clinical Trial
15
- >woof
16
- ## Description
17
- >Meow -
18
-
19
- Principle data requirements for Teddy Bear Drop Foot Clinical Trial.
20
-
21
-
22
-
23
-
24
- # foo Create Data Dictionary
25
- ## Name
26
- Clinical Trial Data Dictionary
27
-
28
- ## Description
29
- A data dictionary for clinical trial data elements.
30
-
31
-
32
-
33
-
34
- ___
35
-
36
-
37
-
38
- TBDF-Incoming Weekly Measurement Data
39
-
40
-
41
- # Update Data Structure
42
-
43
- ## Data Structure Name
44
-
45
- TBDF-Incoming Weekly Measurement Data
46
-
47
- ## Description
48
- This describes the weekly measurement data for each patient for the Teddy Bear drop foot clinical trial
49
-
50
- ## Qualified Name
51
- DataStruct::TBDF-Incoming Weekly Measurement Data
52
-
53
- ## Namespace
54
-
55
-
56
- ## Version Identifier
57
-
58
-
59
- ## Guid
60
- 3eb5d206-6d3f-4b61-8f45-d7fbc05a870e
61
-
62
-
63
-
64
- WWT-Incoming Weekly Measurement Data
65
-
66
- # foo Create Data Structure
67
-
68
- ## Qualified Name
69
- DataStruct::WWT-Incoming Weekly Measurement Data
70
-
71
- ## GUID
72
- ae221834-a3a6-4f32-ac94-110dff761b49
73
-
74
- ## Data Structure
75
-
76
- WWT-Incoming Weekly Measurement Data
77
-
78
-
79
- ## Description
80
- A collection of data fields that form a data structure.
81
-
82
-
83
- ## In Data Specification
84
-
85
-
86
-
87
- ## Qualified Name
88
-
89
- # Provenance
90
-
91
- * Results from processing file data_test.md on 2025-05-19 14:04
@@ -1,303 +0,0 @@
1
- """
2
- This file contains blueprint/solution-related object_action functions for processing Egeria Markdown
3
- """
4
- from typing import Optional
5
-
6
- from rich.markdown import Markdown
7
-
8
- from pyegeria.egeria_tech_client import EgeriaTech
9
- from md_processing.md_processing_utils.common_md_utils import (
10
- debug_level, print_msg, update_element_dictionary
11
- )
12
- from md_processing.md_processing_utils.extraction_utils import (
13
- extract_command_plus, process_simple_attribute, process_name_list, process_element_identifiers, update_a_command
14
- )
15
-
16
- from md_processing.md_processing_utils.md_processing_constants import (
17
- BLUEPRINT_NAME_LABELS, COMPONENT_NAME_LABELS, ALWAYS, ERROR, INFO, pre_command, EXISTS_REQUIRED,
18
- )
19
-
20
- def process_blueprint_upsert_command(egeria_client: EgeriaTech, txt: str, directive: str = "display") -> Optional[str]:
21
- """
22
- Processes a solution blueprint create or update object_action by extracting key attributes such as
23
- blueprint name, description, and usage from the given text.
24
-
25
- :param txt: A string representing the input cell to be processed for
26
- extracting blueprint-related attributes.
27
- :param directive: an optional string indicating the directive to be used - display, validate or execute
28
- :return: A string summarizing the outcome of the processing.
29
- """
30
- from md_processing.md_processing_utils.common_md_utils import set_debug_level
31
-
32
- command, object_type, object_action = extract_command_plus(txt)
33
- set_debug_level(directive)
34
-
35
- blueprint_name = process_simple_attribute(txt, BLUEPRINT_NAME_LABELS, ERROR)
36
- print(Markdown(f"{pre_command} `{object_action}` `{object_type}` for blueprint: `\'{blueprint_name}\'` with directive: `{directive}` "))
37
- description = process_simple_attribute(txt, ['Description'], INFO)
38
- usage = process_simple_attribute(txt, ['Usage'], INFO)
39
- q_name = process_simple_attribute(txt, ['Qualified Name'], INFO)
40
- valid = True
41
-
42
- if blueprint_name is None:
43
- valid = False
44
- known_q_name = None
45
- known_guid = None
46
- blueprint_exists = False
47
- else:
48
- element_labels = BLUEPRINT_NAME_LABELS
49
- element_labels.append('Display Name')
50
- known_q_name, known_guid, valid, blueprint_exists = process_element_identifiers(egeria_client, object_type,
51
- element_labels, txt,
52
- object_action, None)
53
-
54
- blueprint_display = (f"\n* Command: `{command}`\n\t* Blueprint Name: {blueprint_name}\n\t"
55
- f"* Description: {description}\n\t* Usage: {usage}\n")
56
-
57
- if object_action == 'Update':
58
- guid = process_simple_attribute(txt, ['GUID', 'guid', 'Guid'])
59
- blueprint_display += f"* Qualified Name: `{q_name}`\n\t* GUID: {guid}\n\n"
60
- if not blueprint_exists:
61
- msg = f"Blueprint can't be updated; `{blueprint_name}` not found"
62
- print_msg("ERROR", msg, debug_level)
63
- valid = False
64
- else:
65
- msg = f"Blueprint can be updated; `{blueprint_name}` found"
66
- print_msg(ALWAYS, msg, debug_level)
67
-
68
- elif object_action == "Create":
69
- if blueprint_exists:
70
- msg = f"Blueprint `{blueprint_name}` can't be created because it already exists.\n"
71
- print_msg("ERROR", msg, debug_level)
72
- valid = False
73
- elif valid:
74
- msg = f"It is valid to create Blueprint `{blueprint_name}` with:\n"
75
- print_msg("ALWAYS", msg, debug_level)
76
-
77
- if directive == "display":
78
- print(Markdown(blueprint_display))
79
- return None
80
-
81
- elif directive == "validate":
82
- if valid:
83
- print(Markdown(blueprint_display))
84
- else:
85
- msg = f"Validation failed for Blueprint `{blueprint_name}`\n"
86
- print_msg(ERROR, msg, debug_level)
87
- print(Markdown(blueprint_display))
88
-
89
- return valid
90
-
91
- elif directive == "process":
92
- if valid:
93
- print(Markdown(blueprint_display))
94
- else:
95
- if blueprint_exists and object_action == "Create":
96
- msg = f"Create failed because blueprint `{blueprint_name}` exists - changing `Create` to `Update` in processed output \n"
97
- print_msg(ERROR, msg, debug_level)
98
- print(Markdown(blueprint_display))
99
- return update_a_command(txt, object_action, object_type, known_q_name, known_guid)
100
- else:
101
- return None
102
-
103
- if object_action == "Update":
104
- if not blueprint_exists:
105
- print(f"\n{ERROR}Blueprint `{blueprint_name}` does not exist! Updating result document with Create "
106
- f"object_action\n")
107
- return update_a_command(txt, object_action, object_type, known_q_name, known_guid)
108
-
109
- body = {
110
- "class": "ReferenceableRequestBody", "elementProperties": {
111
- "class": "SolutionBlueprintProperties", "qualifiedName": known_q_name, "description": description,
112
- "usage": usage
113
- }
114
- }
115
- egeria_client.update_solution_blueprint(known_guid, body)
116
- print_msg(ALWAYS, f"Updated Blueprint `{blueprint_name}` with GUID {known_guid}", debug_level)
117
- update_element_dictionary(known_q_name, {
118
- 'guid': known_guid, 'display_name': blueprint_name
119
- })
120
- return egeria_client.get_solution_blueprint_by_guid(known_guid, output_format='MD')
121
-
122
- elif object_action == "Create":
123
- if blueprint_exists:
124
- print(f"\nBlueprint `{blueprint_name}` already exists and result document updated\n")
125
- return update_a_command(txt, object_action, object_type, known_q_name, known_guid)
126
- else:
127
- blueprint_guid = egeria_client.create_solution_blueprint(blueprint_name, description, usage)
128
- if blueprint_guid:
129
- print_msg(ALWAYS, f"Created Blueprint `{blueprint_name}` with GUID {blueprint_guid}", debug_level)
130
- return egeria_client.get_solution_blueprint_by_guid(blueprint_guid, output_format='MD')
131
- else:
132
- print_msg(ERROR, f"Failed to create Blueprint `{blueprint_name}`", debug_level)
133
- return None
134
-
135
-
136
- def process_solution_component_upsert_command(egeria_client: EgeriaTech, txt: str, directive: str = "display") -> Optional[str]:
137
- """
138
- Processes a solution component create or update object_action by extracting key attributes such as
139
- component name, description, and parent components from the given text.
140
-
141
- :param txt: A string representing the input cell to be processed for
142
- extracting component-related attributes.
143
- :param directive: an optional string indicating the directive to be used - display, validate or execute
144
- :return: A string summarizing the outcome of the processing.
145
- """
146
- from md_processing.md_processing_utils.common_md_utils import set_debug_level
147
-
148
- command, object_type, object_action = extract_command_plus(txt)
149
- set_debug_level(directive)
150
-
151
- component_name = process_simple_attribute(txt, COMPONENT_NAME_LABELS, ERROR)
152
- print(Markdown(f"{pre_command} `{object_action}` `{object_type}` for component: `\'{component_name}\'` with directive: `{directive}` "))
153
- description = process_simple_attribute(txt, ['Description'], INFO)
154
- q_name = process_simple_attribute(txt, ['Qualified Name'], INFO)
155
- valid = True
156
-
157
- if component_name is None:
158
- valid = False
159
- known_q_name = None
160
- known_guid = None
161
- component_exists = False
162
- else:
163
- element_labels = COMPONENT_NAME_LABELS
164
- element_labels.append('Display Name')
165
- known_q_name, known_guid, valid, component_exists = process_element_identifiers(egeria_client, object_type,
166
- element_labels, txt,
167
- object_action, None)
168
-
169
- # Get the blueprint this component is in
170
- blueprint_name = process_simple_attribute(txt, BLUEPRINT_NAME_LABELS)
171
- if blueprint_name:
172
- known_blueprint_q_name, known_blueprint_guid, blueprint_valid, blueprint_exists = process_element_identifiers(
173
- egeria_client, "Solution Blueprint", BLUEPRINT_NAME_LABELS, txt, EXISTS_REQUIRED, None)
174
- if not blueprint_exists:
175
- valid = False
176
- else:
177
- known_blueprint_q_name = None
178
- known_blueprint_guid = None
179
- blueprint_valid = True
180
- blueprint_exists = False
181
-
182
- # Get the parent components if specified
183
- parent_components = process_simple_attribute(txt, ['Parent Components', 'Parent Component'])
184
- if parent_components:
185
- parent_components_list, parent_q_name_list, parents_valid, parents_exist = process_name_list(
186
- egeria_client, 'Solution Components', txt, COMPONENT_NAME_LABELS)
187
- if not parents_exist:
188
- valid = False
189
- else:
190
- parent_components_list = None
191
- parent_q_name_list = None
192
- parents_valid = True
193
- parents_exist = False
194
-
195
- component_display = (f"\n* Command: `{command}`\n\t* Component Name: {component_name}\n\t"
196
- f"* Blueprint: {blueprint_name}\n\t* Parent Components: {parent_components}\n\t"
197
- f"* Description: {description}\n")
198
-
199
- if object_action == 'Update':
200
- guid = process_simple_attribute(txt, ['GUID', 'guid', 'Guid'])
201
- component_display += f"* Qualified Name: `{q_name}`\n\t* GUID: {guid}\n\n"
202
- if not component_exists:
203
- msg = f"Component can't be updated; `{component_name}` not found"
204
- print_msg("ERROR", msg, debug_level)
205
- valid = False
206
- else:
207
- msg = f"Component can be updated; `{component_name}` found"
208
- print_msg(ALWAYS, msg, debug_level)
209
-
210
- elif object_action == "Create":
211
- if component_exists:
212
- msg = f"Component `{component_name}` can't be created because it already exists.\n"
213
- print_msg("ERROR", msg, debug_level)
214
- valid = False
215
- elif valid:
216
- msg = f"It is valid to create Component `{component_name}` with:\n"
217
- print_msg("ALWAYS", msg, debug_level)
218
-
219
- if directive == "display":
220
- print(Markdown(component_display))
221
- return None
222
-
223
- elif directive == "validate":
224
- if valid:
225
- print(Markdown(component_display))
226
- else:
227
- msg = f"Validation failed for Component `{component_name}`\n"
228
- print_msg(ERROR, msg, debug_level)
229
- print(Markdown(component_display))
230
-
231
- return valid
232
-
233
- elif directive == "process":
234
- if valid:
235
- print(Markdown(component_display))
236
- else:
237
- if component_exists and object_action == "Create":
238
- msg = f"Create failed because component `{component_name}` exists - changing `Create` to `Update` in processed output \n"
239
- print_msg(ERROR, msg, debug_level)
240
- print(Markdown(component_display))
241
- return update_a_command(txt, object_action, object_type, known_q_name, known_guid)
242
- else:
243
- return None
244
-
245
- if object_action == "Update":
246
- if not component_exists:
247
- print(f"\n{ERROR}Component `{component_name}` does not exist! Updating result document with Create "
248
- f"object_action\n")
249
- return update_a_command(txt, object_action, object_type, known_q_name, known_guid)
250
-
251
- body = {
252
- "class": "ReferenceableRequestBody", "elementProperties": {
253
- "class": "SolutionComponentProperties", "qualifiedName": known_q_name, "description": description
254
- }
255
- }
256
- egeria_client.update_solution_component(known_guid, body)
257
- print_msg(ALWAYS, f"Updated Component `{component_name}` with GUID {known_guid}", debug_level)
258
- update_element_dictionary(known_q_name, {
259
- 'guid': known_guid, 'display_name': component_name
260
- })
261
-
262
- # Update parent components if specified
263
- if parent_components and parents_exist and parents_valid:
264
- # Get the current parent components
265
- component_details = egeria_client.get_solution_component_by_guid(known_guid)
266
- current_parents = []
267
- if 'parentComponents' in component_details:
268
- for parent in component_details['parentComponents']:
269
- current_parents.append(parent.get('guid', None))
270
-
271
- # Add new parent components
272
- for parent in parent_q_name_list:
273
- if parent not in current_parents:
274
- egeria_client.add_parent_component(parent, known_guid)
275
- print_msg(INFO, f"Added parent component to {component_name}", debug_level)
276
-
277
- # Remove parent components that are not in the new list
278
- for parent in current_parents:
279
- if parent not in parent_q_name_list:
280
- egeria_client.remove_parent_component(parent, known_guid)
281
- print_msg(INFO, f"Removed parent component from {component_name}", debug_level)
282
-
283
- return egeria_client.get_solution_component_by_guid(known_guid, output_format='MD')
284
-
285
- elif object_action == "Create":
286
- if component_exists:
287
- print(f"\nComponent `{component_name}` already exists and result document updated\n")
288
- return update_a_command(txt, object_action, object_type, known_q_name, known_guid)
289
- else:
290
- component_guid = egeria_client.create_solution_component(component_name, description, known_blueprint_guid)
291
- if component_guid:
292
- print_msg(ALWAYS, f"Created Component `{component_name}` with GUID {component_guid}", debug_level)
293
-
294
- # Add parent components if specified
295
- if parent_components and parents_exist and parents_valid:
296
- for parent in parent_q_name_list:
297
- egeria_client.add_parent_component(parent, component_guid)
298
- print_msg(INFO, f"Added parent component to {component_name}", debug_level)
299
-
300
- return egeria_client.get_solution_component_by_guid(component_guid, output_format='MD')
301
- else:
302
- print_msg(ERROR, f"Failed to create Component `{component_name}`", debug_level)
303
- return None
pyegeria/.DS_Store DELETED
Binary file