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
DM-14356: Add matplotlib.figure.Figure storage to PosixStorage. #92
Conversation
Raises | ||
------ | ||
ValueError | ||
Raised if the file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing sentence. I also don't see a raise below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just removed the whole section; I don't know what I was thinking.
# default. | ||
ext = None | ||
obj.savefig(logLoc.locString(), format=ext) | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the return meant to be indented to within the with SafeFilename here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The empty return
here serves no purpose, and should be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, this is a copy-paste relic. I'll go remove the return
s I cargo-culted too.
logLoc = LogicalLocation(locationString, additionalData) | ||
# SafeFilename appends a random suffix, which corrupts the extension | ||
# matplotlib uses to guess the file format. | ||
# Instead, we strip off the extension from the original location |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say "extract the extension".
"strip off the extension" implies it's removed from the location name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ed2a3cd
to
95eedcb
Compare
Matplotlib figures cannot be retrieved using the butler, but 'put' should now work. Note that this storage actually only requires that the object being saved have a `savefig` method with the same behavior as matplotlib's.
95eedcb
to
37986b2
Compare
Matplotlib figures cannot be retrieved using the butler, but 'put' should now work.
Note that this storage actually only requires that the object being saved have a
savefig
method with the same behavior as matplotlib's.