pull_requests: 222557759
This data as json
id | node_id | number | state | locked | title | user | body | created_at | updated_at | closed_at | merged_at | merge_commit_sha | assignee | milestone | draft | head | base | author_association | auto_merge | repo | url | merged_by |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
222557759 | MDExOlB1bGxSZXF1ZXN0MjIyNTU3NzU5 | 2482 | closed | 0 | Global option to always keep/discard attrs on operations | 35968931 | - [x] Resolves wishes of some users and relevant for discussion in #138, #442, #688, #828, #988, #1009, #1271, #2288, #2473 - [x] Tests added, both of setting the option and of attributes propagating in the expected way - [x] Tests passed - [x] Documented Adds a global option to either always keep or always discard attrs in method and function calls. The behaviour is backwards-compatible, as the logic is: - if `keep_attrs` supplied as keyword argument then use that - else if global option (`xarray.set_options(keep_attrs=True)`) is set then use that - else use default value of `keep_attrs` argument for that particular function/method (kept the same as they were for backwards-compatibility). Main use cases include users who want to store the units of their data in the attrs, users who want to always keep information about the source or history of their data, and users who want to store objects in their attributes which are needed to supplement the xarray objects (e.g. an `xgcm.grid`). It should eventually be superceded by hooks for custom attribute handling (#988), but will be useful until then. I have left the top-level functions like `concat` and `merge` alone. Currently concat keeps the attributes of the first object passed to it, and merge returns a dataset with no attributes. It's not clear how this should be treated though, so I left it to users to extend those functions if they need to. | 2018-10-12T19:01:12Z | 2020-04-05T03:53:53Z | 2018-10-30T01:01:08Z | 2018-10-30T01:01:08Z | 6d55f99905d664ef73cb708cfe8c52c2c651e8dc | 0 | cbf227d4bef2cb270e4ec9cfcee7024625041cec | b622c5e7da928524ef949d9e389f6c7f38644494 | MEMBER | 13221727 | https://github.com/pydata/xarray/pull/2482 |
Links from other tables
- 1 row from pull_requests_id in labels_pull_requests