Hi,

Two issues that I'm struggling to work out solve cleanly with the autodoc 
extension for sphinx.


How to reference a docstring (without signature) so that sphinx will 
include it in other docstrings when generating:

have multiple functions where the there is a subset of same options common 
to all and are in fact handled by a private method. To make it easier to 
maintain the user doc it would be useful if I could place the common 
options in the private function docstring and for each of the functions 
that call it add directive that would include these common options directly 
inline in the outputted docs. Instead of exposing the private function and 
having the user have to jump from one function definition to another in 
order to know the full set of options available. At the moment the same 
information is maintained in all of the top level function docstrings and 
is at risk of falling out of sync.

Can see this with the descriptions for the following:
http://ci.openstack.org/jenkins-job-builder/publishers.html#publishers.checkstyle
http://ci.openstack.org/jenkins-job-builder/publishers.html#publishers.dry
http://ci.openstack.org/jenkins-job-builder/publishers.html#publishers.pmd

A substantial chunk of these (and of others to be refactored) use the same 
private function for the common options and it would be useful to be able 
to have the same source for the docstring relating to this piece, even if 
broke up the list of parameters, just as long as the reader doesn't need to 
jump around the page to understand.


Similar issue: Once off skip module summary or function signatures (maybe a 
solution to previous could solve this too)

Wanted to be able to reference a module member docstring in a rst file a 
second time, at the moment if I use 'autofunction' to pull in just the this 
will result in the function signature being include (not desirable on this 
occasion) alternative it's not possible to list a specific member without a 
module summary when using:

.. automodule: mymodule
   :members: myfunc

I did find the following 
http://stackoverflow.com/questions/7825263/including-docstring-in-sphinx-documentation
 
so I'm wondering if it's possible to subclass ModuleDocumenter to allow 
once off suppression of the module level docstring or subclass the 
FunctionDocumenter to skip adding the signature.


Are custom classes really the only option here?

I did look at using autodoc-process-signature but there doesn't seem to be 
a way to have that trigger for one occassion without it triggering for all.


Thanks,

Darragh




-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to