pyegeria 5.3.9.1__py3-none-any.whl → 5.3.9.2__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 +1 -1
- pyegeria/_globals.py +1 -1
- pyegeria/commands/cat/dr_egeria_md.py +1 -0
- pyegeria/commands/cat/list_terms.py +6 -9
- pyegeria/glossary_browser_omvs.py +15 -12
- pyegeria/md_processing_utils.py +5 -5
- {pyegeria-5.3.9.1.dist-info → pyegeria-5.3.9.2.dist-info}/METADATA +1 -1
- {pyegeria-5.3.9.1.dist-info → pyegeria-5.3.9.2.dist-info}/RECORD +11 -11
- {pyegeria-5.3.9.1.dist-info → pyegeria-5.3.9.2.dist-info}/LICENSE +0 -0
- {pyegeria-5.3.9.1.dist-info → pyegeria-5.3.9.2.dist-info}/WHEEL +0 -0
- {pyegeria-5.3.9.1.dist-info → pyegeria-5.3.9.2.dist-info}/entry_points.txt +0 -0
pyegeria/__init__.py
CHANGED
@@ -14,7 +14,7 @@ the server platform and servers.
|
|
14
14
|
from ._globals import (INTEGRATION_GUIDS, TEMPLATE_GUIDS, default_time_out, disable_ssl_warnings, enable_ssl_check,
|
15
15
|
is_debug, max_paging_size, NO_ELEMENTS_FOUND, NO_ASSETS_FOUND, NO_SERVERS_FOUND,
|
16
16
|
NO_CATALOGS_FOUND, NO_GLOSSARIES_FOUND, NO_TERMS_FOUND, NO_CATEGORIES_FOUND, NO_ELEMENT_FOUND,
|
17
|
-
NO_PROJECTS_FOUND, )
|
17
|
+
NO_PROJECTS_FOUND, DEBUG_LEVEL,)
|
18
18
|
|
19
19
|
if disable_ssl_warnings:
|
20
20
|
from urllib3 import disable_warnings
|
pyegeria/_globals.py
CHANGED
@@ -133,6 +133,7 @@ def process_markdown_file(file_path: str, directive: str, server: str, url: str,
|
|
133
133
|
print(f"\n==>\tErrors found while processing command: \'{potential_command}\'\n"
|
134
134
|
f"\tPlease correct and try again. \n")
|
135
135
|
final_output.append(current_block)
|
136
|
+
final_output.append('\n___\n')
|
136
137
|
else:
|
137
138
|
# If there is no command, append the block as-is
|
138
139
|
final_output.append(current_block)
|
@@ -25,6 +25,7 @@ from pyegeria import (
|
|
25
25
|
UserNotAuthorizedException, NO_CATEGORIES_FOUND,
|
26
26
|
)
|
27
27
|
from pyegeria.commands.cat.glossary_actions import EGERIA_HOME_GLOSSARY_GUID
|
28
|
+
from pyegeria._globals import NO_GLOSSARIES_FOUND
|
28
29
|
|
29
30
|
disable_ssl_warnings = True
|
30
31
|
|
@@ -99,7 +100,7 @@ def display_glossary_terms(
|
|
99
100
|
token = g_client.create_egeria_bearer_token(user_id, user_pass)
|
100
101
|
if (glossary_name is not None) and (glossary_name != "*"):
|
101
102
|
glossary_guid = g_client.get_guid_for_name(glossary_name)
|
102
|
-
if glossary_guid ==
|
103
|
+
if glossary_guid == NO_GLOSSARIES_FOUND:
|
103
104
|
console.print(
|
104
105
|
f"\nThe glossary name {glossary_name} was not found. Please try using the glossary guid"
|
105
106
|
)
|
@@ -188,14 +189,10 @@ def display_glossary_terms(
|
|
188
189
|
q_name = Text(
|
189
190
|
f"{qualified_name}\n&\n{term_guid}\n&\n{aliases}", style=style, justify="center"
|
190
191
|
)
|
191
|
-
abbrev =
|
192
|
-
summary =
|
192
|
+
abbrev = props.get("abbreviation", "---")
|
193
|
+
summary = props.get("summary", "---")
|
193
194
|
description = Markdown(props.get("description",'---'))
|
194
|
-
version =
|
195
|
-
props.get("publishVersionIdentifier", "---"),
|
196
|
-
style=style,
|
197
|
-
justify="center",
|
198
|
-
)
|
195
|
+
version = props.get("publishVersionIdentifier", "---")
|
199
196
|
example = props.get("example", "---")
|
200
197
|
usage = props.get("usage", "---")
|
201
198
|
ex_us_out = Markdown(f"Example:\n{example}\n---\nUsage: \n{usage}")
|
@@ -217,7 +214,7 @@ def display_glossary_terms(
|
|
217
214
|
category_list_md = ""
|
218
215
|
category_list = g_client.get_categories_for_term(term_guid)
|
219
216
|
if type(category_list) is str and category_list == NO_CATEGORIES_FOUND:
|
220
|
-
category_list_md =
|
217
|
+
category_list_md = '---'
|
221
218
|
elif isinstance(category_list, list) and len(category_list) > 0:
|
222
219
|
for category in category_list:
|
223
220
|
category_name = category["glossaryCategoryProperties"].get("displayName",'---')
|
@@ -132,17 +132,20 @@ class GlossaryBrowser(Client):
|
|
132
132
|
categories = self.get_categories_for_glossary(guid)
|
133
133
|
cat_md_display = ''
|
134
134
|
cat_md_qn = ''
|
135
|
+
category_names = ''
|
136
|
+
category_qualified_names = ''
|
137
|
+
|
135
138
|
if type(categories) is list:
|
136
139
|
for category in categories:
|
137
140
|
cat_md_display += f" {category['glossaryCategoryProperties'][('displayName')]},\n"
|
138
141
|
cat_md_qn += f" {category['glossaryCategoryProperties'][('qualifiedName')]},\n"
|
139
|
-
|
140
|
-
|
142
|
+
category_names = cat_md_display.rstrip(',')
|
143
|
+
category_qualified_names = cat_md_qn.rstrip(',')
|
141
144
|
|
142
145
|
return {
|
143
146
|
'guid': guid, 'properties': properties, 'display_name': display_name, 'description': description,
|
144
|
-
'language': language, 'usage': usage, 'qualified_name': qualified_name, '
|
145
|
-
'
|
147
|
+
'language': language, 'usage': usage, 'qualified_name': qualified_name, 'categories_names': category_names,
|
148
|
+
'categories_qualified_names': category_qualified_names
|
146
149
|
}
|
147
150
|
|
148
151
|
def _generate_entity_md(self, elements: list, elements_action: str, output_format: str, entity_type: str,
|
@@ -182,16 +185,16 @@ class GlossaryBrowser(Client):
|
|
182
185
|
|
183
186
|
# Add common attributes
|
184
187
|
for key, value in props.items():
|
185
|
-
# Skip
|
186
|
-
if key == '
|
188
|
+
# Skip categories_names for FORM output and categories_qualified_names for REPORT output
|
189
|
+
if key == 'categories_names' and output_format == 'FORM':
|
187
190
|
continue
|
188
|
-
if key == '
|
191
|
+
if key == 'categories_qualified_names' and output_format == 'REPORT':
|
189
192
|
continue
|
190
193
|
if key not in ['guid', 'properties', 'display_name']:
|
191
|
-
# Use "Categories" as the label for both
|
192
|
-
if key == '
|
194
|
+
# Use "Categories" as the label for both categories_qualified_names and categories_names
|
195
|
+
if key == 'categories_qualified_names' and output_format == 'FORM':
|
193
196
|
elements_md += self.make_md_attribute("Categories", value, output_format)
|
194
|
-
elif key == '
|
197
|
+
elif key == 'categories_names' and output_format == 'REPORT':
|
195
198
|
elements_md += self.make_md_attribute("Categories", value, output_format)
|
196
199
|
else:
|
197
200
|
elements_md += self.make_md_attribute(key.replace('_', ' '), value, output_format)
|
@@ -308,7 +311,7 @@ class GlossaryBrowser(Client):
|
|
308
311
|
{'name': 'Language', 'key': 'language', 'format': True},
|
309
312
|
{'name': 'Description', 'key': 'description', 'format': True},
|
310
313
|
{'name': 'Usage', 'key': 'usage', 'format': True},
|
311
|
-
{'name': 'Categories', 'key': '
|
314
|
+
{'name': 'Categories', 'key': 'categories_names', 'format': True}, ]
|
312
315
|
|
313
316
|
return self._generate_entity_md_table(elements=elements, search_string=search_string, entity_type="Glossary",
|
314
317
|
extract_properties_func=self._extract_glossary_properties,
|
@@ -371,7 +374,7 @@ class GlossaryBrowser(Client):
|
|
371
374
|
list: List of glossary dictionaries
|
372
375
|
"""
|
373
376
|
return self._generate_entity_dict(elements=elements, extract_properties_func=self._extract_glossary_properties,
|
374
|
-
exclude_keys=['properties', '
|
377
|
+
exclude_keys=['properties', 'categories_qualified_names'], output_format=output_format)
|
375
378
|
|
376
379
|
def generate_glossaries_md(self, elements: list | dict, search_string: str,
|
377
380
|
output_format: str = 'MD') -> str | list:
|
pyegeria/md_processing_utils.py
CHANGED
@@ -16,7 +16,7 @@ from rich.console import Console
|
|
16
16
|
from rich.markdown import Markdown
|
17
17
|
|
18
18
|
from pyegeria import body_slimmer
|
19
|
-
from pyegeria._globals import (NO_GLOSSARIES_FOUND, NO_ELEMENTS_FOUND, NO_PROJECTS_FOUND, NO_CATEGORIES_FOUND)
|
19
|
+
from pyegeria._globals import (NO_GLOSSARIES_FOUND, NO_ELEMENTS_FOUND, NO_PROJECTS_FOUND, NO_CATEGORIES_FOUND, DEBUG_LEVEL)
|
20
20
|
from pyegeria.dr_egeria_state import get_element_dictionary, update_element_dictionary, find_key_with_value
|
21
21
|
from pyegeria.egeria_tech_client import EgeriaTech
|
22
22
|
# from pyegeria.md_processing_helpers import process_q_name_list
|
@@ -32,7 +32,7 @@ command_list = ["Provenance", "Create Glossary", "Update Glossary", "Create Term
|
|
32
32
|
"Create Solution Blueprint", "Update Solution Blueprint", "Create Solution Component",
|
33
33
|
"Update Solution Component", "Create Term-Term Relationship", "Update Term-Term Relationship",]
|
34
34
|
# verbosity - verbose, quiet, debug
|
35
|
-
|
35
|
+
|
36
36
|
message_types = {
|
37
37
|
"INFO": "INFO-", "WARNING": "WARNING->", "ERROR": "ERROR->", "DEBUG-INFO": "DEBUG-INFO->",
|
38
38
|
"DEBUG-WARNING": "DEBUG-WARNING->", "DEBUG-ERROR": "DEBUG-ERROR->", "ALWAYS": "\n\n==> "
|
@@ -96,6 +96,7 @@ def is_valid_iso_date(date_text) -> bool:
|
|
96
96
|
except ValueError:
|
97
97
|
return False
|
98
98
|
|
99
|
+
debug_level = DEBUG_LEVEL
|
99
100
|
|
100
101
|
def set_debug_level(directive: str) -> None:
|
101
102
|
"""Sets the debug level for the script."""
|
@@ -388,7 +389,7 @@ def process_provenance_command(file_path: str, txt: [str]) -> str:
|
|
388
389
|
existing_prov = extracted_text # Return the cleaned text
|
389
390
|
else:
|
390
391
|
existing_prov = None
|
391
|
-
|
392
|
+
|
392
393
|
existing_prov = existing_prov if existing_prov else " "
|
393
394
|
return f"\n# Provenance:\n{existing_prov}\n{output}\n"
|
394
395
|
|
@@ -1148,7 +1149,6 @@ def process_category_upsert_command(egeria_client: EgeriaTech, txt: str, directi
|
|
1148
1149
|
update_element_dictionary(known_q_name, {
|
1149
1150
|
'guid': known_guid, 'display_name': category_name
|
1150
1151
|
})
|
1151
|
-
print_msg(ALWAYS, f"Updated Category `{category_name}` with GUID {known_guid}", debug_level)
|
1152
1152
|
|
1153
1153
|
category_sync = update_category_parent(egeria_client, known_guid, parent_category_name)
|
1154
1154
|
print_msg(ALWAYS, f"Updated Category hierarchy for `{category_name}` with outcome {category_sync}",
|
@@ -1303,7 +1303,7 @@ def process_term_upsert_command(egeria_client: EgeriaTech, txt: str, directive:
|
|
1303
1303
|
|
1304
1304
|
aliases = process_simple_attribute(txt, ['Aliases','Alias'], INFO)
|
1305
1305
|
if aliases:
|
1306
|
-
alias_list = list(filter(None, re.split(r'[,\
|
1306
|
+
alias_list = list(filter(None, re.split(r'[,\n]+', aliases.strip())))
|
1307
1307
|
else:
|
1308
1308
|
alias_list = None
|
1309
1309
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
pyegeria/README.md,sha256=PwX5OC7-YSZUCIsoyHh1O-WBM2hE84sm3Bd4O353NOk,1464
|
2
|
-
pyegeria/__init__.py,sha256=
|
2
|
+
pyegeria/__init__.py,sha256=nFCanIHEBLo4bQSMBdqncR-otfySxnit8Atf5lSjeYA,30805
|
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
|
6
|
-
pyegeria/_globals.py,sha256=
|
6
|
+
pyegeria/_globals.py,sha256=wTUFvZgk_evuGk9ds2lCegQT3FQfBJxgPaI-zWFsiMw,1012
|
7
7
|
pyegeria/_validators.py,sha256=vP9nuZwucnCo_LrPU7hkitpWzaych5bTZEKE58TaTnQ,12726
|
8
8
|
pyegeria/asset_catalog_omvs.py,sha256=P6FceMP0FgakGSOt3ePxpEbsF7nnypzo1aQahjdL_94,29021
|
9
9
|
pyegeria/automated_curation_omvs.py,sha256=tzwCyXL0Hx8UjryBBWcPoEuBRajXZpLuwPQ1vuOg2yc,130349
|
@@ -16,7 +16,7 @@ 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=h9LmDmejmaPDlDuGNlVor-bqNnKPvSBhcC7JFWBdOEM,5710
|
19
|
-
pyegeria/commands/cat/dr_egeria_md.py,sha256=
|
19
|
+
pyegeria/commands/cat/dr_egeria_md.py,sha256=aR6qlZ3-DjtxuAmDcn4aKWgnyhYB-eRV7IkOhSA7j2E,11836
|
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
|
@@ -36,7 +36,7 @@ pyegeria/commands/cat/list_glossaries.py,sha256=D2ovkffSmnO-NQ7y-Jw0aDBtK2j06CQz
|
|
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=vgf4vqLqPGNTdCR3ptX0Xdqx_FR_Izu6SHrV1q1R6nE,12145
|
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,11 +226,11 @@ 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=
|
229
|
+
pyegeria/glossary_browser_omvs.py,sha256=YoiTgqm5wdF1ly6d3fwSUagkxvwzANKv6PFcDvI6zKY,172548
|
230
230
|
pyegeria/glossary_manager_omvs.py,sha256=aGYZFuzWrPmPLLNwkNpV7-FsalqwDR7gyBzgdubnM04,87989
|
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=77k_5aDcrcZB_bxIuYA2nssvRYfB-0CxMgj4lfADH78,96844
|
234
234
|
pyegeria/md_processing_utils_orig.py,sha256=64eVP86__zI4EdzwveskDyLiw6EyWJXZW4pqk9aLpuM,52486
|
235
235
|
pyegeria/mermaid_utilities.py,sha256=sQqdFUWdNpHu9d3Tk9UVe80M-5bOzses0XcFYX5FF-E,54254
|
236
236
|
pyegeria/metadata_explorer_omvs.py,sha256=xHnZTQKbd6XwOhYia-RiIisrvZcqHi0SL1l6OCf04Gk,86911
|
@@ -245,8 +245,8 @@ pyegeria/template_manager_omvs.py,sha256=chBljs1vy5wr9DRAtbvIt4Cob_7HxGfxLkCNlDT
|
|
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.9.
|
249
|
-
pyegeria-5.3.9.
|
250
|
-
pyegeria-5.3.9.
|
251
|
-
pyegeria-5.3.9.
|
252
|
-
pyegeria-5.3.9.
|
248
|
+
pyegeria-5.3.9.2.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
249
|
+
pyegeria-5.3.9.2.dist-info/METADATA,sha256=AGkUdX36k28Sor23eShJz3r_-tJ3ZmySZvQLpqfS4ns,2757
|
250
|
+
pyegeria-5.3.9.2.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
251
|
+
pyegeria-5.3.9.2.dist-info/entry_points.txt,sha256=eAvQ_vkejlF3JzMzEc5VD93ymLA_hSFV0HM8fntG-d8,6791
|
252
|
+
pyegeria-5.3.9.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|