Jon Guyer
unread,Apr 20, 2011, 8:51:58 AM4/20/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sphinx-dev
We have a number of examples scripts in our FiPy package that consist
of a long doctest string and a little bit of boilerplate to allow
running the doctest as a script when invoked directly. This allows us
to combine prose, math, and runnable code all in one place.
Our Sphinx conf.py has an autosummary_generate list of index files in
the examples directory that read like::
------------------
Diffusion Examples
------------------
.. autosummary::
:toctree: generated
examples.diffusion.mesh1D
examples.diffusion.mesh20x20
examples.diffusion.circle
Previously (Sphinx 0.6.something?), the generated autosummary files
would be something like::
examples.diffusion.mesh1D
=========================
.. automodule:: examples.diffusion.mesh1D
and our documentation would generate as desired, with the full
documentation rendered in Sphinxian glory.
Since upgrading to Sphinx 1.0.7, the generated autosummary files
read::
examples.diffusion.mesh1D
=========================
.. currentmodule:: examples.diffusion
.. autodata:: mesh1D
The resulting documentation is truncated to anywhere from 2 lines to
twenty or so, except in a few cases where it is included completely
for some reason.
I've been able to work around this by adding `:template: example.rst`
to my autosummary directives and declaring example.rst as::
{{ fullname }}
{{ underline }}
.. automodule:: {{ module }}.{{ objname }}
but this seems somewhat meat-fisted.
Is there a better way to get autosummary to generate automodule
instead of autodata or, alternatively, to get all of my documentation
reported by autodata?