On Sun, Jul 5, 2009 at 9:14 PM, Aaron S. Meurer<[email protected]> wrote:
>
> OK, that patch worked for simplify().  However, I had some problems
> getting some of the other functions to work.  You can pull again from
> the same branch to see what I mean.  I had to change "autofunction" to
> "function" for a handful of functions because sphinx wouldn't compile
> otherwise.

After applying:

$ git diff
diff --git a/doc/src/modules/simplify.txt b/doc/src/modules/simplify.txt
index f41c3ab..cf76929 100644
--- a/doc/src/modules/simplify.txt
+++ b/doc/src/modules/simplify.txt
@@ -9,7 +9,7 @@ simplify

 collect
 -------
-.. function:: collect
+.. autofunction:: collect

 separate
 --------



you will get during compilation:

$ make html
rm -rf sphinx
mkdir -p _build/html/
rst2html src/sympy-patches-tutorial.txt > _build/html/spt-printable.html
mkdir -p src/.static
mkdir -p _build/html _build/doctrees
mkdir -p src/modules
PYTHONPATH=.. sphinx-build -b html -d _build/doctrees -D
latex_paper_size=  src _build/html
Sphinx v0.5.2, building html
loading pickled environment... done
building [html]: targets for 1 source files that are out of date
updating environment: 0 added, 1 changed, 0 removed
reading sources... modules/simplify reST markup error:
/home/ondrej/repos/sympy/sympy/simplify/simplify.py:docstring of
collect:113: (SEVERE/4) Unexpected section title.

Notes
=====
make: *** [html] Error 1


which loosely speaking means: "your docstring for the function collect
is wrong, here is what is wrong:

Notes
=====
"

so you look into sympy/simplify/simplify.py, find the collect
function, you can see:

"""
       >>> collect(a*D(D(f,x),x)**2 + b*D(D(f,x),x)**2, D(f,x)) == \
           (a + b)*D(D(f,x),x)**2
       True


    Notes
    =====
        - arguments are expected to be in expanded form, so you might
have to call
           .expand() prior to calling this function.
"""


so it's clear what is wrong --- the Notes is a section title, but it
is inconsistent with the rest of our docs. So for example this patch
fixes it:

diff --git a/sympy/simplify/simplify.py b/sympy/simplify/simplify.py
index c24613f..65d015c 100644
--- a/sympy/simplify/simplify.py
+++ b/sympy/simplify/simplify.py
@@ -453,8 +453,7 @@ def collect(expr, syms, evaluate=True, exact=False):
        True


-    Notes
-    =====
+    *Notes*
         - arguments are expected to be in expanded form, so you might have to c
            .expand() prior to calling this function.
     """





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