-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Expose info about attribute coercion and/or way to validate user data/layout #598
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
Comments
As mentioned in #619, having a |
I just pushed some Proof-of-Concept commits for a I wouldn't mind getting opinions from @cpsievert @mdtusz @alexcjohnson @chriddyp @cldougl |
Note that the idea of providing an error code comes from the I'm imagining that for some applications e.g. the |
@etpinard I love the strategy and the structure of the response. Aside from a few comments I made on the commits, I would just try and make the error codes look more like errors than benign "differences" like those returned by |
Looks pretty good. Github won't let me comment on the code for some reason, but it may be nice to pass a list of the path keys rather than just |
You can't comment on the combined diff until it's in a PR I guess... But you can comment on individual commits |
Two ways of doing this come to mind:
Lib.log
incoerce.js
notifying users if a given attribute is set to an invalid value. Post Log levels #590, these logs would be hidden by default. This method has one drawback: it would only warn user about invalid values, not about invalid attributes (which never reachcoerce.js
.Plotly.validate(data, layout)
method that runs the fullsupplyDefaults
chain, compare input and full data/layout and logs the info.The text was updated successfully, but these errors were encountered: