A SageMath-based computing environment for binder
This repository illustrates Binder use cases for SageMath.
What is Binder?
Have a repository full of Jupyter notebooks? With Binder, you can add a badge that opens those notebooks in an executable environment, making your code immediately reproducible by anyone, anywhere.
What is SageMath?
A general purpose, community developed open source software for computational mathematics.
This repository provides some simple live demos for SageMath and other software included in the SageMath distribution.
- index.ipynb: starter notebook / brief SageMath demo
- demo-gap.ipynb: brief GAP demo
- demo-pari.ipynb: brief Pari/GP demo
- demo-singular.ipynb: brief Singular demo
Develop a collection of striking demo notebooks, and link from http://sagemath.org/, maybe as try.sagemath.org.
Examples of binder-enabled repository for SageMath
Have a repository full of Jupyter notebooks using SageMath? It's easy to setup Binder to let anyone run them. Just copy the short Dockerfile from this repository, and adapt it to your needs. You probably also want to insert the Binder badge in your READ ME.
Computing backend for live documents with Thebe
Have HTML pages (e.g. documentation) containing chunks of SageMath code? With Thebe, it's easy to turn them into live code cells that will use Binder and the executable environment defined by this repository.
See this Thebe example.
For the Sphinx-generated documentation of a Sage based project, you can use the Sphinx extension provided by the Sage package authoring utilities. For an example, see this demo page, and click Activate.
Note: Thebe is similar in principle to SageMath Cell. It introduces additional flexibility by enabling the customization of the programming language (kernel), computing backend (e.g. local Jupyter server, ...) and executable environment (e.g. via Binder). It also targets a much broader community, with the potential to relieve the SageMath community from maintaining a custom solution. On the other hand it's still relatively recent and quickly evolving technology with less settled sustainability. Also the SageMath Cell has been optimized to be more reactive on startup and reduce resource consumption. Those optimizations have not yet been ported to Thebe+binder.
See also thebe.rst for additional reader-oriented notes.
Nicolas M. Thiéry
The demo notebooks for GAP, Singular, and Pari were written by the authors of the respective kernels. See the report on their implementation.
Contributions most welcome!