Skip to content

Commit

Permalink
Merge pull request #242 from tBuLi/sphinx_notebook
Browse files Browse the repository at this point in the history
Notebooks in documentation
  • Loading branch information
tBuLi committed Jun 6, 2019
2 parents e030a01 + 565cfb5 commit 4b5932c
Show file tree
Hide file tree
Showing 11 changed files with 1,030 additions and 56 deletions.
23 changes: 23 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Optionally build your docs in additional formats such as PDF and ePub
formats: all

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
install:
- requirements: requirements_docs.txt
- method: pip
path: .
extra_requirements:
- all
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@ jobs:

- stage: docs
python: "3.7"
addons:
apt:
packages:
- pandoc
install:
- pip install --upgrade sphinx
- pip install --upgrade -r requirements_docs.txt
- pip install --upgrade .[all]
script:
- mkdir docs_build
Expand Down
4 changes: 4 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
'sphinx.ext.mathjax',
'sphinx.ext.viewcode',
'sphinx.ext.intersphinx',
'nbsphinx',
]

intersphinx_mapping = {
Expand All @@ -54,6 +55,9 @@
('py:func', 'symfit.core.leastsqbound.leastsqbound')
]

# Always re-execute notebooks when building the docs
nbsphinx_execute = 'always'

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

Expand Down
168 changes: 168 additions & 0 deletions docs/examples/ex_bivariate_likelihood.ipynb

Large diffs are not rendered by default.

26 changes: 0 additions & 26 deletions docs/examples/ex_bivariate_likelihood.rst

This file was deleted.

260 changes: 260 additions & 0 deletions docs/examples/ex_mexican_hat.ipynb

Large diffs are not rendered by default.

203 changes: 203 additions & 0 deletions docs/examples/ex_ode_system.ipynb

Large diffs are not rendered by default.

349 changes: 349 additions & 0 deletions docs/examples/ex_tikhonov.ipynb

Large diffs are not rendered by default.

15 changes: 13 additions & 2 deletions docs/examples/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ paper.
ex_piecewise
ex_poly_surface_fit
ex_ODEModel
ex_ode_system.ipynb
ex_CallableNumericalModel
ex_tikhonov.ipynb

Objective Examples
------------------
Expand All @@ -28,7 +30,16 @@ standard least-squares objective, such as likelihood fitting.
.. toctree::
:maxdepth: 1

ex_bivariate_likelihood
ex_bivariate_likelihood.ipynb

Minimizer Examples
------------------
These examples demonstrate the different minimizers available in ``symfit``.

.. toctree::
:maxdepth: 1

ex_mexican_hat.ipynb

Interactive Guess Module
------------------------
Expand All @@ -43,4 +54,4 @@ initial values.

ex_interactive_guesses_ODE
ex_interactive_guesses_vector_2D
ex_interactive_guesses_nD
ex_interactive_guesses_nD
27 changes: 0 additions & 27 deletions examples/bivariate_likelihood.py

This file was deleted.

5 changes: 5 additions & 0 deletions requirements_docs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-r requirements.txt
sphinx
nbsphinx
IPython
ipykernel

0 comments on commit 4b5932c

Please sign in to comment.