-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
Invalid options should warn instead of preventing display #201
Comments
I strongly support this change. It would be good if the message listing the ignored options could include a statement of how to use the logging module to supress the warnings, in case people want to happily put in hints that are useful for some backends but not known for others. I agree that it would be good practice to support the same plot options (and to clarify that the principle is not just highly recommended (which sounds like it's up to external users to ensure) but is something that is true as far as we can make it (i.e., it's up to the backend maintainers)). |
I've finally gotten round to implementing this improvement in dc66a8b. As typical when working with
I agree this would be a nice feature but I don't think the logging module will offer much granularity - if you match on the start of the warning message (i.e 'Invalid option ...') you'll suppress all such warnings. Any more specific string matching is bound to be extremely brittle. This suggests that |
Since 6bc4543 there are now two boolean parameters on hv.Options.warn_on_skip=False I think I can now close this issue now the suggested feature is implemented. |
Sounds great, thanks! I'll try it out on various notebooks and reopen the issue if I have problems. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Now that we can switch backends, there is a problem with how invalid options supplied to the
%opts
magic are handled (actually this affects howOptionTrees
are processed in general). Currently, an HTML message is generated to inform the user that a supplied option was invalid.Now, if the backend is changed, the valid style/plot options are also likely to change. This means, that many plots won't display at all due to the invalid option messages. The proposed solution is to ignore the options that are invalid, generate a warning about the options which were ignored and still show the available display output.
Note that this issue mostly applies to style options: I think we should highly recommend that plot options stay as consistent as possible between backends as we implement them!
The text was updated successfully, but these errors were encountered: