Sounds like a good policy.  We already require tests for everything,  
so it is not too much more of a hassle.  I think we should have at  
least a docstring for all classes as well, since you can do  
help(Class) and it gives you information on it.  Maybe you don't need  
a doctest for a class docstring, but having at least a docstring would  
be nice.

What about adding docstrings of new functions to Sphinx?  Quite a few  
functions' docstrings are not available on docs.sympy.org because no  
one has added them to the Sphinx docs.  All a person has to do is add  
a ".. automethod:: function" line for whatever function they write, or  
add a new file if it is a new module or one that isn't in Sphinx yet.   
It could be a bit more of a hassle as most people don't know Sphinx.   
Would it maybe be possible to automatically pull together autodocs for  
all functions in an __init__.py file that have docstrings (which  
should be all functions in any __init__.py file).

Aaron Meurer
On Jul 7, 2009, at 10:57 PM, Ondrej Certik wrote:

>
> Hi,
>
> from now on a patch in order to pass a review, it must have at least
> one example doctest for each function/method (except those beginning
> with _).
> To test it, use the bin/coverage_doctest.py script, like this:
>
> $ bin/coverage_doctest.py sympy/integrals/integrals.py
> ----------------------------------------------------------------------
> sympy/integrals/integrals.py
>
> Missing documentation:
>        * function(self)
>        * limits(self)
>        * variables(self)
>        * doit(self, **hints)
>
>
> Missing doctests:
>        * transform(self, x, mapping, inverse=False)
>
> SCORE sympy/integrals/integrals.py: 37% (3 of 8)
> ----------------------------------------------------------------------
>
>
> Our goal is for every file in sympy to have 100%.
>
> For rationale, see:
>
> http://groups.google.com/group/sympy/browse_thread/thread/45aa9de214ed6f76/
>
> as written there, this is not for testing a functionality, but to show
> the user how to use the function on an example and to use sphinx's
> autodoc to document it.
>
> Ondrej
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" 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/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to