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 method for graphics objects does not have an example explicitly using "save" #4689
Comments
comment:1
Hi, which Sage release is that? If it is 3.2.1 this might be #4672. There is a patch over there that needs one doctest fix to be merged into 3.2.2. Cheers, Michael |
comment:3
It's in both 3.1.4 and 3.2.1, but that bug report does look relevant; hopefully fixing that will sort this out too. |
comment:4
With #4672 appplied:
results in
Rereading the original ticket I now get your main point: the docstring does not contain "save", but "show" does save the png and then pops up a viewer. We could resolve this by adding a example that uses the save method as you suggested, but my guess would be that such example (in case it did exist) was either changed or removed since "save('foo.png')" saves in the current working directory which is bad for doctesting as a non-owner. So, what do you want to do? Close this ticket as "wontfix" or we add a doctest that saves an image in SAGE_TMP - which is the clean way to deal with temporary files. Cheers, Michael |
comment:5
I think your idea of having a doctest which saves an image somewhere temporary would be the best idea as it would give the reader the idea of how to use the method and reassure them that it is the correct help function. |
Attachment: trac-4689-save-docstring.patch.gz |
Author: Jason Grout |
comment:9
Looks good to me. |
Reviewer: Mike Hansen |
Merged: sage-4.3.2.alpha0 |
The examples in the documentation for the save method seems to be broken. If I try
then I get
which never mentions "save" at all. Presumably there should be an extra line, something like
CC: @mwhansen
Component: documentation
Author: Jason Grout
Reviewer: Mike Hansen
Merged: sage-4.3.2.alpha0
Issue created by migration from https://trac.sagemath.org/ticket/4689
The text was updated successfully, but these errors were encountered: