pyegeria 0.7.45__py3-none-any.whl → 0.8.0__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.
Files changed (51) hide show
  1. examples/widgets/cat/list_cert_types.py +61 -43
  2. examples/widgets/cat/list_projects.py +1 -1
  3. examples/widgets/cli/egeria.py +18 -2
  4. examples/widgets/cli/egeria_tech.py +299 -98
  5. examples/widgets/my/my_profile_actions.py +51 -32
  6. examples/widgets/ops/engine_actions.py +35 -23
  7. examples/widgets/ops/integration_daemon_actions.py +51 -32
  8. examples/widgets/tech/get_element_info.py +63 -38
  9. examples/widgets/tech/get_guid_info.py +50 -27
  10. examples/widgets/tech/list_asset_types.py +33 -23
  11. examples/widgets/tech/list_elements.py +44 -34
  12. examples/widgets/tech/list_elements_x.py +69 -49
  13. examples/widgets/tech/list_registered_services.py +44 -24
  14. examples/widgets/tech/list_related_specification.py +70 -45
  15. examples/widgets/tech/list_relationship_types.py +50 -31
  16. examples/widgets/tech/list_valid_metadata_values.py +57 -28
  17. examples/widgets/tech/x_list_related_elements.py +54 -34
  18. pyegeria/Xloaded_resources_omvs.py +43 -41
  19. pyegeria/__init__.py +5 -1
  20. pyegeria/_client.py +142 -102
  21. pyegeria/_deprecated_gov_engine.py +218 -167
  22. pyegeria/action_author_omvs.py +107 -88
  23. pyegeria/asset_catalog_omvs.py +467 -395
  24. pyegeria/automated_curation_omvs.py +2 -2
  25. pyegeria/classification_manager_omvs.py +1920 -868
  26. pyegeria/collection_manager_omvs.py +1957 -1519
  27. pyegeria/core_omag_server_config.py +310 -192
  28. pyegeria/egeria_cat_client.py +88 -0
  29. pyegeria/egeria_config_client.py +37 -0
  30. pyegeria/egeria_my_client.py +47 -0
  31. pyegeria/egeria_ops_client.py +67 -0
  32. pyegeria/egeria_tech_client.py +77 -0
  33. pyegeria/feedback_manager_omvs.py +633 -631
  34. pyegeria/full_omag_server_config.py +330 -158
  35. pyegeria/glossary_browser_omvs.py +927 -474
  36. pyegeria/glossary_manager_omvs.py +1033 -543
  37. pyegeria/mermaid_utilities.py +1 -1
  38. pyegeria/my_profile_omvs.py +714 -574
  39. pyegeria/platform_services.py +228 -176
  40. pyegeria/project_manager_omvs.py +1158 -903
  41. pyegeria/registered_info.py +76 -74
  42. pyegeria/runtime_manager_omvs.py +749 -670
  43. pyegeria/server_operations.py +123 -85
  44. pyegeria/valid_metadata_omvs.py +268 -168
  45. {pyegeria-0.7.45.dist-info → pyegeria-0.8.0.dist-info}/METADATA +1 -1
  46. {pyegeria-0.7.45.dist-info → pyegeria-0.8.0.dist-info}/RECORD +49 -46
  47. examples/widgets/tech/list_gov_processes.py +0 -162
  48. pyegeria/tech_guids_31-08-2024 14:33.py +0 -79
  49. {pyegeria-0.7.45.dist-info → pyegeria-0.8.0.dist-info}/LICENSE +0 -0
  50. {pyegeria-0.7.45.dist-info → pyegeria-0.8.0.dist-info}/WHEEL +0 -0
  51. {pyegeria-0.7.45.dist-info → pyegeria-0.8.0.dist-info}/entry_points.txt +0 -0
@@ -26,35 +26,49 @@ from pyegeria import (
26
26
  UserNotAuthorizedException,
27
27
  print_exception_response,
28
28
  AssetCatalog,
29
- ClassificationManager
29
+ ClassificationManager,
30
30
  )
31
+
31
32
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
32
- EGERIA_KAFKA_ENDPOINT = os.environ.get('KAFKA_ENDPOINT', 'localhost:9092')
33
- EGERIA_PLATFORM_URL = os.environ.get('EGERIA_PLATFORM_URL', 'https://localhost:9443')
34
- EGERIA_VIEW_SERVER = os.environ.get('VIEW_SERVER', 'view-server')
35
- EGERIA_VIEW_SERVER_URL = os.environ.get('EGERIA_VIEW_SERVER_URL', 'https://localhost:9443')
36
- EGERIA_INTEGRATION_DAEMON = os.environ.get('INTEGRATION_DAEMON', 'integration-daemon')
37
- EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
38
- EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
39
- EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
40
- EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
41
- EGERIA_JUPYTER = bool(os.environ.get('EGERIA_JUPYTER', 'False'))
42
- EGERIA_WIDTH = int(os.environ.get('EGERIA_WIDTH', '200'))
33
+ EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
34
+ EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
35
+ EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
36
+ EGERIA_VIEW_SERVER_URL = os.environ.get(
37
+ "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
38
+ )
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"))
43
46
 
44
47
 
45
48
  disable_ssl_warnings = True
46
49
 
47
50
 
48
- def display_certifications(search_string: str, server: str, url: str, username: str, user_password: str, time_out: int = 60,
49
- jupyter: bool = EGERIA_JUPYTER, width: int = EGERIA_WIDTH):
51
+ def display_certifications(
52
+ search_string: str,
53
+ server: str,
54
+ url: str,
55
+ username: str,
56
+ user_password: str,
57
+ time_out: int = 60,
58
+ jupyter: bool = EGERIA_JUPYTER,
59
+ width: int = EGERIA_WIDTH,
60
+ ):
50
61
  console = Console(width=width, force_terminal=not jupyter, soft_wrap=True)
51
- if (search_string is None) or ((len(search_string) < 3)) and (search_string != '*'):
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)
62
+ if (search_string is None) or ((len(search_string) < 3)) and (search_string != "*"):
63
+ raise ValueError(
64
+ "Invalid Search String - must be greater than four characters long"
65
+ )
66
+ g_client = ClassificationManager(
67
+ server, url, user_id=username, user_pwd=user_password
68
+ )
54
69
  token = g_client.create_egeria_bearer_token(username, user_password)
55
70
 
56
-
57
- def generate_table(search_string:str = None) -> Table:
71
+ def generate_table(search_string: str = None) -> Table:
58
72
  """Make a new table."""
