Teachbooks: jupyter-book based interactive notebooks

At Delft University of Technology, teachers and TAs have been working on a system they call “teachbooks”. It’s a flavor of jupyter-book, packaged with some extras and modifications.

What they have done really nicely;

  • they made a github template so you can get started in minutes
  • created a github workflow that will publish your jupyter-book to github pages: no other hosting necessary. The workflow even builds different branches so you can view the in-progress book.
  • they made using a browser-based Python kernel easier to integrate, so you can have code examples that students can run/modify on their own machine, no jupyter lab required (for basic/standard pages). Try this book chapter as example

I’ve used it to setup a tutorial during a workshop, but could not use the interactive elements as it needed asyncio which is not possible yet. I did link the book to a jupyter hub we had running during the workshop.

It should also be possible to create a BMI focussed interactive tutorial with teachbooks, where you can play with BMI toy models in the browser. No installing needed.

3 Likes

It should also be possible to create a BMI focussed interactive tutorial with teachbooks, where you can play with BMI toy models in the browser. No installing needed.

This would be super cool! I’m probably overcommitting myself, but I would be happy to work on this with you.

1 Like

Also, is this using JupyterLite? I wanted to explore it for making a CSDMS demo site.

Yeah and it should work out of the box if you use the github template!

1 Like

This is really neat, thanks for sharing! I can definitely see myself using this in the future.

As a slight tangent, the new Fortran compiler LFortran compiles to WASM… I wonder if teachbooks for Fortran will be a possibility in the future!

It would probably be possible to interface LFortran with the thebe-lite extension somehow. However, R is probably closer to reality as its WASM interpreter is more mature and you can already use an R kernel in normal jupyter notebooks.

1 Like