Today I stumbled across the extension jupyter-collaboration. On the surface, this looks perfect for my teaching needs, however, I do not want all every student in class to be able to edit every cell.
In short, I want to be able to share a URL where students can view my notebook in “read only” mode; students should be able to see the code I write, and be able to copy it to their own notebook. From the documentation, it reads as if everyone can edit everything.
My question is: Is that possible? If so, can you point me to the documentation so I can learn more about how I might use this in a classroom environment?
So in doing a very quick scan, most of those tools suggest my notebook is already complete and provide ways share the link. In my case, my lectures are live coding sessions. gitautopush is the closest to what I was looking for, in that my changes are pushed to git. That could work and will have to test this out.
Ultimately what I am looking for is something like a Google Doc where students are viewers and can watch my notebook in real time, and copy cells as needed, which is why jupyter-collaboration caught my eye.
Well you can test out Real-time collaboration without installing anything yet, via here has JupyterLab 4.
(There may be others jtpio has set up to enable RTC, but I only collected & fully tested successfully with that one for now, as it has JupyterLab 4, while the others I saw were JupyterLab 3. See the separate section below for Jupyter Notebook.)
Click ‘launch binder’ badge to start a new temporary session on a remote machine serve via the MyBinder service.
A way to test the RTC ability:
Click ‘launch binder’ badge to start a new temporary session on a remote machine serve via the MyBinder service.
After you open & edit a notebook in the launched session, then copy the link via the ‘Share’ option on the toolbar as illustrated in the graphic here (make sure to tick ‘Include token in URL’), and then open that link up in an entirely different browser. (Like get the URL from Chrome and open it in Firefox.) Actually, there is an icon in the upper right corner that allows you to get the share link, too. (This route to get the ‘Shared Link’ is like the only option that seemed possible in Jupyter Notebook, see the section below.)
Maybe it will work for your needs? But the content should remain editable by all though, which seems is not what you wanted.
This one here is set up for Jupyter Notebook RTC, and it works but when you paste the URL given in a new browser, however, it defaults to opening in JupyterLab when you paste in the provided link. Note the icon to get the share link is in the upper right, just to the left of the user initials indicator. The icon looks like an angle illustration.
Thank you for sharing your use case. I was advocating for support of exactly this scenario in jupyter-collaboration all the way. We are not yet there.
You could make specific cells non-editable
The recently added timeline slider adds a motion of read-only copies “forks” of the documents.
I am sure that ultimately RTC will learn to distinguish different authorization levels. Right now this already works on Jupyter-server level - users without execute permission should not able to run code. Unfortunately right now setting this up is a bit complex, and there is no integration with the UI.
Thanks, I will keep my eye out now that I am aware these project(s) exist. For what its worth, there is a VS Code extension that does something relatively similar, but my issue is that the upper bound on the number of users would not support size of the classes I teach. Regardless, thanks for the note!