Skip to content

Commit

Permalink
added tutorials to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
syp2001 committed Sep 4, 2023
1 parent 7de82d3 commit 20eb66a
Show file tree
Hide file tree
Showing 22 changed files with 1,262 additions and 96 deletions.
3 changes: 1 addition & 2 deletions docs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ dependencies:
- pip
- python=3.11
- sphinx-book-theme
- nbsphinx
- sphinx-autoapi
- myst-nb
5 changes: 5 additions & 0 deletions docs/source/_templates/custom-base-template.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{ name | escape | underline }}

.. currentmodule:: {{ module }}

.. auto{{ objtype }}:: {{ objname }}
2 changes: 1 addition & 1 deletion docs/source/_templates/custom-class-template.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ fullname | escape | underline}}
{{ name | escape | underline}}

.. currentmodule:: {{ module }}

Expand Down
5 changes: 3 additions & 2 deletions docs/source/_templates/custom-module-template.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ fullname | escape | underline}}
{{ name | escape | underline}}

.. automodule:: {{ fullname }}

Expand All @@ -20,6 +20,7 @@

.. autosummary::
:toctree:
:template: custom-base-template.rst
{% for item in functions %}
{{ item }}
{%- endfor %}
Expand Down Expand Up @@ -60,7 +61,7 @@
:template: custom-module-template.rst
:recursive:
{% for item in modules %}
{{ item }}
~{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}
4 changes: 3 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"nbsphinx"
"myst_nb"
]
myst_enable_extensions = ["dollarmath", "amsmath"]
nb_execution_mode = "off"
autosummary_generate = True
# https://stackoverflow.com/questions/2701998/automatically-document-all-modules-recursively-with-sphinx-autodoc/62613202#62613202

Expand Down
37 changes: 29 additions & 8 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ The library also provides a set of methods for computing constants of motion and
:align: right
:width: 45%

.. note::

This project is under active development.

.. _Installation:

Installation
------------
Install the latest version of kerrgeopy using pip
Expand All @@ -26,27 +32,42 @@ Install the latest version of kerrgeopy using pip
pip install kerrgeopy
See `Getting Started <notebooks/Tutorial.html>`_ for usage examples.

.. note::

This project is under active development. The documentation is not yet complete.
See `Getting Started <notebooks/Tutorial.html>`_ for basic usage. See the `API Reference`_ below or the `Modules <_autosummary/kerrgeopy.html>`_ page for a complete list of classes and methods.


.. toctree::
:maxdepth: 2
:caption: Tutorials

notebooks/Tutorial
notebooks/Trajectory
notebooks/Orbital Properties
notebooks/Graphics

.. _API Reference:

API Reference
-------------

.. toctree::
:maxdepth: 1
:caption: API Reference
:hidden:

Full List of Modules <https://kerrgeopy.readthedocs.io/en/latest/_autosummary/kerrgeopy.html>

.. autosummary::
:toctree: _autosummary
:template: custom-module-template.rst
:caption: API Reference
:recursive:

kerrgeopy

~kerrgeopy.bound_orbit.BoundOrbit
~kerrgeopy.plunging_orbit.PlungingOrbit
~kerrgeopy.orbit.Orbit
~kerrgeopy.spacetime.KerrSpacetime
~kerrgeopy.constants
~kerrgeopy.frequencies
~kerrgeopy.units

Indices and tables
==================
Expand Down
192 changes: 192 additions & 0 deletions docs/source/notebooks/Graphics.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit 20eb66a

Please sign in to comment.