pyegeria 5.3.8.10__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 +2 -2
- pyegeria/_globals.py +1 -1
- pyegeria/commands/cat/dr_egeria_md.py +5 -2
- pyegeria/commands/cat/list_terms.py +9 -11
- pyegeria/glossary_browser_omvs.py +323 -154
- pyegeria/md_processing_utils.py +87 -25
- {pyegeria-5.3.8.10.dist-info → pyegeria-5.3.9.2.dist-info}/METADATA +1 -1
- {pyegeria-5.3.8.10.dist-info → pyegeria-5.3.9.2.dist-info}/RECORD +11 -11
- {pyegeria-5.3.8.10.dist-info → pyegeria-5.3.9.2.dist-info}/LICENSE +0 -0
- {pyegeria-5.3.8.10.dist-info → pyegeria-5.3.9.2.dist-info}/WHEEL +0 -0
- {pyegeria-5.3.8.10.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
|
@@ -64,7 +64,7 @@ from .md_processing_utils import (extract_command, process_glossary_upsert_comma
|
|
64
64
|
process_glossary_list_command, process_category_list_command,
|
65
65
|
process_term_history_command, process_glossary_structure_command,
|
66
66
|
process_term_revision_history_command, process_create_term_term_relationship_command,
|
67
|
-
)
|
67
|
+
process_term_details_command,)
|
68
68
|
|
69
69
|
#
|
70
70
|
# The following assignments were generated by the `create_tech_guid_lists.py` utility that uses the pyegeria functions
|
pyegeria/_globals.py
CHANGED
@@ -15,7 +15,7 @@ from pyegeria import (extract_command, process_glossary_upsert_command, process_
|
|
15
15
|
process_solution_component_upsert_command, dr_egeria_state, process_term_list_command,
|
16
16
|
process_category_list_command, process_glossary_list_command, process_term_history_command,
|
17
17
|
process_glossary_structure_command, process_term_revision_history_command,
|
18
|
-
process_create_term_term_relationship_command)
|
18
|
+
process_create_term_term_relationship_command, process_term_details_command)
|
19
19
|
|
20
20
|
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
21
21
|
EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
|
@@ -97,6 +97,8 @@ def process_markdown_file(file_path: str, directive: str, server: str, url: str,
|
|
97
97
|
result = process_create_term_term_relationship_command(client, current_block, directive)
|
98
98
|
elif potential_command in ["List Term History", "Term History"]:
|
99
99
|
result = process_term_history_command(client, current_block, directive)
|
100
|
+
elif potential_command in ["List Term Details"]:
|
101
|
+
result = process_term_details_command(client, current_block, directive)
|
100
102
|
elif potential_command in ["List Term Update History", "List Term Revision History"]:
|
101
103
|
result = process_term_revision_history_command(client, current_block, directive)
|
102
104
|
elif potential_command in ["List Terms", "List Glossary Terms"]:
|
@@ -131,6 +133,7 @@ def process_markdown_file(file_path: str, directive: str, server: str, url: str,
|
|
131
133
|
print(f"\n==>\tErrors found while processing command: \'{potential_command}\'\n"
|
132
134
|
f"\tPlease correct and try again. \n")
|
133
135
|
final_output.append(current_block)
|
136
|
+
final_output.append('\n___\n')
|
134
137
|
else:
|
135
138
|
# If there is no command, append the block as-is
|
136
139
|
final_output.append(current_block)
|
@@ -150,7 +153,7 @@ def process_markdown_file(file_path: str, directive: str, server: str, url: str,
|
|
150
153
|
in_h1_block = True
|
151
154
|
|
152
155
|
# Handle the end of a block (line starts with `---`)
|
153
|
-
elif line.startswith("
|
156
|
+
elif line.startswith("___"):
|
154
157
|
if in_h1_block:
|
155
158
|
# Process the current block when it ends with `---`
|
156
159
|
current_block += f"\n{line}"
|
@@ -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
|
)
|
@@ -149,7 +150,7 @@ def display_glossary_terms(
|
|
149
150
|
expand=True,
|
150
151
|
)
|
151
152
|
table.add_column("Term Name / Abbreviation / Version")
|
152
|
-
table.add_column("Qualified Name / GUID", width=38, no_wrap=True)
|
153
|
+
table.add_column("Qualified Name / GUID / Aliases", width=38, no_wrap=True)
|
153
154
|
table.add_column("Summary")
|
154
155
|
table.add_column("Description")
|
155
156
|
table.add_column("Glossary")
|
@@ -184,17 +185,14 @@ def display_glossary_terms(
|
|
184
185
|
display_name = props.get("displayName","---")
|
185
186
|
qualified_name = props["qualifiedName"]
|
186
187
|
term_guid = term["elementHeader"]["guid"]
|
188
|
+
aliases = props.get("aliases", "---")
|
187
189
|
q_name = Text(
|
188
|
-
f"{qualified_name}\n&\n{term_guid}", style=style, justify="center"
|
190
|
+
f"{qualified_name}\n&\n{term_guid}\n&\n{aliases}", style=style, justify="center"
|
189
191
|
)
|
190
|
-
abbrev =
|
191
|
-
summary =
|
192
|
+
abbrev = props.get("abbreviation", "---")
|
193
|
+
summary = props.get("summary", "---")
|
192
194
|
description = Markdown(props.get("description",'---'))
|
193
|
-
version =
|
194
|
-
props.get("publishVersionIdentifier", "---"),
|
195
|
-
style=style,
|
196
|
-
justify="center",
|
197
|
-
)
|
195
|
+
version = props.get("publishVersionIdentifier", "---")
|
198
196
|
example = props.get("example", "---")
|
199
197
|
usage = props.get("usage", "---")
|
200
198
|
ex_us_out = Markdown(f"Example:\n{example}\n---\nUsage: \n{usage}")
|
@@ -216,7 +214,7 @@ def display_glossary_terms(
|
|
216
214
|
category_list_md = ""
|
217
215
|
category_list = g_client.get_categories_for_term(term_guid)
|
218
216
|
if type(category_list) is str and category_list == NO_CATEGORIES_FOUND:
|
219
|
-
category_list_md =
|
217
|
+
category_list_md = '---'
|
220
218
|
elif isinstance(category_list, list) and len(category_list) > 0:
|
221
219
|
for category in category_list:
|
222
220
|
category_name = category["glossaryCategoryProperties"].get("displayName",'---')
|