Add attribute tracking functionality#253
Add attribute tracking functionality#253dcherian wants to merge 2 commits intoxarray-contrib:mainfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## main #253 +/- ##
==========================================
- Coverage 96.52% 95.79% -0.73%
==========================================
Files 16 17 +1
Lines 1926 1951 +25
==========================================
+ Hits 1859 1869 +10
- Misses 67 82 +15
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
While I like the idea of Otherwise, this functionality is very interesting! |
Actually this is wrong! Both |
Simple test of pydata/xarray#5668 (cc @keewis)
This just adds the
cell_methodsattribute for reductions and a placeholder for tracking history.There is one top-level function
This returns a partial function that can be provided to
keep_attrsi.e. it expects the argsattrs, context. I think we could add things likeprovenance=Trueetc. in the future.Right now only the private
_trackerfunction satisfies the contract expected bykeep_attrs. Alternately, we could providetrack_cell_methodstrack_historyetc. that satisfy the contract so that users can instead do for fine controlI'm interested in opinions on whether we should do this second approach instead.
cc @huard @aulemahal