pyegeria 1.5.1.1.19__py3-none-any.whl → 1.5.1.1.22__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.
Binary file
@@ -88,12 +88,25 @@ def create_glossary(
88
88
 
89
89
  existing_glossary = m_client.find_glossaries(name)
90
90
  if type(existing_glossary) is list:
91
- click.echo(f"\nFound {len(existing_glossary)} existing Glossaries\n")
91
+ click.echo(
92
+ f"\nFound {len(existing_glossary)} existing Glossaries with a similar name!\n"
93
+ )
92
94
  for glossary in existing_glossary:
93
- click.echo(
94
- f"\tFound glossary: {glossary['glossaryProperties']['qualifiedName']} with id of {glossary['elementHeader']['guid']}\n"
95
- )
96
- sys.exit(0)
95
+ if (
96
+ glossary["glossaryProperties"]["qualifiedName"]
97
+ == "Glossary:" + name
98
+ ):
99
+ click.echo(
100
+ (
101
+ f"\tFound existing glossary: {glossary['glossaryProperties']['qualifiedName']} with id of {glossary['elementHeader']['guid']}\n"
102
+ "Exiting\n"
103
+ )
104
+ )
105
+ sys.exit(0)
106
+ else:
107
+ click.echo(
108
+ "Found glossaries with similar names but different qualifiedNames...proceeding\n"
109
+ )
97
110
 
98
111
  glossary_guid = m_client.create_glossary(name, description, language, usage)
99
112
  print(f"New glossary {name} created with id of {glossary_guid}")
@@ -103,7 +103,7 @@ class GlossaryManager(GlossaryBrowser):
103
103
  "class": "ReferenceableRequestBody",
104
104
  "elementProperties": {
105
105
  "class": "GlossaryProperties",
106
- "qualifiedName": f"Glossary:{display_name}-{time.asctime()}",
106
+ "qualifiedName": f"Glossary:{display_name}",
107
107
  "displayName": display_name,
108
108
  "description": description,
109
109
  "language": language,
@@ -1613,21 +1613,6 @@ class GlossaryManager(GlossaryBrowser):
1613
1613
  # If upsert is set we need to see if it can be done (there must be a valid qualified name) and then
1614
1614
  # do the update for the row - if there is no qualified name we will treat the row as an insert.
1615
1615
  if qualified_name:
1616
- body = {
1617
- "class": "ReferenceableRequestBody",
1618
- "elementProperties": {
1619
- "class": "GlossaryTermProperties",
1620
- "qualifiedName": qualified_name,
1621
- "displayName": term_name,
1622
- "summary": summary,
1623
- "description": description,
1624
- "abbreviation": abbrev,
1625
- "examples": examples,
1626
- "usage": usage,
1627
- "publishVersionIdentifier": version,
1628
- },
1629
- "initialStatus": status,
1630
- }
1631
1616
  term_stuff = self.get_terms_by_name(
1632
1617
  qualified_name, glossary_guid
1633
1618
  )
@@ -1644,6 +1629,21 @@ class GlossaryManager(GlossaryBrowser):
1644
1629
  continue
1645
1630
  else:
1646
1631
  # An existing term was found - so update it!
1632
+ body = {
1633
+ "class": "ReferenceableRequestBody",
1634
+ "elementProperties": {
1635
+ "class": "GlossaryTermProperties",
1636
+ "qualifiedName": qualified_name,
1637
+ "displayName": term_name,
1638
+ "summary": summary,
1639
+ "description": description,
1640
+ "abbreviation": abbrev,
1641
+ "examples": examples,
1642
+ "usage": usage,
1643
+ "publishVersionIdentifier": version,
1644
+ },
1645
+ "initialStatus": status,
1646
+ }
1647
1647
  term_guid = term_stuff["elementHeader"]["guid"]
1648
1648
  self.update_term(
1649
1649
  term_guid, body_slimmer(body), is_merge_update=True
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyegeria
3
- Version: 1.5.1.1.19
3
+ Version: 1.5.1.1.22
4
4
  Summary: A python client for Egeria
5
5
  Home-page: https://github.com/odpi/egeria-python
6
6
  License: Apache 2.0
@@ -9,6 +9,7 @@ pyegeria/asset_catalog_omvs.py,sha256=NUF9C3s_zs9pTfIZyRJlqMCKrhZASJPH08EXzzjki7
9
9
  pyegeria/automated_curation_omvs.py,sha256=BwNuF7XQJAV-POvzaWwFh0TS5yRnHZZPhlayvtIMlwY,130243
10
10
  pyegeria/classification_manager_omvs.py,sha256=3yInuRy7Cf43oSFZ8BuzcIgtGSm5BfvlKYqtWKRMlPU,186678
11
11
  pyegeria/collection_manager_omvs.py,sha256=kye2kjthNnmwxMZhHQKV0xoHbxcNPWjNzRAYOItj_gY,99201
12
+ pyegeria/commands/.DS_Store,sha256=nBgW7MKJ6b4wSWyEEeGYHWwC8QJAiteQaWKM9PoNRzY,6148
12
13
  pyegeria/commands/README.md,sha256=zNfWZppDxoKqTJeRtcewzku9z1m6_hKacCyQUQw1iq4,1974
13
14
  pyegeria/commands/__init__.py,sha256=7y3p5oQ2c0C1465oIgSA_123W1uo7Wqwk91LXccUgrw,17
14
15
  pyegeria/commands/cat/README.md,sha256=-aaAnIT2fcfU63vajgB-RzQk4l4yFdhkyVfSaTPiqRY,967
@@ -19,7 +20,7 @@ pyegeria/commands/cat/get_project_dependencies.py,sha256=B0JaMSUi0hzVgos1sTY2uUP
19
20
  pyegeria/commands/cat/get_project_structure.py,sha256=n2GbNd07w1DTo7jTR8b2ewXRyNcat_2BcCBRyDMldwk,5969
20
21
  pyegeria/commands/cat/get_tech_type_elements.py,sha256=-m3Q0BoNqkCtV8h75vMwTcOV-_ymEXmnJcr4Ec7WMAw,6180
21
22
  pyegeria/commands/cat/get_tech_type_template.py,sha256=gMFVcgCIm09GQu1Vsc5ZUVH9XLhItAG1eVGZJrcnHeQ,6174
22
- pyegeria/commands/cat/glossary_actions.py,sha256=Tcpa9wCFo4D_fsfMilnbVoRerr_8f6Bqtw3hAJdcUvw,13493
23
+ pyegeria/commands/cat/glossary_actions.py,sha256=hS3MVbMr279HGsb_anCrUuy4SF0Q_2WATCakD3Gy8Bs,14001
23
24
  pyegeria/commands/cat/list_archives.py,sha256=FEZ2XYnQIWo2PztWqnj6unn0pbblPU0-bMbTyI3csv4,5464
24
25
  pyegeria/commands/cat/list_assets.py,sha256=bNwSaBDz661hfnc2Rn4j4HPHAugKvz0XwN9L1m4FVQk,6529
25
26
  pyegeria/commands/cat/list_cert_types.py,sha256=mbCls_EqC5JKG5rvS4o69k7KgZ6aNXlcqoJ3DtHsTFA,7127
@@ -94,7 +95,7 @@ pyegeria/egeria_tech_client.py,sha256=7NfqpJFft5GR4NPRDVDw22L9caHbXB8fhx0TAf6qEo
94
95
  pyegeria/feedback_manager_omvs.py,sha256=B66e3ZCaC_dirb0mcb2Nz3PYh2ZKsoMAYNOb3euNiro,152931
95
96
  pyegeria/full_omag_server_config.py,sha256=LBnqUiz1ofBdlKBzECFs_pQbdJwcWigAukWHGJRR2nU,47340
96
97
  pyegeria/glossary_browser_omvs.py,sha256=NcitYaZJqwVODBO5zBtWpXPNUJJ3DKzEbRaOFSAyUlg,93554
97
- pyegeria/glossary_manager_omvs.py,sha256=s9BxAa2UJk5kinS6-U9H6xKqZUG-lp7aqHdNdStaGLs,126294
98
+ pyegeria/glossary_manager_omvs.py,sha256=10o8TThZvD9IZOU9NodaTz8j-FtSjR7p3er94RIB7Mc,126337
98
99
  pyegeria/mermaid_utilities.py,sha256=GXiS-subb5nJcDqlThZWX2T8WspU1neFfhf4TxRoMh4,8344
99
100
  pyegeria/my_profile_omvs.py,sha256=DyECbUFEcgokrIbzdMMNljC3bqfqKGXAF2wZEpzvRYs,34666
100
101
  pyegeria/platform_services.py,sha256=CJIOYIFEbcIGwdWlApAQcXxZTsdrhFtpJcm4O3p7dG0,41646
@@ -106,8 +107,8 @@ pyegeria/template_manager_omvs.py,sha256=heqbKeum5hPCHap4r1RUZU8YB3QaQlxVNbq4GZi
106
107
  pyegeria/utils.py,sha256=1h6bwveadd6GpbnGLTmqPBmBk68QvxdjGTI9RfbrgKY,5415
107
108
  pyegeria/valid_metadata_omvs.py,sha256=tfCGXed5LLt59YA8uZNNtd9UJ-lRZfPU_uZxK31Yux0,65069
108
109
  pyegeria/x_action_author_omvs.py,sha256=xu1IQ0YbhIKi17C5a7Aq9u1Az2czwahNPpX9czmyVxE,6454
109
- pyegeria-1.5.1.1.19.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
110
- pyegeria-1.5.1.1.19.dist-info/METADATA,sha256=OoLOd-kJQbZ0WU79fSXM9V4SrXVjoReUeWxiClYAPhQ,2998
111
- pyegeria-1.5.1.1.19.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
112
- pyegeria-1.5.1.1.19.dist-info/entry_points.txt,sha256=49rVcJuuKXUSC-9ZNzr-ybsaUL-wm6xrUodCZeKJdGc,4898
113
- pyegeria-1.5.1.1.19.dist-info/RECORD,,
110
+ pyegeria-1.5.1.1.22.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
111
+ pyegeria-1.5.1.1.22.dist-info/METADATA,sha256=yEHoxagZqOfG4aumCO8-amhpuE1Z7CpvlYTKaK8mizY,2998
112
+ pyegeria-1.5.1.1.22.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
113
+ pyegeria-1.5.1.1.22.dist-info/entry_points.txt,sha256=49rVcJuuKXUSC-9ZNzr-ybsaUL-wm6xrUodCZeKJdGc,4898
114
+ pyegeria-1.5.1.1.22.dist-info/RECORD,,