Ticket #5727 (closed defect: fixed)
[with patch, positive review] Improve doctest coverage for sage/modular
| Reported by: | davidloeffler | Owned by: | craigcitro |
|---|---|---|---|
| Priority: | major | Milestone: | sage-3.4.1 |
| Component: | modular forms | Keywords: | doctests |
| Cc: | Work issues: | ||
| Report Upstream: | Reviewers: | William Stein | |
| Authors: | David Loeffler | Merged in: | 3.4.1.rc2 |
| Dependencies: | Stopgaps: |
Description
The attached patch adds doctests for 28 previously undoctested functions in the sage/modular directory, and fixes 2 small bugs uncovered in the process: one in pickling of arithmetic subgroups defined by permutations, and one in dirichlet characters (galois_orbits() returned meaningless garbage when the base ring wasn't an integral domain).
This brings the doctest coverage to 100% for everything *except* the three big subdirectories modform/, modsym/ and hecke/. I will get to work on these next.
Attachments
Change History
Changed 4 years ago by davidloeffler
-
attachment
modular_docs.patch
added
comment:1 Changed 4 years ago by mabshoff
- Summary changed from Improve doctest coverage for sage/modular to [with patch, needs review] Improve doctest coverage for sage/modular
Let's change the status so the right reports pick up this ticket :)
Cheers,
Michael
comment:2 Changed 4 years ago by was
- Summary changed from [with patch, needs review] Improve doctest coverage for sage/modular to [with patch, positive review] Improve doctest coverage for sage/modular
REVIEW:
- Put backquotes aroudn start_weight in the modform_generators docstring: - start_weight -- an integer (default: 2)
- A doctest fails on 32-bit OS X:
sage -t --long devel/sage/sage/modular/arithgroup/arithgroup_perm.py ********************************************************************** File "/Users/wstein/build/sage-3.4.1.rc1/devel/sage-main/sage/modular/arithgroup/arithgroup_perm.py", line 202: sage: cmp(G, 1) Expected: -1 Got: 1 ********************************************************************** 1 items had failures: 1 of 6 in __main__.example_9 ***Test Failed*** 1 failures.
I recommend changing the doctest to:
sage: cmp(G,1) in [-1,1]
since it depends on the OS.
These are trivial changes, so I've posted a tiny patch that adds them and given this a positive review.
Changed 4 years ago by was
-
attachment
trac_5727_referee.patch
added
apply this after applying the above patch
comment:4 Changed 4 years ago by mabshoff
- Status changed from new to closed
- Resolution set to fixed
Merged both patches in Sage 3.4.1.rc2.
Cheers,
Michael
comment:5 Changed 4 years ago by davidloeffler
- Status changed from closed to reopened
- Resolution fixed deleted
Here's some more -- mostly in sage/modular/hecke/hecke_operator.py and sage/modular/hecke/module.py. This patch also adds Brandt modules into the reference manual.
comment:6 Changed 4 years ago by davidloeffler
- Summary changed from [with patch, positive review] Improve doctest coverage for sage/modular to [with new patch, needs review] Improve doctest coverage for sage/modular
comment:7 Changed 4 years ago by mabshoff
- Status changed from reopened to closed
- Resolution set to fixed
- Summary changed from [with new patch, needs review] Improve doctest coverage for sage/modular to [with patch, positive review] Improve doctest coverage for sage/modular
Please do not reopen tickets with merged patches. Instead open a new ticket for the new patch. I have deleted the new patch.
Cheers,
Michael

patch against 3.4.1.rc1