-
Notifications
You must be signed in to change notification settings - Fork 70
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
'track_times' argument for 'dump' has no use #130
Comments
This was a specific feature request from a user -- the user wanted md5sums for identical data to be identical. Agreed that the documentation is confusing, as the use case was the opposite: allowing |
But it won't. |
Alright, I finally found where that feature was requested (#13). |
Agreed that |
So, while I was going through the tests of the package a bit for the v4 release, I noticed that the tests for the
track_times
optional argument do not actually do anything, which you can see here (ifcaching_dump
is never called before thetest_track_times
function, which is the case, then that test does nothing asDUMP_CACHE
is empty):hickle/hickle/tests/test_hickle.py
Lines 340 to 374 in 5e8f626
That is actually a good thing, as it would infinitely loop in Python 3 due to string representation differences.
However, I decided to check what exactly
track_times
does.According to the
h5py
documentation, this argument is solely used for creating datasets; is set toTrue
by default; and enables the saving of the creation timestamps.It is rather unclear actually what that means or what impact it has, and it is not mentioned anywhere else in the documentation.
But, seeing as it is set to
True
by default, which is the same default asdump
has inhickle
, there is no point in specifically asking for its value.Furthermore,
dump
already allows for additionalkwargs
to be provided that are passed to thecreate_dataset
method, so if anyone ever wants to settrack_times
to a different value, they can.Also, in
hickle
, the argument is described as making sure that repeated hickling results in different files.This description itself is very vague as what that exactly means, as repeated hickling using the exact same script either always results in a different file (if the file was opened for writing and truncated, thus becoming a new file) or impossible (if it was not truncated, causing the data to already exist with the same name).
Given the above, I feel like that the argument has no use besides confusing the user, and should therefore be removed in both v3 and v4.
@telegraphic What is your opinion?
The text was updated successfully, but these errors were encountered: