Coverage for src/ui/ascii_art.py: 60%

15 statements  

« prev     ^ index     » next       coverage.py v7.8.0, created at 2025-06-05 22:56 -0700

1""" 

2ASCII art and styling for Chuck TUI. 

3""" 

4 

5from rich.console import Console 

6from rich.panel import Panel 

7from rich.text import Text 

8from rich.box import ROUNDED 

9 

10from src.ui.theme import CHUCK_LOGO, DIALOG_BORDER, MESSAGE_LIGHT 

11 

12# ASCII art for Chuck logo 

13 

14CHUCK_LOGO_ART = r""" 

15 .. :-- .: 

16 %+ .:========-.====. .:%%%. 

17 :+%%%%=-----=============. -%@@%. ________ ___ ___ ___ ___ ________ ___ __ 

18 %%%%%@@*====-==========--+%@@%*= |\ ____\|\ \|\ \|\ \|\ \|\ ____\|\ \|\ \ 

19 ***==+@%####*---------=**##*+=- \ \ \___|\ \ \\\ \ \ \\\ \ \ \___|\ \ \/ /|_ 

20 .--=###*=*#########+--+######*==: \ \ \ \ \ __ \ \ \\\ \ \ \ \ \ ___ \ 

21 .-----=###+++++++++++++++++++++++=: \ \ \____\ \ \ \ \ \ \\\ \ \ \____\ \ \\ \ \ 

22 :---==-++###*. @@@: @@@:. \ \_______\ \__\ \__\ \_______\ \_______\ \__\\ \__\ 

23 ====---######*: @@@= -#*- @@@-. \|_______|\|__|\|__|\|_______|\|_______|\|__| \|__| 

24 -=--=####@%##-. :@. .=@@+.. .@- 

25 :====-*##%%@@@@%##:::::::-==---:::::::=- 

26 ..=--**#%@@@@@@@@@@@@@@@@#+..+#@@@@@%%+- -:. ________ ________ _________ ________ 

27 :=---#%%%@@@@%#@@@@@@#@@@++====@@@#@@@@@%. ::--=-. |\ ___ \|\ __ \|\___ ___\\ __ \ 

28 ===-+#%%@@@@@@@@%##@@@@+=+:*@@%:+++@@@@@@@@+.::::-: \ \ \_|\ \ \ \|\ \|___ \ \_\ \ \|\ \ 

29 .:-+*#%@@@@@%%%@####@@@@@@@@@@@@@@@@####%@@@@#-:::-- \ \ \ \\ \ \ __ \ \ \ \ \ \ __ \ 

30 .:#%%%@@@@@@@%#@####*+=+@@@@@@@%+==+*##%@@@@#: \ \ \_\\ \ \ \ \ \ \ \ \ \ \ \ \ \ 

31 .#%%@@@@@@@@@@#######+============*####%@%#*: \ \_______\ \__\ \__\ \ \__\ \ \__\ \__\ 

32 -+#%%@@@@@@@#%@########**++++++++*#######@%* \|_______|\|__|\|__| \|__| \|__|\|__| 

33 -#%@@@@@@@@@@@@@###############**########@+: 

34 -#%@@@@@@@@@@@@@@@#######################@= 

35 .:::.:. -#@@@@@@@@@@@@@@@@@###################### 

36 .-=++--:..=##%@@@@@@@@@@@@@@@**==++##############*= 

37 .-**+:---..:#%%@@@%@@@%%%@@@:..:::-*#############= 

38 .::++-:--:::**#%@@@@@@####**.::---###############= 

39 :::-==-::..=*#@@@%%@%%##**---=++##############=: 

40 ...:......###@%@@#%@###***###############*+. 

41 +##%@@%%@:..#################-. .. 

42 .+***#=.....::****#####****....:-- 

43 .::::::::-::=======.:::::=*+=. 

44 ..---+++*.. ....... 

45 

46""" 

47 

48CHUCK_LOGO_ART = r""" 

49 .::::::::: 

50 -----------=++ 

51 -***::::--::----:*#= 

52 .**- %%%+:::+:---::#@@@ 

53 .:*+:.%++++==+:::==+#-+@ 

54 :#-.:===============*#%%  

55 -:%: .@@- :@@=  

56 :-:+=:-: ==% +++. ==% +#*  

57 ::::=+= +++++- .+++  

58 :--::+++++++@@@% +@@@++++++%:...  

59 :+#*::=++++=@@@@@@ @@@@@@*+++%%%%-  

60 :::::#::=*#+=-@@@.. ..-@@-++*#%@  

61 ..:=*:::=*%%%*----@@@*---+#%%%% 

62 +=::::--+%%%%###++++++##%%%%%@ 

63 :+::::::=++#%%%%%%%%%%%%%%%%#*+@ 

64 #:::::::-++++%%%%%%@@@@@@%%%%*++%@  

65 .=-:::::::-++++*%%%@@@@@@@@@%%+++++@  

66 -*::::::::--=+++#%%@@@@@@@@@%#==+++@  

67 =+::------::--=++--#%%@@@@@@%%-++++%@  

68 *=:::---=+++-::--=+::+%%@@@%#+:=+++*%  

69 *=::---=++++++-::- .%%%%: =+#@  

70 *=::---=+++++#%#= :+@@@@#- =-  

71 *=::----=++++#%%%% @@@@@@@@@@ --. 

72 **-:::----===:*%%@@@@@@@@@@@@@%-=*= 

73 ++-*+:::-------:*%%@@@@@@@@@@@@#--+#= 

74 :==--:::=#::::::::::*%%%@@@@@@@@%%*=--++- 

75 ==----::::-*:::::::::*%%%%@@@@@@%#-:::-- 

76 #-::::::*#= : -%%%%%%%%% 

77 :------ ......:------- ......... 

78 

79 ________ ___ ___ ___ ___ ________ ___ __ 

80 |\ ____\|\ \|\ \|\ \|\ \|\ ____\|\ \|\ \ 

81 \ \ \___|\ \ \\\ \ \ \\\ \ \ \___|\ \ \/ /|_  

82 \ \ \ \ \ __ \ \ \\\ \ \ \ \ \ ___ \ 

83 \ \ \____\ \ \ \ \ \ \\\ \ \ \____\ \ \\ \ \ 

84 \ \_______\ \__\ \__\ \_______\ \_______\ \__\\ \__\ 

85 \|_______|\|__|\|__|\|_______|\|_______|\|__| \|__| 

86 

87 ________ ________ _________ ________ 

88 |\ ___ \|\ __ \|\___ ___\\ __ \ 

89 \ \ \_|\ \ \ \|\ \|___ \ \_\ \ \|\ \ 

90 \ \ \ \\ \ \ __ \ \ \ \ \ \ __ \ 

91 \ \ \_\\ \ \ \ \ \ \ \ \ \ \ \ \ \ 

92 \ \_______\ \__\ \__\ \ \__\ \ \__\ \__\ 

93 \|_______|\|__|\|__| \|__| \|__|\|__| 

94  

95  

96""" 

97 

98# Welcome message 

99WELCOME_MESSAGE = r""" 

100Welcome to the Chuck Data agentic data engineering research preview! 

101 

102Chuck is an agent for building amazing customer centric data models and workflows in your Databricks account. 

103 

104Enter prompts to ask Chuck for help. 

105 

106Try asking chuck "What customer data do I have?" or "Build an identity keychain." 

107""" 

108 

109 

110def display_welcome_screen(console: Console) -> None: 

111 """ 

112 Display the welcome screen with ASCII art and welcome message. 

113 

114 Args: 

115 console: Rich console instance 

116 """ 

117 # Display the ASCII art logo with styling 

118 logo_text = Text(CHUCK_LOGO_ART) 

119 logo_text.stylize(CHUCK_LOGO) 

120 console.print(logo_text) 

121 

122 # Display welcome message in a box 

123 welcome_panel = Panel( 

124 Text(WELCOME_MESSAGE, style=MESSAGE_LIGHT, justify="left"), 

125 box=ROUNDED, 

126 border_style=DIALOG_BORDER, 

127 padding=(1, 2), 

128 title=f"[bold {DIALOG_BORDER}]Chuck Data Research Preview[/bold {DIALOG_BORDER}]", 

129 title_align="left", 

130 ) 

131 console.print(welcome_panel) 

132 

133 # Add a little space after the welcome panel 

134 console.print()