home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 409755419

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/issues/1624#issuecomment-409755419 https://api.github.com/repos/pydata/xarray/issues/1624 409755419 MDEyOklzc3VlQ29tbWVudDQwOTc1NTQxOQ== 3606852 2018-08-01T23:14:18Z 2018-08-01T23:14:18Z NONE

This issue is pretty stale, but I've taken a crack at this. Not sure I like my approach. This doesn't seem like a high priority issue, but if we can triage my implementation with some feedback, happy to work it up into a PR.

branch diff

The idea was to add _check_values method to the options class that check the current values in OPTIONS against a dictionary which contains lists of accepted values. If there's no entry in that dictionary, any value is assumed valid. But values of incorrect type can be caught by a _check_types method, which checks for type consistency with the default values.

Both are called at the end of initialization to catch bad values before some function tries to use them in the new context.

Does xarray have any established value checking practices? Skimming through the code I couldn't find any.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  264509098
Powered by Datasette · Queries took 2.36ms · About: xarray-datasette