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
save timeit information with sage -t -timeit #3476
Comments
Attachment: 3476-ncalexan-sage-scripts-doctest-1.patch.gz |
comment:1
Attachment: 3476-ncalexan-sage-timeit-1.patch.gz The attachments came in the wrong order -- the one with |
comment:2
Attachment: diff-python-doctest-to-ncadoctest.gz
|
Changed keywords from testing doctest timing timeit profile regression to testing doctest timing timeit profile regression, editor_mabshoff |
Changed keywords from testing doctest timing timeit profile regression, editor_mabshoff to testing doctest timing timeit profile regression, editor_mabshoff, editor_gfurnish |
comment:5
This should be applied after #3982. |
Changed keywords from testing doctest timing timeit profile regression, editor_mabshoff, editor_gfurnish to testing doctest timing timeit profile regression, editor_mhansen |
comment:7
Since my one main concern at #3982 is taken care of, I think this can go in. |
comment:8
There is a reject apllying Nick's first patch:
I am attempting to merge this manually. Cheers, Michael |
comment:9
Ok, the reject seems to happen due to merging the warning patch into sage-doctest. Cheers, Michael |
comment:10
If I merge the patch without the troublesome hunk I see 4 doctests related to the random framework and timeit itself fail:
Oh well, life sucks :) Cheers, Michael |
Attachment: trac_3476.patch.gz Attachment: trac_3476-scripts.patch.gz |
comment:12
I've added two updated patches which fix the issue. The problem was that the 'timeit' in test.globs was set to "False" from the options in sage-doctest instead of being the actual timeit function from Sage. Thus, you'd only hit the problem with doctests that used timeit. |
comment:13
For "sage -sdist" to work we need to copy ncadoctest.py, sagedoctest.py in sage-make_devel_packages after
I will take care of this once the patch passes doctests. Cheers, Michael |
comment:14
Hi Mike, there is one tiny easy to fix doctest issue left:
I will fix this via a followup patch. Cheers, Michael |
comment:15
Merged in Sage 3.2.rc0 |
There are several parts to this patch.
The first is an update to
sage.misc.sage_timeit
that generalizes the interface to return an object that prints itself as a timing string rather than the string itself. The advantage is that the information does not need to be parsed from the string later. This patch is a requirement of the later ones but is conceptually independent.The second adds a file
ncadoctest.py
to scripts that is a slightly modified version of Python'sdoctest.py
file. It is easier to subclass the various classes with this version.The third uses
ncadoctest.py
to subclass the doctest architecture and updatessage-doctest
to use these updated classes.Component: doctest coverage
Keywords: testing doctest timing timeit profile regression, editor_mhansen
Issue created by migration from https://trac.sagemath.org/ticket/3476
The text was updated successfully, but these errors were encountered: