Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc generation script typos #41

Closed
williamstein opened this issue Sep 12, 2006 · 5 comments
Closed

doc generation script typos #41

williamstein opened this issue Sep 12, 2006 · 5 comments

Comments

@williamstein
Copy link
Contributor

  • Paisa Seeluangsawat:
> There are typos in the docs.  They tend to get functions'
> optional arguments mixed up.  For an example, compare
>
> 
> http://modular.math.washington.edu/sage/doc/html/ref/module-sage.rings.multi-polynomial-ring.html
>
>     MPolynomialRing(base_ring, [n=False], [names=degrevlex],
>       [order=None], [macaulay2=1])
>
> with
>
>     $SAGE_ROOT/local/lib/python2.4/site-packages/sage/rings/
>
>     def MPolynomialRing(base_ring, n=1, names=None,
>                         order='degrevlex', macaulay2=False):

That's really weird. Many thanks for pointing out the problem.
That documentation is generated from the source code, so I'll investigate
the script that does the generation. Again, thanks for the bug
report.

Component: user interface

Issue created by migration from https://trac.sagemath.org/ticket/41

@williamstein
Copy link
Contributor Author

comment:1

From Alec C:

Looking over the SAGE reference manual I found some crazy stuff in section
8.1 2D Plotting
 
* show*( self, [xmin=False], [xmax=None], [ymin=True], [ymax=125 ], [
figsize=None], [filename=[5, 4]], [dpi=None], [ axes=None], [axes_label=None
], [frame=None])
 
look at figsize, etc.   some other functions have the same problem, any
ideas?
 
This has been reported before.  It must be a bug in update, i.e,. that file
in <SAGE_ROOT>/devel/sage/sage/ref that I showed you.   We have to fix this.

@williamstein
Copy link
Contributor Author

comment:2

Another example from Ifti
{{{> [2] There seems to be some strange function declaration mangling which

seems to be going on in the manual.

For example the function Lseries_dokchitser in the manual

http://sage.math.washington.edu/sage/doc/html/ref/module-sage.schemes.elliptic-curves.ell-rational-field.html

reads

Lseries_dokchitser(self, [prec=gp], [max_imaginary_part=40], [max_asymp_coeffs=0], [algorithm=53])

whereas the source code and E.Lseries_dokchitser? help reads:

def Lseries_dokchitser(self, prec=53,
max_imaginary_part=0,
max_asymp_coeffs=40,
algorithm='gp'):

}}}

@williamstein
Copy link
Contributor Author

comment:3

From Ifti

> [2] There seems to be some strange function declaration mangling which
> seems to be going on in the manual.
>
> For example the function Lseries_dokchitser in the manual
>
> http://sage.math.washington.edu/sage/doc/html/ref/module-sage.schemes.elliptic-curves.ell-rational-field.html
>
> reads
>
> Lseries_dokchitser(self, [prec=gp], [max_imaginary_part=40], [max_asymp_coeffs=0], [algorithm=53])
>
> whereas the source code and E.Lseries_dokchitser? help reads:
>
> def Lseries_dokchitser(self, prec=53,
> 			max_imaginary_part=0,
> 			max_asymp_coeffs=40,
> 			algorithm='gp'):

@williamstein
Copy link
Contributor Author

comment:4

Fixed for SAGE-1.9.
hg_doc patch below.


# HG changeset patch
# User William Stein <wstein@gmail.com>
# Date 1169755223 28800
# Node ID 85b2f50482ffb977c19441aa1966e62a1dec70ca
# Parent  3b37261f05314307520d7fc83d34559ab3577746
Trac #41 -- ref manual autogenerated argument input list had defaults *backwards*.

diff -r 3b37261f0531 -r 85b2f50482ff ref/update_script.py
--- a/ref/update_script.py      Thu Jan 25 11:27:19 2007 -0800
+++ b/ref/update_script.py      Thu Jan 25 12:00:23 2007 -0800
@@ -229,8 +229,10 @@ def doc_method(name, f, source_code=None
     except TypeError:
         args = []; defaults=[]
     if defaults != None:
+        n = len(args)
         for i in range(len(defaults)):
-            args[len(args)-1-i] = '\\optional{%s=%s}'%(args[len(args)-1-i],defaults[i])
+            args[n-1-i] = '\\optional{%s=%s}'%(
+                args[n-1-i],defaults[len(defaults)-i-1])
 
     if source_code and len(args) == 0:
         args = determine_args_from_src(source_code, name, cls)

@williamstein williamstein added this to the sage-1.9 milestone Jan 25, 2007
@fchapoton

This comment has been minimized.

tobiasdiez pushed a commit to tobiasdiez/sage that referenced this issue Feb 22, 2024
* Improvements on package discovery for setup.py

* Exclude test file from flake8

* Add stdlib-list to azure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants