home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1492098719

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/6323#issuecomment-1492098719 https://api.github.com/repos/pydata/xarray/issues/6323 1492098719 IC_kwDOAMm_X85Y756f 2443309 2023-03-31T15:14:59Z 2023-03-31T15:14:59Z MEMBER

This issue was discussed at this week's dev meeting. I will summarize what we discussed:

  1. General agreement that propagating encoding through arbitrary operations (e.g. slice, chunk, computation) leads to inconsistent states that are hard to protect against. This often leads to problems when serializing datasets in our backends.
  2. The primary benefit of keeping encoding on Xarray objects is the ability to exactly roundtrip datasets. However, this benefit is less obvious after a dataset has been modified.
  3. We currently have two APIs for setting encoding (e.g. to_netcdf(..., encoding={...}) and ds.encoding = {...}). We should change this by deprecating setting encoding on Xarray objects using the .encoding property.
  4. We can move towards providing utilities that expose a dataset's source encoding (e.g. open_dataset(..., return_encoding=True).

Specific action items that can happen now: - [x] add reset_encoding to Dataset/DatAarray api (https://github.com/pydata/xarray/issues/7686) - [ ] add a DeprecationWarning to the @property.setter for encoding on Dataset/DatAarray/Variable - [ ] document the change in callout in the Xarray user guide.

Longer term action items: - [ ] add option to backend readers to keep / discard interpreted encoding attributes - [ ] disable all encoding propagation by discarding encoding attributes once a Dataset has been modified.

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