Skip to content

Commit a10ae06

Browse files
committed
Minor refactor of image/load checker
1 parent d258150 commit a10ae06

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

tools/check_load_and_images.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
import random
77
import re
88

9+
from execute_notebooks import print_exceptions
10+
911

1012
def main():
1113
p = Path('.')
@@ -34,19 +36,7 @@ def main():
3436
except FileNotFoundError as e:
3537
exceptions[str(nb_path)].append(str(e))
3638

37-
if exceptions:
38-
print('⚠️' * 20)
39-
print('\n\nFailures in these notebooks:')
40-
print('\n'.join(exceptions.keys()), '\n\n')
41-
print('⚠️' * 20)
42-
for nb, error_list in exceptions.items():
43-
face = random.choice(["😮", "😱", "🤬"])
44-
print(face * 20)
45-
errors = "\n".join(error_list)
46-
print(f'{nb}: \n{errors}')
47-
print(face * 20)
48-
else:
49-
print('🎉🎉 Everything worked! 🎉🎉')
39+
print_exceptions(exceptions)
5040

5141

5242
if __name__ == '__main__':

0 commit comments

Comments
 (0)