Improve cfxr.set_options
dcherian opened this issue · 3 comments
dcherian commented
#234 will add a very simple version of OPTIONS.
We should copy over some logic from xarray: https://github.com/pydata/xarray/blob/4e61a26fca46635a5f6c1eba60950fc33d88459a/xarray/core/options.py
to get the context manager fanciness
kthyng commented
So are you wanting to bring over from xarray the class and functions starting here?
I'm not familiar with the logic here but I can do some pattern matching between cf-xarray and xarray for OPTIONS.
dcherian commented
Yes I would copy over the whole file and start deleting things. The only option we have is "custom_criteria"
and we don't need _SETTERS
and _VALIDATORS
AFAICT