pyegeria 0.7.8__py3-none-any.whl → 0.7.10__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.
@@ -52,8 +52,8 @@ from examples.widgets.tech.list_tech_templates import display_templates_spec
52
52
  from examples.widgets.tech.list_valid_metadata_values import display_metadata_values
53
53
  from examples.widgets.tech.list_elements import list_elements
54
54
 
55
- @tui()
56
- # @tui('menu', 'menu', 'A textual command line interface')
55
+ # @tui()
56
+ @tui('menu', 'menu', 'A textual command line interface')
57
57
  @click.version_option("0.0.1", prog_name="egeria_ops")
58
58
  @click.group()
59
59
  @click.option('--server', default='active-metadata-store', envvar='EGERIA_METADATA_STORE',
@@ -672,7 +672,13 @@ def engine_host(ctx):
672
672
  engine_host.add_command(start_engine_host)
673
673
  engine_host.add_command(stop_engine_host)
674
674
 
675
- tell.add_command(load_archive)
675
+ @tell.group('repository')
676
+ @click.pass_context
677
+ def repository(ctx):
678
+ """Group of commands to a repository"""
679
+ pass
680
+
681
+ repository.add_command(load_archive)
676
682
 
677
683
  if __name__ == '__main__':
678
684
  cli()
@@ -245,7 +245,14 @@ def engine_host(ctx):
245
245
  engine_host.add_command(start_engine_host)
246
246
  engine_host.add_command(stop_engine_host)
247
247
 
248
- tell.add_command(load_archive)
248
+ @tell.group('repository')
249
+ @click.pass_context
250
+ def repository(ctx):
251
+ """Group of commands to a repository"""
252
+ pass
253
+
254
+ repository.add_command(load_archive)
255
+
249
256
 
250
257
  if __name__ == '__main__':
251
258
  cli()
@@ -207,9 +207,9 @@ def valid_metadata_values(ctx, property, type_name):
207
207
  c.userid, c.password, False, c.jupyter, c.width)
208
208
 
209
209
 
210
- @show.command("list-elements")
210
+ @show.command('list-elements')
211
211
  @click.pass_context
212
- @click.option('--om_type', default='Project', help='Metadata type to query')
212
+ @click.option('--om_type', default='Organization', help='Metadata type to query')
213
213
  def get_element_info(ctx, om_type):
214
214
  """Display the valid metadata values for a property and type"""
215
215
  c = ctx.obj
@@ -11,6 +11,7 @@ import os
11
11
 
12
12
  from rich import print
13
13
  from rich.console import Console
14
+ from rich.markdown import Markdown
14
15
  from rich.panel import Panel
15
16
  from rich.prompt import Prompt
16
17
  from rich.text import Text
@@ -54,20 +55,24 @@ def tech_details_viewer(tech: str, server_name: str, platform_url: str, user: st
54
55
  description = tech_details.get('description', '---')
55
56
 
56
57
  style = "bold bright_white on black"
57
- l2 = tree.add(Text(f"Name: {name}", "bold red"))
58
- l2 = tree.add(Text(f"* QualifiedName: {qualified_name}", style))
59
- l2 = tree.add(Text(f"* Category: {category}", style))
60
- l2 = tree.add(Text(f"* Technology Description: {description}", style))
58
+ bas_md = (f"* Name: {name}", "bold red\n"
59
+ f"* QualifiedName: {qualified_name}\n"
60
+ f"* Category: {category}\n"
61
+ f"* Technology Description: {description}\n"
62
+ )
63
+ bas_out = Markdown(bas_md, style="bright_white on black")
64
+
65
+ l2 = tree.add(Panel(bas_out))
61
66
  ext_ref = tech_details.get('externalReferences', None)
62
67
 
63
68
  if ext_ref is not None:
64
69
  uri = ext_ref[0]["properties"].get("uri", "---")
65
70
  # console.print(f" {type(ext_ref)}, {len(ext_ref)}")
66
- l2 = tree.add(Text(f'* URI: {uri}', style))
71
+ l2 = tree.add(Panel(Text(f'* URI: {uri}', style)))
67
72
 
68
73
  resource_list = tech_details.get('resourceList', None)
69
74
  if resource_list:
70
- t_r = tree.add("Resource List[bold red]")
75
+ t_r = tree.add(Panel("Resource List[bold red]"))
71
76
  for resource in resource_list:
72
77
  resource_use = Text(f"[bold bright_white]{resource.get('resourceUse', '---')}")
73
78
  resource_use_description = Text(f"[bold bright_white]{resource.get('resourceUseDescription', '---')}")
@@ -80,9 +85,11 @@ def tech_details_viewer(tech: str, server_name: str, platform_url: str, user: st
80
85
  f"[white]Unique Name: {unique_name}\n[white]Related GUID: {related_guid}\n")
81
86
  p = Panel.fit(resource_text)
82
87
  tt = t_r.add(p, style=style)
88
+ else:
89
+ tt = tree.add(Panel(f"Resource details for {tech} where not found"))
83
90
 
84
91
  else:
85
- tt = tree.add(f"Tech type {tech} was not found - please check the tech type name")
92
+ tt = tree.add(Panel(f"Tech type {tech} was not found - please check the tech type name"))
86
93
 
87
94
  return tt
88
95