home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 388922657

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/2121#issuecomment-388922657 https://api.github.com/repos/pydata/xarray/issues/2121 388922657 MDEyOklzc3VlQ29tbWVudDM4ODkyMjY1Nw== 1217238 2018-05-14T18:47:55Z 2018-05-14T18:47:55Z MEMBER

The simplest design here would be to extract the logic from DataStorePickleMixin into a pickleable wrapper class that could be used in rasterio.open().

e.g., instead of riods = rasterio.open(filename, mode='r') we would write riods_wrapper = PickleByReconstructionWrapper(rasterio.open, filename, mode='r')

PickleByReconstructionWrapper would need to define __setstate__/__getstate__ (for pickleability), and would also have a .value attribute for pulling out the unwrapped file object.

Eventually, we should probably refactor xarray's existing data stores to use this -- the current logic is really messy/hard to understand. We'll probably also want to eventually factor out the auto-close logic in some composable way, but that can be saved for later.

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