-
Notifications
You must be signed in to change notification settings - Fork 99
Binder tips
binder is a free cloud service for running notebooks on a JupyterHub. You can paste in the URL of any GitHub repository containing notebooks and it will start up a server running these notebooks (provided the repository also contains something like a requirements.txt
file listing other dependencies.)
To start a server with Clawpack installed and running these notebooks, you can use one of these links:
-
https://mybinder.org/v2/gh/clawpack/riemann_book/FA16 - clones the repository with the FA16 branch checked out and opens to a directory view, from which you need to navigate to
riemann_book/Index.ipynb
. -
https://mybinder.org/v2/gh/clawpack/riemann_book/FA16?filepath=riemann_book%2FIndex.ipynb - Starts a server and opens the
Index.ipynb
notebook directly, no navigation needed. -
https://mybinder.org/v2/gh/clawpack/riemann_book/master - This link was mistakenly printed in the SIAM book Preface in a footnote on page xi. This starts the server with the master branch checked out. Currently it doesn't matter which branch is checked out since master agrees with FA16, but in the future master may evolve while FA16 will be frozen to agree with published book (Fundamentals of Algorithms Volume 16).
If you want to change branches within binder, you can open a new terminal window (from the top right "New" menu on a notebook page) and then navigate into the riemann_book
directory, which is a git repository. You will also have to first fetch the desired branch, since by default only one branch is included in the clone.
For example, if you started in the master branch and want to switch to FA16, you could do this in a terminal window:
cd riemann_book
git fetch origin FA16:FA16
git checkout FA16
and now any notebook you open (or reload) will be displaying the version on the FA16 branch.
Note that all of Clawpack is cloned as part of the dependencies for these notebooks, so from a terminal window opened from the "New" menu on a notebook page you can navigate to the clawpack-v5.7.0
directory and try out any other features of Clawpack that you wish to.
You can also try out other Clawpack notebooks in the clawpack/apps repository, which has also been cloned on the binder server. From any Jupyter notebook, click on "Files" and then the "Home" folder. Next navigate to clawpack-v5.7.0/apps/notebooks
and then into one of the directories found there. In particular the pyclaw
directory has some other PyClaw demonstrations, and the geoclaw
directory has notebooks illustrating tsunami modeling and other features of GeoClaw.