pyegeria 0.7.45__py3-none-any.whl → 0.7.45.1__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.
@@ -73,7 +73,7 @@ def render_mermaid(mermaid_code):
73
73
 
74
74
 
75
75
  def generate_process_graph(
76
- process_guid: str = "508d3878-8eae-47e5-8507-ee936f33b418",
76
+ process_guid: str,
77
77
  view_server: str = EGERIA_VIEW_SERVER,
78
78
  url: str = EGERIA_VIEW_SERVER_URL,
79
79
  user_id: str = EGERIA_USER,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyegeria
3
- Version: 0.7.45
3
+ Version: 0.7.45.1
4
4
  Summary: A python client for Egeria
5
5
  Home-page: https://github.com/odpi/egeria-python
6
6
  License: Apache 2.0
@@ -18,11 +18,11 @@ examples/widgets/cat/list_tech_types.py,sha256=20T4v6L5qeebSsaL1nGkFMDAIsy2W3A3S
18
18
  examples/widgets/cat/list_todos.py,sha256=_Pe3h74doX_cOoe0Z5_FvZtETBk3tkw2evfRpRgai5E,6283
19
19
  examples/widgets/cat/list_user_ids.py,sha256=7JinL7rknPbGusIb8ikXKEaV1vvbuvx_WWtbmlfS_DY,5093
20
20
  examples/widgets/cli/__init__.py,sha256=6d_R0KZBNnJy9EBz9J2xvGFlx-3j_ZPqPCxKgdvYeDQ,291
21
- examples/widgets/cli/egeria.py,sha256=jhejo0UEYnBsNxZzk4QJJs82rG7_Lpv1ScBeVlMFqeI,28387
21
+ examples/widgets/cli/egeria.py,sha256=yY_7QRTH7fo4qlHfqrf2OUHuyy_MbyMWexxgCbQAPIk,28755
22
22
  examples/widgets/cli/egeria_cat.py,sha256=fSclOYRPTz_lEH-aVpss3jS-vDm2S9EJ5w-M_Q6qh7k,13085
23
23
  examples/widgets/cli/egeria_my.py,sha256=cGehUFrJKwNQ49CQ-rEX0M-6yjviRSb9KQjAcKD7Mq4,5993
24
24
  examples/widgets/cli/egeria_ops.py,sha256=pCP-0fpKOJ2XQ78lpw-t_VI3pytur3vAR3XykSlc_6U,11179
25
- examples/widgets/cli/egeria_tech.py,sha256=AA2PNDKebdDObtrmjF6BHaSuSpNVeQgB61CSX1cBvsg,10255
25
+ examples/widgets/cli/egeria_tech.py,sha256=B0lmlSUVcUXS426jBA71sGSqyl4dqm967wR5AzZNGYk,11265
26
26
  examples/widgets/cli/ops_config.py,sha256=m4AfPjf-fR4EBTx8Dc2mcgrfWwAxb30YGeV-v79bg4U,1450
27
27
  examples/widgets/my/README.md,sha256=ZheFhj_VoPMhcWjW3pGchHB0vH_A9PklSmrSkzKdrcQ,844
28
28
  examples/widgets/my/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -57,7 +57,6 @@ examples/widgets/tech/get_tech_details.py,sha256=p5OgSKep3VOuuZmQXE2OSYhE-kvnI18
57
57
  examples/widgets/tech/list_asset_types.py,sha256=PHPtCXqCHhIw0K59hUvoKdybp6IKPt_9Wc0AJVDtdrg,4181
58
58
  examples/widgets/tech/list_elements.py,sha256=8P2nCtTgBhYZfxFcyG9xL7b1a66o3SU1ny-Yh-BVuII,4730
59
59
  examples/widgets/tech/list_elements_x.py,sha256=E5f6hAs4OeCckz9XM8wb5eynPN6eSZrVlWLqVOaWT-c,6079
60
- examples/widgets/tech/list_gov_processes.py,sha256=bQ0Uph35hMvufn15nO1ulYsZ20fyZmvCr57sCDgHMy8,5498
61
60
  examples/widgets/tech/list_registered_services.py,sha256=TqZbT54vMGvHUAX_bovCce3A3eV_RbjSEtPP6u6ZJV0,6388
62
61
  examples/widgets/tech/list_related_specification.py,sha256=zFOsqR-GB4VUWnZoxmaKWv1-qkI3syRoIC9iIEO6khI,5797
63
62
  examples/widgets/tech/list_relationship_types.py,sha256=0T8Sl7J3WFq_0IQLLzcL0T79pUxVENWNT95Cpjz2ukc,5633
@@ -74,7 +73,7 @@ pyegeria/_validators.py,sha256=DQuMsATRGxGSBtOrVtXlCgWXGhj6Nh-uqPtCsrUGLxk,12703
74
73
  pyegeria/action_author_omvs.py,sha256=m0wsfmyO-VxRDaPpACeIDw8eVAFu3RVbo45RPCUel9M,6340
75
74
  pyegeria/asset_catalog_omvs.py,sha256=Rlr0RxdJlU6MaapPMGxjqlIqdo46TzNShwx66lTJZvo,25631
76
75
  pyegeria/automated_curation_omvs.py,sha256=835FippSwtvL-F8jv4DA_Mfe-4w5QOYRzcunXVgzEjw,150360
77
- pyegeria/classification_manager_omvs.py,sha256=PzdFm5Sp69QsWeiZ4DAtOfe2BvUXLdSNcj700WEMFgk,184475
76
+ pyegeria/classification_manager_omvs.py,sha256=ALZlXN4O_vOfOoT1hF7TxuohoJABAbBRmwuf9PWuPEo,186404
78
77
  pyegeria/collection_manager_omvs.py,sha256=aGtzC3P8_YgY2KEzhtO19_H9drStE0hW5hUj-dA7bLo,112649
79
78
  pyegeria/core_omag_server_config.py,sha256=16ld7aBTgO3gGhvFs-_yzwqPsatdCAiKYi005_2evZU,93096
80
79
  pyegeria/create_tech_guid_lists.py,sha256=jClpvURy20o4UV83LOwhGg3TZdHGzfjZ9y0MNZyG2To,4282
@@ -82,7 +81,7 @@ pyegeria/feedback_manager_omvs.py,sha256=I-Qn7IcrJ5FiSjaC8dIwOmBF8XOCsjl88Anq1xN
82
81
  pyegeria/full_omag_server_config.py,sha256=l4G0oM6l-axosYACypqNqzkF6wELzs9FgKJwvDMF0Fc,45817
83
82
  pyegeria/glossary_browser_omvs.py,sha256=nUCDSQ8cw8vuYgjfcaj1zLIefVI5j51evxPyXCIc4X8,101716
84
83
  pyegeria/glossary_manager_omvs.py,sha256=MsvsTyyTzLbaIQttfhM-izVP06VsdWAueJiiMeKbVwY,128512
85
- pyegeria/mermaid_utilities.py,sha256=mcrzDiA3bTf1kJDNiuAv2gS5LSsgD_LafMvyaHlbqMA,8292
84
+ pyegeria/mermaid_utilities.py,sha256=-0u2_rR4QTUU7hDFxNam-T5zRWMJOKSHzbW_2gUgMsM,8251
86
85
  pyegeria/my_profile_omvs.py,sha256=eVYzwgKM0kanDuSpMPpcXP0cJcT_nRsIGmSBdZztDp4,42124
87
86
  pyegeria/platform_services.py,sha256=T2UiAl7tPfOBGL_H2b73XyyHtR0Y36irgbaljZTjD4I,41808
88
87
  pyegeria/project_manager_omvs.py,sha256=RRPiyEqrcMY3jt3wK-7aEwY3c3PqEodAfDjEJx9duX0,77121
@@ -92,8 +91,8 @@ pyegeria/server_operations.py,sha256=1z2wZLdrNZG6HlswY_Eh8qI1mlcjsQ59zO-AMy9XbUU
92
91
  pyegeria/tech_guids_31-08-2024 14:33.py,sha256=B3fytBw9dmjnlEaCKgt6oQoGh-8HUBG0mFQeyDoUEYQ,6229
93
92
  pyegeria/utils.py,sha256=pkVmS3RrbjaS9yz7FtOCwaOfV5FMqz-__Rt5koCnd9c,5374
94
93
  pyegeria/valid_metadata_omvs.py,sha256=aisdRodIwJSkyArAzfm_sEnBELh69xE8k4Nea-vHu8M,36745
95
- pyegeria-0.7.45.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
96
- pyegeria-0.7.45.dist-info/METADATA,sha256=m4_JeEUG9VM73yuYTXhEHrCVV3J0VqJT5IjfIRMkmuI,2818
97
- pyegeria-0.7.45.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
98
- pyegeria-0.7.45.dist-info/entry_points.txt,sha256=5Q9bDxIqPgdhd3lDnzdRSCYy9hZtNm_BL49bcmbBpGQ,3808
99
- pyegeria-0.7.45.dist-info/RECORD,,
94
+ pyegeria-0.7.45.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
95
+ pyegeria-0.7.45.1.dist-info/METADATA,sha256=wA_h9W4kOcyjkUxwT_gjUObpa17ghchTpUNNsFQcYrM,2820
96
+ pyegeria-0.7.45.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
97
+ pyegeria-0.7.45.1.dist-info/entry_points.txt,sha256=5Q9bDxIqPgdhd3lDnzdRSCYy9hZtNm_BL49bcmbBpGQ,3808
98
+ pyegeria-0.7.45.1.dist-info/RECORD,,
@@ -1,162 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- SPDX-Lic
4
- ense-Identifier: Apache-2.0
5
- Copyright Contributors to the ODPi Egeria project.
6
-
7
- Unit tests for the Utils helper functions using the Pytest framework.
8
-
9
-
10
- A simple display for archives
11
- """
12
- import argparse
13
- import json
14
- import os
15
- import time, datetime
16
-
17
- from rich import box
18
- from rich import print
19
- from rich.console import Console
20
- from rich.prompt import Prompt
21
- from rich.table import Table
22
-
23
- from pyegeria import (
24
- InvalidParameterException,
25
- PropertyServerException,
26
- UserNotAuthorizedException,
27
- print_exception_response,
28
- )
29
- from pyegeria import ProjectManager, ClassificationManager
30
-
31
- EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
32
- EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
33
- EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
34
- EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
35
- EGERIA_VIEW_SERVER_URL = os.environ.get(
36
- "EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
37
- )
38
- EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
39
- EGERIA_INTEGRATION_DAEMON_URL = os.environ.get(
40
- "EGERIA_INTEGRATION_DAEMON_URL", "https://localhost:9443"
41
- )
42
- EGERIA_ADMIN_USER = os.environ.get("ADMIN_USER", "garygeeke")
43
- EGERIA_ADMIN_PASSWORD = os.environ.get("ADMIN_PASSWORD", "secret")
44
- EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
45
- EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
46
- EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
47
- EGERIA_WIDTH = int(os.environ.get("EGERIA_WIDTH", "200"))
48
-
49
-
50
- def display_archive_list(
51
- server: str,
52
- url: str,
53
- username: str,
54
- user_pass: str,
55
- save_output: bool,
56
- jupyter: bool = EGERIA_JUPYTER,
57
- width: int = EGERIA_WIDTH,
58
- ):
59
- c_client = ClassificationManager(server, url, user_id=username)
60
- token = c_client.create_egeria_bearer_token(username, user_pass)
61
-
62
- def generate_table() -> Table:
63
- """Make a new table."""
64
- table = Table(
65
- title=f"Project List: Egeria Archvies @ {time.asctime()}",
66
- header_style="white on dark_blue",
67
- show_lines=True,
68
- box=box.ROUNDED,
69
- caption=f"Archive list for Server '{server}' @ Platform - {url}",
70
- expand=True,
71
- )
72
-
73
- table.add_column("Name")
74
- table.add_column("Path Name")
75
- table.add_column("Creation Date")
76
- # table.add_column("Creator")
77
- # table.add_column("Description")
78
-
79
- open_metadata_type_name = None
80
- property_value = "omarchive"
81
- property_names = ["fileExtension"]
82
- archives = c_client.get_elements_by_property_value(
83
- property_value, property_names, open_metadata_type_name
84
- )
85
-
86
- if type(archives) != list:
87
- raise ValueError("--> No archives found")
88
- else:
89
- sorted_archives = sorted(
90
- archives, key=lambda k: k["properties"].get("name", "---")
91
- )
92
-
93
- for archive in sorted_archives:
94
- name = archive["properties"].get("name", "---")
95
- path_name = archive["properties"].get("pathName", "---")
96
- creation_date_epoch = (
97
- int(archive["properties"].get("storeCreateTime", 0)) / 1000
98
- )
99
- create_date = datetime.datetime.fromtimestamp(creation_date_epoch)
100
- creator = "---"
101
- description = "---"
102
-
103
- table.add_row(
104
- name, path_name, create_date.strftime("%Y-%m-%d %H:%M:%S")
105
- )
106
-
107
- return table
108
-
109
- try:
110
- # with Live(generate_table(), refresh_per_second=4, screen=True) as live:
111
- # while True:
112
- # time.sleep(2)
113
- # live.update(generate_table())
114
- console = Console(
115
- record=True, width=width, force_terminal=not jupyter, soft_wrap=True
116
- )
117
- with console.pager():
118
- console.print(generate_table(), soft_wrap=True)
119
- if save_output:
120
- console.save_html("archives.html")
121
-
122
- except (
123
- InvalidParameterException,
124
- PropertyServerException,
125
- UserNotAuthorizedException,
126
- ValueError,
127
- ) as e:
128
- if type(e) is str:
129
- print(e)
130
- else:
131
- print_exception_response(e)
132
- except KeyboardInterrupt:
133
- pass
134
- finally:
135
- c_client.close_session()
136
-
137
-
138
- def main():
139
- parser = argparse.ArgumentParser()
140
- parser.add_argument("--server", help="Name of the server to display status for")
141
- parser.add_argument("--url", help="URL Platform to connect to")
142
- parser.add_argument("--userid", help="User Id")
143
- parser.add_argument("--save-output", help="Save output to file?")
144
- parser.add_argument("--password", help="User Password")
145
- # parser.add_argument("--sponsor", help="Name of sponsor to search")
146
- args = parser.parse_args()
147
-
148
- server = args.server if args.server is not None else EGERIA_VIEW_SERVER
149
- url = args.url if args.url is not None else EGERIA_PLATFORM_URL
150
- userid = args.userid if args.userid is not None else EGERIA_USER
151
- user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
152
-
153
- try:
154
- save_output = args.save_output if args.save_output is not None else False
155
- display_archive_list(server, url, userid, user_pass, save_output)
156
-
157
- except KeyboardInterrupt:
158
- pass
159
-
160
-
161
- if __name__ == "__main__":
162
- main()