-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider allowing multiple kernels in the same document. #343
Comments
It seems like a reasonable feature to have, though it breaks with Jupyter's "one kernel per document" approach, and we generally default to "doing things like Jupyter" unless there's a clear reason to depart. I think a big thing we should consider is extra maintenance and complexity burden. Thebe is operating with basically 0 resources right now, so whatever solution we come up with needs to be fairly simple and straightforward, and cannot involve a major change in the code. |
I completely agree with the maintenance and engineering aspect. As I wrote in the description, I even considered disabling the feature completely until I saw that there are uses out in the wild. Labeling as "help wanted" based on that. |
BTW, we have another use case, where we want to write a "Modeling and Simulation" jupyter-book for engineers. Currently the book uses a Matlab/Octave kernel and that is the main language taught in the course. But the language itself is not the main focus of the course. In the future, we would like to add Julia and Python as well and ideally have all the interactive code blocks multilingual. I was thinking of something along the lines of interactive tabbed content blocks. |
Possible duplicate of #79. |
Is your feature request related to a problem? Please describe.
Historically jupyter-sphinx implemented including the inputs and outputs of multiple notebooks within the same document. This was done before we had thebe integration. Thebe, on the other hand, assumes a correspondence 1 document = 1 kernel.
I would even consider removing this feature from jupyter-sphinx, however searching through github revealed multiple uses out in the wild, including one by @moorepants in pydy and one in kwant where I'm involved. These uses fall into two categories:
Both uses seem reasonable.
Describe the solution you'd like
I therefore propose to support running multiple kernels within the document. This may be ruled as being out of scope of thebe, but I think this warrants consideration. One possible implementation would be to label each thebe DOM element with the kernel id to which it belongs.
Describe alternatives you've considered
Not supporting multiple kernels in a single document :)
The text was updated successfully, but these errors were encountered: