3
3
from subprocess import check_call , CalledProcessError
4
4
5
5
6
- FIX_PREFIX = '----->'
6
+ SUCCESS_PREFIX = '🎉'
7
+ FIX_PREFIX = '⚠️ ----->'
7
8
8
9
tutorial_name = 'Jupyter widget ecosystem'
9
10
41
42
}
42
43
43
44
if success :
44
- print (' \t All required packages installed' )
45
+ print (f' \t { SUCCESS_PREFIX } All required packages installed' )
45
46
else :
46
47
print (FIX_PREFIX , 'Please install these missing packages '
47
48
'for the tutorial "{}":' .format (tutorial_name ))
52
53
53
54
try :
54
55
check_call (['voila' , '--version' ])
55
- print (' \t Voila is correctly installed' )
56
+ print (f' \t { SUCCESS_PREFIX } Voila is correctly installed' )
56
57
except CalledProcessError :
57
- print (' \t Voila is not installed! Please install it by running one '
58
+ print (f' \t { FIX_PREFIX } Voila is not installed! Please install it by running one '
58
59
'of the following:' )
59
60
print (' conda install -c conda-forge voila' )
60
61
print (' pip install voila' )
@@ -75,7 +76,7 @@ def version_checker(package_name, version, nbextension=None):
75
76
print (' conda install {}={} # if you use conda' .format (package_name , newest ))
76
77
print (' pip install {}=={}' .format (package_name , newest ))
77
78
else :
78
- print ('\t {} version is good!' . format ( package_name ) )
79
+ print (f '\t { SUCCESS_PREFIX } { package_name } version is good!' )
79
80
80
81
81
82
# Check as many packages as we can...
@@ -110,7 +111,7 @@ def version_checker(package_name, version, nbextension=None):
110
111
print (FIX_PREFIX , 'Please create custom kernel with: ' ,
111
112
'ipython kernel install --name widgets-tutorial --display-name widgets-tutorial --sys-prefix' )
112
113
else :
113
- print (' \t Custom kernel is correctly installed' )
114
+ print (f' \t { SUCCESS_PREFIX } Custom kernel is correctly installed' )
114
115
115
116
# Check that lab extensions are installed
116
117
@@ -158,4 +159,4 @@ def version_checker(package_name, version, nbextension=None):
158
159
print (FIX_PREFIX ,' Please try to install the following packages with conda or pip: ' ,
159
160
', ' .join (missing_extensions ))
160
161
else :
161
- print (' \t All extensions are installed!' )
162
+ print (f' \t { SUCCESS_PREFIX } All extensions are installed!' )
0 commit comments