pyegeria 5.2__py3-none-any.whl → 5.2.0.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.
Files changed (126) hide show
  1. pyegeria/.DS_Store +0 -0
  2. pyegeria/__init__.py +0 -2
  3. pyegeria/_client.py +2 -7
  4. pyegeria/asset_catalog_omvs.py +0 -34
  5. pyegeria/classification_manager_omvs.py +3 -2
  6. pyegeria/collection_manager_omvs.py +45 -92
  7. pyegeria/commands/.DS_Store +0 -0
  8. pyegeria/commands/README.md +1 -2
  9. pyegeria/commands/cat/__init__.py +5 -1
  10. pyegeria/commands/cat/get_collection.py +14 -23
  11. pyegeria/commands/cat/get_tech_type_elements.py +1 -1
  12. pyegeria/commands/cat/glossary_actions.py +8 -28
  13. pyegeria/commands/cat/list_assets.py +17 -8
  14. pyegeria/commands/cat/list_collections.py +5 -10
  15. pyegeria/commands/cat/list_deployed_catalogs.py +2 -4
  16. pyegeria/commands/cat/list_deployed_database_schemas.py +14 -8
  17. pyegeria/commands/cat/list_deployed_databases.py +3 -2
  18. pyegeria/commands/cat/list_tech_types.py +24 -36
  19. pyegeria/commands/cat/list_terms.py +2 -4
  20. pyegeria/commands/cli/egeria.py +108 -104
  21. pyegeria/commands/cli/egeria_cat.py +54 -53
  22. pyegeria/commands/cli/egeria_my.py +33 -25
  23. pyegeria/commands/cli/egeria_ops.py +40 -38
  24. pyegeria/commands/cli/egeria_tech.py +41 -55
  25. pyegeria/commands/cli/ops_config.py +1 -3
  26. pyegeria/commands/doc/.DS_Store +0 -0
  27. pyegeria/commands/doc/Visual Command Reference/.DS_Store +0 -0
  28. pyegeria/commands/doc/Visual Command Reference/cat/.DS_Store +0 -0
  29. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/CleanShot 2024-11-20 at 16.17.43@2x.png +0 -0
  30. pyegeria/commands/doc/{README.md → command-overview.md} +5 -50
  31. pyegeria/commands/doc/glossary/.DS_Store +0 -0
  32. pyegeria/commands/doc/glossary/images/.DS_Store +0 -0
  33. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/.DS_Store +0 -0
  34. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/{README.md → hey_egeria: overview.md } +1 -1
  35. pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/.DS_Store +0 -0
  36. pyegeria/commands/my/monitor_my_todos.py +5 -17
  37. pyegeria/commands/my/monitor_open_todos.py +1 -1
  38. pyegeria/commands/ops/monitor_asset_events.py +22 -27
  39. pyegeria/commands/ops/monitor_engine_activity_c.py +1 -1
  40. pyegeria/commands/ops/monitor_gov_eng_status.py +4 -31
  41. pyegeria/commands/ops/monitor_integ_daemon_status.py +14 -17
  42. pyegeria/commands/ops/monitor_platform_status.py +1 -1
  43. pyegeria/commands/ops/orig_monitor_server_status.py +21 -36
  44. pyegeria/commands/ops/refresh_integration_daemon.py +1 -1
  45. pyegeria/commands/ops/restart_integration_daemon.py +1 -1
  46. pyegeria/commands/tech/get_tech_details.py +42 -79
  47. pyegeria/commands/tech/get_tech_type_template.py +53 -69
  48. pyegeria/commands/tech/list_anchored_elements.py +15 -18
  49. pyegeria/commands/tech/list_elements_x.py +4 -7
  50. pyegeria/commands/tech/list_registered_services.py +1 -1
  51. pyegeria/commands/tech/list_relationship_types.py +21 -19
  52. pyegeria/commands/tech/list_relationships.py +3 -7
  53. pyegeria/commands/tech/table_tech_templates.py +1 -3
  54. pyegeria/create_tech_guid_lists.py +2 -2
  55. pyegeria/egeria_client.py +0 -2
  56. pyegeria/egeria_tech_client.py +0 -5
  57. pyegeria/glossary_manager_omvs.py +7 -101
  58. pyegeria/server_operations.py +4 -4
  59. pyegeria/template_manager_omvs.py +3 -1
  60. pyegeria/valid_metadata_omvs.py +1 -1
  61. {pyegeria-5.2.dist-info → pyegeria-5.2.0.2.dist-info}/METADATA +5 -3
  62. pyegeria-5.2.0.2.dist-info/RECORD +185 -0
  63. {pyegeria-5.2.dist-info → pyegeria-5.2.0.2.dist-info}/entry_points.txt +0 -2
  64. pyegeria/commands/cat/list_tech_type_elements.py +0 -190
  65. pyegeria/commands/cli/egeria_login_tui.py +0 -313
  66. pyegeria/commands/cli/txt_custom_v2.tcss +0 -19
  67. pyegeria/commands/doc/Visual Command Reference/README.md +0 -511
  68. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-data-catalogs 2024-12-17 at 15.43.27@2x.png +0 -0
  69. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-schemas 2024-11-25 at 20.14.50@2x.png +0 -0
  70. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-schemas 2024-12-17 at 15.48.38@2x.png +0 -0
  71. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-servers 2024-11-25 at 20.21.25@2x.png +0 -0
  72. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-servers 2024-12-17 at 15.52.16@2x.png +0 -0
  73. pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed_databases 2024-12-16 at 16.40.31@2x.png +0 -0
  74. pyegeria/commands/doc/Visual Command Reference/cat/show/glossary/list-glossaries 2024-11-25 at 20.30.02.png +0 -0
  75. pyegeria/commands/doc/Visual Command Reference/cat/show/glossary/list-terms 2024-11-25 at 20.32.11.png +0 -0
  76. pyegeria/commands/doc/Visual Command Reference/cat/show/info/asset-types 2024-11-25 at 20.34.19@2x.png +0 -0
  77. pyegeria/commands/doc/Visual Command Reference/cat/show/info/certification-types 2024-11-25 at 20.37.07.png +0 -0
  78. pyegeria/commands/doc/Visual Command Reference/cat/show/info/collection-graph 2024-12-12 at 11.33.18@2x.png +0 -0
  79. pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-collections 2024-12-10 at 14.25.51@2x.png +0 -0
  80. pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-todos 2024-12-12 at 11.46.30@2x.png +0 -0
  81. pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-user-ids 2024-12-12 at 11.51.09@2x.png +0 -0
  82. pyegeria/commands/doc/Visual Command Reference/cat/show/info/tech-types 2024-12-12 at 11.37.20@2x.png +0 -0
  83. pyegeria/commands/doc/Visual Command Reference/cat/show/projects/project_dependencies 2024-12-14 at 16.24.39@2x.png +0 -0
  84. pyegeria/commands/doc/Visual Command Reference/cat/show/projects/project_structure 2024-12-14 at 16.21.35@2x.png +0 -0
  85. pyegeria/commands/doc/Visual Command Reference/cat/show/projects/projects 2024-12-14 at 16.18.10@2x.png +0 -0
  86. pyegeria/commands/doc/Visual Command Reference/hey_egeria tui 2024-12-16 at 16.58.22@2x.png +0 -0
  87. pyegeria/commands/doc/Visual Command Reference/my/show/my_profile 2024-12-14 at 16.29.27@2x.png +0 -0
  88. pyegeria/commands/doc/Visual Command Reference/my/show/my_roles 2024-12-14 at 16.32.10@2x.png +0 -0
  89. pyegeria/commands/doc/Visual Command Reference/my/show/my_todos 2024-12-15 at 16.24.13@2x.png +0 -0
  90. pyegeria/commands/doc/Visual Command Reference/my/show/open_todos 2024-12-14 at 16.36.12@2x.png +0 -0
  91. pyegeria/commands/doc/Visual Command Reference/ops/show/engines/list_engine_activity compressed 2024-12-15 at 16.48.48@2x.png +0 -0
  92. pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_activity 2024-12-15 at 16.32.55@2x.png +0 -0
  93. pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_activity compressed 2024-12-15 at 16.38.29@2x.png +0 -0
  94. pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_status 2024-12-15 at 16.51.26.jpeg +0 -0
  95. pyegeria/commands/doc/Visual Command Reference/ops/show/integrations/monitor_integration_daemon_status 2024-12-15 at 16.57.12@2x.png +0 -0
  96. pyegeria/commands/doc/Visual Command Reference/ops/show/integrations/monitor_integration_targets 2024-12-15 at 17.02.19@2x.png +0 -0
  97. pyegeria/commands/doc/Visual Command Reference/ops/show/platforms/monitor_platform_status 2024-12-15 at 19.53.18@2x.png +0 -0
  98. pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_server_status 2024-12-15 at 19.59.39@2x.png +0 -0
  99. pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_server_status full 2024-12-15 at 20.01.57@2x.png +0 -0
  100. pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_startup_servers 2024-12-15 at 19.56.07@2x.png +0 -0
  101. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/get_anchored_elements 2024-12-15 at 21.25.41@2x.png +0 -0
  102. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/get_elements_of_om_type 2024-12-16 at 14.39.59@2x.png +0 -0
  103. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/info_for_guid 2024-12-16 at 11.35.29@2x.png +0 -0
  104. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_by_om-type 2024-12-16 at 14.24.18@2x.png +0 -0
  105. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_by_om-type extended 2024-12-16 at 14.28.46@2x.png +0 -0
  106. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_of_om_type_by_classification 2024-12-16 at 14.35.26@2x.png +0 -0
  107. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/related_elements 2024-12-16 at 14.55.01@2x.png +0 -0
  108. pyegeria/commands/doc/Visual Command Reference/tech/show/elements/show_related_specifications 2024-12-16 at 15.04.55@2x.png +0 -0
  109. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/asset_types 2024-12-16 at 15.10.16@2x.png +0 -0
  110. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/detailed_governance_action_processes 2024-12-16 at 15.16.26@2x.png +0 -0
  111. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/governance_action_processes 2024-12-16 at 15.13.01@2x.png +0 -0
  112. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/registered_services 2024-12-16 at 16.44.54@2x.png +0 -0
  113. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/relationship_types 2024-12-16 at 16.20.34@2x.png +0 -0
  114. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/relationship_types 2024-12-19 at 10.51.54@2x.png +0 -0
  115. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/valid_metadata_values 2024-12-16 at 15.31.56@2x.png +0 -0
  116. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/list_tech_type_template_specs 2024-12-16 at 16.03.22@2x.png +0 -0
  117. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/list_technology_types 2024-12-16 at 15.39.20@2x.png +0 -0
  118. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/tech_type_details 2024-12-16 at 15.37.21@2x.png +0 -0
  119. pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/tech_type_templates 2024-12-16 at 16.11.48@2x.png +0 -0
  120. pyegeria/metadata_explorer_omvs.py +0 -2371
  121. pyegeria-5.2.dist-info/RECORD +0 -232
  122. /pyegeria/commands/doc/Visual Command Reference/cat/show/assets/{asset-graph 2024-11-20 at 15.56.42.png → Asset-graph 2024-11-20 at 15.56.42.png} +0 -0
  123. /pyegeria/commands/doc/Visual Command Reference/cat/show/assets/{assets-in-domain 2024-11-20 at 15.49.55@2x.png → Assets-in-domain 2024-11-20 at 15.49.55@2x.png} +0 -0
  124. /pyegeria/commands/doc/Visual Command Reference/cat/show/{deployed-data/deployed-data-catalogs-2024-11-20 at 16.17.43@2x.png → assets/deployed-catalogs 2024-11-20 at 16.17.43@2x.png} +0 -0
  125. {pyegeria-5.2.dist-info → pyegeria-5.2.0.2.dist-info}/LICENSE +0 -0
  126. {pyegeria-5.2.dist-info → pyegeria-5.2.0.2.dist-info}/WHEEL +0 -0
@@ -3,6 +3,8 @@
3
3
  SPDX-License-Identifier: Apache-2.0
4
4
  Copyright Contributors to the ODPi Egeria project.
5
5
 
6
+ Unit tests for the Utils helper functions using the Pytest framework.
7
+
6
8
 
7
9
  Retrieve elements based on a search of a specified properties.
8
10
  """
@@ -46,7 +48,7 @@ disable_ssl_warnings = True
46
48
 
47
49
  def display_anchored_elements(
48
50
  search_string: str,
49
- prop_list: list[str],
51
+ prop_list: [str],
50
52
  server: str,
51
53
  url: str,
52
54
  username: str,
@@ -57,18 +59,16 @@ def display_anchored_elements(
57
59
  ):
58
60
  console = Console(width=width, force_terminal=not jupyter, soft_wrap=True)
59
61
  if (search_string is None) or (len(search_string) < 3):
60
- print(
61
- "\nError --> Invalid Search String - must be greater than four characters long"
62
+ raise ValueError(
63
+ "Invalid Search String - must be greater than four characters long"
62
64
  )
63
- sys.exit(3)
64
65
  g_client = EgeriaTech(server, url, username, user_password)
65
66
  token = g_client.create_egeria_bearer_token()
66
- print(f"search string is {search_string} and prop_list is {prop_list}\n")
67
67
 
68
68
  def generate_table(search_string: str, prop_list: [str]) -> Table:
69
69
  """Make a new table."""
70
70
  table = Table(
71
- title=f"Elements containing the string {search_string} @ {time.asctime()}",
71
+ title=f"Assets containing the string {search_string} @ {time.asctime()}",
72
72
  header_style="white on dark_blue",
73
73
  style="bold white on black",
74
74
  row_styles=["bold white on black"],
@@ -89,7 +89,6 @@ def display_anchored_elements(
89
89
  classification = "Anchors"
90
90
  open_type_name = None
91
91
  property_value = search_string
92
-
93
92
  property_names = prop_list
94
93
 
95
94
  elements = g_client.find_elements_by_classification_with_property_value(
@@ -149,6 +148,11 @@ def display_anchored_elements(
149
148
  return table
150
149
 
151
150
  try:
151
+ # with Live(generate_table(), refresh_per_second=4, screen=True) as live:
152
+ # while True:
153
+ # time.sleep(2)
154
+ # live.update(generate_table())
155
+
152
156
  with console.pager(styles=True):
153
157
  console.print(generate_table(search_string, prop_list), soft_wrap=True)
154
158
 
@@ -160,7 +164,7 @@ def display_anchored_elements(
160
164
  console.print_exception()
161
165
  sys.exit(1)
162
166
 
163
- except Exception as e:
167
+ except ValueError as e:
164
168
  console.print(
165
169
  f"\n\n====> Invalid Search String - must be greater than four characters long"
166
170
  )
@@ -187,16 +191,9 @@ def main():
187
191
  prop_list = Prompt.ask(
188
192
  "Enter the list of properties to search", default="anchorTypeName"
189
193
  )
190
- if search_string == "":
191
- print("\nError --> Search string can't be empty")
192
- sys.exit(1)
193
- elif len(search_string) <= 4:
194
- print("\nError --> Search string must be greater than four characters long")
195
- sys.exit(2)
196
- else:
197
- display_anchored_elements(
198
- search_string, [prop_list], server, url, userid, user_pass, time_out
199
- )
194
+ display_anchored_elements(
195
+ search_string, [prop_list], server, url, userid, user_pass, time_out
196
+ )
200
197
  except KeyboardInterrupt:
201
198
  pass
202
199
 
@@ -102,13 +102,13 @@ def list_elements_x(
102
102
  if type(tags) is list:
103
103
  for tag in tags:
104
104
  tags_md += (
105
- f"* tag: {tag.get('name','')}\n"
105
+ f"* tag: {tag.get('name','---')}\n"
106
106
  f"\t description: {tag.get('description','---')}\n"
107
107
  f"\t assigned by: {tag.get('user','---')}\n"
108
108
  )
109
109
 
110
110
  else:
111
- tags_md = ""
111
+ tags_md = "---"
112
112
 
113
113
  likes = c_client.get_attached_likes(el_guid)
114
114
  likes_md = "Likes:\b"
@@ -122,12 +122,9 @@ def list_elements_x(
122
122
  )
123
123
 
124
124
  else:
125
- likes_md = ""
125
+ likes_md = "---"
126
126
 
127
- if len(tags_md) > 0 and len(likes_md) > 0:
128
- feedback_out = f"{tags_md}\n --- \n{likes_md}"
129
- else:
130
- feedback_out = ""
127
+ feedback_out = f"{tags_md}\n --- \n{likes_md}"
131
128
 
132
129
  comments_out = " "
133
130
 
@@ -71,7 +71,7 @@ def display_registered_svcs(
71
71
  def generate_table(svc_list) -> Table:
72
72
  """Make a new table."""
73
73
  table = Table(
74
- title=f"Services for: {url} @ {time.asctime()}",
74
+ title=f"Technology Types for: {url} @ {time.asctime()}",
75
75
  style="bold bright_white on black",
76
76
  row_styles=["bold bright_white on black"],
77
77
  header_style="white on dark_blue",
@@ -14,7 +14,6 @@ import time
14
14
  from rich import box
15
15
  from rich import print
16
16
  from rich.console import Console
17
- from rich.markdown import Markdown
18
17
  from rich.prompt import Prompt
19
18
  from rich.table import Table
20
19
 
@@ -70,11 +69,16 @@ def display_relationship_types(
70
69
  expand=True,
71
70
  )
72
71
 
73
- table.add_column("Name")
74
72
  table.add_column("Status")
73
+ table.add_column("Name")
74
+ # table.add_column("GUID", no_wrap=True,)
75
+
75
76
  table.add_column("Description")
77
+ table.add_column("Attrib Name")
78
+ table.add_column("Attrib Status")
79
+ table.add_column("Attrib Type")
80
+ table.add_column("Attrib Description")
76
81
  table.add_column("Description Wiki", no_wrap=True)
77
- table.add_column("Attributes", min_width=50)
78
82
 
79
83
  types_list = p_client.get_valid_relationship_types(type_name)
80
84
 
@@ -95,27 +99,27 @@ def display_relationship_types(
95
99
  description = types["description"]
96
100
  description_wiki = types.get("descriptionWiki", " ")
97
101
  attribute_defs = types.get("attributeDefinitions")
98
-
99
- att_table = Table(show_lines=True)
100
- att_table.add_column("Name")
101
- att_table.add_column("Description")
102
- att_table.add_column("Status")
103
- att_table.add_column("Type")
104
-
105
102
  if attribute_defs:
106
- att_md = True
107
103
  for attr in attribute_defs:
108
104
  attr_name = attr["attributeName"]
109
105
  attr_desc = attr["attributeDescription"]
110
106
  attr_status = attr["attributeStatus"]
111
107
  attr_type = attr["attributeType"]["name"]
112
- att_table.add_row(attr_name, attr_desc, attr_status, attr_type)
113
-
108
+ table.add_row(
109
+ status,
110
+ name,
111
+ description,
112
+ attr_name,
113
+ attr_status,
114
+ attr_type,
115
+ attr_desc,
116
+ description_wiki,
117
+ )
114
118
  else:
115
- att_md = False
116
- att_out = att_table if att_md else " "
119
+ table.add_row(
120
+ status, name, description, description_wiki, " ", " ", " ", " "
121
+ )
117
122
 
118
- table.add_row(name, status, description, description_wiki, att_out)
119
123
  p_client.close_session()
120
124
  return table
121
125
 
@@ -153,9 +157,7 @@ def main():
153
157
  userid = args.userid if args.userid is not None else EGERIA_USER
154
158
  user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
155
159
  save_output = args.save_output if args.save_output is not None else False
156
- type_name = Prompt.ask(
157
- "Enter the OM Type Name to retrieve relationships for:", default="AssetOwner"
158
- )
160
+ type_name = Prompt.ask("Enter the Type Name to retrieve:", default="AssetOwner")
159
161
 
160
162
  display_relationship_types(type_name, server, url, userid, user_pass, save_output)
161
163
 
@@ -16,7 +16,6 @@ import time
16
16
  from rich import box
17
17
  from rich.console import Console
18
18
  from rich.markdown import Markdown
19
- from rich.prompt import Prompt
20
19
  from rich.table import Table
21
20
 
22
21
  from pyegeria import (
@@ -24,7 +23,6 @@ from pyegeria import (
24
23
  PropertyServerException,
25
24
  UserNotAuthorizedException,
26
25
  ClassificationManager,
27
- max_paging_size,
28
26
  )
29
27
 
30
28
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
@@ -89,7 +87,7 @@ def list_relationships(
89
87
  table.add_column("Properties", min_width=40)
90
88
 
91
89
  rel_list = g_client.get_relationships(
92
- search_string, page_size=max_paging_size, time_out=time_out
90
+ search_string, page_size=100, time_out=time_out
93
91
  )
94
92
  if type(rel_list) is str:
95
93
  return table
@@ -166,10 +164,8 @@ def main():
166
164
  user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
167
165
  time_out = args.time_out if args.time_out is not None else 60
168
166
  try:
169
- search_string = Prompt.ask(
170
- "Enter an asset search string:", default="Certification"
171
- )
172
-
167
+ # search_string = Prompt.ask("Enter an asset search string:", default="*")
168
+ search_string = "Certification"
173
169
  list_relationships(search_string, server, url, userid, user_pass, time_out)
174
170
  except KeyboardInterrupt:
175
171
  pass
@@ -181,7 +181,6 @@ def display_templates_spec(
181
181
  sys.exit(1)
182
182
 
183
183
  try:
184
- start_time = time.perf_counter()
185
184
  if data_table:
186
185
  return generate_table(data_table)
187
186
  else:
@@ -189,8 +188,7 @@ def display_templates_spec(
189
188
 
190
189
  with console.pager(styles=True):
191
190
  console.print(generate_table(data_table))
192
- duration = time.perf_counter() - start_time
193
- print(f"\n\n\t Search string {search_string}\tDuration was {duration:.2f}\n")
191
+
194
192
  except (
195
193
  InvalidParameterException,
196
194
  PropertyServerException,
@@ -82,10 +82,10 @@ def build_global_guid_lists(
82
82
  )
83
83
  #
84
84
  # Ok - now lets harvest integration connectors using get_integration_daemon_status from ServerOps
85
- # Assume that integration daemon called integration_daemon
85
+ # Assume that integration daemon called integration-daemon
86
86
  #
87
87
  s_client = ServerOps(
88
- "integration_daemon", url, user_id=user_id, user_pwd=user_pwd
88
+ "integration-daemon", url, user_id=user_id, user_pwd=user_pwd
89
89
  )
90
90
  integ_status = s_client.get_integration_daemon_status()
91
91
 
pyegeria/egeria_client.py CHANGED
@@ -28,7 +28,6 @@ from pyegeria import (
28
28
  ValidMetadataManager,
29
29
  FullServerConfig,
30
30
  EgeriaConfig,
31
- MetadataExplorer,
32
31
  )
33
32
 
34
33
 
@@ -49,7 +48,6 @@ class Egeria(
49
48
  RegisteredInfo,
50
49
  # TemplateManager,
51
50
  ValidMetadataManager,
52
- MetadataExplorer,
53
51
  ):
54
52
  """
55
53
  Client to issue Runtime status requests.
@@ -23,7 +23,6 @@ from pyegeria import (
23
23
  RuntimeManager,
24
24
  TEMPLATE_GUIDS,
25
25
  INTEGRATION_GUIDS,
26
- MetadataExplorer,
27
26
  )
28
27
 
29
28
 
@@ -35,7 +34,6 @@ class EgeriaTech(
35
34
  RegisteredInfo,
36
35
  RuntimeManager,
37
36
  ValidMetadataManager,
38
- MetadataExplorer,
39
37
  ):
40
38
  """
41
39
  Client for technical Egeria users.
@@ -84,9 +82,6 @@ class EgeriaTech(
84
82
  ValidMetadataManager.__init__(
85
83
  self, view_server, platform_url, user_id, user_pwd, token
86
84
  )
87
- MetadataExplorer.__init__(
88
- self, view_server, platform_url, user_id, user_pwd, token
89
- )
90
85
 
91
86
 
92
87
  if __name__ == "__main__":
@@ -1535,7 +1535,6 @@ class GlossaryManager(GlossaryBrowser):
1535
1535
  self,
1536
1536
  glossary_name: str,
1537
1537
  filename: str,
1538
- file_path: str = os.environ.get("EGERIA_GLOSSARY_PATH", None),
1539
1538
  upsert: bool = True,
1540
1539
  verbose: bool = True,
1541
1540
  ) -> List[dict] | None:
@@ -1545,9 +1544,6 @@ class GlossaryManager(GlossaryBrowser):
1545
1544
  ----------
1546
1545
  glossary_name : str
1547
1546
  Name of the glossary to import terms into.
1548
- file_path: str, default is EGERIA_GLOSSARY_PATH if specified or None
1549
- If EGERIA_GLOSSARY_PATH environment variable is set, then it will be used in forming the
1550
- prepended to the filename parameter to form the full path to the file.
1551
1547
  filename: str
1552
1548
  Path to the file to import terms from. File is assumed to be in CSV format. The path
1553
1549
  is relative to where the python method is being called from.
@@ -1613,18 +1609,8 @@ class GlossaryManager(GlossaryBrowser):
1613
1609
  "Version Identifier",
1614
1610
  "Status",
1615
1611
  }
1616
-
1617
- if file_path:
1618
- full_file_path = os.path.join(file_path, filename)
1619
- else:
1620
- full_file_path = filename
1621
-
1622
- if not os.path.isfile(full_file_path):
1623
- raise FileNotFoundError(
1624
- f"Did not find file with path {file_path} and name {filename}"
1625
- )
1626
1612
  # process file
1627
- with open(full_file_path, mode="r") as file:
1613
+ with open(filename, mode="r") as file:
1628
1614
  # Create a CSV reader object
1629
1615
  csv_reader = csv.DictReader(file)
1630
1616
  headers = csv_reader.fieldnames
@@ -1632,6 +1618,7 @@ class GlossaryManager(GlossaryBrowser):
1632
1618
  # check that the column headers are known
1633
1619
  if all(header in term_properties for header in headers) is False:
1634
1620
  raise InvalidParameterException("Invalid headers in CSV File")
1621
+ sys.exit(1)
1635
1622
 
1636
1623
  # process each row and validate values
1637
1624
  for row in csv_reader:
@@ -1772,10 +1759,7 @@ class GlossaryManager(GlossaryBrowser):
1772
1759
  return
1773
1760
 
1774
1761
  async def _async_export_glossary_to_csv(
1775
- self,
1776
- glossary_guid: str,
1777
- target_file: str,
1778
- file_path: str = os.environ.get("EGERIA_GLOSSARY_PATH", None),
1762
+ self, glossary_guid: str, target_file: str
1779
1763
  ) -> int:
1780
1764
  """Export all the terms in a glossary to a CSV file. Async version
1781
1765
 
@@ -1785,9 +1769,6 @@ class GlossaryManager(GlossaryBrowser):
1785
1769
  Identity of the glossary to export.
1786
1770
  target_file: str
1787
1771
  Complete file name with path and extension to export to.
1788
- file_path: str, default is EGERIA_GLOSSARY_PATH if specified or None
1789
- If EGERIA_GLOSSARY_PATH environment variable is set, then it will be used in forming the
1790
- prepended to the filename parameter to form the full path to the file.
1791
1772
 
1792
1773
  Returns:
1793
1774
  int: Number of rows exported.
@@ -1806,12 +1787,8 @@ class GlossaryManager(GlossaryBrowser):
1806
1787
  "Version Identifier",
1807
1788
  "Status",
1808
1789
  ]
1809
- if file_path:
1810
- full_file_path = os.path.join(file_path, target_file)
1811
- else:
1812
- full_file_path = target_file
1813
1790
 
1814
- with open(full_file_path, mode="w") as file:
1791
+ with open(target_file, mode="w") as file:
1815
1792
  csv_writer = csv.DictWriter(file, fieldnames=header)
1816
1793
  csv_writer.writeheader()
1817
1794
  count = 0
@@ -1845,12 +1822,7 @@ class GlossaryManager(GlossaryBrowser):
1845
1822
  count += 1
1846
1823
  return count
1847
1824
 
1848
- def export_glossary_to_csv(
1849
- self,
1850
- glossary_guid: str,
1851
- target_file: str,
1852
- file_path: str = os.environ.get("EGERIA_GLOSSARY_PATH", None),
1853
- ) -> int:
1825
+ def export_glossary_to_csv(self, glossary_guid: str, target_file: str) -> int:
1854
1826
  """Export all the terms in a glossary to a CSV file.
1855
1827
 
1856
1828
  Parameters:
@@ -1859,9 +1831,6 @@ class GlossaryManager(GlossaryBrowser):
1859
1831
  Identity of the glossary to export.
1860
1832
  target_file: str
1861
1833
  Complete file name with path and extension to export to.
1862
- file_path: str, default is EGERIA_GLOSSARY_PATH if specified or None
1863
- If EGERIA_GLOSSARY_PATH environment variable is set, then it will be used in forming the
1864
- prepended to the filename parameter to form the full path to the file.
1865
1834
 
1866
1835
  Returns:
1867
1836
  int: Number of rows exported.
@@ -1869,7 +1838,7 @@ class GlossaryManager(GlossaryBrowser):
1869
1838
 
1870
1839
  loop = asyncio.get_event_loop()
1871
1840
  response = loop.run_until_complete(
1872
- self._async_export_glossary_to_csv(glossary_guid, target_file, file_path)
1841
+ self._async_export_glossary_to_csv(glossary_guid, target_file)
1873
1842
  )
1874
1843
 
1875
1844
  return response
@@ -2501,70 +2470,7 @@ class GlossaryManager(GlossaryBrowser):
2501
2470
  )
2502
2471
  )
2503
2472
 
2504
- async def _async_undo_term_update(self, glossary_term_guid: str) -> None:
2505
- """Undo an update to a glossary term
2506
-
2507
- Async Version.
2508
-
2509
- Parameters
2510
- ----------
2511
- glossary_term_guid: str
2512
- Unique identifier for the source glossary term.
2513
-
2514
- Returns
2515
- -------
2516
- None
2517
-
2518
- Raises
2519
- ------
2520
- InvalidParameterException
2521
- If the client passes incorrect parameters on the request - such as bad URLs or invalid values.
2522
- PropertyServerException
2523
- Raised by the server when an issue arises in processing a valid request.
2524
- NotAuthorizedException
2525
- The principle specified by the user_id does not have authorization for the requested action.
2526
- Notes
2527
- -----
2528
- This creates a new version with the state of the term before the last update.
2529
-
2530
- """
2531
-
2532
- validate_guid(glossary_term_guid)
2533
-
2534
- url = (
2535
- f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/glossary-manager/glossaries/terms/"
2536
- f"{glossary_term_guid}/undo"
2537
- )
2538
-
2539
- await self._async_make_request("POST", url)
2540
-
2541
- def undo_term_update(self, glossary_term_guid: str) -> None:
2542
- """Undo an update to a glossary term
2543
-
2544
- Parameters
2545
- ----------
2546
- glossary_term_guid: str
2547
- Unique identifier for the source glossary term.
2548
-
2549
- Returns
2550
- -------
2551
- None
2552
-
2553
- Raises
2554
- ------
2555
- InvalidParameterException
2556
- If the client passes incorrect parameters on the request - such as bad URLs or invalid values.
2557
- PropertyServerException
2558
- Raised by the server when an issue arises in processing a valid request.
2559
- NotAuthorizedException
2560
- The principle specified by the user_id does not have authorization for the requested action.
2561
- Notes
2562
- -----
2563
- This creates a new version with the state of the term before the last update.
2564
-
2565
- """
2566
- loop = asyncio.get_event_loop()
2567
- loop.run_until_complete(self._async_undo_term_update(glossary_term_guid))
2473
+ return
2568
2474
 
2569
2475
  async def _async_get_terms_for_category(
2570
2476
  self,
@@ -354,7 +354,7 @@ class ServerOps(Platform):
354
354
  if server is None:
355
355
  server = self.server_name
356
356
 
357
- url = f"{self.platform_url}/servers/{server}/open-metadata/integration_daemon/users/{self.user_id}/status"
357
+ url = f"{self.platform_url}/servers/{server}/open-metadata/integration-daemon/users/{self.user_id}/status"
358
358
  response = await self._async_make_request("GET", url)
359
359
  return response.json().get("integrationDaemonStatus", "No Integration Groups")
360
360
  # return response.json()
@@ -377,7 +377,7 @@ class ServerOps(Platform):
377
377
  validate_name(connector_name)
378
378
 
379
379
  url = (
380
- f"{self.platform_url}/servers/{server}/open-metadata/integration_daemon/users/{self.user_id}/"
380
+ f"{self.platform_url}/servers/{server}/open-metadata/integration-daemon/users/{self.user_id}/"
381
381
  f"integration-connectors/{connector_name}/configuration-properties"
382
382
  )
383
383
 
@@ -411,7 +411,7 @@ class ServerOps(Platform):
411
411
  server = self.server_name
412
412
 
413
413
  url = (
414
- f"{self.platform_url}/servers/{server}/open-metadata/integration_daemon/users/"
414
+ f"{self.platform_url}/servers/{server}/open-metadata/integration-daemon/users/"
415
415
  f"{self.user_id}/integration-connectors/restart"
416
416
  )
417
417
  body = {"class": "NameRequestBody", "name": connector_name}
@@ -439,7 +439,7 @@ class ServerOps(Platform):
439
439
  connector_name = None
440
440
 
441
441
  url = (
442
- f"{self.platform_url}/servers/{server}/open-metadata/integration_daemon/users/"
442
+ f"{self.platform_url}/servers/{server}/open-metadata/integration-daemon/users/"
443
443
  f"{self.user_id}/integration-connectors/refresh"
444
444
  )
445
445
  if connector_name:
@@ -665,7 +665,9 @@ class TemplateManager(Client):
665
665
  await self._async_make_request("POST", url, body_slimmer(body))
666
666
  return
667
667
 
668
- def archive_metadata_element_in_store(self, element_guid: str, body: dict) -> None:
668
+ def update_metadata_element_effectivity_in_store(
669
+ self, element_guid: str, body: dict
670
+ ) -> None:
669
671
  """Archive a specific metadata element.
670
672
 
671
673
  Parameters
@@ -1421,7 +1421,7 @@ class ValidMetadataManager(Client):
1421
1421
  url = f"{self.platform_url}/servers/{self.view_server}{self.valid_m_command_base}/open-metadata-types"
1422
1422
 
1423
1423
  resp = await self._async_make_request("GET", url)
1424
- return resp.json()
1424
+ return resp.json().get("typeDefs", "No TypeDefs Found")
1425
1425
 
1426
1426
  def get_all_entity_types(self) -> list | str:
1427
1427
  """Returns the list of different types of metadata organized into two groups. The first are the
@@ -1,17 +1,18 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyegeria
3
- Version: 5.2
3
+ Version: 5.2.0.2
4
4
  Summary: A python client for Egeria
5
5
  Home-page: https://github.com/odpi/egeria-python
6
6
  License: Apache 2.0
7
7
  Keywords: egeria,metadata,governance
8
8
  Author: Dan Wolfson
9
9
  Author-email: dan.wolfson@pdr-associates.com
10
- Requires-Python: >=3.12.3,<4.0.0
10
+ Requires-Python: >=3.12,<4.0
11
11
  Classifier: License :: OSI Approved :: Apache Software License
12
12
  Classifier: License :: Other/Proprietary License
13
13
  Classifier: Programming Language :: Python
14
14
  Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.12
15
16
  Requires-Dist: click (>=8.1.7,<9.0.0)
16
17
  Requires-Dist: confluent-kafka (>=2.5.0,<3.0.0)
17
18
  Requires-Dist: httpx (>=0.27,<0.28)
@@ -23,7 +24,8 @@ Requires-Dist: requests (>=2.32.3,<3.0.0)
23
24
  Requires-Dist: rich (>=13,<14)
24
25
  Requires-Dist: rich-pixels (>=3.0.1,<4.0.0)
25
26
  Requires-Dist: textual (>=0.86,<0.87)
26
- Requires-Dist: trogon (>=0.6.0,<0.7.0)
27
+ Requires-Dist: textual-forms (>=0.3.0,<0.4.0)
28
+ Requires-Dist: trogon (>=0.5.0,<0.6.0)
27
29
  Requires-Dist: urllib3 (>=2.2.2,<3.0.0)
28
30
  Requires-Dist: validators (>=0.32.0,<0.33.0)
29
31
  Project-URL: Repository, https://github.com/odpi/egeria-python