dask: Dask.get_filenames (2)#408
Conversation
sadielbartholomew
left a comment
There was a problem hiding this comment.
All of the code changes here are fine and sensible, though it seems something has been missed, since the method doesn't seem to hit the deprecation error for the direct case, e.g:
>>> import cf
>>> d = cf.Data(100, "m")
>>> d.get_filenames()
set()which I assume is because there's still a case under the mixin.propertiesdatabounds module:
$ pwd
/home/sadie/cf-python/cf
$ git grep "def get_filenames"
data/mixin/deprecations.py: def get_filenames(self):
mixin/propertiesdatabounds.py: def get_filenames(self):So that probably needs to go or be deprecated also. Once that's done, this will be good to merge I think!
|
Good spot - I didn't think to check that it actually worked :). It turns out that the issue is that the method is inherited from I have changed the MRO and everything seems OK (bc2bbce). I'll make a note in #295 to pay attention to the |
Sometimes it can be useful! 😆 Thanks for investigating and clarifying. I'll do a quick sanity check re-review in a moment... |
sadielbartholomew
left a comment
There was a problem hiding this comment.
Feedback addressed in an elegant way after:
I have changed the MRO and everything seems OK (bc2bbce).
All good, thanks. Merging.
Following on from #365, I think that this method is just too "dangerous", now, and it would be better to manage this from the
Field/Domain, with content injected bycf.read/cf.aggregate. All of which would be the topic of a later PR.