-
-
Notifications
You must be signed in to change notification settings - Fork 487
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
Make #optional usable at a higher level #3260
Comments
comment:1
COMMENTS:
Thus if you put anywhere in the docstring for a function (or the top of the file) all
|
comment:2
If it already works, then one way to resolve this ticket is to document that in the appropriate places. As for your number 2, I understand your objection to be that the docstring gotten when using Sage's built-in help-system should warn users that a particular doctest requires some optional package to work. I can get behind that. It should not be hard to inject a notice of that into the docstring shown in the help system, without having them sprinkled all over the Python file. This notice could be much more helpful than a comment saying "#optional", since it is not obvious what a comment saying #optional means, if you do not already know. E.g. Sage could inject a string before each optional doctest saying "This example depends on an optional package being installed." Or it could preserve the status quo by injecting #optional on each line. |
comment:3
Wow, 5 years. This ticket should be re-examined now that #12415 is finished. Some solutions may be more tractable now. |
comment:10
Duplicate of #20427. |
Reviewer: Jeroen Demeyer |
comment:12
Determined to be invalid/duplicate/wontfix (closing as "wontfix" as a catch-all resolution). |
When adding optional spkgs to Sage, it is necessary to go through the Python interface file and put #optional on every single line of every single doctest, to indicate that those doctests should not be run.
It would be nice to be able to put #optional at, say, the top of the file, or in the docstring for the module or class, and then have that imply that every doctest within is optional.
CC: @mezzarobba
Component: doctest framework
Reviewer: Jeroen Demeyer
Issue created by migration from https://trac.sagemath.org/ticket/3260
The text was updated successfully, but these errors were encountered: