dask: Data memory/disk#387
Conversation
|
See new docs in |
sadielbartholomew
left a comment
There was a problem hiding this comment.
Perhaps I am missing something here, but the deprecation doesn't seem to be manifesting for in_memory, though it is working absolutely fine for the other methods and properties deprecated here, as indicated for one example below (and I have double checked the install of this branch is OK to be sure)? E.g:
>>> d.to_disk()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/sadie/cf-python/cf/data/mixin/deprecations.py", line 436, in to_disk
_DEPRECATION_ERROR_METHOD(
File "/home/sadie/cf-python/cf/functions.py", line 3197, in _DEPRECATION_ERROR_METHOD
raise DeprecationError(
cf.functions.DeprecationError: Data method 'to_disk' has been deprecated at version TODODASK and is no longer available and will be removed at version 5.0.0.
>>>
>>> d.to_memory()
Traceback (most recent call last):
File "/home/sadie/cfdm/cfdm/core/abstract/container.py", line 262, in _get_component
return self._components[component]
KeyError: 'array'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/sadie/cfdm/cfdm/decorators.py", line 44, in inplace_wrapper
processed_copy = operation_method(self, *args, **kwargs)
File "/home/sadie/cfdm/cfdm/data/data.py", line 2700, in to_memory
d._set_Array(self.source().to_memory())
File "/home/sadie/cfdm/cfdm/core/data/data.py", line 909, in source
return self._get_component("array", default=default)
File "/home/sadie/cfdm/cfdm/core/abstract/container.py", line 267, in _get_component
return self._default(
File "/home/sadie/cfdm/cfdm/core/abstract/container.py", line 144, in _default
raise default
ValueError: Data has no 'array' componentCo-authored-by: Sadie L. Bartholomew <[email protected]>
Co-authored-by: Sadie L. Bartholomew <[email protected]>
Co-authored-by: Sadie L. Bartholomew <[email protected]>
Co-authored-by: Sadie L. Bartholomew <[email protected]>
|
Hi Sadie - look like the deprecation error wasn't working for any attributes . 99cffd4 should fix this: >>> cf.Data(9).in_memory
Traceback
...
DeprecationError: Data attribute 'in_memory' has been deprecated at version TODODASK and will be removed at version 5.0.0. |
Nice, and it indeed does. What about |
Ah. I see that that's inherited from |
I raised it since you have added such a method to |
Doh! 7aecaca |
sadielbartholomew
left a comment
There was a problem hiding this comment.
This fell off my radar after my latest feedback comment, apologies. Your new commit is fine, so all good to merge! Thanks.
No description provided.