-
Notifications
You must be signed in to change notification settings - Fork 224
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
Figure.grdimage: Remove the unsupported 'img_out'/'A' parameter #2907
Conversation
7923939
to
907d658
Compare
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.
A couple of minor suggestions, otherwise ok.
@@ -172,6 +157,13 @@ def grdimage(self, grid, **kwargs): | |||
""" | |||
kwargs = self._preprocess(**kwargs) | |||
|
|||
# Do not support -A option | |||
if any(kwargs.get(arg) is not None for arg in ["A", "img_out"]): |
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.
if any(kwargs.get(arg) is not None for arg in ["A", "img_out"]): | |
if any(kwargs.get(arg) for arg in ["A", "img_out"]): |
Should be ok to remove is not None
, e.g.:
kwargs = {"img_out": "temp.nc"}
if any(kwargs.get(arg) for arg in ["A", "img_out"]):
raise Exception
should raise an Exception.
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.
Won't raise an exception if an empty string is given:
kwargs = {"img_out": ""}
if any(kwargs.get(arg) for arg in ["A", "img_out"]):
raise Exception
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.
Ah yes, keep it as is then.
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
CodSpeed Performance ReportMerging #2907 will not alter performanceComparing Summary
|
As proposed in #2765 (comment), we will NOT support the
img_out
/A
parameter in theFigure.grdimage
method. The related feature will be added to a new function/method if requested.Supersede #2765.