jupyter-sphinx icon indicating copy to clipboard operation
jupyter-sphinx copied to clipboard

Consider using sphinx-thebelab for thebelab support

Open choldgraf opened this issue 5 years ago • 2 comments

Now that sphinx-thebelab (https://github.com/executablebooks/sphinx-thebelab) is starting to take shape, I wonder what folks think about using it for thebelab support in jupyter-sphinx. It should be possible to use it out-of-the box and remove a good chunk of code from jupyter-sphinx. If folks are interested in this, I can give it a shot when it's the right time to try it.

choldgraf avatar Jul 03 '20 01:07 choldgraf

Absolutely! Would be awesome!

akhmerov avatar Jul 03 '20 07:07 akhmerov

I'm now returning to this issue. @choldgraf I'd be very interested to hear your thoughts on the following aspects of the implementation.

User interface

  1. I imagine jupyter-sphinx will silently include sphinx-thebelab, but only enable it and add assets if it's configured. Does this make sense?
  2. What about thebe configuration: for backwards compatibility it makes sense to still support it as provided by jupyter-sphinx, however moving forward would it make sense to use the sphinx-thebe configuration keys in conf.py?

Implementation

sphinx-thebe determines the kernel from the document metadata, while jupyter-sphinx allows for multiple notebooks/kernels in one document. This is of course something that we can only partially support anyway, so it would make sense if the kernel of the first notebook encountered in the document is added to the metadata. Does that make sense?

akhmerov avatar Jan 02 '21 15:01 akhmerov