-
-
Notifications
You must be signed in to change notification settings - Fork 452
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
Automatic doctest for external softwares #20182
Comments
Branch: public/20182 |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Commit: |
comment:3
The patch is a draft or a proof of concept. |
comment:4
Don't forget internet - or should that be its own ticket, since it's a different kind of non-package? One could presumably do some connectivity test and if it failed, not run the internet tests - they should really nearly always be run. |
comment:5
I don't like the fact that you explicitly need to specify Also, I don't believe that |
This comment has been minimized.
This comment has been minimized.
comment:7
The intention is to test the doctests of the form "#optional - xxx" where xxx is not a Sage package. So I think internet is also a "nonpackage" :-) |
This comment has been minimized.
This comment has been minimized.
comment:8
Replying to @jdemeyer:
To be clear, I meant that |
comment:9
It would be cool if this would automatically go over all test functions instead of this ugly error-prone code:
|
comment:10
You should also consider performance issues. I don't want to run all these tests every time I doctest something. You should look at #13540, which uses a lazy mechanism for testing optional tags. |
comment:11
Replying to @jdemeyer:
Currently doctests for Sage optional packages, if installed on the system, are automatically run only if "--optional" is given. Doctests for nonpackages are run only if "--optional=nonpackages" is given. Perhaps we should keep this ability because of the performance issues that you mention... |
comment:12
Replying to @jdemeyer:
I totally agree! But I needed to write the code before I go to sleep, as I am living on the other side of the globe :-) You can help! |
comment:13
I think this is only really useful if "nonpackages" are tested by default. |
comment:14
Replying to @kcrisman:
There were some concerns about running internet tests whenever possible. I'm not sure I agree with those, but maybe there are other reasons not to do these all the time. (What if I lose my internet connection after testing testing connectivity but in the middle of doctesting? Do we have to test connectivity before every internet test?) But I think some of the patchbots could use the |
comment:15
Replying to @kwankyu:
I don't think this is correct. When I run doctests without any extra flags, I see (after installing a few optional packages for testing purposes)
|
comment:16
I would prefer "external" instead of "nonpackage", otherwise the |
comment:17
The behavior "--optional" tag has changed after the merged ticket: #18558, but the developer's manual seems not updated completely to reflect the changes. The following is from experiments and the documentation. So would you verify my understanding? (1) "-t" : tests all ordinary doctests and also doctests about installed optional packages, in effect equivalent to "-t --optional=optional". (A) Via this ticket I want to add one more line to (3):
(B) Also we can change (1) to equate "-t" to "-t --optional=optional,external". Do you agree? |
comment:18
This seems reasonable to me as a concept (implementation of (B) shouldn't slow things down ridiculously, though, so the devil may be in the details). Should "-t --optional" be equivalent to "-t" or is the desired behavior still thus?
|
comment:19
Replying to @kcrisman:
Agree. We definitely need to implement a lazy mechanism like that in #13540. I am reading the related codes in Sage.
Once we implement "external", "all" will mean "sage"+"optional"+"external". Then we may set "-t --optional" to mean "-t --optional=all". |
This comment has been minimized.
This comment has been minimized.
Author: Kwankyu Lee |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:58
Why the patchbot is not working on this ticket? Since I made changes on |
comment:60
As this ticket is related to #20382, but independent from it. I think this ticket could be reviewed and merged independently, though still no one bothers reviewing it. Then I would be happy that you open a new ticket to use your features once #20382 got merged. If #20382 is merged first, then I would also be very happy that you rebase this ticket to #20382. |
comment:61
This doctest should be marked "random":
Also, throughout, "softwares" should be "software" -- "which software do you have installed" is correct, for example, not "which softwares do you have installed". |
comment:62
What should happen with failing doctests? klee's opinion is that they should be fixed on another ticket. I guess that's okay as long as they are not run by default. Anyone else have opinions? For example:
I get this at the end of
|
comment:63
minor remark: there is a timeout optional argument for |
comment:64
Replying to @jhpalmieri:
This patch can be safely merged as long as the patchbot and the people checking a new Sage release use |
comment:66
Every function and method needs documentation and doctests.
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:69
Here are a few minor rewordings. The only possibly significant change is removing "# random" from one doctest, but the same thing is doctested later in the same file (in I am happy with this now. Does anyone else have any comments? |
comment:71
The list "external_software" should not be random. For convenience of later modification, I changed one of the duplicate doctests. Thank you for elaborate review! |
Reviewer: John Palmieri |
Changed branch from public/20182 to |
Many doctests depend on softwares external to Sage (including "internet") available on the system, such as latex, magma, mathematica, maple, etc. This patch allows to run the optional doctests for the softwares available.
With the patch,
"sage -t --optional=PKGS": only run doctests including one of the "# optional - xxx" tags where xxx is listed in PKGS;
if "sage" is listed, will also run the standard doctests;
if "optional" is listed, will also run tests for installed optional (new-style) packages;
if "external" is listed, will also run tests for available external softwares;
if set to "all", then all tests will be run
This is a rewrite of #18904 and #13540.
Component: doctest framework
Author: Kwankyu Lee
Branch/Commit:
c4e48bd
Reviewer: John Palmieri
Issue created by migration from https://trac.sagemath.org/ticket/20182
The text was updated successfully, but these errors were encountered: