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

add HDF5_STATUS attribute into file writing and run_or_skip() checking #789

Open
yunjunz opened this issue Jun 10, 2022 · 0 comments
Open

Comments

@yunjunz
Copy link
Member

yunjunz commented Jun 10, 2022

Description of the desired feature

With the current version of HDF5 writing via writefile.layout_hdf5/write_hdf5_block(), the h5 file is complete even if the process is killed in the middle. This leads to a failed run_or_skip checking in the update_mode.

Describe the solution you'd like

Add a new attribute, called HDF5_STATUS, assign it to EMPTY in writefile.layout_hdf5() and change it to FULL in the last call of writefile.write_hdf5_block(). Then check this attribute in ut.run_or_skip().

To determine the last call of write_hdf5_block() automatically:

if not block or block[1::2] == ds.shape[1::2]:
    HDF5_STATUS = FULL
else:
    HDF5_STATUS = EMPTY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant