MCPcopy Create free account
hub / github.com/HKUDS/OpenSpace / print_initialization_progress

Method print_initialization_progress

openspace/utils/cli_display.py:47–67  ·  view source on GitHub ↗
(steps: list, show_header: bool = True)

Source from the content-addressed store, hash-verified

45
46 @staticmethod
47 def print_initialization_progress(steps: list, show_header: bool = True):
48 box = Box(width=70, style=BoxStyle.ROUNDED, color='g')
49
50 if show_header:
51 print(box.text_line(colorize("► Initializing Components", 'g', bold=True),
52 align='center', indent=4, text_color=''))
53 print(box.separator_line(indent=4))
54
55 for step, status in steps:
56 if status == "ok":
57 icon = colorize("✓", 'g')
58 elif status == "error":
59 icon = colorize("✗", 'rd')
60 else:
61 icon = colorize("[...]", 'y')
62
63 line = f" {icon} {step}"
64 print(box.text_line(line, indent=4, text_color=''))
65
66 print(box.bottom_line(indent=4))
67 print()
68
69 @staticmethod
70 def print_result_summary(result: dict):

Callers 1

_initialize_openspaceFunction · 0.80

Calls 5

text_lineMethod · 0.95
separator_lineMethod · 0.95
bottom_lineMethod · 0.95
BoxClass · 0.90
colorizeFunction · 0.90

Tested by

no test coverage detected