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?
--
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sphinx-dev?hl=en.