-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dask: Dask.get_filenames
(2)
#408
dask: Dask.get_filenames
(2)
#408
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.