pyegeria 0.3.8__py3-none-any.whl → 0.4.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 (59) hide show
  1. pyegeria/Xfeedback_manager_omvs.py +238 -0
  2. pyegeria/Xloaded_resources_omvs.py +91 -0
  3. pyegeria/__init__.py +15 -12
  4. pyegeria/_client.py +4 -6
  5. pyegeria/{gov_engine.py → _deprecated_gov_engine.py} +2 -59
  6. pyegeria/_exceptions.py +5 -6
  7. pyegeria/_globals.py +3 -1
  8. pyegeria/asset_catalog_omvs.py +672 -0
  9. pyegeria/automated_curation_omvs.py +627 -359
  10. pyegeria/collection_manager_omvs.py +187 -248
  11. pyegeria/core_guids.py +128 -0
  12. pyegeria/core_omag_server_config.py +1 -5
  13. pyegeria/full_omag_server_config.py +53 -83
  14. pyegeria/glossary_browser_omvs.py +2208 -0
  15. pyegeria/glossary_manager_omvs.py +3002 -0
  16. pyegeria/my_profile_omvs.py +2 -7
  17. pyegeria/platform_services.py +0 -3
  18. pyegeria/project_manager_omvs.py +9 -15
  19. pyegeria/registered_info.py +12 -52
  20. pyegeria/runtime_manager_omvs.py +967 -0
  21. pyegeria/server_operations.py +1 -5
  22. pyegeria/valid_metadata_omvs.py +204 -43
  23. pyegeria-0.4.0.data/scripts/Create_Collection_Sample.py +292 -0
  24. pyegeria-0.4.0.data/scripts/Create_Sustainability_Collection_Sample.py +115 -0
  25. pyegeria-0.4.0.data/scripts/get_guid_info.py +86 -0
  26. pyegeria-0.3.8.data/scripts/view_my_profile.py → pyegeria-0.4.0.data/scripts/get_my_profile.py +8 -34
  27. {pyegeria-0.3.8.data → pyegeria-0.4.0.data}/scripts/get_tech_details.py +1 -37
  28. pyegeria-0.4.0.data/scripts/get_tech_type_elements.py +137 -0
  29. pyegeria-0.4.0.data/scripts/get_tech_type_template.py +137 -0
  30. {pyegeria-0.3.8.data → pyegeria-0.4.0.data}/scripts/list_asset_types.py +3 -25
  31. pyegeria-0.4.0.data/scripts/list_assets.py +138 -0
  32. pyegeria-0.3.8.data/scripts/project_list_viewer.py → pyegeria-0.4.0.data/scripts/list_projects.py +13 -27
  33. pyegeria-0.4.0.data/scripts/list_registered_services.py +135 -0
  34. pyegeria-0.3.8.data/scripts/get_relationship_types.py → pyegeria-0.4.0.data/scripts/list_relationship_types.py +25 -43
  35. pyegeria-0.4.0.data/scripts/list_tech_templates.py +134 -0
  36. pyegeria-0.3.8.data/scripts/find_todos.py → pyegeria-0.4.0.data/scripts/list_todos.py +11 -39
  37. pyegeria-0.4.0.data/scripts/list_valid_metadata_values.py +144 -0
  38. pyegeria-0.4.0.data/scripts/view_asset_graph.py +236 -0
  39. pyegeria-0.3.8.data/scripts/multi-server_status.py → pyegeria-0.4.0.data/scripts/view_coco_status.py +17 -39
  40. pyegeria-0.3.8.data/scripts/collection_viewer.py → pyegeria-0.4.0.data/scripts/view_collection.py +12 -31
  41. pyegeria-0.3.8.data/scripts/engine_action_status.py → pyegeria-0.4.0.data/scripts/view_eng_action_status.py +17 -31
  42. pyegeria-0.3.8.data/scripts/glossary_view.py → pyegeria-0.4.0.data/scripts/view_glossary.py +2 -2
  43. pyegeria-0.3.8.data/scripts/gov_engine_status.py → pyegeria-0.4.0.data/scripts/view_gov_eng_status.py +0 -1
  44. pyegeria-0.3.8.data/scripts/integration_daemon_status.py → pyegeria-0.4.0.data/scripts/view_integ_daemon_status.py +30 -42
  45. pyegeria-0.3.8.data/scripts/my_todos.py → pyegeria-0.4.0.data/scripts/view_my_todos.py +1 -1
  46. pyegeria-0.3.8.data/scripts/open_todos.py → pyegeria-0.4.0.data/scripts/view_open_todos.py +3 -24
  47. pyegeria-0.4.0.data/scripts/view_platform_status.py +123 -0
  48. pyegeria-0.3.8.data/scripts/server_status.py → pyegeria-0.4.0.data/scripts/view_server_status.py +1 -20
  49. {pyegeria-0.3.8.dist-info → pyegeria-0.4.0.dist-info}/METADATA +5 -4
  50. pyegeria-0.4.0.dist-info/RECORD +58 -0
  51. {pyegeria-0.3.8.dist-info → pyegeria-0.4.0.dist-info}/WHEEL +1 -1
  52. pyegeria/glossary_omvs.py +0 -789
  53. pyegeria/loaded_resources_omvs.py +0 -159
  54. pyegeria-0.3.8.dist-info/RECORD +0 -42
  55. /pyegeria/{governance_author.py → action_author_omvs.py} +0 -0
  56. /pyegeria-0.3.8.data/scripts/get_tech_types.py → /pyegeria-0.4.0.data/scripts/list_tech_types.py +0 -0
  57. /pyegeria-0.3.8.data/scripts/server_status_widget.py → /pyegeria-0.4.0.data/scripts/view_server_list.py +0 -0
  58. {pyegeria-0.3.8.dist-info → pyegeria-0.4.0.dist-info}/LICENSE +0 -0
  59. {pyegeria-0.3.8.dist-info → pyegeria-0.4.0.dist-info}/top_level.txt +0 -0
@@ -4,10 +4,9 @@ This module contains the MyProfile class and its methods.
4
4
 
5
5
  """
6
6
  import asyncio
7
-
8
7
  import json
8
+
9
9
  from pyegeria._client import Client
10
- from pyegeria._globals import enable_ssl_check
11
10
  from pyegeria._validators import validate_name, validate_search_string
12
11
 
13
12
 
@@ -29,9 +28,6 @@ class MyProfile(Client):
29
28
  The user ID. Default is None.
30
29
  user_pwd : str, optional
31
30
  The user password. Default is None.
32
- verify_flag : bool, optional
33
- The flag indicating whether to enable SSL check. Default is
34
- enable_ssl_check.
35
31
  sync_mode : bool, optional
36
32
  The flag indicating whether to use synchronous mode. Default
37
33
  is True.
@@ -44,7 +40,6 @@ class MyProfile(Client):
44
40
  token: str = None,
45
41
  user_id: str = None,
46
42
  user_pwd: str = None,
47
- verify_flag: bool = enable_ssl_check,
48
43
  sync_mode: bool = True
49
44
  ):
50
45
 
@@ -761,7 +756,7 @@ class MyProfile(Client):
761
756
  ends_with_s = str(ends_with).lower()
762
757
  ignore_case_s = str(ignore_case).lower()
763
758
 
764
- if search_string is '*':
759
+ if search_string == '*':
765
760
  search_string = " "
766
761
 
767
762
  body = {
@@ -39,9 +39,6 @@ class Platform(Client):
39
39
  when the user doesn't pass the user_id on a method call.
40
40
  user_pwd: str
41
41
  The password associated with the user_id. Defaults to None
42
- verify_flag: bool
43
- Flag to indicate if SSL Certificates should be verified in the HTTP requests.
44
- Defaults to False.
45
42
 
46
43
  """
47
44
 
@@ -11,7 +11,6 @@ import time
11
11
 
12
12
  # import json
13
13
  from pyegeria._client import Client
14
- from pyegeria._globals import enable_ssl_check
15
14
  from pyegeria._validators import (
16
15
  validate_guid,
17
16
  validate_search_string,
@@ -35,11 +34,7 @@ class ProjectManager(Client):
35
34
  when the user doesn't pass the user_id on a method call.
36
35
  user_pwd: str
37
36
  The password associated with the user_id. Defaults to None
38
- verify_flag: bool
39
- Flag to indicate if SSL Certificates should be verified in the HTTP requests.
40
- Defaults to False.
41
-
42
- """
37
+ """
43
38
 
44
39
  def __init__(
45
40
  self,
@@ -48,7 +43,6 @@ class ProjectManager(Client):
48
43
  token: str = None,
49
44
  user_id: str = None,
50
45
  user_pwd: str = None,
51
- verify_flag: bool = enable_ssl_check,
52
46
  sync_mode: bool = True
53
47
  ):
54
48
  self.command_base: str = f"/api/open-metadata/project-manager/metadata-elements"
@@ -153,7 +147,7 @@ class ProjectManager(Client):
153
147
  loop = asyncio.get_event_loop()
154
148
  resp = loop.run_until_complete(self._async_get_linked_projects(parent_guid, project_status,
155
149
  effective_time, server_name,
156
- start_from, page_size)),
150
+ start_from, page_size))
157
151
  return resp
158
152
 
159
153
  async def _async_get_classified_projects(self, project_classification: str, effective_time: str = None,
@@ -250,7 +244,7 @@ class ProjectManager(Client):
250
244
  loop = asyncio.get_event_loop()
251
245
  resp = loop.run_until_complete(self._async_get_classified_projects(project_classification,
252
246
  effective_time, server_name,
253
- start_from, page_size)),
247
+ start_from, page_size))
254
248
  return resp
255
249
 
256
250
  async def _async_get_project_team(self, project_guid: str, team_role: str = None, effective_time: str = None,
@@ -354,7 +348,7 @@ class ProjectManager(Client):
354
348
  """
355
349
  loop = asyncio.get_event_loop()
356
350
  resp = loop.run_until_complete(self._async_get_project_team(project_guid, team_role, effective_time,
357
- server_name, start_from, page_size)),
351
+ server_name, start_from, page_size))
358
352
  return resp
359
353
 
360
354
  async def _async_find_projects(self, search_string: str, effective_time: str = None, starts_with: bool = False,
@@ -429,8 +423,8 @@ class ProjectManager(Client):
429
423
  return resp.json().get("elements", "No elements found")
430
424
 
431
425
  def find_projects(self, search_string: str, effective_time: str = None, starts_with: bool = False,
432
- ends_with: bool = False, ignore_case: bool = False, server_name: str = None,
433
- start_from: int = 0, page_size: int = None) -> list | str:
426
+ ends_with: bool = False, ignore_case: bool = False, server_name: str = None,
427
+ start_from: int = 0, page_size: int = None) -> list | str:
434
428
  """ Returns the list of projects matching the search string.
435
429
  The search string is located in the request body and is interpreted as a plain string.
436
430
  The request parameters, startsWith, endsWith and ignoreCase can be used to allow a fuzzy search.
@@ -535,7 +529,7 @@ class ProjectManager(Client):
535
529
  return resp.json().get("elements", "No elements found")
536
530
 
537
531
  def get_projects_by_name(self, name: str, effective_time: str = None, server_name: str = None,
538
- start_from: int = 0, page_size: int = None) -> list | str:
532
+ start_from: int = 0, page_size: int = None) -> list | str:
539
533
  """ Returns the list of projects with a particular name.
540
534
 
541
535
  Parameters
@@ -1364,8 +1358,8 @@ class ProjectManager(Client):
1364
1358
  return
1365
1359
 
1366
1360
  async def _async_add_to_project_team(self, project_guid: str, actor_guid: str, team_role: str = None,
1367
- effective_from: str = None, effective_to: str = None, server_name: str = None) \
1368
- -> None:
1361
+ effective_from: str = None, effective_to: str = None,
1362
+ server_name: str = None) -> None:
1369
1363
  """ Add an actor to a project. The request body is optional. If supplied, it contains the name of the role that
1370
1364
  the actor plays in the project. Async version.
1371
1365
 
@@ -6,18 +6,10 @@ Copyright Contributors to the ODPi Egeria project.
6
6
 
7
7
  This module allows users to query the available (registered) capabilities of Egeria. Detailed information is returned
8
8
  to provide both insight and understanding in how to use these capabilities. For example, when configuring an Egeria
9
- integration service, it is importregistered_info.pyant to know what companion service it depends on so that you can make sure the
10
- companion service is also configured and running.
9
+ integration service, it is import registered_info.pyant to know what companion service it depends on so that you can
10
+ make sure the companion service is also configured and running.
11
11
 
12
12
  """
13
- import json
14
- from rich.console import Console
15
- from rich import print, print_json
16
-
17
- import pandas as pd
18
- from tabulate import tabulate
19
-
20
- from pyegeria.utils import wrap_text
21
13
 
22
14
  from pyegeria._client import Client
23
15
 
@@ -25,7 +17,7 @@ from pyegeria._client import Client
25
17
  class RegisteredInfo(Client):
26
18
  """ Client to discover Egeria services and capabilities
27
19
 
28
- Attributes:
20
+ Parameters:
29
21
  ----------
30
22
  server_name: str
31
23
  Name of the server to use.
@@ -70,28 +62,18 @@ class RegisteredInfo(Client):
70
62
  self.admin_command_root = (f"{self.platform_url}/open-metadata/platform-services/users/"
71
63
  f"{self.user_id}/server-platform/registered-services")
72
64
 
