@@ -307,7 +307,7 @@ def build_course(course, clean, zip, upload, clobber):
307307 if upload :
308308 success = upload_zip (zipped )
309309 if success :
310- click .secho (f"⬆️ Uploaded { zipped } " , fg = "green" )
310+ click .secho (f"⬆️ Uploaded { zipped } " , fg = "green" )
311311 link = f"https://{ KOSU ['s3-bucket' ]} .s3.amazonaws.com/"
312312 link += f"{ course } .zip"
313313 click .secho (f"🔗 File link: { link } " , fg = "green" )
@@ -342,13 +342,14 @@ def build_notebooks(path, config):
342342 all_items = [f for items in config ['curriculum' ].values () for f in items ]
343343 notebooks = list (filter (lambda item : '.ipynb' in item , all_items ))
344344 notebooks += config .get ('extras' , list ())
345+ kernel = config .get ('environment' , config ['course' ]).lower ()
345346 images_to_copy = []
346347 data_urls_to_check = []
347348 click .secho ('📔 Processing notebooks ' , fg = "cyan" , nl = False )
348349 for notebook in notebooks :
349350 infile = pathlib .Path (KOSU ['notebooks-source' ]) / notebook
350351 outfile = nb_path / notebook
351- images , data_urls = process_notebook (infile , outfile )
352+ images , data_urls = process_notebook (infile , outfile , kernel = kernel )
352353 images_to_copy .extend (images )
353354 data_urls_to_check .extend (data_urls )
354355 shutil .copyfile (infile , m_path / notebook )
@@ -359,7 +360,7 @@ def build_notebooks(path, config):
359360 for notebook in notebooks :
360361 infile = pathlib .Path (KOSU ['notebooks-source' ]) / notebook
361362 outfile = demo_path / notebook
362- images , data_urls = process_notebook (infile , outfile , demo = True )
363+ images , data_urls = process_notebook (infile , outfile , demo = True , kernel = kernel )
363364 images_to_copy .extend (images )
364365 data_urls_to_check .extend (data_urls )
365366 shutil .copyfile (infile , m_path / notebook )
0 commit comments