Skip to content

Commit aef418c

Browse files
authored
Merge pull request #33 from RonnyPfannschmidt/docs-quickstart
add sphinx autodoc api doc
2 parents cac9657 + 86f3aa4 commit aef418c

File tree

4 files changed

+103
-0
lines changed

4 files changed

+103
-0
lines changed

docs/api_reference.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
3+
Api Reference
4+
=============
5+
6+
.. automodule:: pluggy
7+
:members:
8+
:undoc-members:
9+
:show-inheritance:
10+
11+

docs/conf.py

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# -*- coding: utf-8 -*-
2+
import pkg_resources
3+
4+
5+
extensions = [
6+
'sphinx.ext.autodoc',
7+
'sphinx.ext.doctest',
8+
'sphinx.ext.intersphinx',
9+
'sphinx.ext.coverage',
10+
'sphinx.ext.viewcode',
11+
]
12+
13+
# Add any paths that contain templates here, relative to this directory.
14+
templates_path = ['_templates']
15+
16+
source_suffix = '.rst'
17+
18+
# The master toctree document.
19+
master_doc = 'index'
20+
21+
# General information about the project.
22+
23+
dist = pkg_resources.get_distribution('pluggy')
24+
project = dist.project_name
25+
copyright = u'2016, Holger Krekel'
26+
author = 'Holger Krekel'
27+
28+
release = dist.version
29+
# The short X.Y version.
30+
version = u'.'.join(dist.version.split('.')[:2])
31+
32+
33+
language = None
34+
35+
pygments_style = 'sphinx'
36+
html_theme = 'alabaster'
37+
html_static_path = ['_static']
38+
39+
# One entry per manual page. List of tuples
40+
# (source start file, name, description, authors, manual section).
41+
man_pages = [
42+
(master_doc, 'pluggy', u'pluggy Documentation',
43+
[author], 1)
44+
]
45+
46+
47+
# -- Options for Texinfo output -------------------------------------------
48+
49+
# Grouping the document tree into Texinfo files. List of tuples
50+
# (source start file, target name, title, author,
51+
# dir menu entry, description, category)
52+
texinfo_documents = [
53+
(master_doc, 'pluggy', u'pluggy Documentation',
54+
author, 'pluggy', 'One line description of project.',
55+
'Miscellaneous'),
56+
]
57+
58+
# Example configuration for intersphinx: refer to the Python standard library.
59+
intersphinx_mapping = {'https://docs.python.org/': None}

docs/index.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.. pluggy documentation master file, created by
2+
sphinx-quickstart on Mon Nov 14 11:08:31 2016.
3+
You can adapt this file completely to your liking, but it should at least
4+
contain the root `toctree` directive.
5+
6+
Welcome to pluggy's documentation!
7+
==================================
8+
9+
Contents:
10+
11+
.. toctree::
12+
:maxdepth: 2
13+
14+
api_reference
15+
16+
17+
Indices and tables
18+
==================
19+
20+
* :ref:`genindex`
21+
* :ref:`modindex`
22+
* :ref:`search`
23+

tox.ini

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ commands =
1919
py.test --flakes -m flakes pluggy.py testing/test_pluggy.py
2020
rst-lint CHANGELOG.rst README.rst
2121

22+
23+
[testenv:docs]
24+
deps =
25+
sphinx
26+
pygments
27+
28+
commands =
29+
sphinx-build \
30+
-b html \
31+
{toxinidir}/docs {toxinidir}/build/html-docs
2232
[pytest]
2333
minversion=2.0
2434
#--pyargs --doctest-modules --ignore=.tox

0 commit comments

Comments
 (0)