Skip to content

Commit

Permalink
Update RTD page
Browse files Browse the repository at this point in the history
* Add landing page stub
* Add example notebook

To be prettified later...
  • Loading branch information
dweindl committed Oct 8, 2024
1 parent 6aea82e commit b81f098
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 4 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions doc/about.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
About fiddy
===========

Fiddy is a Python library implementing finite difference methods,
for applications including gradient computation and gradient checks.
5 changes: 5 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,18 @@
"sphinx.ext.napoleon",
# "sphinx_autodoc_typehints", # FIXME fails
"sphinx.ext.intersphinx",
"sphinx.ext.mathjax",
"nbsphinx",
"IPython.sphinxext.ipython_console_highlighting",
"recommonmark",
]

intersphinx_mapping = {
"petab": ("https://petab.readthedocs.io/en/stable/", None),
"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
Expand Down
2 changes: 2 additions & 0 deletions examples/derivative.ipynb → doc/examples/derivative.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Welcome to fiddy's documentation!
:maxdepth: 2
:caption: Contents:

about
examples/derivative
modules

Indices and tables
Expand Down
8 changes: 6 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b81f098

Please sign in to comment.