From 8c61a50d5ed567d990cc0876f42457c48d028723 Mon Sep 17 00:00:00 2001 From: Gleb Nikonorov Date: Sat, 12 Dec 2020 20:54:23 -0500 Subject: [PATCH] Add plugin hooks to RTD documentation --- docs/api_reference.rst | 12 ++++++++++++ docs/conf.py | 16 ++++++++++++---- docs/index.rst | 1 + 3 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 docs/api_reference.rst diff --git a/docs/api_reference.rst b/docs/api_reference.rst new file mode 100644 index 00000000..c3a72678 --- /dev/null +++ b/docs/api_reference.rst @@ -0,0 +1,12 @@ +API Reference +------------- + +This is a reference to the plugin API. + +Hooks +~~~~~ + +This plugin exposes the following hooks: + +.. automodule:: pytest_html.hooks + :members: diff --git a/docs/conf.py b/docs/conf.py index 2aab7825..ddb7c3d1 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -8,9 +8,12 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # -# import os -# import sys -# sys.path.insert(0, os.path.abspath('.')) +import os +import sys + +sys.path.insert(0, os.path.abspath("../src/")) + + # -- Project information ----------------------------------------------------- project = "pytest-html" @@ -23,7 +26,7 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = [] +extensions = ["sphinx.ext.autodoc"] # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] @@ -54,3 +57,8 @@ # The master toctree document. master_doc = "index" + + +# -- Options for the autodoc extension --------------------------------------- + +autodoc_member_order = "alphabetical" diff --git a/docs/index.rst b/docs/index.rst index 6f8552a7..b223ba41 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -14,6 +14,7 @@ pytest-html is a plugin for `pytest`_ that generates a HTML report for test resu installing user_guide + api_reference development .. _pytest: http://pytest.org