pyegeria 0.5.8.23__tar.gz → 0.5.8.25__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 (78) hide show
  1. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/PKG-INFO +1 -1
  2. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/catalog_user/list_glossary.py +30 -33
  3. pyegeria-0.5.8.25/examples/widgets/cli/egeria_my.py +140 -0
  4. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/cli/egeria_tech.py +13 -5
  5. {pyegeria-0.5.8.23/examples/widgets/personal_organizer → pyegeria-0.5.8.25/examples/widgets/personal}/list_my_profile.py +5 -2
  6. {pyegeria-0.5.8.23/examples/widgets/personal_organizer → pyegeria-0.5.8.25/examples/widgets/personal}/monitor_my_todos.py +9 -3
  7. {pyegeria-0.5.8.23/examples/widgets/personal_organizer → pyegeria-0.5.8.25/examples/widgets/personal}/monitor_open_todos.py +11 -4
  8. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/tech/list_registered_services.py +1 -1
  9. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/tech/list_tech_templates.py +1 -1
  10. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/pyproject.toml +9 -9
  11. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/LICENSE +0 -0
  12. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/README.md +0 -0
  13. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/doc_samples/Create_Collection_Sample.py +0 -0
  14. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/doc_samples/Create_Sustainability_Collection_Sample.py +0 -0
  15. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/catalog_user/README.md +0 -0
  16. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/catalog_user/__init__.py +0 -0
  17. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/catalog_user/get_asset_graph.py +0 -0
  18. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/catalog_user/get_collection.py +0 -0
  19. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/catalog_user/get_tech_type_elements.py +0 -0
  20. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/catalog_user/get_tech_type_template.py +0 -0
  21. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/catalog_user/list_assets.py +0 -0
  22. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/catalog_user/list_projects.py +0 -0
  23. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/catalog_user/list_tech_types.py +0 -0
  24. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/catalog_user/list_todos.py +0 -0
  25. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/cli/__init__.py +0 -0
  26. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/cli/egeria_cat.py +0 -0
  27. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/cli/egeria_ops.py +0 -0
  28. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/cli/ops_config.py +0 -0
  29. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/operational/README.md +0 -0
  30. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/operational/__init__.py +0 -0
  31. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/operational/engine_actions.py +0 -0
  32. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/operational/integration_daemon_actions.py +0 -0
  33. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/operational/list_catalog_targets.py +0 -0
  34. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/operational/load_archive.py +0 -0
  35. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/operational/monitor_asset_events.py +0 -0
  36. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/operational/monitor_coco_status.py +0 -0
  37. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/operational/monitor_engine_activity.py +0 -0
  38. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/operational/monitor_gov_eng_status.py +0 -0
  39. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/operational/monitor_integ_daemon_status.py +0 -0
  40. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/operational/monitor_platform_status.py +0 -0
  41. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/operational/monitor_server_list.py +0 -0
  42. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/operational/monitor_server_status.py +0 -0
  43. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/operational/refresh_integration_daemon.py +0 -0
  44. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/operational/restart_integration_daemon.py +0 -0
  45. {pyegeria-0.5.8.23/examples/widgets/personal_organizer → pyegeria-0.5.8.25/examples/widgets/personal}/README.md +0 -0
  46. {pyegeria-0.5.8.23/examples/widgets/personal_organizer → pyegeria-0.5.8.25/examples/widgets/personal}/__init__.py +0 -0
  47. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/tech/README.md +0 -0
  48. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/tech/__init__.py +0 -0
  49. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/tech/get_guid_info.py +0 -0
  50. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/tech/get_tech_details.py +0 -0
  51. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/tech/list_asset_types.py +0 -0
  52. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/tech/list_relationship_types.py +0 -0
  53. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/examples/widgets/tech/list_valid_metadata_values.py +0 -0
  54. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/pyegeria/Xfeedback_manager_omvs.py +0 -0
  55. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/pyegeria/Xloaded_resources_omvs.py +0 -0
  56. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/pyegeria/__init__.py +0 -0
  57. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/pyegeria/_client.py +0 -0
  58. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/pyegeria/_deprecated_gov_engine.py +0 -0
  59. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/pyegeria/_exceptions.py +0 -0
  60. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/pyegeria/_globals.py +0 -0
  61. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/pyegeria/_validators.py +0 -0
  62. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/pyegeria/action_author_omvs.py +0 -0
  63. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/pyegeria/asset_catalog_omvs.py +0 -0
  64. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/pyegeria/automated_curation_omvs.py +0 -0
  65. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/pyegeria/collection_manager_omvs.py +0 -0
  66. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/pyegeria/core_omag_server_config.py +0 -0
  67. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/pyegeria/create_tech_guid_lists.py +0 -0
  68. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/pyegeria/full_omag_server_config.py +0 -0
  69. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/pyegeria/glossary_browser_omvs.py +0 -0
  70. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/pyegeria/glossary_manager_omvs.py +0 -0
  71. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/pyegeria/my_profile_omvs.py +0 -0
  72. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/pyegeria/platform_services.py +0 -0
  73. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/pyegeria/project_manager_omvs.py +0 -0
  74. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/pyegeria/registered_info.py +0 -0
  75. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/pyegeria/runtime_manager_omvs.py +0 -0
  76. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/pyegeria/server_operations.py +0 -0
  77. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/pyegeria/utils.py +0 -0
  78. {pyegeria-0.5.8.23 → pyegeria-0.5.8.25}/pyegeria/valid_metadata_omvs.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyegeria
3
- Version: 0.5.8.23
3
+ Version: 0.5.8.25
4
4
  Summary: A python client for Egeria
5
5
  Home-page: https://github.com/odpi/egeria-python
6
6
  License: Apache 2.0
@@ -8,28 +8,23 @@ Unit tests for the Utils helper functions using the Pytest framework.
8
8
 
9
9
  A simple display for glossary terms
10
10
  """
11
+ import argparse
11
12
  import os
12
13
  import time
13
- import json
14
- import argparse
14
+
15
+ from rich import box
16
+ from rich.console import Console
17
+ from rich.prompt import Prompt
18
+ from rich.table import Table
19
+ from rich.text import Text
20
+
15
21
  from pyegeria import (
16
22
  InvalidParameterException,
17
23
  PropertyServerException,
18
24
  UserNotAuthorizedException,
19
- print_exception_response,
20
25
  )
21
- from rich.table import Table
22
- from rich.live import Live
23
- from rich import box
24
- from rich.prompt import Prompt
25
- from rich.tree import Tree
26
- from rich import print
27
- from rich.console import Console
28
-
29
-
30
- from pyegeria.server_operations import ServerOps
31
- from pyegeria._deprecated_gov_engine import GovEng
32
26
  from pyegeria.glossary_browser_omvs import GlossaryBrowser
27
+
33
28
  disable_ssl_warnings = True
34
29
 
35
30
  EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
@@ -47,18 +42,17 @@ EGERIA_WIDTH = int(os.environ.get('EGERIA_WIDTH', '200'))
47
42
 
48
43
 
49
44
  def display_glossary_terms(search_string: str, guid: str, server: str, url: str, username: str, user_password: str,
50
- jupyter: bool = EGERIA_JUPYTER, width: int = EGERIA_WIDTH ):
51
-
45
+ jupyter: bool = EGERIA_JUPYTER, width: int = EGERIA_WIDTH):
52
46
  g_client = GlossaryBrowser(server, url)
53
47
  token = g_client.create_egeria_bearer_token(username, user_password)
54
48
 
55
- def generate_table(search_string:str = '*') -> Table:
49
+ def generate_table(search_string: str = '*') -> Table:
56
50
  """Make a new table."""
57
51
  table = Table(
58
52
  title=f"Glossary Definitions for Terms like {search_string} @ {time.asctime()}",
59
- style="bold white on black",
60
- row_styles=["bold white on black"],
61
- header_style="white on dark_blue",
53
+ style="bright_white on black",
54
+ # row_styles="bright_white on black",
55
+ header_style="bright_white on dark_blue",
62
56
  title_style="bold white on black",
63
57
  caption_style="white on black",
64
58
  show_lines=True,
@@ -73,25 +67,25 @@ def display_glossary_terms(search_string: str, guid: str, server: str, url: str,
73
67
  table.add_column("Summary")
74
68
  table.add_column("Description")
75
69
 
76
- terms = g_client.find_glossary_terms(search_string, guid, starts_with=True,
70
+ terms = g_client.find_glossary_terms(search_string, guid, starts_with=False,
77
71
  ends_with=False, status_filter=[], page_size=500)
72
+ style = "bright_white on black"
78
73
  if type(terms) is str:
79
74
  return table
80
75
 
81
76
  for term in terms:
82
- props = term.get("glossaryTermProperties","None")
77
+ props = term.get("glossaryTermProperties", "None")
83
78
  if props == "None":
84
79
  return table
85
80
 
86
- display_name = props["displayName"]
87
- qualified_name = props["qualifiedName"]
88
- abbrev = props.get("abbreviation"," ")
89
- summary = props.get("summary", " ")
90
- description = props.get("description", " ")
91
-
81
+ display_name = Text(props["displayName"], style=style)
82
+ qualified_name = Text(props["qualifiedName"], style=style)
83
+ abbrev = Text(props.get("abbreviation", " "), style=style)
84
+ summary = Text(props.get("summary", " "), style=style)
85
+ description = Text(props.get("description", " "), style=style)
92
86
 
93
87
  table.add_row(
94
- display_name,qualified_name, abbrev, summary, description, style="bold white on black"
88
+ display_name, qualified_name, abbrev, summary, description, style="bold white on black"
95
89
  )
96
90
 
97
91
  g_client.close_session()
@@ -102,7 +96,7 @@ def display_glossary_terms(search_string: str, guid: str, server: str, url: str,
102
96
  # while True:
103
97
  # time.sleep(2)
104
98
  # live.update(generate_table(search_string))
105
- console = Console(style="bold white on black", width=width, force_terminal=not jupyter)
99
+ console = Console(style="bold bright_white on black", width=width, force_terminal=not jupyter)
106
100
  with console.pager(styles=True):
107
101
  console.print(generate_table(search_string))
108
102
 
@@ -110,6 +104,7 @@ def display_glossary_terms(search_string: str, guid: str, server: str, url: str,
110
104
  except (InvalidParameterException, PropertyServerException, UserNotAuthorizedException) as e:
111
105
  console.print_exception()
112
106
 
107
+
113
108
  def main():
114
109
  sus_guid = "f9b78b26-6025-43fa-9299-a905cc6d1575"
115
110
  parser = argparse.ArgumentParser()
@@ -126,12 +121,14 @@ def main():
126
121
  userid = args.userid if args.userid is not None else EGERIA_USER
127
122
  user_pass = args.password if args.password is not None else EGERIA_USER_PASSWORD
128
123
  guid = args.guid if args.guid is not None else None
129
- guid = sus_guid if args.sustainability else None
124
+ guid = sus_guid if args.sustainability else None
130
125
 
131
126
  try:
132
127
  search_string = Prompt.ask("Enter the term you are searching for:", default="*")
133
- display_glossary_terms(search_string, guid,server, url, userid, user_pass)
128
+ display_glossary_terms(search_string, guid, server, url, userid, user_pass)
134
129
  except(KeyboardInterrupt):
135
130
  pass
131
+
132
+
136
133
  if __name__ == "__main__":
137
- main()
134
+ main()
@@ -0,0 +1,140 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ SPDX-License-Identifier: Apache-2.0
4
+ Copyright Contributors to the ODPi Egeria project.
5
+
6
+
7
+ A command line interface for Egeria Users - of individual relevance
8
+
9
+ This is an emerging capability based on the **click** package. Feedback welcome!
10
+
11
+ """
12
+ import click
13
+ from trogon import tui
14
+
15
+ from examples.widgets.cli.ops_config import Config
16
+
17
+ from examples.widgets.personal.monitor_open_todos import display_todos
18
+ from examples.widgets.personal.monitor_my_todos import display_my_todos
19
+ from examples.widgets.personal.list_my_profile import display_my_profiles
20
+
21
+
22
+
23
+ # class Config(object):
24
+ # def __init__(self, server: str = None, url: str = None, userid:str = None, password:str = None,
25
+ # timeout:int = 30, paging: bool = False):
26
+ # self.server = server
27
+ # self.url = url
28
+ # self.userid = userid
29
+ # self.password = password
30
+ # self.timeout = timeout
31
+ # self.paging = paging
32
+ #
33
+ #
34
+ # pass_config = click.make_pass_decorator(Config)
35
+
36
+ # @tui
37
+ @tui('menu', 'menu', 'A textual command line interface')
38
+ @click.version_option("0.0.1", prog_name="egeria_ops")
39
+ @click.group()
40
+ @click.option('--server', default='active-metadata-store', envvar='EGERIA_METADATA_STORE',
41
+ help='Egeria metadata store to work with')
42
+ @click.option('--url', default='https://localhost:9443', envvar='EGERIA_PLATFORM_URL',
43
+ help='URL of Egeria metadata store platform to connect to')
44
+ @click.option('--integration-daemon', default='integration-daemon', envvar='EGERIA_INTEGRATION_DAEMON',
45
+ help='Egeria integration daemon to work with')
46
+ @click.option('--integration_daemon_url', default='https://localhost:9443', envvar='EGERIA_INTEGRATION_DAEMON_URL',
47
+ help='URL of Egeria integration daemon platform to connect to')
48
+ @click.option('--view_server', default='view-server', envvar='EGERIA_VIEW_SERVER',
49
+ help='Egeria view server to work with')
50
+ @click.option('--view_server_url', default='https://localhost:9443', envvar='EGERIA_VIEW_SERVER_URL',
51
+ help='URL of Egeria view server platform to connect to')
52
+ @click.option('--engine_host', default='engine-host', envvar='EGERIA_ENGINE_HOST',
53
+ help='Egeria engine host to work with')
54
+ @click.option('--engine_host_url', default='https://localhost:9443', envvar='EGERIA_ENGINE_HOST_URL',
55
+ help='URL of Egeria engine host platform to connect to')
56
+ @click.option('--admin_user', default='garygeeke', envvar='EGERIA_ADMIN_USER', help='Egeria admin user')
57
+ @click.option('--admin_user_password', default='secret', envvar='EGERIA_ADMIN_PASSWORD',
58
+ help='Egeria admin password')
59
+ @click.option('--userid', default='garygeeke', envvar='EGERIA_USER', help='Egeria user')
60
+ @click.option('--password', default='secret', envvar='EGERIA_PASSWORD',
61
+ help='Egeria user password')
62
+ @click.option('--timeout', default=60, help='Number of seconds to wait')
63
+ @click.option('--verbose', is_flag=True, default=False, help='Enable verbose mode')
64
+ @click.option('--paging', is_flag=True, default=False, help='Enable paging snapshots vs live updates')
65
+ @click.option('--jupyter', is_flag=True, default=False, envvar='EGERIA_JUPYTER',
66
+ help='Enable for rendering in a Jupyter terminal')
67
+ @click.option('--width', default=200, envvar='EGERIA_WIDTH', help='Screen width, in characters, to use')
68
+ @click.pass_context
69
+ def cli(ctx, server, url, view_server, view_server_url, integration_daemon, integration_daemon_url,
70
+ engine_host, engine_host_url, admin_user, admin_user_password, userid, password, timeout, paging,
71
+ verbose, jupyter, width):
72
+ """An Egeria Command Line interface for Operations """
73
+ ctx.obj = Config(server, url, view_server, view_server_url, integration_daemon,
74
+ integration_daemon_url, engine_host, engine_host_url,
75
+ admin_user, admin_user_password, userid, password,
76
+ timeout, paging, verbose, jupyter, width)
77
+ ctx.max_content_width = 200
78
+ ctx.ensure_object(Config)
79
+ if verbose:
80
+ click.echo(f"we are in verbose mode - server is {server}")
81
+
82
+
83
+ @cli.group("show")
84
+ @click.pass_context
85
+ def show(ctx):
86
+ """Display an Egeria Object"""
87
+ pass
88
+
89
+
90
+ @show.command('my-profile')
91
+ @click.pass_context
92
+ def show_my_profile(ctx):
93
+ """Display my profiles
94
+
95
+ Usage: show my-profile
96
+
97
+ """
98
+ c = ctx.obj
99
+ display_my_profiles( c.view_server, c.view_server_url,
100
+ c.userid, c.password, c.jupyter, c.width)
101
+
102
+
103
+ @show.command('my-to-dos')
104
+ @click.pass_context
105
+ def show_my_todos(ctx):
106
+ """Show my To-Dos
107
+
108
+ Usage: show my-to-dos
109
+
110
+ """
111
+ c = ctx.obj
112
+ display_my_todos(c.view_server, c.view_server_url,
113
+ c.userid, c.password, c.jupyter, c.width)
114
+
115
+
116
+ @show.command('open-to-dos')
117
+ @click.pass_context
118
+ def show_open_todos(ctx):
119
+ """Display a live status view of Egeria servers for the specified Egeria platform
120
+
121
+ Usage: show tech-details <tech-name>
122
+
123
+ tech-name is a valid technology name (see 'show tech-types')
124
+ """
125
+ c = ctx.obj
126
+ display_todos( c.view_server, c.view_server_url, c.userid, c.password, c.jupyter, c.width)
127
+
128
+ #
129
+ # Tell
130
+ #
131
+
132
+ @cli.group('tell')
133
+ @click.pass_context
134
+ def tell(ctx):
135
+ """Perform actions an Egeria Objects"""
136
+ pass
137
+
138
+
139
+ if __name__ == '__main__':
140
+ cli()
@@ -108,12 +108,20 @@ def show_guid_infos(ctx, guid):
108
108
 
109
109
 
110
110
  @show.command('tech-types')
111
- @click.option('--tech_type', default='*', help='Tech type to search for')
111
+ @click.option('--search-string', default='*', help='Tech type to search for')
112
112
  @click.pass_context
113
- def show_tech_types(ctx, tech_type):
114
- """List deployed technology types"""
113
+ def show_tech_types(ctx, search_string):
114
+ """List deployed technology types
115
+
116
+ Usage: show tech-types <optional search-string>
117
+
118
+ All tech-types will be returned if no search-string is specified.
119
+
120
+ """
121
+
122
+
115
123
  c = ctx.obj
116
- display_tech_types(tech_type, c.view_server, c.view_server_url,
124
+ display_tech_types(search_string, c.view_server, c.view_server_url,
117
125
  c.userid, c.password)
118
126
 
119
127
 
@@ -148,7 +156,7 @@ def show_asset_types(ctx):
148
156
  case_sensitive=False), default='all', help='Which service group to display')
149
157
  @click.pass_context
150
158
  def show_registered_services(ctx, services):
151
- """Show information about a registered servicese"""
159
+ """Show information about a registered services"""
152
160
  c = ctx.obj
153
161
  display_registered_svcs(services, c.view_server, c.view_server_url,
154
162
  c.userid, c.password, c.jupyter, c.width)
@@ -37,8 +37,11 @@ EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
37
37
  EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
38
38
  EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
39
39
  EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
40
+ EGERIA_JUPYTER = bool(os.environ.get('EGERIA_JUPYTER', 'False'))
41
+ EGERIA_WIDTH = int(os.environ.get('EGERIA_WIDTH', '200'))
40
42
 
41
- def display_my_profiles(server: str, url: str, username: str, user_pass:str):
43
+ def display_my_profiles(server: str, url: str, username: str, user_pass:str,
44
+ jupyter:bool=EGERIA_JUPYTER, width:int = EGERIA_WIDTH):
42
45
 
43
46
  m_client = MyProfile(server, url, user_id=username, user_pwd=user_pass)
44
47
  token = m_client.create_egeria_bearer_token(username, user_pass)
@@ -102,7 +105,7 @@ def display_my_profiles(server: str, url: str, username: str, user_pass:str):
102
105
  # while True:
103
106
  # time.sleep(2)
104
107
  # live.update(generate_table())
105
- console = Console()
108
+ console = Console(width=width, force_terminal=not jupyter)
106
109
  with console.pager():
107
110
  console.print(generate_table())
108
111
 
@@ -15,6 +15,7 @@ import time
15
15
  from rich import box
16
16
  from rich.live import Live
17
17
  from rich.table import Table
18
+ from rich.console import Console
18
19
 
19
20
  from pyegeria import (
20
21
  InvalidParameterException,
@@ -35,11 +36,17 @@ EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
35
36
  EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
36
37
  EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
37
38
  EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
39
+ EGERIA_JUPYTER = bool(os.environ.get('EGERIA_JUPYTER', 'False'))
40
+ EGERIA_WIDTH = int(os.environ.get('EGERIA_WIDTH', '200'))
38
41
 
39
42
  disable_ssl_warnings = True
40
43
 
41
44
 
42
- def display_todos(server: str, url: str, user: str, user_pass:str):
45
+ def display_my_todos(server: str, url: str, user: str, user_pass:str,
46
+ jupyter:bool=EGERIA_JUPYTER, width:int = EGERIA_WIDTH):
47
+
48
+ console = Console(width=width, force_terminal=not jupyter)
49
+
43
50
  m_client = MyProfile(server, url, user_id=user)
44
51
  token = m_client.create_egeria_bearer_token(user, user_pass)
45
52
 
@@ -131,7 +138,6 @@ def display_todos(server: str, url: str, user: str, user_pass:str):
131
138
  while True:
132
139
  time.sleep(2)
133
140
  live.update(generate_table())
134
- live.console.pager()
135
141
 
136
142
  except (InvalidParameterException, PropertyServerException, UserNotAuthorizedException) as e:
137
143
  print_exception_response(e)
@@ -156,7 +162,7 @@ def main():
156
162
 
157
163
  try:
158
164
  print(f"Starting display_todos with {server}, {url}, {userid}")
159
- display_todos(server=server, url=url, user=userid, user_pass=user_pass)
165
+ display_my_todos(server=server, url=url, user=userid, user_pass=user_pass)
160
166
  except KeyboardInterrupt:
161
167
  pass
162
168
 
@@ -15,7 +15,7 @@ import sys
15
15
  from rich import box
16
16
  from rich.live import Live
17
17
  from rich.table import Table
18
- from rich import console
18
+ from rich.console import Console
19
19
 
20
20
  from pyegeria._exceptions import (
21
21
  InvalidParameterException,
@@ -38,18 +38,25 @@ EGERIA_ADMIN_USER = os.environ.get('ADMIN_USER', 'garygeeke')
38
38
  EGERIA_ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'secret')
39
39
  EGERIA_USER = os.environ.get('EGERIA_USER', 'erinoverview')
40
40
  EGERIA_USER_PASSWORD = os.environ.get('EGERIA_USER_PASSWORD', 'secret')
41
+ EGERIA_JUPYTER = bool(os.environ.get('EGERIA_JUPYTER', 'False'))
42
+ EGERIA_WIDTH = int(os.environ.get('EGERIA_WIDTH', '200'))
41
43
 
42
44
 
43
- def display_todos(server: str , url: str, user: str, user_pass:str):
45
+ def display_todos(server: str , url: str, user: str, user_pass:str,
46
+ jupyter:bool=EGERIA_JUPYTER, width:int = EGERIA_WIDTH):
47
+
48
+ console = Console(width=width, force_terminal=not jupyter)
49
+
44
50
  m_client = MyProfile(server, url, user_id=user)
45
51
  token = m_client.create_egeria_bearer_token(user, user_pass)
46
52
 
47
53
  def generate_table(search_string:str = '*') -> Table:
48
54
  """Make a new table."""
49
55
  table = Table(
56
+ header_style="bright_white on dark_blue",
57
+ title_style="bold white on black",
58
+ caption_style="white on black",
50
59
  title=f"Open ToDos for Platform {url} @ {time.asctime()}",
51
- # style = "black on grey66",
52
- header_style="white on dark_blue",
53
60
  show_lines=True,
54
61
  box=box.ROUNDED,
55
62
  caption=f"ToDos for Server '{server}' @ Platform - {url}",
@@ -79,7 +79,7 @@ def display_registered_svcs(service: str, server: str, url: str,
79
79
  table.add_column("Service Development Status")
80
80
  table.add_column("URL Marker")
81
81
  table.add_column("Description")
82
- table.add_column("Wiki")
82
+ table.add_column("Wiki",no_wrap=True)
83
83
  table.add_column("Server Type")
84
84
  table.add_column("Partner Service Name")
85
85
  table.add_column("Partner Service Type")
@@ -51,7 +51,7 @@ def display_tech_templates(search_string:str, server: str,
51
51
  style="bold bright_white on black",
52
52
  row_styles=["bold bright_white on black"],
53
53
  header_style="white on dark_blue",
54
- title_style="bold white on black",
54
+ title_style="bold bright_white on black",
55
55
  caption_style="white on black",
56
56
  show_lines=True,
57
57
  box=box.ROUNDED,
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pyegeria"
3
- version = "0.5.8.23"
3
+ version = "0.5.8.25"
4
4
  license = 'Apache 2.0'
5
5
  authors = ["Dan Wolfson <dan.wolfson@pdr-associates.com>"]
6
6
  readme = "README.md"
@@ -19,7 +19,7 @@ packages = [
19
19
  { include = "examples/widgets/catalog_user" },
20
20
  { include = "examples/widgets/tech" },
21
21
  { include = "examples/widgets/operational"},
22
- { include = "examples/widgets/personal_organizer"},
22
+ { include = "examples/widgets/personal"},
23
23
  { include = "examples/doc_samples"},
24
24
  { include = "examples/widgets/cli"}
25
25
  ]
@@ -77,17 +77,17 @@ pytest = "^8.2.2"
77
77
  load_archive_tui = "examples.widgets.operational.load_archive:tui"
78
78
  list_catalog_targets = "examples.widgets.operational.list_catalog_targets:main"
79
79
 
80
- list_my_profile = "examples.widgets.personal_organizer.list_my_profile:main"
81
-
82
- monitor_open_todos = "examples.widgets.personal_organizer.monitor_open_todos:main"
83
- monitor_my_todos = "examples.widgets.personal_organizer.monitor_my_todos:main"
80
+ list_my_profile = "examples.widgets.personal.list_my_profile:main"
81
+ monitor_open_todos = "examples.widgets.personal.monitor_open_todos:main"
82
+ monitor_my_todos = "examples.widgets.personal.monitor_my_todos:main"
84
83
 
85
84
  egeria_ops = "examples.widgets.cli.egeria_ops:cli"
86
- egeria_ops_menu = "examples.widgets.cli.egeria_ops:menu"
85
+ # egeria_ops_menu = "examples.widgets.cli.egeria_ops:menu"
87
86
  egeria_cat = "examples.widgets.cli.egeria_cat:cli"
88
- egeria_cat_menu = "examples.widgets.cli.egeria_cat:menu"
87
+ # egeria_cat_menu = "examples.widgets.cli.egeria_cat:menu"
89
88
  egeria_tech = "examples.widgets.cli.egeria_cat:cli"
90
- egeria_tech_menu = "examples.widgets.cli.egeria_cat:menu"
89
+ # egeria_tech_menu = "examples.widgets.cli.egeria_cat:menu"
90
+ egeria_my = "examples.widgets.cli.egeria_my:cli"
91
91
 
92
92
  get_guid_info = "examples.widgets.tech.get_guid_info:main"
93
93
  get_tech_details = "examples.widgets.tech.get_tech_details:main"
File without changes
File without changes