#12849 closed defect (fixed)
The argspecs of extension function/methods is broken in the Sphinx documentation
Reported by:  hivert  Owned by:  mvngu, hivert 

Priority:  critical  Milestone:  sage5.0 
Component:  documentation  Keywords:  argspecs Cython 
Cc:  Merged in:  sage5.0.beta14  
Authors:  Florent Hivert, Jeroen Demeyer  Reviewers:  Mike Hansen 
Report Upstream:  N/A  Work issues:  
Branch:  Commit:  
Dependencies:  Stopgaps: 
Description (last modified by )
In the current Sphinx HTML doc, the extenstion function and methods have no arguments setup.
See for example the documentation of
reference/sage/symbolic/expression.html#sage.symbolic.expression.Expression.N
which was ok (see there) in Sage 4.8. The problem was introduced in sage5.0.beta8.
We should add a regression test on that kinds of problem.
Apply
:
Attachments (2)
Change History (23)
comment:1 Changed 7 years ago by
 Owner changed from mvngu to mvngu, hivert
Changed 7 years ago by
comment:2 followup: ↓ 3 Changed 7 years ago by
I created a doctest for this issue, which obviously fails on recent Sage betas.
comment:3 in reply to: ↑ 2 ; followup: ↓ 5 Changed 7 years ago by
Replying to jdemeyer:
I created a doctest for this issue, which obviously fails on recent Sage betas.
Thanks ! I tried to figureout a way to call directly Sphinx but this is much easier. I'll try to work on this this afternoon. Do you have somewhere the various beta compiled so that I can rsync them on boxen to help bissecting ? So far the few guesses I made to find the culprit were wrong.
comment:4 Changed 7 years ago by
sage5.0.beta5 is still okay.
comment:5 in reply to: ↑ 3 Changed 7 years ago by
Replying to hivert:
Replying to jdemeyer:
I created a doctest for this issue, which obviously fails on recent Sage betas.
Thanks ! I tried to figureout a way to call directly Sphinx but this is much easier. I'll try to work on this this afternoon. Do you have somewhere the various beta compiled so that I can rsync them on boxen to help bissecting ? So far the few guesses I made to find the culprit were wrong.
Look at http://boxen.math.washington.edu/home/release/. There should be binaries for all Sage betas, made on sage.math or boxen.math.
comment:6 Changed 7 years ago by
 Description modified (diff)
comment:7 Changed 7 years ago by
It seems that I have a fix, but I don't understand how it worked before ! Still looking.
Florent
comment:8 Changed 7 years ago by
 Description modified (diff)
It looks like this was introduced in sage5.0.beta8.
comment:9 followup: ↓ 10 Changed 7 years ago by
The culprit is #9128.
comment:10 in reply to: ↑ 9 Changed 7 years ago by
comment:11 Changed 7 years ago by
 Priority changed from blocker to critical
comment:12 Changed 7 years ago by
Hi,
I got the fix ! I'm definitely the culprit. For strange reason the following lines were removed by #9128. Putting them back should fix the problem.

doc/common/conf.py
diff git a/doc/common/conf.py b/doc/common/conf.py
a b def find_sage_dangling_links(app, env, n 576 576 newnode.append(contnode) 577 577 return newnode 578 578 579 from sage.misc.sageinspect import sage_getargspec 580 autodoc_builtin_argspec = sage_getargspec 579 581 580 582 def setup(app): 581 583 app.connect('autodocprocessdocstring', process_docstring_cython)
Changed 7 years ago by
comment:13 Changed 7 years ago by
 Description modified (diff)
 Status changed from new to needs_review
comment:14 followup: ↓ 15 Changed 7 years ago by
Jeroen: I'm reviewing your patch. Can you review mine ?
Florent
comment:15 in reply to: ↑ 14 Changed 7 years ago by
Replying to hivert:
Can you review mine ?
Sorry, no. I'm not at all familiar with the docbuilding process.
comment:16 followup: ↓ 17 Changed 7 years ago by
 Reviewers set to Mike Hansen
 Status changed from needs_review to positive_review
Florent's patch is good, as is Jeroen (even if it is a bit sensitive to the particular HTML output used by Sphinx).
comment:17 in reply to: ↑ 16 Changed 7 years ago by
Replying to mhansen:
Florent's patch is good, as is Jeroen (even if it is a bit sensitive to the particular HTML output used by Sphinx).
Thanks Mike !
comment:18 Changed 7 years ago by
 Merged in set to sage5.0.beta14
 Resolution set to fixed
 Status changed from positive_review to closed
comment:19 Changed 7 years ago by
Hi!
The doctest introduced by this patch, at line 22 of sage/misc/sagedoc.py, is causing the sagepad.org patchbot to fail on some (trivial, unrelated) patches. The problem seems to be that the doctest is trying to check the documentation when the documentation isn't built.
I don't know if this is really a problem with this patch, or with the patchbot, but I thought I would try reporting it here. If I should try elsewhere, please let me know!
You can see this failure at #12943, which is a completely trivial patch. (It's also making the sagepad.org patchbot fail on #10527. If you look at that ticket, though, don't look at the log for Volker's patchbot, which is having a different problem.)
cheers,
Hugh
comment:20 Changed 7 years ago by
A complete set of documentation is an integral part of a Sage build, so doctests are supposed to fail if the documentation hasn't been built. This is not because of this ticket, I don't think.
comment:21 Changed 7 years ago by
Thanks. The issue seems to be with the particular patchbot  I have posted to sagedevel about it.
Doctest for the issue