pyegeria 0.8.4.12__py3-none-any.whl → 0.8.4.16__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.
@@ -79,7 +79,7 @@ def display_gov_eng_status(
79
79
  caption=f"Server: '{server_name}' running on {url}",
80
80
  expand=True,
81
81
  )
82
- # table.footer: f"Server {server_name} on Platform {good_platform1_url}"
82
+ # table.footer: f"Server {view_server} on Platform {good_platform1_url}"
83
83
  table.add_column("Gov Engine")
84
84
  table.add_column("Gov Engine Type")
85
85
  table.add_column("Gov Engine Desc")
pyegeria/_validators.py CHANGED
@@ -103,7 +103,7 @@ def validate_server_name(server_name: str) -> bool:
103
103
  "exceptionUserAction": OMAGCommonErrorCode.NULL_USER_ID.value[
104
104
  "user_action"
105
105
  ],
106
- "exceptionProperties": {"server_name": server_name},
106
+ "exceptionProperties": {"view_server": server_name},
107
107
  }
108
108
  )
109
109
  raise InvalidParameterException(exc_msg)
@@ -214,8 +214,11 @@ def validate_search_string(search_string: str) -> bool:
214
214
  caller_method = inspect.getframeinfo(calling_frame).function
215
215
 
216
216
  if (search_string is None) or (len(search_string) == 0):
