Ticket #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: | sage-5.0 |
| Component: | documentation | Keywords: | argspecs Cython |
| Cc: | Work issues: | ||
| Report Upstream: | N/A | Reviewers: | Mike Hansen |
| Authors: | Florent Hivert, Jeroen Demeyer | Merged in: | sage-5.0.beta14 |
| Dependencies: | Stopgaps: |
Description (last modified by hivert) (diff)
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 sage-5.0.beta8.
We should add a regression test on that kinds of problem.
Apply:
Attachments
Change History
comment:2 follow-up: ↓ 3 Changed 14 months ago by jdemeyer
I created a doctest for this issue, which obviously fails on recent Sage betas.
comment:3 in reply to: ↑ 2 ; follow-up: ↓ 5 Changed 14 months ago by 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.
comment:5 in reply to: ↑ 3 Changed 14 months ago by jdemeyer
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:7 Changed 14 months ago by hivert
It seems that I have a fix, but I don't understand how it worked before ! Still looking.
Florent
comment:8 Changed 14 months ago by jdemeyer
- Description modified (diff)
It looks like this was introduced in sage-5.0.beta8.
comment:10 in reply to: ↑ 9 Changed 14 months ago by hivert
comment:12 Changed 14 months ago by hivert
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('autodoc-process-docstring', process_docstring_cython)
comment:13 Changed 14 months ago by hivert
- Status changed from new to needs_review
- Description modified (diff)
- Authors set to Florent Hivert, Jeroen Demeyer
comment:14 follow-up: ↓ 15 Changed 14 months ago by hivert
Jeroen: I'm reviewing your patch. Can you review mine ?
Florent
comment:15 in reply to: ↑ 14 Changed 14 months ago by jdemeyer
Replying to hivert:
Can you review mine ?
Sorry, no. I'm not at all familiar with the docbuilding process.
comment:16 follow-up: ↓ 17 Changed 14 months ago by mhansen
- Status changed from needs_review to positive_review
- Reviewers set to Mike Hansen
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 14 months ago by hivert
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 14 months ago by jdemeyer
- Status changed from positive_review to closed
- Resolution set to fixed
- Merged in set to sage-5.0.beta14
comment:19 Changed 10 months ago by hthomas
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 10 months ago by jhpalmieri
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 9 months ago by hthomas
Thanks. The issue seems to be with the particular patchbot -- I have posted to sage-devel about it.

