pyegeria 1.5.1.1.4__py3-none-any.whl → 1.5.1.1.5__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.
@@ -8,6 +8,7 @@ Execute Glossary actions.
8
8
 
9
9
  """
10
10
  import csv
11
+ import json
11
12
  import os
12
13
  import sys
13
14
  import time
@@ -216,6 +217,12 @@ def create_term(
216
217
  @click.command("load-terms-from-file")
217
218
  @click.option("--glossary-name", help="Name of Glossary", required=True)
218
219
  @click.option("--file-name", help="Path of CSV file", required=True)
220
+ @click.option(
221
+ "--verbose",
222
+ type=bool,
223
+ default=False,
224
+ help="If true, result descriptions are provided",
225
+ )
219
226
  @click.option("--server", default=EGERIA_VIEW_SERVER, help="Egeria view server to use")
220
227
  @click.option(
221
228
  "--url", default=EGERIA_VIEW_SERVER_URL, help="URL of Egeria platform to connect to"
@@ -223,7 +230,9 @@ def create_term(
223
230
  @click.option("--userid", default=EGERIA_USER, help="Egeria user")
224
231
  @click.option("--password", default=EGERIA_USER_PASSWORD, help="Egeria user password")
225
232
  @click.option("--timeout", default=60, help="Number of seconds to wait")
226
- def load_terms(glossary_name, file_name, server, url, userid, password, timeout):
233
+ def load_terms(
234
+ glossary_name, file_name, verbose, server, url, userid, password, timeout
235
+ ):
227
236
  """Delete the glossary specified"""
228
237
  m_client = EgeriaTech(server, url, user_id=userid, user_pwd=password)
229
238
  token = m_client.create_egeria_bearer_token()
@@ -233,6 +242,8 @@ def load_terms(glossary_name, file_name, server, url, userid, password, timeout)
233
242
  click.echo(
234
243
  f"Loaded terms from into glossary: {glossary_name} from {file_name}"
235
244
  )
245
+ if verbose:
246
+ print(f"\n Verbose output:\n{json.dumps(result, indent = 2)}")
236
247
 
237
248
  except (InvalidParameterException, PropertyServerException) as e:
238
249
  print_exception_response(e)
@@ -64,9 +64,9 @@ class GlossaryManager(GlossaryBrowser):
64
64
  # Get Valid Values for Enumerations
65
65
  #
66
66
 
67
- def __validate_term_status__(self, status: str)-> bool
67
+ def __validate_term_status__(self, status: str) -> bool:
68
68
  """Return True if the status is a legal glossary term status"""
69
- recognized_term_status = {"DRAFT", "ACTIVE", "DEPRACATED", "OBSOLETE", "OTHER"}
69
+ recognized_term_status = {"DRAFT", "ACTIVE", "DEPRACATED", "OBSOLETE", "OTHER"}
70
70
  return status in recognized_term_status
71
71
 
72
72
  async def _async_create_glossary(
@@ -1343,6 +1343,8 @@ class GlossaryManager(GlossaryBrowser):
1343
1343
  """
1344
1344
 
1345
1345
  validate_guid(glossary_guid)
1346
+ if self.__validate_term_status__(body["initialStatus"]) is False:
1347
+ raise InvalidParameterException("Bad status value")
1346
1348
 
1347
1349
  url = (
1348
1350
  f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/glossary-manager/glossaries/"
@@ -1472,20 +1474,24 @@ class GlossaryManager(GlossaryBrowser):
1472
1474
 
1473
1475
  # process the row
1474
1476
  if term_name is None:
1475
- term_info.append({
1476
- {"term_name" : "---"},
1477
- {"qualified_name" : "---"},
1478
- {"term_guid" : "---"},
1479
- {'error': "missing term names - skipping"}
1480
- })
1477
+ term_info.append(
1478
+ {
1479
+ {"term_name": "---"},
1480
+ {"qualified_name": "---"},
1481
+ {"term_guid": "---"},
1482
+ {"error": "missing term names - skipping"},
1483
+ }
1484
+ )
1481
1485
  continue
1482
1486
  if self.__validate_term_status__(status) is False:
1483
- term_info.append({
1484
- {"term_name": "---"},
1485
- {"qualified_name": "---"},
1486
- {"term_guid": "---"},
1487
- {'error' : "invalid term status"}
1488
- })
1487
+ term_info.append(
1488
+ {
1489
+ {"term_name": "---"},
1490
+ {"qualified_name": "---"},
1491
+ {"term_guid": "---"},
1492
+ {"error": "invalid term status"},
1493
+ }
1494
+ )
1489
1495
  continue
1490
1496
 
1491
1497
  body = {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyegeria
3
- Version: 1.5.1.1.4
3
+ Version: 1.5.1.1.5
4
4
  Summary: A python client for Egeria
5
5
  Home-page: https://github.com/odpi/egeria-python
6
6
  License: Apache 2.0
@@ -6,7 +6,7 @@ commands/cat/get_project_dependencies.py,sha256=B0JaMSUi0hzVgos1sTY2uUPGy1DzKEJM
6
6
  commands/cat/get_project_structure.py,sha256=n2GbNd07w1DTo7jTR8b2ewXRyNcat_2BcCBRyDMldwk,5969
7
7
  commands/cat/get_tech_type_elements.py,sha256=-m3Q0BoNqkCtV8h75vMwTcOV-_ymEXmnJcr4Ec7WMAw,6180
8
8
  commands/cat/get_tech_type_template.py,sha256=gMFVcgCIm09GQu1Vsc5ZUVH9XLhItAG1eVGZJrcnHeQ,6174
9
- commands/cat/glossary_actions.py,sha256=tEQX85-hHIalEuKpgybx1V5_NeFDONNrOfrsb9VGlyE,8531
9
+ commands/cat/glossary_actions.py,sha256=KbSiMseXgQLdoT8TqXocl3WpE_gqalkxjxRuGZCzFw8,8775
10
10
  commands/cat/list_archives.py,sha256=FEZ2XYnQIWo2PztWqnj6unn0pbblPU0-bMbTyI3csv4,5464
11
11
  commands/cat/list_assets.py,sha256=bNwSaBDz661hfnc2Rn4j4HPHAugKvz0XwN9L1m4FVQk,6529
12
12
  commands/cat/list_cert_types.py,sha256=mbCls_EqC5JKG5rvS4o69k7KgZ6aNXlcqoJ3DtHsTFA,7127
@@ -92,7 +92,7 @@ pyegeria/egeria_tech_client.py,sha256=7NfqpJFft5GR4NPRDVDw22L9caHbXB8fhx0TAf6qEo
92
92
  pyegeria/feedback_manager_omvs.py,sha256=B66e3ZCaC_dirb0mcb2Nz3PYh2ZKsoMAYNOb3euNiro,152931
93
93
  pyegeria/full_omag_server_config.py,sha256=LBnqUiz1ofBdlKBzECFs_pQbdJwcWigAukWHGJRR2nU,47340
94
94
  pyegeria/glossary_browser_omvs.py,sha256=NcitYaZJqwVODBO5zBtWpXPNUJJ3DKzEbRaOFSAyUlg,93554
95
- pyegeria/glossary_manager_omvs.py,sha256=-J1kLypJkIJBsGYVn-WOyYztPJnrAK902KjUmF32Izc,116554
95
+ pyegeria/glossary_manager_omvs.py,sha256=Nnk0cnpU4zJodIgEs7sqLTldd0fF2gKcMt2FBgSlAPI,116815
96
96
  pyegeria/mermaid_utilities.py,sha256=GXiS-subb5nJcDqlThZWX2T8WspU1neFfhf4TxRoMh4,8344
97
97
  pyegeria/my_profile_omvs.py,sha256=DyECbUFEcgokrIbzdMMNljC3bqfqKGXAF2wZEpzvRYs,34666
98
98
  pyegeria/platform_services.py,sha256=CJIOYIFEbcIGwdWlApAQcXxZTsdrhFtpJcm4O3p7dG0,41646
@@ -104,8 +104,8 @@ pyegeria/template_manager_omvs.py,sha256=heqbKeum5hPCHap4r1RUZU8YB3QaQlxVNbq4GZi
104
104
  pyegeria/utils.py,sha256=1h6bwveadd6GpbnGLTmqPBmBk68QvxdjGTI9RfbrgKY,5415
105
105
  pyegeria/valid_metadata_omvs.py,sha256=tfCGXed5LLt59YA8uZNNtd9UJ-lRZfPU_uZxK31Yux0,65069
106
106
  pyegeria/x_action_author_omvs.py,sha256=xu1IQ0YbhIKi17C5a7Aq9u1Az2czwahNPpX9czmyVxE,6454
107
- pyegeria-1.5.1.1.4.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
108
- pyegeria-1.5.1.1.4.dist-info/METADATA,sha256=_gjfUkhzaROtUfpiqigMG5A9CttQmsNEIEpfDOAoP8c,2997
109
- pyegeria-1.5.1.1.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
110
- pyegeria-1.5.1.1.4.dist-info/entry_points.txt,sha256=eQF0CAWVQlHftl85JzL0pWSaQ1eURJ6MeI1I78FvAgQ,4127
111
- pyegeria-1.5.1.1.4.dist-info/RECORD,,
107
+ pyegeria-1.5.1.1.5.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
108
+ pyegeria-1.5.1.1.5.dist-info/METADATA,sha256=9LOU2PLe7BudUMtaoJUVHmOKY4FG7KxIB6Ngzx5oIC0,2997
109
+ pyegeria-1.5.1.1.5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
110
+ pyegeria-1.5.1.1.5.dist-info/entry_points.txt,sha256=eQF0CAWVQlHftl85JzL0pWSaQ1eURJ6MeI1I78FvAgQ,4127
111
+ pyegeria-1.5.1.1.5.dist-info/RECORD,,