217
- msg = str(OMAGCommonErrorCode.NULL_SEARCH_STRING.value["message_template"].
218
- format('search_string', caller_method))
217
+ msg = str(
218
+ OMAGCommonErrorCode.NULL_SEARCH_STRING.value["message_template"].format(
219
+ "search_string", caller_method
220
+ )
221
+ )
219
222
  exc_msg = json.dumps(
220
223
  {
221
224
  "class": "VoidResponse",
@@ -329,8 +332,8 @@ def validate_url(url: str) -> bool:
329
332
 
330
333
  # The following hack allows localhost to be used as a hostname - which is disallowed by the
331
334
  # validations package
332
- if ('localhost' in url) and ('localhost.' not in url):
333
- url = url.replace('localhost', '127.0.0.1')
335
+ if ("localhost" in url) and ("localhost." not in url):
336
+ url = url.replace("localhost", "127.0.0.1")
334
337
 
335
338
  result = validators.url(url)
336
339
  if result is not True:
@@ -2865,7 +2865,7 @@ class AutomatedCuration(Client):
2865
2865
  # The GUID of the initiated action or "Action not initiated" if the action was not initiated.
2866
2866
  #
2867
2867
  # """
2868
- # server = self.server_name if server is None else server
2868
+ # server = self.view_server if server is None else server
2869
2869
  # url = (f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/governance-action-types/"
2870
2870
  # f"initiate")
2871
2871
  #
@@ -2911,7 +2911,7 @@ class AutomatedCuration(Client):
2911
2911
  # The GUID of the initiated action or "Action not initiated" if the action was not initiated.
2912
2912
  #
2913
2913
  # """
2914
- # server = self.server_name if server is None else server
2914
+ # server = self.view_server if server is None else server
2915
2915
  # url = (f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/governance-action-types/"
2916
2916
  # f"initiate")
2917
2917
  #
@@ -2957,7 +2957,7 @@ class AutomatedCuration(Client):
2957
2957
  # The GUID of the initiated action or "Action not initiated" if the action was not initiated.
2958
2958
  #
2959
2959
  # """
2960
- # server = self.server_name if server is None else server
2960
+ # server = self.view_server if server is None else server
2961
2961
  # url = (f"{self.platform_url}/servers/{server}/api/open-metadata/automated-curation/governance-action-types/"
2962
2962
  # f"initiate")
2963
2963
  #
@@ -97,7 +97,7 @@ class CoreServerConfig(Client):
97
97
  Parameters
98
98
  ----------
99
99
  server_name : str, optional
100
- The name of the server. If not provided, it uses the default server_name from the instance.
100
+ The name of the server. If not provided, it uses the default view_server from the instance.
101
101
 
102
102
  Returns
103
103
  -------
@@ -856,7 +856,7 @@ class CoreServerConfig(Client):
856
856
  Parameters
857
857
  ----------
858
858
  server_name : str, optional
859
- The name of the server. If not provided, the method uses the value stored in `self.server_name`.
859
+ The name of the server. If not provided, the method uses the value stored in `self.view_server`.
860
860
 
861
861
  Returns
862
862
  -------
@@ -1731,7 +1731,7 @@ class CoreServerConfig(Client):
1731
1731
  Parameters
1732
1732
  ----------
1733
1733
  server_name : str, optional
1734
- The name of the server. If not provided, the value from `self.server_name` will be used.
1734
+ The name of the server. If not provided, the value from `self.view_server` will be used.
1735
1735
 
1736
1736
  Returns
1737
1737
  -------
@@ -2273,7 +2273,7 @@ class CoreServerConfig(Client):
2273
2273
  self.make_request("DELETE", url)
2274
2274
 
2275
2275
  def get_integration_groups_config(self, server_name: str = None) -> list | str:
2276
- """Get the Integration Groups configuration server specified by the server_name parameter.
2276
+ """Get the Integration Groups configuration server specified by the view_server parameter.
2277
2277
 
2278
2278
  Parameters
2279
2279
  ----------
pyegeria/egeria_client.py CHANGED
@@ -72,43 +72,43 @@ class Egeria(
72
72
 
73
73
  def __init__(
74
74
  self,
75
- server_name: str,
75
+ view_server: str,
76
76
  platform_url: str,
77
77
  user_id: str,
78
78
  user_pwd: str = None,
79
79
  token: str = None,
80
80
  ):
81
- AssetCatalog.__init__(self, server_name, platform_url, user_id, user_pwd, token)
81
+ AssetCatalog.__init__(self, view_server, platform_url, user_id, user_pwd, token)
82
82
  CollectionManager.__init__(
83
- self, server_name, platform_url, user_id, user_pwd, token
83
+ self, view_server, platform_url, user_id, user_pwd, token
84
84
  )
85
- EgeriaMy.__init__(self, server_name, platform_url, user_id, user_pwd, token)
85
+ EgeriaMy.__init__(self, view_server, platform_url, user_id, user_pwd, token)
86
86
 
87
87
  GlossaryManager.__init__(
88
- self, server_name, platform_url, user_id, user_pwd, token
88
+ self, view_server, platform_url, user_id, user_pwd, token
89
89
  )
90
90
 
91
91
  ProjectManager.__init__(
92
- self, server_name, platform_url, user_id, user_pwd, token
92
+ self, view_server, platform_url, user_id, user_pwd, token
93
93
  )
94
94
 
95
95
  RuntimeManager.__init__(
96
- self, server_name, platform_url, user_id, user_pwd, token=token
96
+ self, view_server, platform_url, user_id, user_pwd, token=token
97
97
  )
98
- ServerOps.__init__(self, server_name, platform_url, user_id, user_pwd)
98
+ ServerOps.__init__(self, view_server, platform_url, user_id, user_pwd)
99
99
 
100
- EgeriaConfig.__init__(self, server_name, platform_url, user_id, user_pwd)
100
+ EgeriaConfig.__init__(self, view_server, platform_url, user_id, user_pwd)
101
101
 
102
- ActionAuthor.__init__(self, server_name, platform_url, user_id, user_pwd, token)
102
+ ActionAuthor.__init__(self, view_server, platform_url, user_id, user_pwd, token)
103
103
  AutomatedCuration.__init__(
104
- self, server_name, platform_url, user_id, user_pwd, token
104
+ self, view_server, platform_url, user_id, user_pwd, token
105
105
  )
106
106
  ClassificationManager.__init__(
107
- self, server_name, platform_url, user_id, user_pwd, token
107
+ self, view_server, platform_url, user_id, user_pwd, token
108
108
  )
109
109
  RegisteredInfo.__init__(
110
- self, server_name, platform_url, user_id, user_pwd, token
110
+ self, view_server, platform_url, user_id, user_pwd, token
111
111
  )
112
112
  ValidMetadataManager.__init__(
113
- self, server_name, platform_url, user_id, user_pwd, token
113
+ self, view_server, platform_url, user_id, user_pwd, token
114
114
  )
@@ -17,7 +17,7 @@ from pyegeria import (
17
17
  EgeriaCat,
18
18
  ValidMetadataManager,
19
19
  AutomatedCuration,
20
- ActionAuthor,
20
+ # ActionAuthor,
21
21
  ClassificationManager,
22
22
  RegisteredInfo,
23
23
  RuntimeManager,
@@ -25,7 +25,7 @@ from pyegeria import (
25
25
 
26
26
 
27
27
  class EgeriaTech(
28
- ActionAuthor,
28
+ # ActionAuthor,
29
29
  AutomatedCuration,
30
30
  EgeriaCat,
31
31
  ClassificationManager,
@@ -57,28 +57,28 @@ class EgeriaTech(
57
57
 
58
58
  def __init__(
59
59
  self,
60
- server_name: str,
60
+ view_server: str,
61
61
  platform_url: str,
62
62
  user_id: str,
63
63
  user_pwd: str = None,
64
64
  token: str = None,
65
65
  ):
66
- # ActionAuthor.__init__(self, server_name, platform_url, user_id, user_pwd, token)
66
+ # ActionAuthor.__init__(self, view_server, platform_url, user_id, user_pwd, token)
67
67
  AutomatedCuration.__init__(
68
- self, server_name, platform_url, user_id, user_pwd, token
68
+ self, view_server, platform_url, user_id, user_pwd, token
69
69
  )
70
- EgeriaCat.__init__(self, server_name, platform_url, user_id, user_pwd, token)
70
+ EgeriaCat.__init__(self, view_server, platform_url, user_id, user_pwd, token)
71
71
  ClassificationManager.__init__(
72
- self, server_name, platform_url, user_id, user_pwd, token
72
+ self, view_server, platform_url, user_id, user_pwd, token
73
73
  )
74
74
  RegisteredInfo.__init__(
75
- self, server_name, platform_url, user_id, user_pwd, token
75
+ self, view_server, platform_url, user_id, user_pwd, token
76
76
  )
77
77
  RuntimeManager.__init__(
78
- self, server_name, platform_url, user_id, user_pwd, token
78
+ self, view_server, platform_url, user_id, user_pwd, token
79
79
  )
80
80
  ValidMetadataManager.__init__(
81
- self, server_name, platform_url, user_id, user_pwd, token
81
+ self, view_server, platform_url, user_id, user_pwd, token
82
82
  )
83
83
 
84
84
 
@@ -1100,7 +1100,7 @@ class FullServerConfig(CoreServerConfig):
1100
1100
  The body of the view service request.
1101
1101
 
1102
1102
  server_name : str, optional
1103
- The name of the server. If not provided, the value of `self.server_name` will be used.
1103
+ The name of the server. If not provided, the value of `self.view_server` will be used.
1104
1104
 
1105
1105
  Returns
1106
1106
  -------
@@ -105,9 +105,8 @@ def generate_process_graph(
105
105
  """
106
106
  console = Console()
107
107
  a_client = AutomatedCuration(view_server, url, user_id, user_pass)
108
+ token = a_client.create_egeria_bearer_token()
108
109
  try:
109
- token = a_client.create_egeria_bearer_token()
110
-
111
110
  start_time = time.perf_counter()
112
111
  response = a_client.get_gov_action_process_graph(process_guid)
113
112
  duration = time.perf_counter() - start_time
@@ -123,6 +122,7 @@ def generate_process_graph(
123
122
  ]
124
123
 
125
124
  md = f"\n---\ntitle: {gov_process_dn}\n---\nflowchart LR\n"
125
+ md += f'%%{init: {"flowchart": {"htmlLabels": false}} }%%\n'
126
126
  element = response["firstProcessStep"]["element"]
127
127
  qname = element["processStepProperties"]["qualifiedName"]
128
128
  dname = element["processStepProperties"]["displayName"]
@@ -134,7 +134,7 @@ def generate_process_graph(
134
134
  ]
135
135
  link = response["firstProcessStep"]["linkGUID"]
136
136
 
137
- md = f'{md}\nStep1[("`**{dname}**\n*nwait_time*: {wait}\n*nmult_trig*: {ignore_mult_trig}`")]'
137
+ md = f'{md}\nStep1("`**{dname}**\n*nwait_time*: {wait}\n*nmult_trig*: {ignore_mult_trig}`")'
138
138
  process_steps = {
139
139
  qname: {
140
140
  "step": "Step1",
@@ -137,7 +137,7 @@ class MyProfile(Client):
137
137
  status: str
138
138
  The status of teh action to filter on. Default value is "OPEN".
139
139
  server_name: str, optional
140
- The name of the server. If not provided, the value of self.server_name will be used.
140
+ The name of the server. If not provided, the value of self.view_server will be used.
141
141
  start_from: int, optional
142
142
  The index from which to start retrieving the assigned actions. Default is 0.
143
143
  page_size: int, optional
@@ -190,7 +190,7 @@ class MyProfile(Client):
190
190
  status: str
191
191
  The status of teh action to filter on. Default value is "OPEN".
192
192
  server_name: str, optional
193
- The name of the server. If not provided, the value of self.server_name will be used.
193
+ The name of the server. If not provided, the value of self.view_server will be used.
194
194
  start_from: int, optional
195
195
  The index from which to start retrieving the assigned actions. Default is 0.
196
196
  page_size: int, optional
@@ -236,7 +236,7 @@ class MyProfile(Client):
236
236
  status: str
237
237
  The status of teh action to filter on. Default value is "OPEN".
238
238
  server_name: str, optional
239
- The name of the server. If not provided, the value of self.server_name will be used.
239
+ The name of the server. If not provided, the value of self.view_server will be used.
240
240
  start_from: int, optional
241
241
  The index from which to start retrieving the assigned actions. Default is 0.
242
242
  page_size: int, optional
@@ -288,7 +288,7 @@ class MyProfile(Client):
288
288
  status: str
289
289
  The status of teh action to filter on. Default value is "OPEN"
290
290
  server_name: str, optional
291
- The name of the server. If not provided, the value of self.server_name will be used.
291
+ The name of the server. If not provided, the value of self.view_server will be used.
292
292
  start_from: int, optional
293
293
  The index from which to start retrieving the assigned actions. Default is 0.
294
294
  page_size: int, optional
@@ -334,7 +334,7 @@ class MyProfile(Client):
334
334
  status: str
335
335
  The status of the action to filter on. Default value is "OPEN".
336
336
  server_name: str, optional
337
- The name of the server. If not provided, the value of self.server_name will be used.
337
+ The name of the server. If not provided, the value of self.view_server will be used.
338
338
  start_from: int, optional
339
339
  The index from which to start retrieving the assigned actions. Default is 0.
340
340
  page_size: int, optional
@@ -385,7 +385,7 @@ class MyProfile(Client):
385
385
  status: str
386
386
  The status of teh action to filter on. Default value is "OPEN".
387
387
  server_name: str, optional
388
- The name of the server. If not provided, the value of self.server_name will be used.
388
+ The name of the server. If not provided, the value of self.view_server will be used.
389
389
  start_from: int, optional
390
390
  The index from which to start retrieving the assigned actions. Default is 0.
391
391
  page_size: int, optional
@@ -884,7 +884,7 @@ class MyProfile(Client):
884
884
  ----------
885
885
  search_string: str
886
886
  String to search against. If '*' then all to-do items will match.
887
- server_name : str, optional
887
+ view_server : str, optional
888
888
  The name of the server where the to-do item will be created. If not provided,
889
889
  the default server name associated with the instance of the class will be used.
890
890
  status: str
@@ -476,7 +476,7 @@ class Platform(Client):
476
476
  ----------
477
477
  server : str, optional
478
478
  The name of the server to check if configured. If not specified, the server name stored in
479
- `self.server_name` will be used.
479
+ `self.view_server` will be used.
480
480
 
481
481
  Returns
482
482
  -------
@@ -500,7 +500,7 @@ class Platform(Client):
500
500
  ----------
501
501
  server : str, optional
502
502
  The name of the server to check if configured. If not specified,
503
- the server name stored in `self.server_name` will be used.
503
+ the server name stored in `self.view_server` will be used.
504
504
 
505
505
  Returns
506
506
  -------
@@ -763,7 +763,7 @@ class ProjectManager(Client):
763
763
  A dict representing the details of the project to create.
764
764
  classification: str, optional
765
765
  An optional project classification. See https://egeria-project.org/types/1/0130-Projects for values.
766
- server_name: str, optional, defaults to None
766
+ view_server: str, optional, defaults to None
767
767
  The name of the server to configure. If not provided, the server name associated with the
768
768
  instance is used.
769
769
 
@@ -828,7 +828,7 @@ class ProjectManager(Client):
828
828
  A dict representing the details of the project to create.
829
829
  classification: str, optional
830
830
  An optional project classification. See https://egeria-project.org/types/1/0130-Projects for values.
831
- server_name: str, optional, defaults to None
831
+ view_server: str, optional, defaults to None
832
832
  The name of the server to configure. If not provided, the server name associated with the instance
833
833
  is used.
834
834
 
@@ -19,7 +19,7 @@ class RegisteredInfo(Client):
19
19
 
20
20
  Parameters:
21
21
  ----------
22
- server_name: str
22
+ view_server: str
23
23
  Name of the server to use.
24
24
  platform_url : str
25
25
  URL of the server platform to connect to