pyegeria 5.3.8.3__py3-none-any.whl → 5.3.8.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.
- pyegeria/__init__.py +2 -1
- pyegeria/commands/cat/dr_egeria_md.py +11 -1
- pyegeria/commands/cat/glossary_actions.py +1 -1
- pyegeria/commands/cat/list_categories.py +1 -1
- pyegeria/commands/cat/list_glossaries.py +11 -1
- pyegeria/commands/cat/list_terms.py +2 -1
- pyegeria/glossary_browser_omvs.py +1547 -1654
- pyegeria/glossary_manager_omvs.py +10 -7
- pyegeria/md_processing_utils.py +202 -17
- pyegeria/project_manager_omvs.py +11 -6
- pyegeria/template_manager_omvs.py +9 -4
- {pyegeria-5.3.8.3.dist-info → pyegeria-5.3.8.4.dist-info}/METADATA +1 -1
- {pyegeria-5.3.8.3.dist-info → pyegeria-5.3.8.4.dist-info}/RECORD +16 -16
- {pyegeria-5.3.8.3.dist-info → pyegeria-5.3.8.4.dist-info}/LICENSE +0 -0
- {pyegeria-5.3.8.3.dist-info → pyegeria-5.3.8.4.dist-info}/WHEEL +0 -0
- {pyegeria-5.3.8.3.dist-info → pyegeria-5.3.8.4.dist-info}/entry_points.txt +0 -0
@@ -143,35 +143,38 @@ class GlossaryManager(GlossaryBrowser):
|
|
143
143
|
)
|
144
144
|
return response
|
145
145
|
|
146
|
-
async def _async_delete_glossary(self, glossary_guid: str) -> None:
|
146
|
+
async def _async_delete_glossary(self, glossary_guid: str, cascade:bool = False) -> None:
|
147
147
|
"""Delete glossary. Async version.
|
148
148
|
|
149
149
|
Parameters
|
150
150
|
----------
|
151
151
|
glossary_guid: str
|
152
152
|
The ID of the glossary to delete.
|
153
|
-
|
153
|
+
cascade: bool, optional, default = False
|
154
|
+
If true, then delete all terms and categories in the glossary as well.
|
154
155
|
|
155
156
|
Returns
|
156
157
|
-------
|
157
158
|
None
|
158
159
|
|
159
160
|
"""
|
160
|
-
|
161
|
+
cascade_str = str(cascade).lower()
|
161
162
|
url = (
|
162
163
|
f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/glossary-manager/glossaries/"
|
163
|
-
f"{glossary_guid}/remove"
|
164
|
+
f"{glossary_guid}/remove?cascadedDelete={cascade_str}"
|
164
165
|
)
|
165
166
|
|
166
167
|
await self._async_make_request("POST", url)
|
167
168
|
|
168
|
-
def delete_glossary(self, glossary_guid: str) -> None:
|
169
|
-
"""
|
169
|
+
def delete_glossary(self, glossary_guid: str, cascade: bool = False) -> None:
|
170
|
+
"""Delete a new glossary.
|
170
171
|
|
171
172
|
Parameters
|
172
173
|
----------
|
173
174
|
glossary_guid: str
|
174
175
|
The ID of the glossary to delete.
|
176
|
+
cascade: bool, optional, default = False
|
177
|
+
If true, then delete all terms and categories in the glossary as well.
|
175
178
|
|
176
179
|
|
177
180
|
Returns
|
@@ -180,7 +183,7 @@ class GlossaryManager(GlossaryBrowser):
|
|
180
183
|
|
181
184
|
"""
|
182
185
|
loop = asyncio.get_event_loop()
|
183
|
-
loop.run_until_complete(self._async_delete_glossary(glossary_guid))
|
186
|
+
loop.run_until_complete(self._async_delete_glossary(glossary_guid, cascade))
|
184
187
|
|
185
188
|
async def _async_update_glossary(
|
186
189
|
self,
|
pyegeria/md_processing_utils.py
CHANGED
@@ -27,12 +27,14 @@ EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "170"))
|
|
27
27
|
console = Console(width=EGERIA_WIDTH)
|
28
28
|
|
29
29
|
command_list = ["Provenance", "Create Glossary", "Update Glossary", "Create Term", "Update Term", "List Terms",
|
30
|
-
"List Glossary Terms", "
|
30
|
+
"List Glossary Terms", "List Term History", "Term Journal Report", "List Glossary Structure",
|
31
|
+
"List Glossaries", "List Categories", "List Glossary Categories",
|
32
|
+
"Create Personal Project", "Update Personal Project", "Create Category",
|
31
33
|
"Update Category", "Create Solution Blueprint", "Update Solution Blueprint",
|
32
34
|
"Create Solution Component", "Update Solution Component", "Set Parent Category",
|
33
35
|
"UnSet Parent Category", "Unset Parent Category"]
|
34
36
|
# verbosity - verbose, quiet, debug
|
35
|
-
debug_level = "
|
37
|
+
debug_level = "debug"
|
36
38
|
message_types = {
|
37
39
|
"INFO": "INFO-", "WARNING": "WARNING->", "ERROR": "ERROR->", "DEBUG-INFO": "DEBUG-INFO->",
|
38
40
|
"DEBUG-WARNING": "DEBUG-WARNING->", "DEBUG-ERROR": "DEBUG-ERROR->", "ALWAYS": "\n\n==> "
|
@@ -92,10 +94,11 @@ def get_current_datetime_string():
|
|
92
94
|
return now
|
93
95
|
|
94
96
|
|
95
|
-
def
|
97
|
+
def update_term_categories(egeria_client: EgeriaTech, term_guid: str, categories_exist: bool,
|
96
98
|
categories_list: List[str]) -> None:
|
97
99
|
"""
|
98
|
-
|
100
|
+
|
101
|
+
Adds or removes a term to/from specified categories in a glossary.
|
99
102
|
|
100
103
|
This function associates a term, identified by its GUID, with one or more
|
101
104
|
categories. It uses the provided EgeriaTech client to assign the term
|
@@ -113,6 +116,14 @@ def add_term_to_categories(egeria_client: EgeriaTech, term_guid: str, categories
|
|
113
116
|
Returns:
|
114
117
|
None
|
115
118
|
"""
|
119
|
+
to_be_cat_guids: list[str] = []
|
120
|
+
# find the categories a term is currently in.
|
121
|
+
existing_categories = egeria_client.get_categories_for_term(term_guid)
|
122
|
+
if type(existing_categories) is str:
|
123
|
+
current_categories = []
|
124
|
+
else:
|
125
|
+
current_categories = [cat['elementHeader']['guid'] for cat in existing_categories]
|
126
|
+
|
116
127
|
if categories_exist is True and categories_list is not None:
|
117
128
|
if type(categories_list) is str:
|
118
129
|
categories_list = categories_list.split(",").trim()
|
@@ -125,8 +136,26 @@ def add_term_to_categories(egeria_client: EgeriaTech, term_guid: str, categories
|
|
125
136
|
cat_guid = cat.get('guid', None) if cat else None
|
126
137
|
if cat_guid is None:
|
127
138
|
cat_guid = egeria_client.__get_guid__(qualified_name=cat_el)
|
128
|
-
|
139
|
+
update_element_dictionary(cat_el, {'guid': cat_guid})
|
140
|
+
to_be_cat_guids.append(cat_guid)
|
141
|
+
|
142
|
+
for cat in to_be_cat_guids:
|
143
|
+
if cat not in current_categories:
|
144
|
+
egeria_client.add_term_to_category(term_guid, cat)
|
145
|
+
current_categories.append(cat)
|
146
|
+
msg = f"Added term {term_guid} to category {cat}"
|
147
|
+
print_msg("DEBUG-INFO", msg, debug_level)
|
129
148
|
|
149
|
+
for cat in current_categories:
|
150
|
+
if cat not in to_be_cat_guids:
|
151
|
+
egeria_client.remove_term_from_category(term_guid, cat)
|
152
|
+
msg = f"Removed term {term_guid} from category {cat}"
|
153
|
+
print_msg("DEBUG-INFO", msg, debug_level)
|
154
|
+
else: # No categories specified - so remove any categories a term is in
|
155
|
+
for cat in current_categories:
|
156
|
+
egeria_client.remove_term_from_category(term_guid, cat)
|
157
|
+
msg = f"Removed term {term_guid} from category {cat}"
|
158
|
+
print_msg("DEBUG-INFO", msg, debug_level)
|
130
159
|
|
131
160
|
def extract_command_plus(block: str) -> tuple[str, str, str] | None:
|
132
161
|
"""
|
@@ -138,6 +167,8 @@ def extract_command_plus(block: str) -> tuple[str, str, str] | None:
|
|
138
167
|
be the first part, while the rest is treated as the object type. If
|
139
168
|
no match is found, the function returns None.
|
140
169
|
|
170
|
+
Lines beginning with '>' are ignored.
|
171
|
+
|
141
172
|
Args:
|
142
173
|
block: A string containing the block of text to search for the
|
143
174
|
command and action.
|
@@ -146,7 +177,11 @@ def extract_command_plus(block: str) -> tuple[str, str, str] | None:
|
|
146
177
|
A tuple containing the command, the object type and the object action if a
|
147
178
|
match is found. Otherwise, returns None.
|
148
179
|
"""
|
149
|
-
|
180
|
+
# Filter out lines beginning with '>'
|
181
|
+
filtered_lines = [line for line in block.split('\n') if not line.strip().startswith('>')]
|
182
|
+
filtered_block = '\n'.join(filtered_lines)
|
183
|
+
|
184
|
+
match = re.search(r"#(.*?)(?:##|\n|$)", filtered_block) # Using a non capturing group
|
150
185
|
if match:
|
151
186
|
clean_match = match.group(1).strip()
|
152
187
|
if ' ' in clean_match:
|
@@ -186,7 +221,7 @@ def extract_command(block: str) -> str | None:
|
|
186
221
|
|
187
222
|
def extract_attribute(text: str, labels: [str]) -> str | None:
|
188
223
|
"""
|
189
|
-
Extracts the
|
224
|
+
Extracts the attribute value from a string.
|
190
225
|
|
191
226
|
Args:
|
192
227
|
text: The input string.
|
@@ -194,17 +229,27 @@ def extract_attribute(text: str, labels: [str]) -> str | None:
|
|
194
229
|
|
195
230
|
Returns:
|
196
231
|
The glossary name, or None if not found.
|
232
|
+
|
233
|
+
Note:
|
234
|
+
Lines beginning with '>' are ignored.
|
197
235
|
"""
|
198
236
|
# Iterate over the list of labels
|
199
237
|
for label in labels:
|
200
238
|
# Construct pattern for the current label
|
201
|
-
pattern = rf"## {re.escape(label)}\n(.*?)(?:#|___
|
239
|
+
pattern = rf"## {re.escape(label)}\n(.*?)(?:#|___|>|$)" # modified from --- to enable embedded tables
|
202
240
|
match = re.search(pattern, text, re.DOTALL)
|
203
241
|
if match:
|
204
|
-
# Extract matched text
|
205
|
-
|
242
|
+
# Extract matched text
|
243
|
+
matched_text = match.group(1).strip()
|
244
|
+
|
245
|
+
# Filter out lines beginning with '>'
|
246
|
+
filtered_lines = [line for line in matched_text.split('\n') if not line.strip().startswith('>')]
|
247
|
+
filtered_text = '\n'.join(filtered_lines)
|
248
|
+
|
249
|
+
# Replace consecutive \n with a single \n
|
250
|
+
extracted_text = re.sub(r'\n+', '\n', filtered_text)
|
206
251
|
if not extracted_text.isspace() and extracted_text:
|
207
|
-
return extracted_text
|
252
|
+
return extracted_text # Return the cleaned text - I removed the title casing
|
208
253
|
|
209
254
|
|
210
255
|
def print_msg(msg_level: str, msg: str, verbosity: str):
|
@@ -1212,7 +1257,7 @@ def process_term_list_command(egeria_client: EgeriaTech, element_dictionary: dic
|
|
1212
1257
|
|
1213
1258
|
search_string = process_simple_attribute(txt, ['Search String', 'Filter'])
|
1214
1259
|
if search_string is None:
|
1215
|
-
search_string = ''
|
1260
|
+
search_string = '*'
|
1216
1261
|
print(Markdown(f"{pre_command} `{command}` with search string:`{search_string}` with directive: `{directive}`"))
|
1217
1262
|
|
1218
1263
|
glossary = process_simple_attribute(txt, ['Glossary', 'In Glossary'])
|
@@ -1250,6 +1295,146 @@ def process_term_list_command(egeria_client: EgeriaTech, element_dictionary: dic
|
|
1250
1295
|
console.print_exception(show_locals=True)
|
1251
1296
|
return None
|
1252
1297
|
|
1298
|
+
def process_category_list_command(egeria_client: EgeriaTech, element_dictionary: dict, txt: str,
|
1299
|
+
directive: str = "display") -> Optional[str]:
|
1300
|
+
""" List terms as a markdown table. Filter based on optional search string. """
|
1301
|
+
set_debug_level(directive)
|
1302
|
+
valid = True
|
1303
|
+
command = extract_command(txt)
|
1304
|
+
object_type = command.split(' ')[1].strip()
|
1305
|
+
object_action = command.split(' ')[0].strip()
|
1306
|
+
known_glossary_q = ""
|
1307
|
+
known_glossary_guid = ""
|
1308
|
+
glossary_exists = False
|
1309
|
+
glossary_valid = False
|
1310
|
+
|
1311
|
+
|
1312
|
+
search_string = process_simple_attribute(txt, ['Search String', 'Filter'])
|
1313
|
+
if search_string is None:
|
1314
|
+
search_string = '*'
|
1315
|
+
print(Markdown(f"{pre_command} `{command}` with search string:`{search_string}` with directive: `{directive}`"))
|
1316
|
+
|
1317
|
+
# glossary = process_simple_attribute(txt, ['Glossary', 'In Glossary'])
|
1318
|
+
# if glossary is not None:
|
1319
|
+
# _, glossary_guid, _, glossary_exists = get_element_by_name(
|
1320
|
+
# egeria_client, "Glossary", glossary)
|
1321
|
+
# msg = f"Found glossary `{glossary}` with GUID {glossary_guid}"
|
1322
|
+
# print_msg(INFO, msg, debug_level)
|
1323
|
+
# else:
|
1324
|
+
# glossary_guid= None
|
1325
|
+
# msg = f"No glossary found"
|
1326
|
+
# print_msg(INFO, msg, debug_level)
|
1327
|
+
|
1328
|
+
|
1329
|
+
request_display = f"\n* Search String: {search_string}\n"
|
1330
|
+
|
1331
|
+
if directive == "display":
|
1332
|
+
print(Markdown(request_display))
|
1333
|
+
return None
|
1334
|
+
elif directive == "validate":
|
1335
|
+
print(Markdown(request_display))
|
1336
|
+
return valid
|
1337
|
+
elif directive == "process":
|
1338
|
+
try:
|
1339
|
+
print(Markdown(request_display))
|
1340
|
+
if not valid: # First validate the term before we process it
|
1341
|
+
return None
|
1342
|
+
md_table = egeria_client.find_glossary_categories(search_string, output_format = "LIST")
|
1343
|
+
|
1344
|
+
return md_table
|
1345
|
+
|
1346
|
+
except Exception as e:
|
1347
|
+
print(f"{ERROR}Error creating Glossary Category list: {e}")
|
1348
|
+
console.print_exception(show_locals=True)
|
1349
|
+
return None
|
1350
|
+
|
1351
|
+
def process_glossary_list_command(egeria_client: EgeriaTech, element_dictionary: dict, txt: str,
|
1352
|
+
directive: str = "display") -> Optional[str]:
|
1353
|
+
""" List terms as a markdown table. Filter based on optional search string. """
|
1354
|
+
set_debug_level(directive)
|
1355
|
+
valid = True
|
1356
|
+
command = extract_command(txt)
|
1357
|
+
object_type = command.split(' ')[1].strip()
|
1358
|
+
object_action = command.split(' ')[0].strip()
|
1359
|
+
known_glossary_q = ""
|
1360
|
+
known_glossary_guid = ""
|
1361
|
+
glossary_exists = False
|
1362
|
+
glossary_valid = False
|
1363
|
+
|
1364
|
+
|
1365
|
+
search_string = process_simple_attribute(txt, ['Search String', 'Filter'])
|
1366
|
+
if search_string is None:
|
1367
|
+
search_string = '*'
|
1368
|
+
print(Markdown(f"{pre_command} `{command}` with search string:`{search_string}` with directive: `{directive}`"))
|
1369
|
+
|
1370
|
+
|
1371
|
+
request_display = f"\n* Search String: {search_string}\n"
|
1372
|
+
|
1373
|
+
if directive == "display":
|
1374
|
+
print(request_display)
|
1375
|
+
return None
|
1376
|
+
elif directive == "validate":
|
1377
|
+
print(request_display)
|
1378
|
+
return valid
|
1379
|
+
elif directive == "process":
|
1380
|
+
try:
|
1381
|
+
print(request_display)
|
1382
|
+
if not valid: # First validate the term before we process it
|
1383
|
+
return None
|
1384
|
+
|
1385
|
+
md_table = egeria_client.find_glossaries(search_string, output_format = "LIST")
|
1386
|
+
|
1387
|
+
return md_table
|
1388
|
+
|
1389
|
+
except Exception as e:
|
1390
|
+
print(f"{ERROR}Error creating Glossary list: {e}")
|
1391
|
+
console.print_exception(show_locals=True)
|
1392
|
+
return None
|
1393
|
+
|
1394
|
+
def process_term_history_command(egeria_client: EgeriaTech, element_dictionary: dict, txt: str,
|
1395
|
+
directive: str = "display") -> Optional[str]:
|
1396
|
+
""" List terms as a markdown table. Filter based on optional search string. """
|
1397
|
+
set_debug_level(directive)
|
1398
|
+
valid = True
|
1399
|
+
command = extract_command(txt)
|
1400
|
+
object_type = command.split(' ')[1].strip()
|
1401
|
+
object_action = command.split(' ')[0].strip()
|
1402
|
+
|
1403
|
+
element_labels = TERM_NAME_LABELS
|
1404
|
+
element_labels.append('Display Name')
|
1405
|
+
|
1406
|
+
term_name = process_simple_attribute(txt, element_labels, "ERROR")
|
1407
|
+
print(Markdown(f"{pre_command} `{command}` for term: `\'{term_name}\'` with directive: `{directive}` "))
|
1408
|
+
|
1409
|
+
known_q_name, known_guid, valid, term_exists = process_element_identifiers(egeria_client, object_type,
|
1410
|
+
element_labels, txt, object_action,
|
1411
|
+
)
|
1412
|
+
|
1413
|
+
print(Markdown(f"{pre_command} `{command}` for term:`{term_name}` with directive: `{directive}`"))
|
1414
|
+
|
1415
|
+
|
1416
|
+
request_display = f"\n\t* Term Name: {term_name}\n\t* Qualified Name: {known_q_name}\n\t* GUID: {known_guid}\n"
|
1417
|
+
|
1418
|
+
if directive == "display":
|
1419
|
+
print(request_display)
|
1420
|
+
return None
|
1421
|
+
elif directive == "validate":
|
1422
|
+
print(request_display)
|
1423
|
+
return valid
|
1424
|
+
elif directive == "process":
|
1425
|
+
try:
|
1426
|
+
print(request_display)
|
1427
|
+
if not valid: # First validate the term before we process it
|
1428
|
+
return None
|
1429
|
+
term_history_md = f"\n# Term History for `{term_name}`\n\n"
|
1430
|
+
term_history_md += egeria_client.list_full_term_history(known_guid, 'LIST')
|
1431
|
+
|
1432
|
+
return term_history_md
|
1433
|
+
|
1434
|
+
except Exception as e:
|
1435
|
+
print(f"{ERROR}Error creating Glossary list: {e}")
|
1436
|
+
console.print_exception(show_locals=True)
|
1437
|
+
return None
|
1253
1438
|
|
1254
1439
|
|
1255
1440
|
|
@@ -1364,7 +1549,7 @@ def process_term_upsert_command(egeria_client: EgeriaTech, element_dictionary: d
|
|
1364
1549
|
try:
|
1365
1550
|
if not valid: # First validate the term before we process it
|
1366
1551
|
return None
|
1367
|
-
|
1552
|
+
print(Markdown(term_display))
|
1368
1553
|
if object_action == "Update" and directive == "process":
|
1369
1554
|
if not term_exists:
|
1370
1555
|
return None
|
@@ -1376,8 +1561,8 @@ def process_term_upsert_command(egeria_client: EgeriaTech, element_dictionary: d
|
|
1376
1561
|
}, "updateDescription": update_description
|
1377
1562
|
}
|
1378
1563
|
egeria_client.update_term(known_guid, body_slimmer(body))
|
1379
|
-
if cat_exist and cat_valid:
|
1380
|
-
|
1564
|
+
# if cat_exist and cat_valid:
|
1565
|
+
update_term_categories(egeria_client, known_guid, cats_exist, cat_q_name_list)
|
1381
1566
|
print_msg(ALWAYS,
|
1382
1567
|
f"\tUpdated Term `{term_name}` with GUID {known_guid}\n\tand categories `{categories}`",
|
1383
1568
|
debug_level)
|
@@ -1425,10 +1610,10 @@ def process_term_upsert_command(egeria_client: EgeriaTech, element_dictionary: d
|
|
1425
1610
|
print(f"{ERROR}Term {term_name} not created")
|
1426
1611
|
return None
|
1427
1612
|
if cats_exist and categories is not None:
|
1428
|
-
|
1613
|
+
update_term_categories(egeria_client, term_guid, cats_exist, cat_q_name_list)
|
1429
1614
|
update_element_dictionary(known_q_name, {'guid': term_guid, 'display_name': term_name})
|
1430
1615
|
print_msg(ALWAYS, f"Created term `{term_name}` with GUID {term_guid}", debug_level)
|
1431
|
-
return egeria_client.
|
1616
|
+
return egeria_client.get_term_by_guid(term_guid,
|
1432
1617
|
'MD') # return update_a_command(txt, command,
|
1433
1618
|
# object_type, q_name, term_guid)
|
1434
1619
|
except Exception as e:
|
pyegeria/project_manager_omvs.py
CHANGED
@@ -1521,7 +1521,7 @@ class ProjectManager(Client):
|
|
1521
1521
|
|
1522
1522
|
async def _async_delete_project(
|
1523
1523
|
self,
|
1524
|
-
project_guid: str,
|
1524
|
+
project_guid: str, cascade: bool = False
|
1525
1525
|
) -> None:
|
1526
1526
|
"""Delete a project. It is detected from all parent elements. Async version
|
1527
1527
|
|
@@ -1529,7 +1529,8 @@ class ProjectManager(Client):
|
|
1529
1529
|
----------
|
1530
1530
|
project_guid: str
|
1531
1531
|
The guid of the project to update.
|
1532
|
-
|
1532
|
+
cascade: bool, optional, defaults to False
|
1533
|
+
If true, then all anchored elements will be deleted.
|
1533
1534
|
|
1534
1535
|
Returns
|
1535
1536
|
-------
|
@@ -1545,10 +1546,10 @@ class ProjectManager(Client):
|
|
1545
1546
|
The principle specified by the user_id does not have authorization for the requested action
|
1546
1547
|
|
1547
1548
|
"""
|
1548
|
-
|
1549
|
+
cascade_s = str(cascade).lower()
|
1549
1550
|
url = (
|
1550
1551
|
f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/project-manager/projects/"
|
1551
|
-
f"{project_guid}/delete"
|
1552
|
+
f"{project_guid}/delete?cascadedDelete={cascade_s}"
|
1552
1553
|
)
|
1553
1554
|
|
1554
1555
|
body = {"class": "NullRequestBody"}
|
@@ -1558,7 +1559,7 @@ class ProjectManager(Client):
|
|
1558
1559
|
|
1559
1560
|
def delete_project(
|
1560
1561
|
self,
|
1561
|
-
project_guid: str,
|
1562
|
+
project_guid: str, cascade: bool = False
|
1562
1563
|
) -> None:
|
1563
1564
|
"""Delete a project. It is detected from all parent elements.
|
1564
1565
|
|
@@ -1566,8 +1567,12 @@ class ProjectManager(Client):
|
|
1566
1567
|
----------
|
1567
1568
|
project_guid: str
|
1568
1569
|
The guid of the collection to update.
|
1570
|
+
cascade: bool, optional, defaults to False
|
1571
|
+
If true, then all anchored elements will be deleted.
|
1569
1572
|
|
1570
1573
|
|
1574
|
+
cascade: bool, optional, defaults to False
|
1575
|
+
If true, then all anchored elements will be deleted.
|
1571
1576
|
Returns
|
1572
1577
|
-------
|
1573
1578
|
Nothing
|
@@ -1584,7 +1589,7 @@ class ProjectManager(Client):
|
|
1584
1589
|
|
1585
1590
|
"""
|
1586
1591
|
loop = asyncio.get_event_loop()
|
1587
|
-
loop.run_until_complete(self._async_delete_project(project_guid))
|
1592
|
+
loop.run_until_complete(self._async_delete_project(project_guid, cascade))
|
1588
1593
|
return
|
1589
1594
|
|
1590
1595
|
async def _async_add_to_project_team(
|
@@ -531,7 +531,7 @@ class TemplateManager(Client):
|
|
531
531
|
return
|
532
532
|
|
533
533
|
async def _async_delete_metadata_element_in_store(
|
534
|
-
self, element_guid: str, body: dict
|
534
|
+
self, element_guid: str, body: dict, cascade:bool = False
|
535
535
|
) -> None:
|
536
536
|
"""Delete a metadata element.
|
537
537
|
Async version.
|
@@ -542,6 +542,8 @@ class TemplateManager(Client):
|
|
542
542
|
The identity of the metadata element to update.
|
543
543
|
body : dict
|
544
544
|
The definition of the element to create. A sample is the notes below.
|
545
|
+
cascade : bool, optional, defaults to False
|
546
|
+
If true, delete all anchored elements as well.
|
545
547
|
|
546
548
|
Returns
|
547
549
|
-------
|
@@ -567,11 +569,12 @@ class TemplateManager(Client):
|
|
567
569
|
}
|
568
570
|
|
569
571
|
"""
|
570
|
-
|
572
|
+
cascade_str = str(cascade).lower()
|
573
|
+
url = f"{self.command_root}/metadata-elements/{element_guid}/delete?cascadedDelete={cascade_str}"
|
571
574
|
await self._async_make_request("POST", url, body_slimmer(body))
|
572
575
|
return
|
573
576
|
|
574
|
-
def delete_metadata_element_in_store(self, element_guid: str, body: dict) -> None:
|
577
|
+
def delete_metadata_element_in_store(self, element_guid: str, body: dict, cascade:bool = False) -> None:
|
575
578
|
"""Delete a metadata element.
|
576
579
|
|
577
580
|
Parameters
|
@@ -580,6 +583,8 @@ class TemplateManager(Client):
|
|
580
583
|
The identity of the metadata element to update.
|
581
584
|
body : dict
|
582
585
|
The definition of the element to create. A sample is the notes below.
|
586
|
+
cascade : bool, optional, defaults to False
|
587
|
+
If true, delete all anchored elements as well.
|
583
588
|
|
584
589
|
Returns
|
585
590
|
-------
|
@@ -607,7 +612,7 @@ class TemplateManager(Client):
|
|
607
612
|
"""
|
608
613
|
loop = asyncio.get_event_loop()
|
609
614
|
loop.run_until_complete(
|
610
|
-
self._async_delete_metadata_element_in_store(element_guid, body)
|
615
|
+
self._async_delete_metadata_element_in_store(element_guid, body, cascade)
|
611
616
|
)
|
612
617
|
return
|
613
618
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
pyegeria/README.md,sha256=PwX5OC7-YSZUCIsoyHh1O-WBM2hE84sm3Bd4O353NOk,1464
|
2
|
-
pyegeria/__init__.py,sha256=
|
2
|
+
pyegeria/__init__.py,sha256=bBbo9UZL2e2MdAu7mrKPZ1tDzXojJbw43gkeOcrO3Lg,30609
|
3
3
|
pyegeria/_client.py,sha256=lCWq8XJOFg3MnEO4ulMVuCJrW3uU4eWUCcbLEd90_LU,34673
|
4
4
|
pyegeria/_deprecated_gov_engine.py,sha256=dWNcwVsE5__dF2u4QiIyQrssozzzOjBbLld8MdpmVCQ,17264
|
5
5
|
pyegeria/_exceptions.py,sha256=1SrnV194V4_YJNnNAU0myTHQ3dhLn4GF2B2gZcj1u90,18153
|
@@ -16,27 +16,27 @@ pyegeria/commands/cat/README.md,sha256=-aaAnIT2fcfU63vajgB-RzQk4l4yFdhkyVfSaTPiq
|
|
16
16
|
pyegeria/commands/cat/__init__.py,sha256=5OCy4m_yZsnSxdy_gvkCyP_OkjvuWKimqUGHYCJc_qA,450
|
17
17
|
pyegeria/commands/cat/dr_egeria_inbox/glossary_creation_experiment.ipynb,sha256=dbzNu90fCKNohOWVSRBOB1GLyd95x8Qw51I5AkaPtso,11552
|
18
18
|
pyegeria/commands/cat/dr_egeria_jupyter.py,sha256=U-3m9BMoCXj2fvuawr3PTc2HQWAXThqQ3sIXjyCWv6s,5912
|
19
|
-
pyegeria/commands/cat/dr_egeria_md.py,sha256=
|
19
|
+
pyegeria/commands/cat/dr_egeria_md.py,sha256=7Sx64F9mlgBzgKLPXYwReKJDHOJAFxNICVQ3Ttb90DQ,12189
|
20
20
|
pyegeria/commands/cat/exp_list_glossaries.py,sha256=dC6Bnfm3YSMTKPP146qeslIFRiZnGu5b7iDYE07p4iU,5817
|
21
21
|
pyegeria/commands/cat/get_asset_graph.py,sha256=xnXJfpDTVH1TJ2TwE3dtjaXU36Di6-N6JAyhothzz2o,12461
|
22
22
|
pyegeria/commands/cat/get_collection.py,sha256=kXPcP8u-SMWfrVyyBhNoxG8mcgB7EV_5i9N9w_IBU7o,5379
|
23
23
|
pyegeria/commands/cat/get_project_dependencies.py,sha256=XwstxuDxDDuP2uN1oJi0PTDZVLbqgcc_3lxh_prBZvY,5987
|
24
24
|
pyegeria/commands/cat/get_project_structure.py,sha256=5uxWMqNve592OT73GRCO2KoBkgLWRNuQv_emWpS-Fw8,5975
|
25
25
|
pyegeria/commands/cat/get_tech_type_elements.py,sha256=IznytHXwDOFriGM6mypV9wuEeM-vT2s66cUzf-IROog,6147
|
26
|
-
pyegeria/commands/cat/glossary_actions.py,sha256=
|
26
|
+
pyegeria/commands/cat/glossary_actions.py,sha256=zK26fNiv-lpWUP8tHC3wTmdQ6L0_XxlmuNGUyrnSclc,19606
|
27
27
|
pyegeria/commands/cat/list_assets.py,sha256=CdJ2coKvvQv2VwJO0Sp9Eg9Fu_uvpC21tgjrdtT9Yz4,6315
|
28
|
-
pyegeria/commands/cat/list_categories.py,sha256=
|
28
|
+
pyegeria/commands/cat/list_categories.py,sha256=3IhRSpklyhcR5NZ7qkrxVavgd5nGJawy4fo_4-m1UZs,7896
|
29
29
|
pyegeria/commands/cat/list_cert_types.py,sha256=HmrTks0SSYgSMsYz3LqfX5kwDQ6D9KMcynoR_xlWtnE,7137
|
30
30
|
pyegeria/commands/cat/list_collections.py,sha256=kCxl5OuBAGtctHNVmttOe4aJ6r37cGdCFnK1i7A90ls,5996
|
31
31
|
pyegeria/commands/cat/list_deployed_catalogs.py,sha256=VdN6R9kRVWX-fGIgubOigvMVPzhF-hKQepHHlS-w-D8,8258
|
32
32
|
pyegeria/commands/cat/list_deployed_database_schemas.py,sha256=1Qicke1R2_7Xi3Qf5sp8KJ3_reAIt0z1iaz2sG8Z0Qs,9458
|
33
33
|
pyegeria/commands/cat/list_deployed_databases.py,sha256=ryrBW1CxJRfOeLP978qQwxb5oImqhIsHghtcpWeBIrw,7587
|
34
34
|
pyegeria/commands/cat/list_deployed_servers.py,sha256=_xR7EaaCsxIjTphxmoCZlARoja_vQqZ881pFiEuhw-8,5719
|
35
|
-
pyegeria/commands/cat/list_glossaries.py,sha256=
|
35
|
+
pyegeria/commands/cat/list_glossaries.py,sha256=D2ovkffSmnO-NQ7y-Jw0aDBtK2j06CQzMoILKRh9LiU,7726
|
36
36
|
pyegeria/commands/cat/list_projects.py,sha256=NzWTuepTGUEyxK-eWvuUxtBgCtNWubVwmz2eqm2UN1c,7997
|
37
37
|
pyegeria/commands/cat/list_tech_type_elements.py,sha256=-9omj5en9dSP1xMSljYVHyfXsuhuE1bO2IFj_bZPhAs,6873
|
38
38
|
pyegeria/commands/cat/list_tech_types.py,sha256=uqZcXHCzAznhEG6WWeM5j-spwUh8ycygFqpVDeXOG-0,4653
|
39
|
-
pyegeria/commands/cat/list_terms.py,sha256=
|
39
|
+
pyegeria/commands/cat/list_terms.py,sha256=BLz98FXUl2FUDhSw5G44jETtxAAP_p0AIpd0-yO7a0w,12164
|
40
40
|
pyegeria/commands/cat/list_todos.py,sha256=NitCw0uyVVjmN1hxb1W-I4FbOsa8wQxW2ICyOElHyc8,6556
|
41
41
|
pyegeria/commands/cat/list_user_ids.py,sha256=X5Q-YNEp38saPYDuy9VwdQC5Qpa4HyC3WvAdbyp_P6M,5108
|
42
42
|
pyegeria/commands/cli/__init__.py,sha256=hpTVSMP2gnPRhcAZPdeUEsQ-eaDySlXlk239dNWYmng,292
|
@@ -226,27 +226,27 @@ pyegeria/egeria_my_client.py,sha256=eOKLk2zdI6FHZnhAimfR_0yNdBjpUgD41dJZcJODcqE,
|
|
226
226
|
pyegeria/egeria_tech_client.py,sha256=uycgYfCpb4jzFfaQ7I5JxbZ5PKsWdaWxLOJjbw6C2Zk,3817
|
227
227
|
pyegeria/feedback_manager_omvs.py,sha256=0xBs0p54vmdfVYYgQ8pOanLC4fxfgTk1Z61Y6D1U7_I,152978
|
228
228
|
pyegeria/full_omag_server_config.py,sha256=CQqLCy_3DZFvJZEOcGf50HWdFaWpiAIs6z-kKyjvpDA,47464
|
229
|
-
pyegeria/glossary_browser_omvs.py,sha256=
|
230
|
-
pyegeria/glossary_manager_omvs.py,sha256=
|
229
|
+
pyegeria/glossary_browser_omvs.py,sha256=pJxgexKpzWDwuAlehEJEXCCauymotUW3dNC7m6e6n28,149254
|
230
|
+
pyegeria/glossary_manager_omvs.py,sha256=QojY-B0UMWzLoAzzLwPTScKhTQnYLdc4c9wkZljvokM,72206
|
231
231
|
pyegeria/m_test.py,sha256=M5-M2ZczsAJLXWfSeqTTADHdx6Ku-y4PbQ4M21JthAE,7778
|
232
232
|
pyegeria/md_processing_helpers.py,sha256=sV-ciVg_xOGVGTH_CMpH2B5k3V5jzdFp_XvnQQ5xafw,2131
|
233
|
-
pyegeria/md_processing_utils.py,sha256=
|
233
|
+
pyegeria/md_processing_utils.py,sha256=ekExZifDL6sKda81QaiP-RyWwk1yKRRQqwV8o7zv3vk,84207
|
234
234
|
pyegeria/md_processing_utils_orig.py,sha256=WGoVpsV03wwgv9YwDDHZ0EO4-opN8BdoISt4ZhkYGuQ,52492
|
235
235
|
pyegeria/mermaid_utilities.py,sha256=sQqdFUWdNpHu9d3Tk9UVe80M-5bOzses0XcFYX5FF-E,54254
|
236
236
|
pyegeria/metadata_explorer_omvs.py,sha256=xHnZTQKbd6XwOhYia-RiIisrvZcqHi0SL1l6OCf04Gk,86911
|
237
237
|
pyegeria/my_profile_omvs.py,sha256=d0oJYCJG7pS9BINPuGciVa00ac0jwPHNANXDCLginEc,34720
|
238
238
|
pyegeria/platform_services.py,sha256=YEpZsGGsbSdesN8ceyFhV0OMzKG6znTZrREMTRimLps,41701
|
239
|
-
pyegeria/project_manager_omvs.py,sha256=
|
239
|
+
pyegeria/project_manager_omvs.py,sha256=612rYbu2eLR8Sgv9nBzjkFJ2PuxIBd_b-zwcnpVbXhc,70665
|
240
240
|
pyegeria/registered_info.py,sha256=y0-LgDIQXpph0lEWxIOG3_HsqX_Z2iAIb3xu4Aa4B70,6344
|
241
241
|
pyegeria/runtime_manager_omvs.py,sha256=Z5wY9ignNjil8O6yjihZftxkGoh9A4PQDcXhoIsOIT8,79698
|
242
242
|
pyegeria/server_operations.py,sha256=5k0KVz3u8qRLwtz16zT3J86LZY3pkUrMDcps8srmq1A,16831
|
243
243
|
pyegeria/solution_architect_omvs.py,sha256=-PrmNGOVbiIniud328PQ3VY6GF9OPxC9OV8hlLhZZmk,87384
|
244
|
-
pyegeria/template_manager_omvs.py,sha256=
|
244
|
+
pyegeria/template_manager_omvs.py,sha256=chBljs1vy5wr9DRAtbvIt4Cob_7HxGfxLkCNlDTM-rQ,42755
|
245
245
|
pyegeria/utils.py,sha256=GCt1C0bp0Xng1ahzbZhzV9qQwH7Dj93IaCt2dvWb-sg,5417
|
246
246
|
pyegeria/valid_metadata_omvs.py,sha256=Xq9DqBQvBFFJzaFIRKcVZ2k4gJvSh9yeXs_j-O3vn1w,65050
|
247
247
|
pyegeria/x_action_author_omvs.py,sha256=RcqSzahUKCtvb_3u_wyintAlc9WFkC_2v0E12TZs8lQ,6433
|
248
|
-
pyegeria-5.3.8.
|
249
|
-
pyegeria-5.3.8.
|
250
|
-
pyegeria-5.3.8.
|
251
|
-
pyegeria-5.3.8.
|
252
|
-
pyegeria-5.3.8.
|
248
|
+
pyegeria-5.3.8.4.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
249
|
+
pyegeria-5.3.8.4.dist-info/METADATA,sha256=ZjC3tDGbg9GSkaLEPeGLgM8Up-AX3X5mkbz11FbDPXY,2740
|
250
|
+
pyegeria-5.3.8.4.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
251
|
+
pyegeria-5.3.8.4.dist-info/entry_points.txt,sha256=eAvQ_vkejlF3JzMzEc5VD93ymLA_hSFV0HM8fntG-d8,6791
|
252
|
+
pyegeria-5.3.8.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|