Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add sphinx autodoc api doc #33

Merged
merged 2 commits into from
Nov 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/api_reference.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@


Api Reference
=============

.. automodule:: pluggy
:members:
:undoc-members:
:show-inheritance:


59 changes: 59 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# -*- coding: utf-8 -*-
import pkg_resources


extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'

# General information about the project.

dist = pkg_resources.get_distribution('pluggy')
project = dist.project_name
copyright = u'2016, Holger Krekel'
author = 'Holger Krekel'

release = dist.version
# The short X.Y version.
version = u'.'.join(dist.version.split('.')[:2])


language = None

pygments_style = 'sphinx'
html_theme = 'alabaster'
html_static_path = ['_static']

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'pluggy', u'pluggy Documentation',
[author], 1)
]


# -- Options for Texinfo output -------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'pluggy', u'pluggy Documentation',
author, 'pluggy', 'One line description of project.',
'Miscellaneous'),
]

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}
23 changes: 23 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.. pluggy documentation master file, created by
sphinx-quickstart on Mon Nov 14 11:08:31 2016.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

Welcome to pluggy's documentation!
==================================

Contents:

.. toctree::
:maxdepth: 2

api_reference


Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

10 changes: 10 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ commands =
py.test --flakes -m flakes pluggy.py testing/test_pluggy.py
rst-lint CHANGELOG.rst README.rst


[testenv:docs]
deps =
sphinx
pygments

commands =
sphinx-build \
-b html \
{toxinidir}/docs {toxinidir}/build/html-docs
[pytest]
minversion=2.0
#--pyargs --doctest-modules --ignore=.tox
Expand Down