Skip to content
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

Issue 225 #271

Merged
merged 6 commits into from May 24, 2013
Merged

Issue 225 #271

merged 6 commits into from May 24, 2013

Conversation

tacaswell
Copy link
Member

re-based my patches and the patch from barry.wardell@gmail.com

This re-base needs to be tested, but by eye they look ok.

@andrewcollette
Copy link
Contributor

Might want to take a look at #270 ; I think this is the same patch from Google Code. We're on board in principle, but I think we're leaning towards a context manager rather than keywords on all the create_* functions.

@tacaswell
Copy link
Member Author

@andrewcollette Is there an easy way to get the creation time information out of a group or dataset object? My first attempt at writing the keyword argument for groups has no effect on the sha1 of the resulting file, which makes me think that either a) my code is broken or b) groups don't really carry this information.

The high-level patch was written by @barrywardell, he may be in a better positioning to write the test for it.

@andrewcollette
Copy link
Contributor

Right now I believe the only way is through h5py.h5g.get_objinfo. It returns an object with an mtime attribute:

http://www.h5py.org/docs/low/h5g.html

There's a similar function in h5py.h5o but the time fields are unimplemented.

tacaswell and others added 4 commits April 1, 2013 22:18
…e site on issue h5py#225 with the following message:

'I have tested these patches with the latest mercurial version and can confirm that they work fine for me.
I also find the attached patch for the high-level interface convenient.'

Shoved into git by Thomas Caswell <tcaswell@gmail.com>
The classes for data set creation (`PropDCID`) and group creation
(`PropGCID) now inherit from the object creation class (`PropOCID`),
which has the code for dealing with `H5P*obj_track_times`.
@tacaswell
Copy link
Member Author

re-based this branch (did not merge entirely cleanly with the PR #272)

@tacaswell
Copy link
Member Author

After a bit of testing, it seems that groups always have an mtime==0, so adding a kwarg to disable time tracking on the groups is not useful. This may be a bug in the low level code, or a feature of hdf, I am not sure which.

@barrywardell
Copy link
Contributor

Is there still a test case needed or has that been covered by fbd3b31?

@andrewcollette
Copy link
Contributor

@barrywardell, the test seems adequate (although the docstring is wrong) for datasets. I'm still trying to figure out what's going on with group mtimes. It may be intentional for performance reasons, but I would prefer to get this feature out across all objects in the file if there's a chance they could be affected.

@tacaswell
Copy link
Member Author

@andrewcollette Any progress on this/is there anything I should do?

I think that I fixed the docstring in eb6ed0e.

@andrewcollette
Copy link
Contributor

@tacaswell thanks for pinging me on this. From what I can discover group mtimes are not tracked in HDF5. I'll go ahead and merge this now.

andrewcollette added a commit that referenced this pull request May 24, 2013
Issue 225 (disable mtime tracking for datasets)
@andrewcollette andrewcollette merged commit 64eda11 into h5py:master May 24, 2013
@tacaswell tacaswell deleted the issue_225 branch May 30, 2013 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants