[sphinx-dev] documentation coverage

1,742 views
Skip to first unread message

Daniel Stutzbach

unread,
May 17, 2010, 10:48:42 AM5/17/10
to sphinx-dev
I'm trying to use the coverage extension to check for functions I
missed while writing documentation, but I'm not having much luck.
_build/coverage/python.txt always contains:

Undocumented Python objects
===========================

... and nothing else, even if I deliberately delete some
documentation.

If I use autodoc, it finds my modules and can generate rudimentary
documentation for them, so I know Sphinx can import my module.

Presumably I'm doing something wrong, but I'm not sure where to start
looking. Any suggestions? A minimal example demonstrating the
coverage extension in practice would be helpful. I couldn't find one
using Google.

--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To post to this group, send email to sphin...@googlegroups.com.
To unsubscribe from this group, send email to sphinx-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.

Cliff Hill

unread,
Apr 1, 2015, 5:58:59 PM4/1/15
to sphinx...@googlegroups.com, sphin...@googlegroups.com, daniel.s...@gmail.com
I also am having the same problem. Did you ever get a solution to this?

Jan Ulrich Hasecke

unread,
Apr 2, 2015, 5:35:30 AM4/2/15
to sphinx...@googlegroups.com
This is the usual way to use coverage.

1. include sphinx.ext.coverage in extensions in conf.py
2. adjust your path in conf.py so that your module is in the system
path. If your documentation lives in yourmodule/doc try this:

sys.path.insert(0, os.path.abspath('..'))

3. in your rst-file start the documentation of a module with the module
directive.

.. module:: mymodule

4. Call sphinx-build:

$ sphinx-build -b coverage sourcedir builddir

sourcedir is the root dir of your documentation. So if you call
sphinx-build from your root directory you can call it like this:

$ sphinx-build -b coverage . _build/coverage

HTH
juh

--
Software-Dokumentation mit Sphinx
http://www.amazon.de/dp/1497448689/
Paperback: 224 Seiten
Reply all
Reply to author
Forward
0 new messages