Skip to content

Commit 9837e35

Browse files
committed
Merge branch 'master' of github.com:nthiery/test-binder-sage
2 parents 8db3088 + c94e3fd commit 9837e35

File tree

4 files changed

+11060
-49
lines changed

4 files changed

+11060
-49
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
FROM sagemath/sagemath:8.2
22
# Inspired from https://mybinder.readthedocs.io/en/latest/dockerfile.html#preparing-your-dockerfile
33
# Make sure the contents of our repo are in ${HOME}
4-
COPY . ${HOME}
4+
COPY --chown=sage:sage . ${HOME}

README.rst

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,25 +41,27 @@ Example of binder-enabled repository for SageMath
4141
Have a repository full of Jupyter notebooks using SageMath? It's easy
4242
to setup Binder to let anyone run them. Just copy the short
4343
`Dockerfile <Dockerfile>`_ from this repository, and adapt it to your needs. You
44-
probably also want to insert the Binder badge in your `README`.
44+
probably also want to insert the Binder badge in your `READ ME`.
4545

46-
Computing backend for live documents (Thebe)
47-
--------------------------------------------
46+
Examples:
47+
- `Some live slides for a talk <https://mybinder.org/v2/gh/nthiery/harmonic-modules/master?filepath=talk.ipynb>`_
48+
- `A research paper logbook <https://mybinder.org/v2/gh/defeo/ffisom/master?filepath=notebooks>`_
4849

49-
Have HTML pages (e.g. documentation) containing chunks of Sage code?
50+
Computing backend for live documents with Thebe
51+
-----------------------------------------------
52+
53+
Have HTML pages (e.g. documentation) containing chunks of `SageMath <http://sagemath.org>`_ code?
5054
With `Thebe <https://github.com/minrk/thebelab>`_, it's easy to turn
51-
them into live code cells that will use Binder and the executable
52-
environment defined by this repository.
55+
them into live code cells that will use `Binder <http://mybinder.org>`_
56+
and the executable environment defined by this repository.
5357

5458
See this `Thebe example <https://minrk.github.io/thebelab/prompts.html>`_.
5559

56-
For the Sphinx-generated documentation of a SageMath based project,
60+
For the Sphinx-generated documentation of a Sage based project,
5761
you can use the Sphinx extension provided by the
5862
`Sage package authoring utilities <https://github.com/sagemath/sage-package>`_.
59-
For an example, see the
60-
`short graphics demo <http://more-sagemath-tutorials.readthedocs.io/en/latest/mocksage/plot/demo.html>`_
61-
of
62-
`More SageMath tutorials <http://more-sagemath-tutorials.readthedocs.io/>`_,
63+
For an example, see this
64+
`demo page <http://sage-package.readthedocs.io/en/latest/sage_package/sphinx-demo.html>`_,
6365
and click `Activate`.
6466

6567
Note: `Thebe` is similar in principle to `SageMath Cell <http://sagecell.sagemath.org/>`_.
@@ -69,7 +71,12 @@ Jupyter server, ...) and executable environment (e.g. via Binder).
6971
It also targets a much broader community, with the potential to
7072
relieve the SageMath community from maintaining a custom solution.
7173
On the other hand it's still relatively recent and quickly evolving
72-
technology with less settled sustainability.
74+
technology with less settled sustainability. Also the SageMath Cell
75+
has been optimized to be more reactive on startup and reduce
76+
resource consumption. Those optimizations have not yet been ported to
77+
Thebe+binder.
78+
79+
See also `thebe.rst <thebe.rst>`_ for additional reader-oriented notes.
7380

7481
Authors
7582
-------

index.ipynb

Lines changed: 11003 additions & 36 deletions
Large diffs are not rendered by default.

thebe.rst

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Live SageMath examples in static HTML pages with Thebe and binder
2+
=================================================================
3+
4+
If you read this page, you probably followed the `About` link of some
5+
SageMath related web page that embeds live code examples that can be
6+
edited and executed online after clicking `Activate`. Such pages
7+
include:
8+
9+
- (in the work) The SageMath's documentation, either
10+
`online <http://doc.sagemath.org/>`_ or locally.
11+
12+
- `More SageMath tutorials <https://more-sagemath-tutorials.readthedocs.io/>`_
13+
14+
This is handled by the `Thebe <https://github.com/minrk/thebelab>`_
15+
javascript library, configured to run the computations on `mybinder.org
16+
<http://mybinder.org>`_, using the latest version of `SageMath
17+
<http://sagemath.org>`_. See below for some background on those tools.
18+
This is meant for casual use; as for any cloud-based service, don't
19+
run calculations that could leak private information. See the
20+
`binder faq <https://mybinder.readthedocs.io/en/latest/faq.html>`_ for details.
21+
22+
`Thebe <https://github.com/minrk/thebelab>`_ is a small javascript
23+
library based on `JupyterLab <http://jupyterlab.readthedocs.io/en/latest/>`_
24+
that enables embedding live code examples in an HTML page. Upon
25+
clicking `Run`, the code is sent to a Jupyter server for execution and
26+
the result displayed back.
27+
28+
`Binder <https://mybinder.readthedocs.io/>`_ is a free and open source
29+
service for temporary computations within an arbitrary execution
30+
environment; `mybinder.org <mybinder.org>`_ is binder's original
31+
instance.
32+
33+
`SageMath <http://sagemath.org>`_ is a general purpose open source
34+
software for mathematical computations.
35+
36+
See also the `README <README.rst>`_ for some more on how to set up
37+
this service on your own html pages.

0 commit comments

Comments
 (0)