I'm evaluating Sphinx for use as our Python integration documentation
mechanism. We use SWIG to generate an integration layer, and a custom
build step prior to SWIG that processes SDK headers and generates C++
classes for SWIG to wrap. Therefore, the code I'm attempting to "document"
is actually almost 100% automatically generated.
I am trying to see if Sphinx will following this, so that I do not have to
manually keep the *.rst files updated with any automatic changes in the
wrapper.
I have reached a point where I have something like the following:
.. module:: pcore
.. class:: IMaster
This Sphinx code generates an entry for the IMaster class that looks like:
*class *pcore.IMaster [source]
and the "[source]" link properly bounces to the portion of the "pcore"
module that defines the Python IMaster class. However, it does not go
further and insert the class's docstring, nor does it create documentation
of the class's defined methods. I've tried adding:
.. method:: flags()
and:
.. classmethod:: flags()
but it only adds an entry that mirrors that, and not something that
indicates the method belongs to the afore-documented IMaster class.
If it's not clear, the goal is to avoid having to keep the class/method
documentation updated by hand, because it will easily lag behind any
changes to the upstream headers. It obviously knows about the Python
class, because it provides a link to its declaration, so how do I get
Sphinx to automatically generate method entries for the referenced class::
name?
--
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/sphinx-dev/-/j_4KuPkFzToJ.
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.