73
- def list_registered_svcs(self, kind: str = None, fmt: str = 'json', skinny: bool = True,
74
- wrap_len: int = 30) -> list | str:
65
+ def list_registered_svcs(self, kind: str = None) -> list | str:
75
66
  """ Get the registered services for the OMAG Server Platform
76
67
 
77
68
  Parameters
78
69
  ----------
79
70
  kind: str, optional
80
71
  The kind of service to return information for. If None, then provide back a list of service kinds.
81
- fmt: str, optional, default = 'json'
82
- If fmt is 'json', then return the result as a JSON string. If fmt is 'table', then
83
- return the result as a nicely formatted table string.
84
- skinny: bool, optional, default = True
85
- If a table is being created and `skinny` is true, then return a subset of the information,
86
- if false return all columns.
87
- wrap_len: int, optional, default = 30
88
- If a table is being created, the width of the column to wrap text to.
72
+
89
73
  Returns
90
74
  -------
91
75
  dict | str
92
- If fmt is 'JSON' then return a dictionary containing the registered services for the specified
93
- platform. If fmt is 'table' then return the result as a nicely formatted printable table string.
94
-
76
+ Returns JSON dict of the requested information or a help string if input is 'help'.
95
77
  Raises
96
78
  ------
97
79
  InvalidParameterException
@@ -112,7 +94,7 @@ class RegisteredInfo(Client):
112
94
  governance-services.....lists all registered governance services
113
95
  integration-services....lists all registered integration services
114
96
  view-services...........lists all registered view services
115
-
97
+
116
98
  Pass in a parameter from the left-hand column into the function to
117
99
  get more details on the specified service category.
118
100
  """)
@@ -122,34 +104,18 @@ class RegisteredInfo(Client):
122
104
  url = f"{self.admin_command_root}/{kind}"
123
105
  response = self.make_request("GET", url)
124
106
 
125
- if fmt == 'json':
126
- return response.json().get("services", "No services found")
127
- elif fmt == 'table':
128
- df = pd.DataFrame(response.json().get("services", []))
129
- if skinny:
130
- df = df.drop(columns=['serviceId', 'serviceDevelopmentStatus'])
131
- return tabulate(wrap_text(df, wrap_len=wrap_len), headers='keys', tablefmt='psql')
107
+ return response.json().get("services", "No services found")
132
108
 
133
- def list_severity_definitions(self, fmt: str = 'json', skinny: bool = True, wrap_len: int = 30) -> list | str:
109
+ def list_severity_definitions(self) -> list | str:
134
110
  """ Get the registered severities for the OMAG Server
135
111
 
136
112
  Parameters
137
113
  ----------
138
- fmt: str, optional, default = 'json'
139
- If fmt is 'json', then return the result as a JSON string. If fmt is 'table', then
140
- return the result as a nicely formatted table string.
141
- skinny: bool, optional, default = True
142
- If a table is being created and `skinny` is true, then return a subset of the information,
143
- if false return all columns.
144
- wrap_len: int, optional, default = 30
145
- If a table is being created, the width of the column to wrap text to.
146
114
 
147
115
  Returns
148
116
  -------
149
117
  dict | str
150
- If fmt is 'JSON' then return a dictionary containing the registered services for the specified
151
- platform. If fmt is 'table' then return the result as a nicely formatted printable table string.
152
-
118
+ Return a dictionary containing the registered services for the specified platform.
153
119
  Raises
154
120
  ------
155
121
  InvalidParameterException
@@ -164,13 +130,7 @@ class RegisteredInfo(Client):
164
130
  f"/users/{self.user_id}/audit-log/severity-definitions"
165
131
  )
166
132
  response = self.make_request("GET", url)
167
- if fmt == 'json':
168
- return response.json().get("severities", "No severities found")
169
- elif fmt == 'table':
170
- df = pd.DataFrame(response.json().get("severities", []))
171
- if skinny:
172
- df = df.drop(columns=['ordinal'])
173
- return tabulate(wrap_text(df, wrap_len=wrap_len), headers='keys', tablefmt='psql')
133
+ return response.json().get("severities", "No severities found")
174
134
 
175
135
  def list_asset_types(self, server: str = None) -> list | str:
176
136
  """ Get the registered severities for the OMAG Server
@@ -195,7 +155,7 @@ class RegisteredInfo(Client):
195
155
 
196
156
  """
197
157
  server = self.server_name if server is None else server
198
- url = f"{self.platform_url}/servers/{self.server_name}/api/open-metadata/asset-catalog/assets/types"
158
+ url = f"{self.platform_url}/servers/{server}/api/open-metadata/asset-catalog/assets/types"
199
159
 
200
160
  response = self.make_request("GET", url)
201
161
  return response.json().get('types', 'no types found')