pyegeria 0.7.7__tar.gz → 0.7.8__tar.gz
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-0.7.7 → pyegeria-0.7.8}/PKG-INFO +1 -1
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/cli/egeria.py +0 -9
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/cli/egeria_tech.py +0 -9
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/tech/list_elements.py +5 -4
- {pyegeria-0.7.7 → pyegeria-0.7.8}/pyproject.toml +1 -1
- pyegeria-0.7.7/examples/widgets/tech/get_element_info.py +0 -121
- {pyegeria-0.7.7 → pyegeria-0.7.8}/LICENSE +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/README.md +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/doc_samples/Create_Collection_Sample.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/doc_samples/Create_Sustainability_Collection_Sample.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/cat/README.md +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/cat/__init__.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/cat/get_asset_graph.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/cat/get_collection.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/cat/get_project_structure.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/cat/get_tech_type_elements.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/cat/get_tech_type_template.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/cat/list_assets.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/cat/list_cert_types.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/cat/list_glossary.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/cat/list_projects.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/cat/list_tech_types.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/cat/list_todos.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/cli/__init__.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/cli/egeria_cat.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/cli/egeria_my.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/cli/egeria_ops.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/cli/ops_config.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/my/README.md +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/my/__init__.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/my/list_my_profile.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/my/list_my_roles.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/my/monitor_my_todos.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/my/monitor_open_todos.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/my/my_profile_actions.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/ops/README.md +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/ops/__init__.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/ops/engine_actions.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/ops/integration_daemon_actions.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/ops/list_catalog_targets.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/ops/load_archive.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/ops/monitor_asset_events.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/ops/monitor_coco_status.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/ops/monitor_engine_activity.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/ops/monitor_gov_eng_status.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/ops/monitor_integ_daemon_status.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/ops/monitor_platform_status.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/ops/monitor_server_list.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/ops/monitor_server_status.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/ops/refresh_integration_daemon.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/ops/restart_integration_daemon.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/tech/README.md +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/tech/__init__.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/tech/get_guid_info.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/tech/get_tech_details.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/tech/list_asset_types.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/tech/list_registered_services.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/tech/list_relationship_types.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/tech/list_tech_templates.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/examples/widgets/tech/list_valid_metadata_values.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/pyegeria/Xloaded_resources_omvs.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/pyegeria/__init__.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/pyegeria/_client.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/pyegeria/_deprecated_gov_engine.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/pyegeria/_exceptions.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/pyegeria/_globals.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/pyegeria/_validators.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/pyegeria/action_author_omvs.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/pyegeria/asset_catalog_omvs.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/pyegeria/automated_curation_omvs.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/pyegeria/classification_manager_omvs.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/pyegeria/collection_manager_omvs.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/pyegeria/core_omag_server_config.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/pyegeria/create_tech_guid_lists.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/pyegeria/feedback_manager_omvs.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/pyegeria/full_omag_server_config.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/pyegeria/glossary_browser_omvs.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/pyegeria/glossary_manager_omvs.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/pyegeria/my_profile_omvs.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/pyegeria/platform_services.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/pyegeria/project_manager_omvs.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/pyegeria/registered_info.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/pyegeria/runtime_manager_omvs.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/pyegeria/server_operations.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/pyegeria/utils.py +0 -0
- {pyegeria-0.7.7 → pyegeria-0.7.8}/pyegeria/valid_metadata_omvs.py +0 -0
@@ -50,7 +50,6 @@ from examples.widgets.tech.list_registered_services import display_registered_sv
|
|
50
50
|
from examples.widgets.tech.list_relationship_types import display_relationship_types
|
51
51
|
from examples.widgets.tech.list_tech_templates import display_templates_spec
|
52
52
|
from examples.widgets.tech.list_valid_metadata_values import display_metadata_values
|
53
|
-
from examples.widgets.tech.get_element_info import display_elements
|
54
53
|
from examples.widgets.tech.list_elements import list_elements
|
55
54
|
|
56
55
|
@tui()
|
@@ -196,14 +195,6 @@ def show(ctx):
|
|
196
195
|
"""Display an Egeria Object"""
|
197
196
|
pass
|
198
197
|
|
199
|
-
@show.command("get-element-info")
|
200
|
-
@click.pass_context
|
201
|
-
@click.option('--om_type', default='Project', help='Metadata type to query')
|
202
|
-
def get_element_info(ctx, om_type):
|
203
|
-
"""Display the valid metadata values for a property and type"""
|
204
|
-
c = ctx.obj
|
205
|
-
display_elements(om_type, c.view_server, c.view_server_url,
|
206
|
-
c.userid, c.password, c.jupyter, c.width)
|
207
198
|
|
208
199
|
@show.command("list-elements")
|
209
200
|
@click.pass_context
|
@@ -22,7 +22,6 @@ from examples.widgets.tech.list_relationship_types import display_relationship_t
|
|
22
22
|
from examples.widgets.tech.list_tech_templates import display_templates_spec
|
23
23
|
from examples.widgets.tech.list_valid_metadata_values import display_metadata_values
|
24
24
|
from examples.widgets.cat.get_tech_type_template import template_viewer
|
25
|
-
from examples.widgets.tech.get_element_info import display_elements
|
26
25
|
from examples.widgets.tech.list_elements import list_elements
|
27
26
|
|
28
27
|
|
@@ -207,14 +206,6 @@ def valid_metadata_values(ctx, property, type_name):
|
|
207
206
|
display_metadata_values(property, type_name, c.view_server, c.view_server_url,
|
208
207
|
c.userid, c.password, False, c.jupyter, c.width)
|
209
208
|
|
210
|
-
@show.command("get-element-info")
|
211
|
-
@click.pass_context
|
212
|
-
@click.option('--om_type', default='Project', help='Metadata type to query')
|
213
|
-
def get_element_info(ctx, om_type):
|
214
|
-
"""Display the valid metadata values for a property and type"""
|
215
|
-
c = ctx.obj
|
216
|
-
display_elements(om_type, c.view_server, c.view_server_url,
|
217
|
-
c.userid, c.password, c.jupyter, c.width)
|
218
209
|
|
219
210
|
@show.command("list-elements")
|
220
211
|
@click.pass_context
|
@@ -59,6 +59,7 @@ def list_elements(om_type:str, server: str,
|
|
59
59
|
)
|
60
60
|
|
61
61
|
table.add_column("Qualified Name")
|
62
|
+
table.add_column("Type")
|
62
63
|
table.add_column("Created")
|
63
64
|
table.add_column("Home Store")
|
64
65
|
table.add_column("GUID", width = 38,no_wrap=True)
|
@@ -68,7 +69,7 @@ def list_elements(om_type:str, server: str,
|
|
68
69
|
if type(elements) is list:
|
69
70
|
for element in elements:
|
70
71
|
header = element['elementHeader']
|
71
|
-
el_q_name = element['properties']
|
72
|
+
el_q_name = element['properties'].get('qualifiedName',"---")
|
72
73
|
el_type = header["type"]['typeName']
|
73
74
|
el_home = header['origin']['homeMetadataCollectionName']
|
74
75
|
el_create_time = header['versions']['createTime'][:-10]
|
@@ -79,11 +80,11 @@ def list_elements(om_type:str, server: str,
|
|
79
80
|
el_props_md += f"* **{prop}**: {element['properties'][prop]}\n"
|
80
81
|
|
81
82
|
el_props_out = Markdown(el_props_md)
|
82
|
-
table.add_row(el_q_name, el_create_time, el_home, el_guid, el_props_out)
|
83
|
+
table.add_row(el_q_name, el_type, el_create_time, el_home, el_guid, el_props_out)
|
83
84
|
|
84
85
|
return table
|
85
86
|
else:
|
86
|
-
print("
|
87
|
+
print("No instances found")
|
87
88
|
sys.exit(1)
|
88
89
|
|
89
90
|
try:
|
@@ -94,7 +95,7 @@ def list_elements(om_type:str, server: str,
|
|
94
95
|
|
95
96
|
except (InvalidParameterException, PropertyServerException, UserNotAuthorizedException) as e:
|
96
97
|
print_exception_response(e)
|
97
|
-
|
98
|
+
print("Perhaps the type name isn't known")
|
98
99
|
finally:
|
99
100
|
c_client.close_session()
|
100
101
|
|
@@ -1,121 +0,0 @@
|
|
1
|
-
#!/usr/bin/env python3
|
2
|
-
"""
|
3
|
-
SPDX-Lic
|
4
|
-
ense-Identifier: Apache-2.0
|
5
|
-
Copyright Contributors to the ODPi Egeria project.
|
6
|
-
|
7
|
-
Unit tests for the Utils helper functions using the Pytest framework.
|
8
|
-
|
9
|
-
|
10
|
-
A simple display for glossary terms
|
11
|
-
"""
|
12
|
-
import argparse
|
13
|
-
import json
|
14
|
-
import os
|
15
|
-
import sys
|
16
|
-
|
17
|
-
from rich import print, box
|
18
|
-
from rich.console import Console
|
19
|
-
from rich.markdown import Markdown
|
20
|
-
from rich.panel import Panel
|
21
|
-
|
22
|
-
from rich.prompt import Prompt
|
23
|
-
from rich.text import Text
|
24
|
-
from rich.tree import Tree
|
25
|
-
|
26
|
-
from pyegeria import (
|
27
|
-
InvalidParameterException,
|
28
|
-
PropertyServerException,
|
29
|
-
UserNotAuthorizedException,
|
30
|
-
Client, ClassificationManager
|
31
|
-
)
|
32
|
-
|
33
|
-
|
34
|
-
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
35
|
-
EGERIA_KAFKA_ENDPOINT = os.environ.get('KAFKA_ENDPOINT', 'localhost:9092')
|
36
|
-
EGERIA_PLATFORM_URL = os.environ.get('EGERIA_PLATFORM_URL', 'https://localhost:9443')
|
37
|
-
EGERIA_VIEW_SERVER = os.environ.get('VIEW_SERVER', 'view-server')
|
38
|
-
EGERIA_VIEW_SERVER_URL = os.environ.get('EGERIA_VIEW_SERVER_URL', 'https://localhost:9443')
|
39
|
-
EGERIA_INTEGRATION_DAEMON = os.environ.get('INTEGRATION_DAEMON', 'integration-daemon')
|
40
|
-
EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
|
41
|
-
EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
|
42
|
-
EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
|
43
|
-
EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
|
44
|
-
EGERIA_JUPYTER = bool(os.environ.get('EGERIA_JUPYTER', 'False'))
|
45
|
-
EGERIA_WIDTH = int(os.environ.get('EGERIA_WIDTH', '200'))
|
46
|
-
|
47
|
-
|
48
|
-
def display_elements(om_type: str, server: str, url: str, username: str, user_password: str,
|
49
|
-
jupyter: bool = EGERIA_JUPYTER, width: int = EGERIA_WIDTH
|
50
|
-
):
|
51
|
-
c = ClassificationManager(server, url, user_id=username, user_pwd=user_password)
|
52
|
-
|
53
|
-
bearer_token = c.create_egeria_bearer_token(username, user_password)
|
54
|
-
|
55
|
-
try:
|
56
|
-
console = Console(width=width, force_terminal=not jupyter, style="bold white on black")
|
57
|
-
r = c.get_elements(om_type)
|
58
|
-
if type(r) is not list:
|
59
|
-
print(f"\n\n\tno elements found: {r}")
|
60
|
-
sys.exit(1)
|
61
|
-
|
62
|
-
tree = Tree(f"Elements for Open Metadata Type:{om_type}\n* There are {len(r)} elements", style="bold bright_white on black",
|
63
|
-
guide_style="bold bright_blue")
|
64
|
-
t = tree.add(f"Elements for {om_type}", style="bold bright_white on black")
|
65
|
-
for element in r:
|
66
|
-
header = element['elementHeader']
|
67
|
-
el_type = header["type"]['typeName']
|
68
|
-
el_home = header['origin']['homeMetadataCollectionName']
|
69
|
-
el_create_time = header['versions']['createTime']
|
70
|
-
el_guid = header['guid']
|
71
|
-
|
72
|
-
el_md = (f"#### Element Basics\n"
|
73
|
-
f"* **Type**: {el_type}\n"
|
74
|
-
f"* **Home**: {el_home}\n"
|
75
|
-
f"* **Created**: {el_create_time}\n"
|
76
|
-
f"* **GUID**: {el_guid}\n ---\n")
|
77
|
-
for prop in element['properties'].keys():
|
78
|
-
el_md += f"* **{prop}**: {element['properties'][prop]}\n"
|
79
|
-
|
80
|
-
el_out = Markdown(el_md)
|
81
|
-
p = Panel.fit(el_out, title=element['properties']['qualifiedName'],
|
82
|
-
style = "bold white on black")
|
83
|
-
t = tree.add(p)
|
84
|
-
|
85
|
-
print(tree)
|
86
|
-
|
87
|
-
c.close_session()
|
88
|
-
|
89
|
-
except (InvalidParameterException, PropertyServerException, UserNotAuthorizedException, ValueError) as e:
|
90
|
-
if type(e) is str:
|
91
|
-
console.print_exception()
|
92
|
-
else:
|
93
|
-
# console.print_exception(show_locals=True)
|
94
|
-
console.print(f"\n ===> Looks like the type {om_type} isn't known...\n")
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
def main():
|
99
|
-
parser = argparse.ArgumentParser()
|
100
|
-
parser.add_argument("--server", help="Name of the server to display status for")
|
101
|
-
parser.add_argument("--url", help="URL Platform to connect to")
|
102
|
-
parser.add_argument("--userid", help="User Id")
|
103
|
-
parser.add_argument("--password", help="User Password")
|
104
|
-
|
105
|
-
# parser.add_argument("--sponsor", help="Name of sponsor to search")
|
106
|
-
args = parser.parse_args()
|
107
|
-
|
108
|
-
server = args.server if args.server is not None else EGERIA_VIEW_SERVER
|
109
|
-
url = args.url if args.url is not None else EGERIA_VIEW_SERVER_URL
|
110
|
-
userid = args.userid if args.userid is not None else EGERIA_USER
|
111
|
-
user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
|
112
|
-
|
113
|
-
try:
|
114
|
-
om_type = Prompt.ask("Enter the Open Metadata Type to find Elements for", default=None)
|
115
|
-
display_elements(om_type, server, url, userid, user_pass)
|
116
|
-
except (KeyboardInterrupt):
|
117
|
-
pass
|
118
|
-
|
119
|
-
|
120
|
-
if __name__ == "__main__":
|
121
|
-
main()
|
File without changes
|
File without changes
|
File without changes
|
{pyegeria-0.7.7 → pyegeria-0.7.8}/examples/doc_samples/Create_Sustainability_Collection_Sample.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|