From 652a89cc9f972e88a593c7beebaff64ba6387533 Mon Sep 17 00:00:00 2001 From: Garry O'Donnell Date: Tue, 12 Jul 2022 14:50:05 +0000 Subject: [PATCH] Add api reference to docs --- docs/conf.py | 17 ++++++- docs/reference/api.rst | 101 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 71ce2b23..18b94f38 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -3,11 +3,17 @@ # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/main/usage/configuration.html +from sphinx.domains.python import PythonDomain import adcorr # -- General configuration ------------------------------------------------ +# Workaround for NewType as autodata, to be removed when issue is resolved +# see: https://github.com/sphinx-doc/sphinx/issues/9560 +assert PythonDomain.object_types["data"].roles == ("data", "obj") +PythonDomain.object_types["data"].roles = ("data", "class", "obj") + # General information about the project. project = "adcorr" @@ -42,7 +48,16 @@ # generating warnings in "nitpicky mode". Note that type should include the # domain name if present. Example entries would be ('py:func', 'int') or # ('envvar', 'LD_LIBRARY_PATH'). -nitpick_ignore = [("py:func", "int")] +nitpick_ignore: list[tuple[str, str]] = [ + ("py:class", "dtype"), + ("py:class", "floating"), + ("py:class", "ndarray"), + ("py:class", "numpy.bool_"), + ("py:class", "numpy.dtype"), + ("py:class", "numpy.floating"), + ("py:class", "numpy.ndarray"), + ("py:class", "numpy.ma.core.MaskedArray"), +] # Both the class’ and the __init__ method’s docstring are concatenated and # inserted into the main body of the autoclass directive diff --git a/docs/reference/api.rst b/docs/reference/api.rst index 2093681e..c42adf08 100644 --- a/docs/reference/api.rst +++ b/docs/reference/api.rst @@ -6,6 +6,107 @@ API ``adcorr`` ---------- + .. automodule:: adcorr.utils + + ``adcorr.utils`` + ---------------- + + .. automodule:: adcorr.utils.geometry + :members: + + ``adcorr.utils.geometry`` + ------------------------- + + .. automodule:: adcorr.utils.typing + :members: + + ``adcorr.utils.typing`` + ----------------------- + + .. automodule:: adcorr.angular_efficiency + :members: + + ``adcorr.angular_efficiency`` + ----------------------------- + + .. automodule:: adcorr.background_subtraction + :members: + + ``adcorr.background_subtraction`` + --------------------------------- + + .. automodule:: adcorr.dark_current + :members: + + ``adcorr.dark_current`` + ----------------------- + + .. automodule:: adcorr.deadtime + :members: + + ``adcorr.deadtime`` + ------------------- + + .. automodule:: adcorr.displaced_volume + :members: + + ``adcorr.displaced_volume`` + --------------------------- + + .. automodule:: adcorr.flatfield + :members: + + ``adcorr.flatfield`` + -------------------- + + .. automodule:: adcorr.flux_and_transmission + :members: + + ``adcorr.flux_and_transmission`` + -------------------------------- + + .. automodule:: adcorr.frame_average + :members: + + ``adcorr.frame_average`` + ------------------------ + + .. automodule:: adcorr.frame_time + :members: + + ``adcorr.frame_time`` + --------------------- + + .. automodule:: adcorr.masking + :members: + + ``adcorr.masking`` + ------------------ + + .. automodule:: adcorr.polarization + :members: + + ``adcorr.polarization`` + ----------------------- + + .. automodule:: adcorr.self_absorption + :members: + + ``adcorr.self_absorption`` + -------------------------- + + .. automodule:: adcorr.solid_angle + :members: + + ``adcorr.solid_angle`` + ---------------------- + + .. automodule:: adcorr.thickness + :members: + + ``adcorr.thickness`` + -------------------- + .. data:: adcorr.__version__ :type: str