Skip to content
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

Create a sphinx-thebelab extension? #68

Closed
choldgraf opened this issue Jun 15, 2020 · 2 comments
Closed

Create a sphinx-thebelab extension? #68

choldgraf opened this issue Jun 15, 2020 · 2 comments
Labels
discussion Things that aren't closeable

Comments

@choldgraf
Copy link
Member

A few projects now have used Thebelab in Sphinx (e.g., jupyter-sphinx, sphinx-gallery, and now myst-nb). Each one has slightly different approaches to config etc, and in some cases the thebelab logic is a bit complex under the hood (e.g. jupyter-sphinx has its own thebelab nodes that replace regular cell nodes).

I wonder if it would be beneficial to have a single sphinx-thebelab extension that others could use. This extension could be used either

  • as a user-facing tool. e.g. provide a .. thebelab-button:: directive along with letting users configure the class used to mark a thebelab-ready cell (similar to how sphinx-copybutton works).
  • as a dev-facing tool. e.g., a theme developer could use thebelab buttons in their theme that are provided by this extension

I think for the most basic Thebelab functionality, this may be overkill, but as features are added we could benefit from a single thebelab package (e.g. if somebody wanted a spinning or a loading widget while waiting for the kernel).

What do folks think? Would it be useful? Unnecessary?

cc @akhmerov who may not be pinged by these issues

@choldgraf choldgraf added the discussion Things that aren't closeable label Jun 15, 2020
@akhmerov
Copy link
Contributor

I think it's a good idea. I imagine this extension would have both configuration with respect to:

  • How to run thebelab
  • Which elements in the AST should become thebelab inputs and outputs.

@choldgraf
Copy link
Member Author

this now exists!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Things that aren't closeable
Projects
None yet
Development

No branches or pull requests

2 participants