59
73
  table = Table(
60
74
  title=f"Certifications Types @ {time.asctime()}",
@@ -66,10 +80,10 @@ def display_certifications(search_string: str, server: str, url: str, username:
66
80
  show_lines=True,
67
81
  box=box.ROUNDED,
68
82
  caption=f"View Server '{server}' @ Platform - {url}",
69
- expand=True
83
+ expand=True,
70
84
  )
71
85
  table.add_column("Title", max_width=15)
72
- table.add_column('summary')
86
+ table.add_column("summary")
73
87
  table.add_column("domainID")
74
88
  table.add_column("Unique Name")
75
89
  table.add_column("Scope")
@@ -78,34 +92,33 @@ def display_certifications(search_string: str, server: str, url: str, username:
78
92
  table.add_column("Details")
79
93
  table.add_column("Related Elements")
80
94
 
81
-
82
95
  certs = g_client.get_elements(search_string, page_size=100, time_out=time_out)
83
96
  if type(certs) is str:
84
97
  return table
85
98
 
86
99
  for element in certs:
87
- properties = element['properties']
88
- summary = properties.get('summary',"---")
89
- domain = properties.get("domainIdentifier",'---')
90
- unique_name = properties.get('qualifiedName','---')
91
- scope = properties.get('scope','---')
92
- description = properties.get('description','---')
93
- details = properties.get('details','---')
94
- title = properties.get('title','---')
95
- cert_guid = element['elementHeader']['guid']
100
+ properties = element["properties"]
101
+ summary = properties.get("summary", "---")
102
+ domain = properties.get("domainIdentifier", "---")
103
+ unique_name = properties.get("qualifiedName", "---")
104
+ scope = properties.get("scope", "---")
105
+ description = properties.get("description", "---")
106
+ details = properties.get("details", "---")
107
+ title = properties.get("title", "---")
108
+ cert_guid = element["elementHeader"]["guid"]
96
109
 
97
110
  related = g_client.get_all_related_elements(cert_guid)
98
111
  if (len(related) > 0) and (type(related) is list):
99
- rel_md = ''
112
+ rel_md = ""
100
113
  for rel in related:
101
- rel_type = rel['relationshipHeader']['type']['typeName']
102
- rel_element_props = rel['relatedElement']['properties']
114
+ rel_type = rel["relationshipHeader"]["type"]["typeName"]
115
+ rel_element_props = rel["relatedElement"]["properties"]
103
116
  rel_el_md = f"* Rel Type: {rel_type}\n"
104
117
  for key in rel_element_props.keys():
105
118
  rel_el_md += f"* {key}: {rel_element_props[key]}\n"
106
119
  rel_md += f"----\n{rel_el_md}\n"
107
120
  else:
108
- rel_md = '---'
121
+ rel_md = "---"
109
122
 
110
123
  # match_tab = Table(expand=True)
111
124
  # match_tab.add_column("Type Name")
@@ -122,9 +135,8 @@ def display_certifications(search_string: str, server: str, url: str, username:
122
135
  # match_details_out = Markdown(match_details_md)
123
136
  # match_tab.add_row(match_type_name, matching_guid, match_details_out)
124
137
 
125
-
126
138
  table.add_row(
127
- title, summary, domain, unique_name,scope,description,details, rel_md
139
+ title, summary, domain, unique_name, scope, description, details, rel_md
128
140
  )
129
141
 
130
142
  g_client.close_session()
@@ -140,13 +152,18 @@ def display_certifications(search_string: str, server: str, url: str, username:
140
152
  with console.pager(styles=True):
141
153
  console.print(generate_table(search_string), soft_wrap=True)
142
154
 
143
-
144
- except (InvalidParameterException, PropertyServerException, UserNotAuthorizedException) as e:
155
+ except (
156
+ InvalidParameterException,
157
+ PropertyServerException,
158
+ UserNotAuthorizedException,
159
+ ) as e:
145
160
  console.print_exception()
146
161
  sys.exit(1)
147
162
 
148
163
  except ValueError as e:
149
- console.print(f"\n\n====> Invalid Search String - must be greater than four characters long")
164
+ console.print(
165
+ f"\n\n====> Invalid Search String - must be greater than four characters long"
166
+ )
150
167
  sys.exit(1)
151
168
 
152
169
 
@@ -167,10 +184,11 @@ def main():
167
184
  time_out = args.time_out if args.time_out is not None else 60
168
185
  try:
169
186
  # search_string = Prompt.ask("Enter an asset search string:", default="*")
170
- search_string = 'CertificationType'
187
+ search_string = "CertificationType"
171
188
  display_certifications(search_string, server, url, userid, user_pass, time_out)
172
- except(KeyboardInterrupt):
189
+ except KeyboardInterrupt:
173
190
  pass
174
191
 
192
+
175
193
  if __name__ == "__main__":
176
- main()
194
+ main()
@@ -59,7 +59,7 @@ def display_project_list(
59
59
  ):
60
60
  p_client = ProjectManager(server, url, user_id=username)
61
61
  token = p_client.create_egeria_bearer_token(username, user_pass)
62
- c_client = ClassificationManager(server, url, token)
62
+ c_client = ClassificationManager(server, url, token=token)
63
63
 
64
64
  def generate_table(project_name: str) -> Table:
65
65
  """Make a new table."""
@@ -352,6 +352,22 @@ def list_element_info(ctx, om_type):
352
352
  )
353
353
 
354
354
 
355
+ @show.command("list-processes")
356
+ @click.pass_context
357
+ def list_element_info(ctx):
358
+ """Display the valid metadata values for a property and type"""
359
+ c = ctx.obj
360
+ list_elements(
361
+ "GovernanceActionProcess",
362
+ c.view_server,
363
+ c.view_server_url,
364
+ c.userid,
365
+ c.password,
366
+ c.jupyter,
367
+ c.width,
368
+ )
369
+
370
+
355
371
  @show.command("guid-info")
356
372
  @click.argument("guid", nargs=1)
357
373
  @click.pass_context
@@ -827,9 +843,9 @@ def show_projects(ctx, search_string):
827
843
  ["OPEN", "IN_PROGRESS", "WAITING", "COMPLETE", "ABANDONED", "None"],
828
844
  case_sensitive="False",
829
845
  ),
830
- help="Enter an optional status filter",
846
+ help="Enter an optional status filter, default='OPEN'",
831
847
  required=False,
832
- default=None,
848
+ default="OPEN",
833
849
  )
834
850
  @click.pass_context
835
851
  def show_todos(ctx, search_string, status):