What's a user-friendly way to setup repositories for Jupyter notebook tutorials?

Jupyter notebooks are a good way for doing tutorials, and I already use them like this:

or here:

Another example is this:

While these types of tutorial repositories play very well with online rendering, problems occur when one wants to start using them interactively. I give users a set of instructions for how to open them and play with them locally, but since the changes are tracked as a Github repo, using the notebooks will dirty the repo, so when future changes occur they cannot Pkg.update() for the changes.

Does anyone have a good way around this? If you add the notebooks to .gitignore, they wouldn’t update in that case either, right?

2 Likes

You can tell them to make sure that for each notebook they do “make a copy” from the file menu, and only work on that copy.

This could alternatively be done with a script to change all the names automatically, and even put them in a sub-folder called “live” or whatever. (I agree that it’s not ideal.)

EDIT:

mkdir live
cp *.ipynb live
cd live

I think this is exactly what Binder is for.

Version control and social coding sites like GitHub make it simple to share code, and projects like the Jupyter notebook provide interactive interfaces for language-agnostic analysis. But executing that code remains a hurdle — dependencies, data, and system configuration are less portable than code, and are more difficult to specify. Binder has two primary goals: to make it easy to construct reproducible environments, even without knowledge of containerization technology; and to make these environments available for instantaneous deployment in the browser.

I haven’t tried deploying to it myself yet.

But I have tried out a few examples,
it seems to spin up a new jupyter instance just for me, to run that demo in

I can edit what I want to test things out.
Seem pretty cool.

1 Like

I don’t know if doing it on the cloud is the right way to go. I think a lot of users do it locally to check that their installation is correct as they learn the commands. This gets more important when binary dependencies are involved.

1 Like

There is now also a working https://beta.mybinder.org/v2/gh/yuvipanda/simplejl/master

Based on https://github.com/sje30/simplejl

See discussion on github https://github.com/jupyter/repo2docker/issues/23#issuecomment-312419028

I certainly like this way of making repos executable

3 Likes