Skip to content

Commit 6d86c57

Browse files
committed
Add some bling to the install_check output
1 parent 8f851b4 commit 6d86c57

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

install_check.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
from subprocess import check_call, CalledProcessError
44

55

6-
FIX_PREFIX = '----->'
6+
SUCCESS_PREFIX = '🎉'
7+
FIX_PREFIX = '⚠️ ----->'
78

89
tutorial_name = 'Jupyter widget ecosystem'
910

@@ -41,7 +42,7 @@
4142
}
4243

4344
if success:
44-
print('\tAll required packages installed')
45+
print(f'\t{SUCCESS_PREFIX} All required packages installed')
4546
else:
4647
print(FIX_PREFIX, 'Please install these missing packages '
4748
'for the tutorial "{}":'.format(tutorial_name))
@@ -52,9 +53,9 @@
5253

5354
try:
5455
check_call(['voila', '--version'])
55-
print('\tVoila is correctly installed')
56+
print(f'\t{SUCCESS_PREFIX} Voila is correctly installed')
5657
except CalledProcessError:
57-
print('\tVoila 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 '
5859
'of the following:')
5960
print(' conda install -c conda-forge voila')
6061
print(' pip install voila')
@@ -75,7 +76,7 @@ def version_checker(package_name, version, nbextension=None):
7576
print(' conda install {}={} # if you use conda'.format(package_name, newest))
7677
print(' pip install {}=={}'.format(package_name, newest))
7778
else:
78-
print('\t{} version is good!'.format(package_name))
79+
print(f'\t{SUCCESS_PREFIX} {package_name} version is good!')
7980

8081

8182
# Check as many packages as we can...
@@ -110,7 +111,7 @@ def version_checker(package_name, version, nbextension=None):
110111
print(FIX_PREFIX, 'Please create custom kernel with: ',
111112
'ipython kernel install --name widgets-tutorial --display-name widgets-tutorial --sys-prefix')
112113
else:
113-
print('\tCustom kernel is correctly installed')
114+
print(f'\t{SUCCESS_PREFIX} Custom kernel is correctly installed')
114115

115116
# Check that lab extensions are installed
116117

@@ -158,4 +159,4 @@ def version_checker(package_name, version, nbextension=None):
158159
print(FIX_PREFIX,' Please try to install the following packages with conda or pip: ',
159160
', '.join(missing_extensions))
160161
else:
161-
print('\tAll extensions are installed!')
162+
print(f'\t{SUCCESS_PREFIX} All extensions are installed!')

0 commit comments

Comments
 (0)