Skip to content

Conversation

@yoshi74ls181
Copy link
Contributor

Currently, DDH5Writer.add_data selects the AppendMode according to DDH5Writer.inserted_rows, which is not incremented correctly.
Because of this, DDH5Writer.add_data always selects AppendMode.none and unnecessarily re-creates the ddh5 file every time a row of data is added.
This bugfix removes the part where DDH5Writer.add_data incorrectly sets the AppendMode and lets datadict_to_hdf5 decide whether to re-create or append to the ddh5 file.
I have also removed DDH5Writer.inserted_rows because it is not used anywhere else.

Copy link
Collaborator

@marcosfrenkel marcosfrenkel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@marcosfrenkel marcosfrenkel enabled auto-merge March 16, 2023 18:41
@marcosfrenkel
Copy link
Collaborator

@yoshi74ls181 This looks good! nice catch, could you update the branch so that this merges?

@marcosfrenkel marcosfrenkel merged commit a31334e into toolsforexperiments:master Mar 17, 2023
@yoshi74ls181 yoshi74ls181 deleted the fix-append-mode branch March 17, 2023 07:42
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.

2 participants