home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 278335633

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
278335633 MDExOlB1bGxSZXF1ZXN0MTU1NzY3NDc2 1752 Refactor xarray.conventions into VariableCoder 1217238 closed 0     3 2017-12-01T02:15:01Z 2017-12-23T13:38:41Z 2017-12-14T17:43:04Z MEMBER   0 pydata/xarray/pulls/1752

Building off of discussion in #1087, I would like to propose refactoring xarray.conventions to use an interface based on VariableCoder objects with encode() and decode() methods.

The idea is make it easier to write new backends, by making decoding variables according to CF conventions as simple as calling decode() on each coder in a list of coders, with encoding defined by calling the same list of encoders in the opposite order.

As a proof of concept, here I implement only a single Coder. In addition to making use of xarray's existing lazy indexing behavior, I have written it so that dask arrays are decoded using dask (which would solve #1372)

Eventually, we should port all the coders in xarray.conventions to this new format. This is probably best saved for future PRs -- help would be appreciated!

  • [x] Tests added / passed
  • [x] Passes git diff upstream/master **/*py | flake8 --diff
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1752/reactions",
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    13221727 pull

Links from other tables

  • 0 rows from issues_id in issues_labels
  • 3 rows from issue in issue_comments
Powered by Datasette · Queries took 0.605ms · About: xarray-datasette