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
Get p-adic doctest coverage to 100% (depends on #5105) #5778
Comments
comment:2
Hi David, This patch fails to apply to my 3.4.1.rc2:
I'll try to take a look and see what's going on, but it might take a while. |
comment:3
This patch does not import particularly well:
I am not sure if there is a missing dependency. David: any ideas? Cheers, Michael |
comment:4
Oops, for whatever reason I did not have #4637 in my tree - so apologies. Cheers, Michael |
comment:5
Ok, with this patch applied:
We also get:
for the padics directory only. Cheers, Michael |
comment:6
There are some slight doctesting failures:
Cheers, Micheal |
comment:7
Bouncing it to 3.4.2 - if the patch is updated, passes doctests and is reviewed there might be a chance to get this into 3.4.1. Cheers, Michael |
comment:9
Looks much better. One trivial hashing issue (32 vs. 64 bit) needs to be fixed:
Cheers, Michael |
comment:10
Michael, are you actually reviewing this or just making sure that it applies and passes tests before it can be reviewed? John |
comment:11
Replying to @JohnCremona: Hi John,
I am not reviewing this since I don't feel qualified, I just made sure that the patch applied and passes doctests. Cheers, Michael |
comment:12
Replying to @sagetrac-mabshoff:
That's what I thought. I'll take a look. John |
comment:13
The patch applies and tests pass. As I cannot view the patch (it is too big) I don't actually know what has changed. Apparently the files have been restified, but the only way to test that would be to add them to the reference manual and try building. I started with factory.py as that seemed pretty important. I found that the file while partially restified on a superficial level was completely broken as far as actually processing it is concerned. I started correcting it and got to line 430, but it is 2200 lines long and so will take a lot longer. I suggest that this patch goes in since it is a step in the right direction; but I don't promise to even get to the end of properly getting the docs for factory.py into the manual, let alone any of the rest (ha ha ) of it. On the positive side I not the very comprhjensive explanation of the p-adic code in a separate tutorial file which is in the reference manual; but I think that we do need the individual files (of which there are a large number) in there too. |
comment:14
The patch is not ready to be build with ReST, David just started changing the doctests as a step in the right direction. About 2/3 of the patch are indentation changes, the other 1/3 adds new doctests. I have taken a look a the patch via a local diff viewer since as you point out the patch is too large for trac. Given your reservations I would like someone else to take another look, so I am setting this to "needs review" again. David is also working on subsequent patches to add more doctests and his eventual goal here is to get all of padics 100% tested and in the reference manual. It might be a good idea to stay below 256kb/patch in the future ;) Cheers, Michael |
comment:15
I'm adding a bunch more doctests and breaking this up into more managable chunks (viewable at least). If anyone wants to review this, let me know, but you probably don't want to get started quite yet. |
comment:35
Certainly. capped_absolute_generic.py, capped_relative_field_generic.py, capped_relative_generic.py, capped_relative_ring_generic.py, fixed_mod_generic.py, padic_capped_absolute_ring_generic.py, padic_capped_relative_field_generic.py, padic_capped_relative_ring_generic.py, padic_field_base_generic.py, padic_field_generic.py, padic_fixed_mod_ring_generic.py, padic_ring_base_generic.py, padic_ring_generic.py ----> generic_nodes.py padic_field_capped_relative.py, padic_ring_capped_absolute.py, padic_ring_capped_relative.py, padic_ring_fixed_mod.py ----> padic_base_leaves.py lazy_field_generic.py, lazy_generic.py, lazy_ring_generic.py, padic_field_lazy.py, padic_lazy_element.py, padic_lazy_field_generic.py, padic_lazy_generic.py, padic_lazy_ring_generic.py, padic_ring_lazy.py, valuation.py ----> deleted because lazy p-adics not supported and won't be for a while rigid_functions.pyx, rigid_functions.pxd ----> deleted because I didn't want to write the doctest and make parents. |
comment:36
First, the patches can't be partially applied and used one at a time. But it is better than one monolithic patch. OK, the first two patches (outside-padics and deletions/moving look good). I'm all for a generic_nodes.py rather than a dozen files with three lines in them each (it makes it a lot easier to trace the code for instance). I'm most of the way through padic_doctests_1.patch--it looks good for the most part. Lots of the patch is whitespace/line wrapping--it would be nice to be able to filter stuff like this out better for review purposes. There's a fair amount of commenting stuff out/ReSTification as well, and new doctests. The only issues I've found are sage/rings/padics/eisenstein_extension_generic.py:97 - typo "extensinos" sage/rings/padics/factory.py:2323: def krasner_check(poly, prec): always returns True, but comments state that it's really not implemented, which is a bit worrisome. |
comment:37
Some more comments: padic_doctests_2.patch looks good, again, mostly rest/whitespace changes. padic_doctests_3.patch
|
comment:38
sage/rings/padics/padic_capped_absolute_element.pyx:382
The former is a better example, IMHO. |
comment:39
Some general remarks:
|
comment:40
Things left to do:
Robert, are there other files besides padic_ZZ_pX_element.pyx that you had in mind for the comment about docstrings being duplicated? |
comment:41
|
comment:42
There's also some verbatim duplicated doctests in There's no way the doctes for |
comment:43
I've finished reading everything.
How many more files need to be ReSTified? If its more than a one or two, lets defer doing this to a later ticket so we can focus on getting this in. Your referee patch looks good too, and does address most of my concerns. |
comment:44
About 13 more files need improved ReSTification. I'll try to diversify the doctests for those functions in a bit. Right now I'm working on p-adic polynomials though. :-) |
comment:45
So nearly half of the files still need ReST conversion? Let's put this off to a later ticket, so we can get this one here into 4.0. |
comment:46
Yep, I agree. There are no build errors for any of them, but there are lots of files that need many ` added. |
comment:47
With #5105 applied all patches apply and I am seeing one issue on sage.math:
But padic_referee_fixes_2.patch introduces some problem since the latex() methods use mathbf() instead of ZZ or QQ for example. Cheers, Michael |
comment:48
Hah. On sage.math:
On my machine:
ntl_ZZ is just comparing types. I'll change the code to convert to Integers earlier. Replying to @sagetrac-mabshoff:
|
Attachment: padic_doctests_1.patch.gz |
Attachment: padic_doctests_2.patch.gz Attachment: padic_doctests_3.patch.gz |
Attachment: padic_doctests_4.patch.gz Attachment: padic_referee_fixes.patch.gz |
Attachment: padic_referee_fixes_2.patch.gz |
Attachment: padic_doctests_deletions.patch.gz |
comment:49
Attachment: padic_doctests_outside.patch.gz I am giving this ticket a positive review in RobertWB's name. It now passes all doctests on sage.math, it applies and builds, so any more concerns should be addressed via followup tickets. Post merge we are definitely in better shape than before and given the size of this patch it seems like a good idea to get this in. With all 8 patches applied:
|
comment:50
Merged
in Sage 4.0.alpha0. Cheers, Michael |
comment:51
To followup now that I've had a chance to look at the last patch, yet, positive review deserved. |
Reviewer: Robert Bradshaw |
Author: David Roe |
Merged: 4.0.alpha0 |
Note:
Added p-adics to the reference manual, 100% doctest coverage, converts p-adics to new coercion model, good ReST compatibility for files up to partway through padic_ZZ_pX_FM_element.pyx (alphabetically), no docbuild errors for files later alphabetically.
Component: padics
Author: David Roe
Reviewer: Robert Bradshaw
Merged: 4.0.alpha0
Issue created by migration from https://trac.sagemath.org/ticket/5778
The text was updated successfully, but these errors were encountered: