diff --git a/README.md b/README.md index 83ee5dd..e713e1e 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,6 @@ Finite difference methods, for applications including gradient computation and gradient checks. -Install with `pip install -e .`. - # Important notes The output of your function of interest should be a NumPy array. If your function is scalar-valued, change it to a NumPy array with: ```python diff --git a/doc/about.rst b/doc/about.rst new file mode 100644 index 0000000..f4ff78d --- /dev/null +++ b/doc/about.rst @@ -0,0 +1,5 @@ +About fiddy +=========== + +Fiddy is a Python library implementing finite difference methods, +for applications including gradient computation and gradient checks. diff --git a/doc/conf.py b/doc/conf.py index 0f5cb71..1a7e6cf 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -37,6 +37,10 @@ "sphinx.ext.napoleon", # "sphinx_autodoc_typehints", # FIXME fails "sphinx.ext.intersphinx", + "sphinx.ext.mathjax", + "nbsphinx", + "IPython.sphinxext.ipython_console_highlighting", + "recommonmark", ] intersphinx_mapping = { @@ -44,6 +48,7 @@ "pandas": ("https://pandas.pydata.org/docs/", None), "numpy": ("https://numpy.org/devdocs/", None), "python": ("https://docs.python.org/3", None), + "amici": ("https://amici.readthedocs.io/en/latest/", None), } # sphinx-autodoc-typehints diff --git a/examples/derivative.ipynb b/doc/examples/derivative.ipynb similarity index 99% rename from examples/derivative.ipynb rename to doc/examples/derivative.ipynb index d28686f..0fbd8e7 100644 --- a/examples/derivative.ipynb +++ b/doc/examples/derivative.ipynb @@ -5,6 +5,8 @@ "id": "1766a5fc", "metadata": {}, "source": [ + "# Demo\n", + "\n", "We will approximate the derivative of the Rosenbrock function at `(1,0,0)`, with the forward and backward difference methods, and with two different step sizes.\n", "\n", "We will also compute an approximation of the central difference, as the average of the forward and backward results.\n", diff --git a/doc/index.rst b/doc/index.rst index 46cab7e..3e348c2 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -5,6 +5,8 @@ Welcome to fiddy's documentation! :maxdepth: 2 :caption: Contents: + about + examples/derivative modules Indices and tables diff --git a/setup.cfg b/setup.cfg index b1d928b..454f321 100644 --- a/setup.cfg +++ b/setup.cfg @@ -55,11 +55,15 @@ all = %(examples)s %(tests)s doc = - sphinx<8 docutils<0.19 + ipython + mock + nbconvert + nbsphinx + recommonmark>=0.7.1 + sphinx<8 sphinx_rtd_theme sphinx-autodoc-typehints - mock %(amici)s amici = amici