Skip to content

Commit 51a982c

Browse files
authored
Add plugin hooks to RTD documentation (#415)
1 parent a0a5916 commit 51a982c

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed

docs/api_reference.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
API Reference
2+
-------------
3+
4+
This is a reference to the plugin API.
5+
6+
Hooks
7+
~~~~~
8+
9+
This plugin exposes the following hooks:
10+
11+
.. automodule:: pytest_html.hooks
12+
:members:

docs/conf.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@
88
# add these directories to sys.path here. If the directory is relative to the
99
# documentation root, use os.path.abspath to make it absolute, like shown here.
1010
#
11-
# import os
12-
# import sys
13-
# sys.path.insert(0, os.path.abspath('.'))
11+
import os
12+
import sys
13+
14+
sys.path.insert(0, os.path.abspath("../src/"))
15+
16+
1417
# -- Project information -----------------------------------------------------
1518

1619
project = "pytest-html"
@@ -23,7 +26,7 @@
2326
# Add any Sphinx extension module names here, as strings. They can be
2427
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
2528
# ones.
26-
extensions = []
29+
extensions = ["sphinx.ext.autodoc"]
2730

2831
# Add any paths that contain templates here, relative to this directory.
2932
templates_path = ["_templates"]
@@ -54,3 +57,8 @@
5457

5558
# The master toctree document.
5659
master_doc = "index"
60+
61+
62+
# -- Options for the autodoc extension ---------------------------------------
63+
64+
autodoc_member_order = "alphabetical"

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ pytest-html is a plugin for `pytest`_ that generates a HTML report for test resu
1414

1515
installing
1616
user_guide
17+
api_reference
1718
development
1819

1920
.. _pytest: http://pytest.org

0 commit comments

Comments
 (0)