-
Notifications
You must be signed in to change notification settings - Fork 652
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
User-configurable JupyterHub / BinderHub launch buttons #1444
Comments
@choldgraf I would check with @mmcky and @AakashGfude to see how they did this for the QE lectures and the associated devops there (e.g. the notebook repo needs to be configured, etc.) But I don't see how this can work prior to getting jupyter support in myst? Or would this still only launch things that are already ipnb notebooks? |
Yep - either the source files would need to be |
I think those are both the wrong approach, even in the longterm. I (and any student I can imagine) want ipynb as an output format. Notebooks are a great output, and I don't want the underlying markup for a book executed by the students any more than I would want them to compile the This is most important for making these books accessible and simple for people who have never programmed before. I wouldn't want someone who has never programmed before to see a myst file with a bunch of complicated metadata for publication any more than I would want them to see a bunch of scary
I think that is also the wrong approach. Not everything is a hub... end users download these things onto their desktops, google colab, vscode juptyer, nteract, etc. Even if you got support for myst on all of them, I still say it is the wrong thing for an introductory user to be looking at. (and I wouldn't want jupytext running on the hub any more than I woudl want the student to compile their own PDF from a tex file on the hub).
Enough of my complaining, how about a workable solution: What if you just let the content developers choose their notebook repository URL and then it is up to them to have the notebooks in the correct folder structure/etc. (and as ipynb so nbgitpuller/etc all work). They are responsible for that conversion and worflow. That is, there are existing workflows with jupytext that try to hack around this issue (e.g. https://github.com/QuantEcon/lecture-python.myst/blob/main/.github/workflows/publish.yml and many others) maybe there is an intermediate step here to get us closer to a world with jupyter support from all myst. What if the notebook repository URL is made more formal and integrated into jupyterbook instead of hacked on top of it with a theme? @mmcky can explain how they did it better, but
If I understand this correctly, this feature would eliminate the hacked up themes which re-implements these core executable book features which are not currently supported in myst - but wouldn't eliminate the custom devops and delivery required to generate and publish the notebooks to a repo. I think that is a fine place to start. |
I think the crux of the issue here is you want a set of notebooks (
Some elements for
Some of this is coming with
Thanks for this suggestion. I guess this would essentially boil down to adding # Information about where the book exists on the web
repository:
url : https://github.com/yourusername/yourbookrepo # Online location of your book
path_to_book : path/to/book # Optional path to your book, relative to the repository root
branch : master # Which branch of the repository should be used when creating links (optional)
# Information about where companion notebooks exist on the web
notebook_repository:
url : https://github.com/yourusername/younotebookskrepo # Online location of your book
path_to_notebooks : path/to/notebooks # Optional path to your notebooks, relative to the repository root
branch : master # Which branch of the repository should be used when creating links (optional) and then setting up Another Option ( At
this would then take a lot of the configuration complexity away by enabling high level options such as: website:
pdflatex: true/false #build pdf via LaTeX then So for the example above:
For the case with Any supporting notebooks can be produced by
|
Thanks @mmcky Great summary.
Yes. To me, that 1 to 1 is not useful since I don't see why I would ever want to write in ipynb/jupyterlab, but I understand others prefer jupyter notebooks as an editing environment and file format. But I think those have essentially nothing to do with with the use of notebooks by students (because even if they aren't myst, they would end up with a bunch of author-centric metadata and stuff releated to the themes).
Yes, I would say essentially all user-facing cases. Content editing is a different issue entirely. For that, I would prefer to have
Well, I don't understand the architecture all that well, but I think it would be used (if provided!) as the url prefix for anything currently connected to just the repositories URL. That is, the current
That all sounds great, though I don't entirely understand it entirely. But it doesn't sound like it would be a replacement for what we I suggested, just that it would provide a better production workflow given the myst source? If so, sounds great to me. I am relatively agnostic on those steps, except that it would be great if they were easy to maintain and standardized rather than custom code. The critique in this issue is narrowly around https://jupyterbook.org/interactive/launchbuttons.html being unable to work with generated notebooks from the content (even ones generated through an external workflow like the one you are describing). I believe making a distinction between the source repo and the notebook repo would alleviate that issue, but I could be wrong. |
Hey all - could I ask that we move conversation about "launch buttons that point to generated notebooks" to a different issue? This issue is specifically about "users that want to configure a book to point to their own JupyterHub", which I think is related but not the same as the topic that is now generating most of the discussion in this issue. We should definitely cross-ref them though |
Sure, create another issue with the content, or we can copy it over. Of course, this issues has an upstream dependency. The "user-configurable launch buttons" needs stuff to launch. |
Description / Summary
We currently hard-code the JupyterHub/BinderHub that a book points to via the author's configuration. However, some readers may wish to bring their own JupyterHubs with them, particularly for content that is meant to be generically useful.
In those cases, it would be useful if they could manually specify a JupyterHub at the client side. For example, they could type in the Hub URL as part of the "launch buttons" dropdown. This would then generate a "launch button" for their hub, and persist between pages.
Value / benefit
This would encourage the (re)use of material across different JupyterHubs, which is an interesting future use-case to consider. It is unclear if this is a particularly common need now, but may become more common as more organizations use JupyterHubs for their work.
Implementation details
This would probably need to an improvement somewhere around here:
https://github.com/executablebooks/sphinx-book-theme/blob/43506962d4f90e6fc74d209d72503929900d84e7/sphinx_book_theme/topbar/launchbuttons.html#L3-L32
and might depend on changes that are being proposed in #1253
Tasks to complete
The text was updated successfully, but these errors were encountered: