pyegeria 0.6.7__tar.gz → 0.6.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.
Files changed (84) hide show
  1. {pyegeria-0.6.7 → pyegeria-0.6.8}/PKG-INFO +1 -1
  2. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/cat/get_project_structure.py +26 -59
  3. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/cat/list_cert_types.py +1 -1
  4. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/cli/egeria.py +26 -0
  5. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/cli/egeria_cat.py +24 -0
  6. {pyegeria-0.6.7 → pyegeria-0.6.8}/pyegeria/classification_manager_omvs.py +759 -42
  7. {pyegeria-0.6.7 → pyegeria-0.6.8}/pyproject.toml +1 -1
  8. {pyegeria-0.6.7 → pyegeria-0.6.8}/LICENSE +0 -0
  9. {pyegeria-0.6.7 → pyegeria-0.6.8}/README.md +0 -0
  10. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/doc_samples/Create_Collection_Sample.py +0 -0
  11. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/doc_samples/Create_Sustainability_Collection_Sample.py +0 -0
  12. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/cat/README.md +0 -0
  13. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/cat/__init__.py +0 -0
  14. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/cat/get_asset_graph.py +0 -0
  15. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/cat/get_collection.py +0 -0
  16. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/cat/get_tech_type_elements.py +0 -0
  17. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/cat/get_tech_type_template.py +0 -0
  18. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/cat/list_assets.py +0 -0
  19. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/cat/list_glossary.py +0 -0
  20. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/cat/list_projects.py +0 -0
  21. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/cat/list_tech_types.py +0 -0
  22. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/cat/list_todos.py +0 -0
  23. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/cli/__init__.py +0 -0
  24. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/cli/egeria_my.py +0 -0
  25. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/cli/egeria_ops.py +0 -0
  26. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/cli/egeria_tech.py +0 -0
  27. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/cli/ops_config.py +0 -0
  28. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/my/README.md +0 -0
  29. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/my/__init__.py +0 -0
  30. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/my/list_my_profile.py +0 -0
  31. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/my/list_my_roles.py +0 -0
  32. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/my/monitor_my_todos.py +0 -0
  33. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/my/monitor_open_todos.py +0 -0
  34. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/my/my_profile_actions.py +0 -0
  35. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/ops/README.md +0 -0
  36. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/ops/__init__.py +0 -0
  37. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/ops/engine_actions.py +0 -0
  38. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/ops/integration_daemon_actions.py +0 -0
  39. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/ops/list_catalog_targets.py +0 -0
  40. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/ops/load_archive.py +0 -0
  41. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/ops/monitor_asset_events.py +0 -0
  42. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/ops/monitor_coco_status.py +0 -0
  43. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/ops/monitor_engine_activity.py +0 -0
  44. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/ops/monitor_gov_eng_status.py +0 -0
  45. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/ops/monitor_integ_daemon_status.py +0 -0
  46. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/ops/monitor_platform_status.py +0 -0
  47. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/ops/monitor_server_list.py +0 -0
  48. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/ops/monitor_server_status.py +0 -0
  49. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/ops/refresh_integration_daemon.py +0 -0
  50. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/ops/restart_integration_daemon.py +0 -0
  51. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/tech/README.md +0 -0
  52. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/tech/__init__.py +0 -0
  53. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/tech/get_guid_info.py +0 -0
  54. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/tech/get_tech_details.py +0 -0
  55. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/tech/list_asset_types.py +0 -0
  56. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/tech/list_registered_services.py +0 -0
  57. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/tech/list_relationship_types.py +0 -0
  58. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/tech/list_tech_templates.py +0 -0
  59. {pyegeria-0.6.7 → pyegeria-0.6.8}/examples/widgets/tech/list_valid_metadata_values.py +0 -0
  60. {pyegeria-0.6.7 → pyegeria-0.6.8}/pyegeria/Xloaded_resources_omvs.py +0 -0
  61. {pyegeria-0.6.7 → pyegeria-0.6.8}/pyegeria/__init__.py +0 -0
  62. {pyegeria-0.6.7 → pyegeria-0.6.8}/pyegeria/_client.py +0 -0
  63. {pyegeria-0.6.7 → pyegeria-0.6.8}/pyegeria/_deprecated_gov_engine.py +0 -0
  64. {pyegeria-0.6.7 → pyegeria-0.6.8}/pyegeria/_exceptions.py +0 -0
  65. {pyegeria-0.6.7 → pyegeria-0.6.8}/pyegeria/_globals.py +0 -0
  66. {pyegeria-0.6.7 → pyegeria-0.6.8}/pyegeria/_validators.py +0 -0
  67. {pyegeria-0.6.7 → pyegeria-0.6.8}/pyegeria/action_author_omvs.py +0 -0
  68. {pyegeria-0.6.7 → pyegeria-0.6.8}/pyegeria/asset_catalog_omvs.py +0 -0
  69. {pyegeria-0.6.7 → pyegeria-0.6.8}/pyegeria/automated_curation_omvs.py +0 -0
  70. {pyegeria-0.6.7 → pyegeria-0.6.8}/pyegeria/collection_manager_omvs.py +0 -0
  71. {pyegeria-0.6.7 → pyegeria-0.6.8}/pyegeria/core_omag_server_config.py +0 -0
  72. {pyegeria-0.6.7 → pyegeria-0.6.8}/pyegeria/create_tech_guid_lists.py +0 -0
  73. {pyegeria-0.6.7 → pyegeria-0.6.8}/pyegeria/feedback_manager_omvs.py +0 -0
  74. {pyegeria-0.6.7 → pyegeria-0.6.8}/pyegeria/full_omag_server_config.py +0 -0
  75. {pyegeria-0.6.7 → pyegeria-0.6.8}/pyegeria/glossary_browser_omvs.py +0 -0
  76. {pyegeria-0.6.7 → pyegeria-0.6.8}/pyegeria/glossary_manager_omvs.py +0 -0
  77. {pyegeria-0.6.7 → pyegeria-0.6.8}/pyegeria/my_profile_omvs.py +0 -0
  78. {pyegeria-0.6.7 → pyegeria-0.6.8}/pyegeria/platform_services.py +0 -0
  79. {pyegeria-0.6.7 → pyegeria-0.6.8}/pyegeria/project_manager_omvs.py +0 -0
  80. {pyegeria-0.6.7 → pyegeria-0.6.8}/pyegeria/registered_info.py +0 -0
  81. {pyegeria-0.6.7 → pyegeria-0.6.8}/pyegeria/runtime_manager_omvs.py +0 -0
  82. {pyegeria-0.6.7 → pyegeria-0.6.8}/pyegeria/server_operations.py +0 -0
  83. {pyegeria-0.6.7 → pyegeria-0.6.8}/pyegeria/utils.py +0 -0
  84. {pyegeria-0.6.7 → pyegeria-0.6.8}/pyegeria/valid_metadata_omvs.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyegeria
3
- Version: 0.6.7
3
+ Version: 0.6.8
4
4
  Summary: A python client for Egeria
5
5
  Home-page: https://github.com/odpi/egeria-python
6
6
  License: Apache 2.0
@@ -3,25 +3,22 @@
3
3
  SPDX-License-Identifier: Apache-2.0
4
4
  Copyright Contributors to the ODPi Egeria project.
5
5
 
6
- A simple viewer for collections - provide the root and we display the hierarchy
6
+ A simple viewer for project structure - provide the root and we display the hierarchy
7
7
 
8
8
  """
9
9
 
10
10
  import argparse
11
11
  import os
12
+
12
13
  from rich import print
14
+ from rich.console import Console
15
+ from rich.markdown import Markdown
13
16
  from rich.panel import Panel
14
17
  from rich.prompt import Prompt
15
- from rich.text import Text
16
18
  from rich.tree import Tree
17
- from rich.markdown import Markdown
18
- from rich.console import Console
19
19
 
20
- from pyegeria import (ProjectManager, MyProfile, UserNotAuthorizedException, PropertyServerException,
21
- InvalidParameterException)
22
- from pyegeria._exceptions import (
23
- print_exception_response,
24
- )
20
+ from pyegeria import (ProjectManager, UserNotAuthorizedException, PropertyServerException, InvalidParameterException)
21
+ from pyegeria._exceptions import (print_exception_response, )
25
22
 
26
23
  disable_ssl_warnings = True
27
24
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
@@ -37,10 +34,13 @@ EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
37
34
  EGERIA_JUPYTER = bool(os.environ.get('EGERIA_JUPYTER', 'False'))
38
35
  EGERIA_WIDTH = int(os.environ.get('EGERIA_WIDTH', '200'))
39
36
 
37
+
40
38
  def project_structure_viewer(root: str, server_name: str, platform_url: str, user: str, user_password: str,
41
- jupyter:bool=EGERIA_JUPYTER, width:int = EGERIA_WIDTH):
39
+ jupyter: bool = EGERIA_JUPYTER, width: int = EGERIA_WIDTH, timeout: int = 30):
42
40
  """ A simple collection viewer"""
43
- def walk_project_hierarchy(project_client: ProjectManager, project_name: str, tree: Tree, root:bool = False) -> None:
41
+
42
+ def walk_project_hierarchy(project_client: ProjectManager, project_name: str, tree: Tree,
43
+ root: bool = False) -> None:
44
44
  """Recursively build a Tree with collection contents."""
45
45
  t = None
46
46
  style = "bright_white on black"
@@ -50,12 +50,12 @@ def project_structure_viewer(root: str, server_name: str, platform_url: str, use
50
50
  proj_guid = project[0]['elementHeader']['guid']
51
51
  proj_props = project[0]['properties']
52
52
 
53
- proj_type = proj_props.get('typeName','---')
53
+ proj_type = proj_props.get('typeName', '---')
54
54
  proj_unique = proj_props.get('qualifiedName', '---')
55
55
  proj_identifier = proj_props.get('identifier', '---')
56
- proj_name = proj_props.get('name','---')
57
- proj_desc = proj_props.get('description','---')
58
- proj_status = proj_props.get('projectStatus','---')
56
+ proj_name = proj_props.get('name', '---')
57
+ proj_desc = proj_props.get('description', '---')
58
+ proj_status = proj_props.get('projectStatus', '---')
59
59
  proj_priority = proj_props.get('priority', '---')
60
60
  proj_start = proj_props.get('startDate', '---')[:-10]
61
61
  proj_props_md = (f"* Name: {proj_name}\n"
@@ -79,66 +79,31 @@ def project_structure_viewer(root: str, server_name: str, platform_url: str, use
79
79
  proj_props_md += f"\n### Team Members\n {member_md}"
80
80
 
81
81
  proj_props_out = Markdown(proj_props_md)
82
- p = Panel(proj_props_out, style = style, title=project_name)
82
+ p = Panel(proj_props_out, style=style, title=project_name)
83
83
  t = tree.add(p)
84
84
 
85
-
86
85
  linked_projects = project_client.get_linked_projects(proj_guid)
87
86
  if type(linked_projects) is list:
88
87
  for proj in linked_projects:
89
88
  child_md = ""
90
89
  child_guid = proj['elementHeader']['guid']
91
90
  child_name = proj['properties']['name']
92
- # child_props = proj['properties']
93
- # for key in child_props.keys():
94
- # child_md += f"* {key}: {child_props[key]}\n"
95
- # child_md += f"* GUID: {child_guid}"
96
91
  walk_project_hierarchy(project_client, child_name, t)
97
92
 
98
93
  else:
99
94
  return t
100
- # tt= tree.add(f"[bold magenta on black]No projects match {root_project_name}")
101
-
102
- #
103
- # branch = tt.add(f"[bold magenta on black]Members", style=style, guide_style=style)
104
- # walk_collection_hierarchy(collection_client, member['qualifiedName'], branch),
105
-
106
- # members = project_client.get_member_list(root_project_name)
107
- # if members:
108
- # for member in members:
109
- # style = "bold white on black"
110
- # text_collection_name = Text(f"[bold white on black]Name: {member['name']}", style=style)
111
- # text_qualified_name = Text(f"* QualifiedName: {member['qualifiedName']}")
112
- # text_guid = Text(f"* GUID: {member['guid']}", "green")
113
- # text_collection_type = Text(f"* Collection Type: {member['collectionType']}")
114
- # text_description = Text(f"* Description: {member['description']}")
115
- # p = Panel.fit(f"{text_collection_name}[green]\n{text_qualified_name}\n{text_guid}\n"
116
- # f"{text_collection_type}\n{text_description}")
117
- # tt = tree.add(p, style=style)
118
- #
119
- #
120
- # linked_projects = project_client.get_linked_projects()
121
- # if type(children) is list:
122
- # branch = tt.add(f"[bold magenta on black]Members", style=style, guide_style=style)
123
- # walk_collection_hierarchy(collection_client, member['qualifiedName'], branch),
124
- # else:
125
- # tt = tree.add(f"[bold magenta on black]No collections match {root_collection_name}")
95
+
126
96
  try:
127
- console = Console(width=EGERIA_WIDTH)
128
- tree = Tree(f"[bold bright green on black]{root}",guide_style="bold bright_blue")
129
- p_client = ProjectManager(server_name, platform_url,
130
- user_id=user)
97
+ console = Console(width=width, force_terminal=not jupyter)
98
+ tree = Tree(f"[bold bright green on black]{root}", guide_style="bold bright_blue")
99
+ p_client = ProjectManager(server_name, platform_url, user_id=user)
131
100
 
132
- token1= p_client.create_egeria_bearer_token(user, user_password)
101
+ token1 = p_client.create_egeria_bearer_token(user, user_password)
133
102
 
134
- walk_project_hierarchy(p_client,root, tree, root = True)
103
+ walk_project_hierarchy(p_client, root, tree, root=True)
135
104
  print(tree)
136
105
 
137
- except (
138
- InvalidParameterException,
139
- PropertyServerException,
140
- UserNotAuthorizedException
141
- ) as e:
106
+ except (InvalidParameterException, PropertyServerException, UserNotAuthorizedException) as e:
142
107
  print_exception_response(e)
143
108
 
144
109
 
@@ -161,5 +126,7 @@ def main():
161
126
  project_structure_viewer(root_project, server, url, userid, user_pass)
162
127
  except (KeyboardInterrupt):
163
128
  pass
129
+
130
+
164
131
  if __name__ == "__main__":
165
- main()
132
+ main()
@@ -50,7 +50,7 @@ def display_certifications(search_string: str, server: str, url: str, username:
50
50
  console = Console(width=width, force_terminal=not jupyter, soft_wrap=True)
51
51
  if (search_string is None) or ((len(search_string) < 3)) and (search_string != '*'):
52
52
  raise ValueError("Invalid Search String - must be greater than four characters long")
53
- g_client = ClassificationManager(server, url, user_id=username,user_pwd=user_password )
53
+ g_client = ClassificationManager(server, url, user_id=username,user_pwd=user_password)
54
54
  token = g_client.create_egeria_bearer_token(username, user_password)
55
55
 
56
56
 
@@ -12,6 +12,8 @@ This is an emerging capability based on the **click** package. Feedback welcome!
12
12
  import click
13
13
  from trogon import tui
14
14
 
15
+ from examples.widgets.cat.get_project_structure import project_structure_viewer
16
+ from examples.widgets.cat.list_cert_types import display_certifications
15
17
  from examples.widgets.cat.get_asset_graph import asset_viewer
16
18
  from examples.widgets.cat.get_collection import collection_viewer
17
19
  from examples.widgets.cat.get_tech_type_elements import tech_viewer
@@ -22,6 +24,7 @@ from examples.widgets.cat.list_projects import display_project_list
22
24
  from examples.widgets.cat.list_tech_types import display_tech_types
23
25
  from examples.widgets.cat.list_todos import display_to_dos
24
26
  from examples.widgets.cli.ops_config import Config
27
+
25
28
  from examples.widgets.ops.engine_actions import start_server as start_engine_host, \
26
29
  stop_server as stop_engine_host
27
30
  from examples.widgets.ops.integration_daemon_actions import (add_catalog_target, remove_catalog_target,
@@ -361,6 +364,29 @@ def show_tech_type_templates(ctx, tech_type):
361
364
  template_viewer(tech_type, c.view_server, c.view_server_url, c.userid,
362
365
  c.password, c.jupyter, c.width)
363
366
 
367
+ @show.command('certification-types')
368
+ @click.option('--search-string', default = 'CertificationType', help="")
369
+ @click.pass_context
370
+ def show_certification_types(ctx, search_string):
371
+ """Show certification types
372
+ - generally stay with the default..
373
+ """
374
+ c = ctx.obj
375
+ display_certifications(search_string, c.view_server, c.view_server_url, c.userid,
376
+ c.password, c.timeout, c.jupyter, c.width)
377
+
378
+ @show.command('project-structure')
379
+ @click.option('--project', default = 'Clinical Trials Management',
380
+ help="Enter the root project to start from")
381
+ @click.pass_context
382
+ def show_project_structure(ctx, project):
383
+ """Show the structure of the project starting from a root project"""
384
+ c = ctx.obj
385
+ project_structure_viewer(project, c.view_server, c.view_server_url, c.userid,
386
+ c.password, c.jupyter, c.width, c.timeout)
387
+
388
+
389
+
364
390
 
365
391
  @show.command('assets')
366
392
  @click.argument('search-string')
@@ -21,6 +21,8 @@ from examples.widgets.cat.list_glossary import display_glossary_terms
21
21
  from examples.widgets.cat.list_tech_types import display_tech_types
22
22
  from examples.widgets.cat.list_projects import display_project_list
23
23
  from examples.widgets.cat.list_todos import display_to_dos
24
+ from examples.widgets.cat.get_project_structure import project_structure_viewer
25
+ from examples.widgets.cat.list_cert_types import display_certifications
24
26
 
25
27
  # from pyegeria import ServerOps
26
28
  from examples.widgets.cli.ops_config import Config
@@ -188,6 +190,28 @@ def show_projects(ctx, search_string):
188
190
  display_project_list(search_string, c.view_server, c.view_server_url, c.userid,
189
191
  c.password, False,c.jupyter, c.width)
190
192
 
193
+ @show.command('certification-types')
194
+ @click.option('--search-string', default = 'CertificationType', help="")
195
+ @click.pass_context
196
+ def show_certification_types(ctx, search_string):
197
+ """Show certification types
198
+ - generally stay with the default..
199
+ """
200
+ c = ctx.obj
201
+ display_certifications(search_string, c.view_server, c.view_server_url, c.userid,
202
+ c.password, c.timeout, c.jupyter, c.width)
203
+
204
+ @show.command('project-structure')
205
+ @click.option('--project', default = 'Clinical Trials Management',
206
+ help="Enter the root project to start from")
207
+ @click.pass_context
208
+ def show_project_structure(ctx, project):
209
+ """Show the structure of the project starting from a root project"""
210
+ c = ctx.obj
211
+ project_structure_viewer(project, c.view_server, c.view_server_url, c.userid,
212
+ c.password, c.jupyter, c.width, c.timeout)
213
+
214
+
191
215
 
192
216
  @show.command('to-dos')
193
217
  @click.option('--search-string', default='*',