diff --git a/docs/environment.yml b/docs/environment.yml index fb991c6bc..a0bcca8a3 100644 --- a/docs/environment.yml +++ b/docs/environment.yml @@ -12,7 +12,7 @@ dependencies: - bokeh=1.0.4 - plotly=3.9.0 - ipywidgets=7.4.2 + - jupyter_sphinx=0.2.0 - pip: - - git+https://github.com/basnijholt/jupyter-sphinx.git@widgets_execute - sphinx_fontawesome==0.0.6 - m2r==0.2.1 diff --git a/docs/source/conf.py b/docs/source/conf.py index 11abce7af..9ce617f1f 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -22,7 +22,7 @@ # -- Project information ----------------------------------------------------- project = "adaptive" -copyright = "2018, Adaptive Authors" +copyright = "2018-2019, Adaptive Authors" author = "Adaptive Authors" # The short X.Y version @@ -83,6 +83,12 @@ pygments_style = "sphinx" +jupyter_sphinx_thebelab_config = { + "requestKernel": True, + "binderOptions": {"repo": "python-adaptive/adaptive"}, +} + + # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for diff --git a/docs/source/tutorial/tutorial.AverageLearner.rst b/docs/source/tutorial/tutorial.AverageLearner.rst index 5f4159184..9495fae74 100644 --- a/docs/source/tutorial/tutorial.AverageLearner.rst +++ b/docs/source/tutorial/tutorial.AverageLearner.rst @@ -10,6 +10,8 @@ Tutorial `~adaptive.AverageLearner` The complete source code of this tutorial can be found in :jupyter-download:notebook:`tutorial.AverageLearner` +.. thebe-button:: Run the code live inside the documentation! + .. jupyter-execute:: :hide-code: diff --git a/docs/source/tutorial/tutorial.BalancingLearner.rst b/docs/source/tutorial/tutorial.BalancingLearner.rst index 1d732db01..f467372c7 100644 --- a/docs/source/tutorial/tutorial.BalancingLearner.rst +++ b/docs/source/tutorial/tutorial.BalancingLearner.rst @@ -10,6 +10,8 @@ Tutorial `~adaptive.BalancingLearner` The complete source code of this tutorial can be found in :jupyter-download:notebook:`tutorial.BalancingLearner` +.. thebe-button:: Run the code live inside the documentation! + .. jupyter-execute:: :hide-code: diff --git a/docs/source/tutorial/tutorial.DataSaver.rst b/docs/source/tutorial/tutorial.DataSaver.rst index 82a8f3f11..c432f6e1f 100644 --- a/docs/source/tutorial/tutorial.DataSaver.rst +++ b/docs/source/tutorial/tutorial.DataSaver.rst @@ -10,6 +10,8 @@ Tutorial `~adaptive.DataSaver` The complete source code of this tutorial can be found in :jupyter-download:notebook:`tutorial.DataSaver` +.. thebe-button:: Run the code live inside the documentation! + .. jupyter-execute:: :hide-code: diff --git a/docs/source/tutorial/tutorial.IntegratorLearner.rst b/docs/source/tutorial/tutorial.IntegratorLearner.rst index e365a8377..09d18c8d2 100644 --- a/docs/source/tutorial/tutorial.IntegratorLearner.rst +++ b/docs/source/tutorial/tutorial.IntegratorLearner.rst @@ -10,6 +10,8 @@ Tutorial `~adaptive.IntegratorLearner` The complete source code of this tutorial can be found in :jupyter-download:notebook:`tutorial.IntegratorLearner` +.. thebe-button:: Run the code live inside the documentation! + .. jupyter-execute:: :hide-code: diff --git a/docs/source/tutorial/tutorial.Learner1D.rst b/docs/source/tutorial/tutorial.Learner1D.rst index 9e82539b3..d1aae414b 100644 --- a/docs/source/tutorial/tutorial.Learner1D.rst +++ b/docs/source/tutorial/tutorial.Learner1D.rst @@ -10,6 +10,8 @@ Tutorial `~adaptive.Learner1D` The complete source code of this tutorial can be found in :jupyter-download:notebook:`tutorial.Learner1D` +.. thebe-button:: Run the code live inside the documentation! + .. jupyter-execute:: :hide-code: diff --git a/docs/source/tutorial/tutorial.Learner2D.rst b/docs/source/tutorial/tutorial.Learner2D.rst index 56bf0d1d3..2ca05b55f 100644 --- a/docs/source/tutorial/tutorial.Learner2D.rst +++ b/docs/source/tutorial/tutorial.Learner2D.rst @@ -10,6 +10,8 @@ Tutorial `~adaptive.Learner2D` The complete source code of this tutorial can be found in :jupyter-download:notebook:`tutorial.Learner2D` +.. thebe-button:: Run the code live inside the documentation! + .. jupyter-execute:: :hide-code: diff --git a/docs/source/tutorial/tutorial.LearnerND.rst b/docs/source/tutorial/tutorial.LearnerND.rst index 164490b5c..bed15cdbb 100644 --- a/docs/source/tutorial/tutorial.LearnerND.rst +++ b/docs/source/tutorial/tutorial.LearnerND.rst @@ -10,6 +10,8 @@ Tutorial `~adaptive.LearnerND` The complete source code of this tutorial can be found in :jupyter-download:notebook:`tutorial.LearnerND` +.. thebe-button:: Run the code live inside the documentation! + .. jupyter-execute:: :hide-code: diff --git a/docs/source/tutorial/tutorial.SKOptLearner.rst b/docs/source/tutorial/tutorial.SKOptLearner.rst index 5998bbf9b..3c6ede7f1 100644 --- a/docs/source/tutorial/tutorial.SKOptLearner.rst +++ b/docs/source/tutorial/tutorial.SKOptLearner.rst @@ -10,6 +10,8 @@ Tutorial `~adaptive.SKOptLearner` The complete source code of this tutorial can be found in :jupyter-download:notebook:`tutorial.SKOptLearner` +.. thebe-button:: Run the code live inside the documentation! + .. jupyter-execute:: :hide-code: diff --git a/docs/source/tutorial/tutorial.SequenceLearner.rst b/docs/source/tutorial/tutorial.SequenceLearner.rst index 22c942779..2243d8710 100644 --- a/docs/source/tutorial/tutorial.SequenceLearner.rst +++ b/docs/source/tutorial/tutorial.SequenceLearner.rst @@ -10,6 +10,8 @@ Tutorial `~adaptive.SequenceLearner` The complete source code of this tutorial can be found in :jupyter-download:notebook:`tutorial.SequenceLearner` +.. thebe-button:: Run the code live inside the documentation! + .. jupyter-execute:: :hide-code: diff --git a/docs/source/tutorial/tutorial.advanced-topics.rst b/docs/source/tutorial/tutorial.advanced-topics.rst index 6cbd46b9b..bc63e5b0c 100644 --- a/docs/source/tutorial/tutorial.advanced-topics.rst +++ b/docs/source/tutorial/tutorial.advanced-topics.rst @@ -10,6 +10,8 @@ Advanced Topics The complete source code of this tutorial can be found in :jupyter-download:notebook:`tutorial.advanced-topics` +.. thebe-button:: Run the code live inside the documentation! + .. jupyter-execute:: :hide-code: diff --git a/docs/source/tutorial/tutorial.custom_loss.rst b/docs/source/tutorial/tutorial.custom_loss.rst index 6d1fe47b8..e3a00b653 100644 --- a/docs/source/tutorial/tutorial.custom_loss.rst +++ b/docs/source/tutorial/tutorial.custom_loss.rst @@ -10,6 +10,8 @@ Custom adaptive logic for 1D and 2D The complete source code of this tutorial can be found in :jupyter-download:notebook:`tutorial.custom-loss` +.. thebe-button:: Run the code live inside the documentation! + .. jupyter-execute:: :hide-code: