Open kno10 opened 8 months ago
The ThebeLab integration has been abandoned a few semesters ago, because nobody was using it anymore. I will start teaching programming again next winter, so the plan is to revive this (or something similar) sometime around next summer.
Until then, I am afraid, there is no easy way to make that work.
Well, I got it working, largely using the code fragment above. With a custom and newer jupyterlite, too.
This has some issues with the interaction of the reveal.js auto-sizing logic and the codemirror editor component, that still needs some sorting out.
Also, reveal.js reacts to any ?
keypress, so if you have to add a question mark in your code, the help screen will pop up.
Currently, the easiest solution for interactive python code is the server-based SageMath (which I know you don't like)
::: { .sageCell width=1200px height=500px }
``` python
import matplotlib.pyplot as plt
import numpy as np
so something fancy with python...
:::
See https://github.com/kno10/decker/tree/thebe 63e21b0e53371b1a755383356ea0971542de06c6 for an updated thebe plugin.
I just found another contender: codapi.org
The server delegates code execution to language specific Docker images and talks to the client in a dead simple protocol. The server is easy to deploy and configure (I just did so at codapi.tramberend.de) and fast.
The whole thing is about 2 orders of magnitude lower in complexity as Jupyter Hub + Thebe. Plus, it does not use CodeMirror.
There is a working example at live-coding-deck.md.
There is some code for thebelab in
https://github.com/decker-edu/decker/blob/master/resource/decker/support/plugins/thebelab/thebelab.js
but it does not appear to be up-to-date (not using JavaScript modules like the other plugins).
E.g., something like
I was looking into thebe-lite for Python code examples, but so far could not get it working.