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

Crossing the LibreTexts, Jupyterhub and Binderhub Divides #138

Open
psychemedia opened this issue Mar 9, 2020 · 1 comment
Open

Crossing the LibreTexts, Jupyterhub and Binderhub Divides #138

psychemedia opened this issue Mar 9, 2020 · 1 comment

Comments

@psychemedia
Copy link

psychemedia commented Mar 9, 2020

From your recent How did the chick learn cross the road? video, I notice that you run both Jupyterhub and Binderhub, with code execution provided via Binderhub, and that users appear to have personal accounts on the Jupyterhub

(Do you also / also plan to support widgets, eg using `nbinteract'?)

One of the things I was wondering was whether there's any benefit to using the local Jupyterhub server to host the notebook kernel, or for your local users, who have a Jupyterhub account, offering a persistent Binderhub environment? (I'm interested in trying to think through use cases around / workflows associated with different combinations of Jupyter services, particular in educational contexts.)

For example, it's easy enough to run Thebelab against a local Jupyter notebook server in an insecure / very open way, eg using the Thebelab config, as per this Thebelab docs demo:

bootstrap: true,
--
 kernelOptions: {
   name: "python3",
   serverSettings: {
     "baseUrl": "http://127.0.0.1:8888",
     "token": "test-secret"
     }
   },
 }

and a Jupyter server run as something like

jupyter notebook --NotebookApp.token=test-secret --NotebookApp.allow_origin='https://geo.libretexts.org/'

If the notebook server was running on the user's Jupyerhub account, this would probably need routing differently (I'm not sure how that'd work exactly?!)

Also, I'm not sure what the benefit would be (not thought it through!), although the startup time for running a kernel should be quicker if the user is already in a Jupyterhub session.

Another way of crossing the textbook and notebook divide might be to open a page as a notebook directly on Jupyterhub (if a user has a Jupyterhub account). nbgallery provides this sort of mechanic, although that is a Ruby app so any relevant code may not be directly reusable.

Something that motivates me is how students can take ownership of their textbooks and edit them directly. I note that LibreTexts already supports hypothesis, which allows them to annotate pages, but if they have access to a page as a Jupyter notebook they can edit and directly annotate the page. If they did do this, a question arises to what they'd see in the LibreTexts book environment? If things were tightly coupled, it would presumably be a rendering of the page served from their Jupyter account, not the default LibreTexts view?

(In passing, I note the Callisto) extension (Capturing the “Why” by Connecting Conversations with Computational Narratives, Wang et al., CHI'20) that allows discussion around an evolving notebook to be associated with it. There may be interesting thoughts to be had there about student discussions around a particular notebook, or supporting student group projects using notebooks.)

The video also mentions (I think?!) a desire to be able to export documents as notebooks so I wonder how you are achieving / intend to achieve that? One approach might be to map your books to a text format that roundtrips to ipynb. The (new) Executable Book Project is developing an extended markdown format to support this — MyST, "Markedly Structured Text" — as well as tools to support it's publication via Sphinx (MyST-NB), which itself is being billed as "a Sphinx parser for ipynb files". This format will hopefully also join the list of Jupytext supported formats, which can currently roundtrip cell inputs, although not outputs, I think?

@moorepants
Copy link
Member

From your recent How did the chick learn cross the road? video, I notice that you run both Jupyterhub and Binderhub, with code execution provided via Binderhub, and that users appear to have personal accounts on the Jupyterhub

Thanks for watching and your interest.

(Do you also / also plan to support widgets, eg using `nbinteract'?)

We will support any widgets we can get working with thebelab. We have some working now and some not.

One of the things I was wondering was whether there's any benefit to using the local Jupyterhub server to host the notebook kernel, or for your local users, who have a Jupyterhub account, offering a persistent Binderhub environment? (I'm interested in trying to think through use cases around / workflows associated with different combinations of Jupyter services, particular in educational contexts.)

The benefit would potentially be network speed. Yes, we could likely provide a setting on a given libretexts page or account profile to enable that.

Another way of crossing the textbook and notebook divide might be to open a page as a notebook directly on Jupyterhub (if a user has a Jupyterhub account).

See #82.

Something that motivates me is how students can take ownership of their textbooks and edit them directly. I note that LibreTexts already supports hypothesis, which allows them to annotate pages, but if they have access to a page as a Jupyter notebook they can edit and directly annotate the page. If they did do this, a question arises to what they'd see in the LibreTexts book environment? If things were tightly coupled, it would presumably be a rendering of the page served from their Jupyter account, not the default LibreTexts view?

Our goal is to give "jupyter powers" to the libretexts website. There are many options for working with Jupyter without the context of Libretexts, so we'd likely leave this one to other people. But #81 would allow export for students.

(In passing, I note the Callisto) extension (Capturing the “Why” by Connecting Conversations with Computational Narratives, Wang et al., CHI'20) that allows discussion around an evolving notebook to be associated with it. There may be interesting thoughts to be had there about student discussions around a particular notebook, or supporting student group projects using notebooks.)

There is one other libretexts user I know of that would like this feature. Sounds like a large undertaking though on first thought.

The video also mentions (I think?!) a desire to be able to export documents as notebooks so I wonder how you are achieving / intend to achieve that? One approach might be to map your books to a text format that roundtrips to ipynb. The (new) Executable Book Project is developing an extended markdown format to support this — MyST, "Markedly Structured Text" — as well as tools to support it's publication via Sphinx (MyST-NB), which itself is being billed as "a Sphinx parser for ipynb files". This format will hopefully also join the list of Jupytext supported formats, which can currently roundtrip cell inputs, although not outputs, I think?

I think we will start with exporting notebooks. IF MyST becomes mature and widely used we can support it if we have users that want it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants