pyegeria 1.5.1.0.23__tar.gz → 1.5.1.0.120__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 (110) hide show
  1. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/PKG-INFO +1 -1
  2. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/cat/glossary_actions.py +4 -35
  3. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/cli/egeria.py +1 -7
  4. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/cli/egeria_cat.py +1 -7
  5. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/tech/list_tech_templates.py +39 -90
  6. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/glossary_manager_omvs.py +9 -76
  7. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/runtime_manager_omvs.py +2 -3
  8. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyproject.toml +2 -4
  9. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/LICENSE +0 -0
  10. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/README.md +0 -0
  11. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/cat/README.md +0 -0
  12. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/cat/__init__.py +0 -0
  13. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/cat/get_asset_graph.py +0 -0
  14. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/cat/get_collection.py +0 -0
  15. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/cat/get_project_dependencies.py +0 -0
  16. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/cat/get_project_structure.py +0 -0
  17. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/cat/get_tech_type_elements.py +0 -0
  18. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/cat/get_tech_type_template.py +0 -0
  19. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/cat/list_archives.py +0 -0
  20. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/cat/list_assets.py +0 -0
  21. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/cat/list_cert_types.py +0 -0
  22. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/cat/list_deployed_catalogs.py +0 -0
  23. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/cat/list_deployed_database_schemas.py +0 -0
  24. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/cat/list_deployed_databases.py +0 -0
  25. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/cat/list_glossary.py +0 -0
  26. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/cat/list_projects.py +0 -0
  27. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/cat/list_relationships.py +0 -0
  28. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/cat/list_tech_types.py +0 -0
  29. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/cat/list_todos.py +0 -0
  30. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/cat/list_user_ids.py +0 -0
  31. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/cli/__init__.py +0 -0
  32. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/cli/egeria_my.py +0 -0
  33. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/cli/egeria_ops.py +0 -0
  34. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/cli/egeria_tech.py +0 -0
  35. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/cli/ops_config.py +0 -0
  36. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/my/README.md +0 -0
  37. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/my/__init__.py +0 -0
  38. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/my/list_my_profile.py +0 -0
  39. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/my/list_my_roles.py +0 -0
  40. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/my/monitor_my_todos.py +0 -0
  41. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/my/monitor_open_todos.py +0 -0
  42. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/my/todo_actions.py +0 -0
  43. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/ops/README.md +0 -0
  44. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/ops/__init__.py +0 -0
  45. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/ops/engine_actions.py +0 -0
  46. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/ops/gov_server_actions.py +0 -0
  47. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/ops/list_catalog_targets.py +0 -0
  48. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/ops/load_archive.py +0 -0
  49. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/ops/monitor_asset_events.py +0 -0
  50. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/ops/monitor_engine_activity.py +0 -0
  51. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/ops/monitor_engine_activity_c.py +0 -0
  52. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/ops/monitor_gov_eng_status.py +0 -0
  53. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/ops/monitor_integ_daemon_status.py +0 -0
  54. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/ops/monitor_platform_status.py +0 -0
  55. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/ops/monitor_server_startup.py +0 -0
  56. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/ops/monitor_server_status.py +0 -0
  57. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/ops/orig_monitor_server_list.py +0 -0
  58. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/ops/orig_monitor_server_status.py +0 -0
  59. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/ops/refresh_integration_daemon.py +0 -0
  60. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/ops/restart_integration_daemon.py +0 -0
  61. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/ops/table_integ_daemon_status.py +0 -0
  62. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/tech/README.md +0 -0
  63. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/tech/__init__.py +0 -0
  64. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/tech/get_element_graph.py +0 -0
  65. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/tech/get_element_info.py +0 -0
  66. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/tech/get_guid_info.py +0 -0
  67. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/tech/get_tech_details.py +0 -0
  68. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/tech/list_asset_types.py +0 -0
  69. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/tech/list_elements.py +0 -0
  70. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/tech/list_elements_for_classification.py +0 -0
  71. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/tech/list_elements_x.py +0 -0
  72. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/tech/list_gov_action_processes.py +0 -0
  73. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/tech/list_registered_services.py +0 -0
  74. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/tech/list_related_elements.py +0 -0
  75. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/tech/list_related_specification.py +0 -0
  76. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/tech/list_relationship_types.py +0 -0
  77. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/tech/list_valid_metadata_values.py +0 -0
  78. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/tech/table_tech_templates.py +0 -0
  79. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/commands/tech/x_list_related_elements.py +0 -0
  80. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/README.md +0 -0
  81. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/__init__.py +0 -0
  82. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/_client.py +0 -0
  83. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/_deprecated_gov_engine.py +0 -0
  84. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/_exceptions.py +0 -0
  85. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/_globals.py +0 -0
  86. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/_validators.py +0 -0
  87. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/asset_catalog_omvs.py +0 -0
  88. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/automated_curation_omvs.py +0 -0
  89. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/classification_manager_omvs.py +0 -0
  90. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/collection_manager_omvs.py +0 -0
  91. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/core_omag_server_config.py +0 -0
  92. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/create_tech_guid_lists.py +0 -0
  93. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/egeria_cat_client.py +0 -0
  94. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/egeria_client.py +0 -0
  95. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/egeria_config_client.py +0 -0
  96. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/egeria_my_client.py +0 -0
  97. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/egeria_tech_client.py +0 -0
  98. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/feedback_manager_omvs.py +0 -0
  99. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/full_omag_server_config.py +0 -0
  100. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/glossary_browser_omvs.py +0 -0
  101. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/mermaid_utilities.py +0 -0
  102. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/my_profile_omvs.py +0 -0
  103. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/platform_services.py +0 -0
  104. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/project_manager_omvs.py +0 -0
  105. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/registered_info.py +0 -0
  106. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/server_operations.py +0 -0
  107. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/template_manager_omvs.py +0 -0
  108. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/utils.py +0 -0
  109. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/valid_metadata_omvs.py +0 -0
  110. {pyegeria-1.5.1.0.23 → pyegeria-1.5.1.0.120}/pyegeria/x_action_author_omvs.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyegeria
3
- Version: 1.5.1.0.23
3
+ Version: 1.5.1.0.120
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 +7,6 @@ Copyright Contributors to the ODPi Egeria project.
7
7
  Execute Glossary actions.
8
8
 
9
9
  """
10
- import csv
11
10
  import os
12
11
  import sys
13
12
  import time
@@ -112,7 +111,7 @@ def delete_glossary(server, url, userid, password, timeout, glossary_guid):
112
111
  try:
113
112
  m_client.delete_to_do(glossary_guid)
114
113
 
115
- click.echo(f"Deleted glossary: {glossary_guid}")
114
+ click.echo(f"Deleted Todo item {glossary_guid}")
116
115
 
117
116
  except (InvalidParameterException, PropertyServerException) as e:
118
117
  print_exception_response(e)
@@ -157,6 +156,7 @@ def create_term(
157
156
  url,
158
157
  userid,
159
158
  password,
159
+ timeout,
160
160
  glossary_name,
161
161
  term_name,
162
162
  summary,
@@ -166,8 +166,7 @@ def create_term(
166
166
  usage,
167
167
  version,
168
168
  status,
169
- timeout: int = 120,
170
- ) -> str:
169
+ ):
171
170
  """Create a new term"""
172
171
  m_client = EgeriaTech(server, url, user_id=userid, user_pwd=password)
173
172
  token = m_client.create_egeria_bearer_token()
@@ -176,7 +175,7 @@ def create_term(
176
175
  "class": "ReferenceableRequestBody",
177
176
  "elementProperties": {
178
177
  "class": "GlossaryTermProperties",
179
- "qualifiedName": f"GlossaryTerm: {term_name} - {datetime.now().isoformat()}",
178
+ "qualifiedName": f"GlossaryTerm: {term_name} : {datetime.now().isoformat()}",
180
179
  "displayName": term_name,
181
180
  "summary": summary,
182
181
  "description": description,
@@ -206,36 +205,6 @@ def create_term(
206
205
  click.echo(
207
206
  f"Successfully created term {term_name} with GUID {term_guid}, in glossary {glossary_name}.\n"
208
207
  )
209
- return term_guid
210
- except (InvalidParameterException, PropertyServerException) as e:
211
- print_exception_response(e)
212
- finally:
213
- m_client.close_session()
214
-
215
-
216
- @click.command("load-terms-from-file")
217
- @click.option("--glossary-name", help="Name of Glossary", required=True)
218
- @click.option("--file-name", help="Path of CSV file", required=True)
219
- @click.option("--server", default=EGERIA_VIEW_SERVER, help="Egeria view server to use")
220
- @click.option(
221
- "--url", default=EGERIA_VIEW_SERVER_URL, help="URL of Egeria platform to connect to"
222
- )
223
- @click.option("--userid", default=EGERIA_USER, help="Egeria user")
224
- @click.option("--password", default=EGERIA_USER_PASSWORD, help="Egeria user password")
225
- @click.option("--timeout", default=60, help="Number of seconds to wait")
226
- @click.argument("glossary-guid")
227
- def load_terms(
228
- glossary_name, file_name, server, url, userid, password, timeout, glossary_guid
229
- ):
230
- """Delete the glossary specified"""
231
- m_client = EgeriaTech(server, url, user_id=userid, user_pwd=password)
232
- token = m_client.create_egeria_bearer_token()
233
- try:
234
- result = m_client.load_terms_from_file(glossary_name, file_name)
235
-
236
- click.echo(
237
- f"Loaded terms from into glossary: {glossary_name} from {file_name}"
238
- )
239
208
 
240
209
  except (InvalidParameterException, PropertyServerException) as e:
241
210
  print_exception_response(e)
@@ -37,12 +37,7 @@ from commands.cat.list_deployed_database_schemas import (
37
37
  )
38
38
  from commands.cat.list_deployed_catalogs import list_deployed_catalogs
39
39
  from commands.cat.list_deployed_databases import list_deployed_databases
40
- from commands.cat.glossary_actions import (
41
- create_glossary,
42
- delete_glossary,
43
- create_term,
44
- load_terms,
45
- )
40
+ from commands.cat.glossary_actions import create_glossary, delete_glossary, create_term
46
41
  from commands.my.todo_actions import (
47
42
  mark_todo_complete,
48
43
  reassign_todo,
@@ -989,7 +984,6 @@ tell.add_command(mark_todo_complete)
989
984
  tell.add_command(reassign_todo)
990
985
  tell.add_command(delete_todo)
991
986
  tell.add_command(create_todo)
992
- tell.add_command(load_terms)
993
987
 
994
988
 
995
989
  @tell.group("survey")
@@ -18,12 +18,7 @@ from commands.cat.get_project_dependencies import project_dependency_viewer
18
18
  from commands.cat.get_project_structure import project_structure_viewer
19
19
  from commands.cat.get_tech_type_elements import tech_viewer
20
20
  from commands.cat.get_tech_type_template import template_viewer
21
- from commands.cat.glossary_actions import (
22
- create_glossary,
23
- delete_glossary,
24
- create_term,
25
- load_terms,
26
- )
21
+ from commands.cat.glossary_actions import create_glossary, delete_glossary, create_term
27
22
  from commands.cat.list_archives import display_archive_list
28
23
  from commands.cat.list_assets import display_assets
29
24
  from commands.cat.list_cert_types import display_certifications
@@ -571,7 +566,6 @@ tell.add_command(mark_todo_complete)
571
566
  tell.add_command(reassign_todo)
572
567
  tell.add_command(delete_todo)
573
568
  tell.add_command(create_todo)
574
- tell.add_command(load_terms)
575
569
 
576
570
 
577
571
  @tell.group("survey")
@@ -1,6 +1,4 @@
1
1
  """This creates a templates guid file from the core metadata archive"""
2
- import json
3
-
4
2
  from rich.markdown import Markdown
5
3
  from rich.prompt import Prompt
6
4
  import os
@@ -18,66 +16,30 @@ from pyegeria import (
18
16
  PropertyServerException,
19
17
  UserNotAuthorizedException,
20
18
  print_exception_response,
21
- RegisteredInfo,
19
+ RegisteredInfo
22
20
  )
23
21
 
24
22
 
25
23
  console = Console()
26
24
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
27
- EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
28
- EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
29
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
30
- EGERIA_VIEW_SERVER_URL = os.environ.get(
31
- "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
32
- )
33
- EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
34
- EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
35
- EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
36
- EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
37
- EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
38
- EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
39
- EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
40
-
41
-
42
- def list_templates(
43
- search_string: str, server: str, url: str, username: str, password: str
44
- ) -> []:
45
- """Return a list of templates for one or more technology type"""
46
- a_client = AutomatedCuration(server, url, username)
47
- token = a_client.create_egeria_bearer_token(username, password)
48
- tech_list = a_client.find_technology_types(search_string, page_size=0)
49
- tech_info_list: dict = []
50
-
51
- if type(tech_list) is list:
52
- for item in tech_list:
53
- if "deployedImplementationType" not in item["qualifiedName"]:
54
- continue
55
-
56
- details = a_client.get_technology_type_detail(item["name"])
57
- entry = {details["name"]: {}}
58
- if type(details) is str:
59
- tech_info_list.append(entry)
60
- continue
61
- templates = details.get("catalogTemplates", "Not Found")
62
- if type(templates) is list:
63
- t_list = []
64
- entry = {details["name"]: {}}
65
- for template in templates:
66
- t_list.append({"template": template["name"]})
67
- entry[details["name"]] = t_list
68
- tech_info_list.append(entry)
69
- return tech_info_list
70
-
71
-
72
- def display_templates_spec(
73
- search_string: str,
74
- server: str,
75
- url: str,
76
- username: str,
77
- password: str,
78
- jupyter: bool = EGERIA_JUPYTER,
79
- width: int = EGERIA_WIDTH,
25
+ EGERIA_KAFKA_ENDPOINT = os.environ.get('KAFKA_ENDPOINT', 'localhost:9092')
26
+ EGERIA_PLATFORM_URL = os.environ.get('EGERIA_PLATFORM_URL', 'https://localhost:9443')
27
+ EGERIA_VIEW_SERVER = os.environ.get('VIEW_SERVER', 'view-server')
28
+ EGERIA_VIEW_SERVER_URL = os.environ.get('EGERIA_VIEW_SERVER_URL', 'https://localhost:9443')
29
+ EGERIA_INTEGRATION_DAEMON = os.environ.get('INTEGRATION_DAEMON', 'integration-daemon')
30
+ EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
31
+ EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
32
+ EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
33
+ EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
34
+ EGERIA_JUPYTER = bool(os.environ.get('EGERIA_JUPYTER', 'False'))
35
+ EGERIA_WIDTH = int(os.environ.get('EGERIA_WIDTH', '200'))
36
+
37
+
38
+
39
+ def display_templates_spec(search_string:str, server: str,
40
+ url: str, username: str, password: str, jupyter:bool=EGERIA_JUPYTER, width:int = EGERIA_WIDTH
80
41
  ):
42
+
81
43
  a_client = AutomatedCuration(server, url, username)
82
44
  token = a_client.create_egeria_bearer_token(username, password)
83
45
  tech_list = a_client.find_technology_types(search_string, page_size=0)
@@ -100,19 +62,21 @@ def display_templates_spec(
100
62
 
101
63
  table.add_column("Name", width=20)
102
64
  table.add_column("Template Name", width=20)
103
- table.add_column("Template GUID", width=38, no_wrap=True)
65
+ table.add_column("Template GUID", width = 38,no_wrap=True)
104
66
  table.add_column("Placeholders")
105
67
 
68
+
106
69
  if type(tech_list) is list:
107
70
  for item in tech_list:
108
- if "deployedImplementationType" not in item["qualifiedName"]:
71
+ if 'deployedImplementationType' not in item['qualifiedName']:
109
72
  continue
110
73
  placeholder_table = Table(expand=False, show_lines=True)
111
- placeholder_table.add_column("Name", width=20, no_wrap=True)
112
- placeholder_table.add_column("Type", width=10)
113
- placeholder_table.add_column("Required", width=10)
114
- placeholder_table.add_column("Example", width=20)
115
- placeholder_table.add_column("Description", width=40)
74
+ placeholder_table.add_column("Name", width = 20,no_wrap=True)
75
+ placeholder_table.add_column("Type", width = 10)
76
+ placeholder_table.add_column("Required", width = 10)
77
+ placeholder_table.add_column("Example", width = 20)
78
+ placeholder_table.add_column("Description", width = 40)
79
+
116
80
 
117
81
  name = item.get("name", "none")
118
82
 
@@ -126,11 +90,7 @@ def display_templates_spec(
126
90
  for template in templates:
127
91
  template_name = template.get("name", None)
128
92
 
129
- template_name = (
130
- f"{name}_Template"
131
- if template_name is None
132
- else template_name
133
- )
93
+ template_name = f"{name}_Template" if template_name is None else template_name
134
94
 
135
95
  specification = template["specification"]["placeholderProperty"]
136
96
  template_guid = template["relatedElement"]["guid"]
@@ -141,17 +101,10 @@ def display_templates_spec(
141
101
  placeholder_name = placeholder["placeholderPropertyName"]
142
102
  placeholder_required = placeholder["required"]
143
103
  placeholder_example = placeholder.get("example", None)
144
- placeholder_table.add_row(
145
- placeholder_name,
146
- placeholder_data_type,
147
- placeholder_required,
148
- placeholder_example,
149
- placeholder_description,
150
- )
151
-
152
- table.add_row(
153
- name, template_name, template_guid, placeholder_table
154
- )
104
+ placeholder_table.add_row(placeholder_name, placeholder_data_type, placeholder_required,
105
+ placeholder_example, placeholder_description,)
106
+
107
+ table.add_row(name, template_name, template_guid, placeholder_table)
155
108
 
156
109
  return table
157
110
  else:
@@ -164,11 +117,7 @@ def display_templates_spec(
164
117
  with console.pager(styles=True):
165
118
  console.print(generate_table())
166
119
 
167
- except (
168
- InvalidParameterException,
169
- PropertyServerException,
170
- UserNotAuthorizedException,
171
- ) as e:
120
+ except (InvalidParameterException, PropertyServerException, UserNotAuthorizedException) as e:
172
121
  print_exception_response(e)
173
122
  assert e.related_http_code != "200", "Invalid parameters"
174
123
  finally:
@@ -191,14 +140,14 @@ def main():
191
140
  guid = None
192
141
 
193
142
  try:
194
- search_string = Prompt.ask(
195
- "Enter the technology you are searching for:", default="*"
196
- )
197
- # display_templates_spec(search_string, server, url, userid, password)
198
- list_templates(search_string, server, url, userid, password)
199
- except KeyboardInterrupt:
143
+ search_string = Prompt.ask("Enter the technology you are searching for:", default="*")
144
+ display_templates_spec(search_string, server, url, userid, password)
145
+ except(KeyboardInterrupt):
200
146
  pass
201
147
 
202
148
 
203
149
  if __name__ == "__main__":
204
150
  main()
151
+
152
+
153
+
@@ -8,11 +8,8 @@ added in subsequent versions of the glossary_omvs module.
8
8
  """
9
9
  import asyncio
10
10
  import time
11
- import csv
12
11
  from datetime import datetime
13
12
 
14
- from pyegeria import InvalidParameterException
15
-
16
13
  # import json
17
14
  from pyegeria._client import Client
18
15
  from pyegeria._validators import (
@@ -1410,92 +1407,28 @@ class GlossaryManager(GlossaryBrowser):
1410
1407
 
1411
1408
  def load_terms_from_file(
1412
1409
  self, glossary_name: str, filename: str, upsert: bool = False
1413
- ) -> [dict]:
1410
+ ) -> str:
1414
1411
  """This method loads glossary terms into the specified glossary from the indicated file."""
1415
1412
  # Check that glossary exists and get guid
1416
1413
  glossaries = self.get_glossaries_by_name(glossary_name)
1417
1414
  if type(glossaries) is not list:
1418
1415
  return "Unknown glossary"
1419
1416
  if len(glossaries) > 1:
1420
- glossary_error = (
1421
- "Multiple glossaries found - please use a qualified name from below\n"
1422
- )
1423
1417
  for g in glossaries:
1418
+ glossary_error = (
1419
+ "Multiple glossaries found - please use the qualified name\n"
1420
+ )
1424
1421
  glossary_error += (
1425
1422
  f"Display Name: {g['glossaryProperties']['displayName']}\tQualified Name:"
1426
1423
  f" {g['glossaryProperties']['qualifiedName']}\n"
1427
1424
  )
1428
- raise InvalidParameterException(glossary_error)
1429
- sys.exit(1)
1430
-
1431
- # Now we know we have a single glossary so we can get the guid
1425
+ return glossary_error
1432
1426
  glossary_guid = glossaries[0]["elementHeader"]["guid"]
1433
- term_info = []
1434
-
1435
- term_properties = {
1436
- "Term Name",
1437
- "Qualified Name",
1438
- "Abbreviation",
1439
- "Summary",
1440
- "Description",
1441
- "Examples",
1442
- "Usage",
1443
- "Version Identifier",
1444
- "Status",
1445
- }
1446
- # process file
1447
- with open(filename, mode="r") as file:
1448
- # Create a CSV reader object
1449
- csv_reader = csv.DictReader(file)
1450
- headers = csv_reader.fieldnames
1451
- # check that the column headers are known
1452
- if all(header in term_properties for header in headers) is False:
1453
- raise InvalidParameterException("Invalid headers in CSV File")
1454
- sys.exit(1)
1455
-
1456
- # process each row
1457
- for row in csv_reader:
1458
- term_name = row.get("Term Name", None)
1459
- qualified_name = row.get("Qualified Name", None)
1460
- abbrev = row.get("Abbreviation", None)
1461
- summary = row.get("Summary", None)
1462
- description = row.get("Description", None)
1463
- examples = row.get("Examples", None)
1464
- usage = row.get("Usage", None)
1465
- version = row.get("Version Identifier", "1.0")
1466
- status = row.get("Status", "DRAFT").upper()
1467
-
1468
- # process the row
1469
- if term_name is None:
1470
- continue
1471
- body = {
1472
- "class": "ReferenceableRequestBody",
1473
- "elementProperties": {
1474
- "class": "GlossaryTermProperties",
1475
- "qualifiedName": f"GlossaryTerm: {term_name} - {datetime.now().isoformat()}",
1476
- "displayName": term_name,
1477
- "summary": summary,
1478
- "description": description,
1479
- "abbreviation": abbrev,
1480
- "examples": examples,
1481
- "usage": usage,
1482
- "publishVersionIdentifier": version,
1483
- },
1484
- "initialStatus": status,
1485
- }
1486
1427
 
1487
- # Add the term
1488
- term_guid = self.create_controlled_glossary_term(
1489
- glossary_guid, body_slimmer(body)
1490
- )
1491
- term_info.append(
1492
- {
1493
- "term_name": term_name,
1494
- "qualified_name": qualified_name,
1495
- "term_guid": term_guid,
1496
- }
1497
- )
1498
- return term_info
1428
+ # Open file
1429
+
1430
+ # Insert terms into glossary
1431
+ pass
1499
1432
 
1500
1433
  async def _async_create_term_copy(
1501
1434
  self,
@@ -59,7 +59,7 @@ class RuntimeManager(Client):
59
59
  )
60
60
 
61
61
  async def __async__get_guid__(
62
- self, guid: str = None, name: str = None, property_name: str = "qualifiedName"
62
+ self, guid: str = None, name: str = None, property_name: str = "name"
63
63
  ) -> str:
64
64
  """Helper function to return a server_guid - one of server_guid or server_name should
65
65
  contain information. If both are None, an exception will be thrown. If both contain
@@ -92,7 +92,7 @@ class RuntimeManager(Client):
92
92
  )
93
93
 
94
94
  def __get_guid__(
95
- self, guid: str = None, name: str = None, property_name: str = "qualifiedName"
95
+ self, guid: str = None, name: str = None, property_name: str = "name"
96
96
  ) -> str:
97
97
  """Helper function to return a server_guid - one of server_guid or server_name should
98
98
  contain information. If both are None, an exception will be thrown. If both contain
@@ -1128,7 +1128,6 @@ class RuntimeManager(Client):
1128
1128
  UserNotAuthorizedException
1129
1129
 
1130
1130
  """
1131
- server_name = f"Metadata Access Server:{server_name}"
1132
1131
  server_guid = self.__get_guid__(server_guid, server_name)
1133
1132
  url = f"{self.runtime_command_root}/metadata-access-stores/{server_guid}/instance/load/open-metadata-archives/file"
1134
1133
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pyegeria"
3
- version = "1.5.1.0.23"
3
+ version = "1.5.1.0.120"
4
4
  license = 'Apache 2.0'
5
5
  authors = ["Dan Wolfson <dan.wolfson@pdr-associates.com>"]
6
6
  readme = "README.md"
@@ -56,7 +56,7 @@ pytest = "^8.2.2"
56
56
  list_tech_types = "commands.cat.list_tech_types:main"
57
57
  get_asset_graph = "commands.cat.get_asset_graph:main"
58
58
  get_collection = "commands.cat.get_collection:main"
59
- list_terms = "commands.cat.list_glossary:main"
59
+ list_glossary = "commands.cat.list_glossary:main"
60
60
  get_tech_type_elements = "commands.cat.get_tech_type_elements:main"
61
61
  get_tech_type_template = "commands.cat.get_tech_type_template:main"
62
62
  list_projects = "commands.cat.list_projects:main"
@@ -68,12 +68,10 @@ pytest = "^8.2.2"
68
68
  list_user_ids = "commands.cat.list_user_ids:main"
69
69
  list_archives = "commands.cat.list_archives:main"
70
70
  list_deployed_catalogs = "commands.cat.list_deployed_catalogs:main"
71
- list_deployed_databases = "commands.cat.list_deployed_databases:main"
72
71
  list_deployed_schemas = "commands.cat.list_deployed_database_schemas:main"
73
72
  create_glossary = "commands.cat.glossary_actions:create_glossary"
74
73
  delete_glossary = "commands.cat.glossary_actions:delete_glossary"
75
74
  create_term = "commands.cat.glossary_actions:create_term"
76
- load_terms_from_file = "commands.cat.glossary_actions:load_terms"
77
75
 
78
76
  monitor_asset_events = "commands.ops.monitor_asset_events:main"
79
77
  monitor_coco_status = "commands.ops.monitor_coco_status:main"
File without changes
File without changes