Rules for propagating attrs and encoding
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.2k
- Forks
- 1.4k
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 14
Description
We need to come up with some clear rules for when and how xarray should propagate metadata (attrs/encoding). This has come up routinely (e.g. #25, #138, #442, #688, #828, #988, #1009, #1271, #1297, #1586) and we don't have a clear direction as to when to keep/drop metadata.
I'll take a first cut:
| operation | attrs | encoding | status |
|---|---|---|---|
| reduce | drop | drop | |
| arithmetic | drop | drop | implemented |
| copy | keep | keep | |
| concat | keep first | keep first | implemented |
| slice | keep | drop | |
| where | keep | keep |
cc @shoyer (following up on https://github.com/pydata/xarray/issues/1586#issuecomment-334954046)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the proposed attrs/encoding table and the referenced issues #25, #138, #442, #688, #828, #988, #1009, #1271, #1297, and #1586. The work is complete only when the project has agreed clear propagation rules for each listed operation and the rules are implemented consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100