[SciPy-dev] documenting objects in stats.distributions

Christopher Burns cburns at berkeley.edu
Wed Dec 16 05:59:44 EST 2009


On Wed, Dec 16, 2009 at 2:00 PM, Ralf Gommers
<ralf.gommers at googlemail.com> wrote:
> No, to remove the warning pydocweb (the wiki app) should recognize the
> Methods section in class instance docstrings I think.
>
> A related point: the docstrings for the stats distributions are generated
> from a template right now, so any edits for those docstrings in the doc wiki
> can not be merged without a lot of tweaking. If you're also interested in
> working on other areas of the scipy docs, that might be more effective.

pydocweb doesn't appear to recognize the Methods section in the
instance docstrings.   Looking at the code I see that the classes we
were editing all subclass rv_continuous.  So if we update the
docstring for rv_continuous, like to have spaces between parameters,
then that will propagate to the children, is that correct?

I see there are 80 children:
cburns at stats 14:41:19 $ pwd
/Users/cburns/src/scipy-trunk/scipy/stats
cburns at stats 14:41:24 $ grin '\(rv_continuous\)' distributions.py | wc -l
      80

I've only looked at a few of the child classes, but in each of those
the instance docstring displays the warning about the Methods section.
 Glancing at the pydocweb source I'm wondering if it's mapping these
docstrings to a NumpyFunctionDocString?  The NumpyFunctionDocString
docstrings don't have a Method section.

Since so many of these inherit their docstring from a parent class, is
it possible to show that fact on the documentation editor page?
Otherwise people will make the same mistake we made and edit the
generated docstrings instead of the template.

Chris



More information about the SciPy-Dev mailing list