odin-detector / odin-data

DAQ software libraries for capturing and storing data from parallel detector systems
https://odin-detector.github.io/odin-data/
Apache License 2.0
8 stars 10 forks source link

Update to use improved h5py string support #324

Closed GDYendell closed 1 year ago

GDYendell commented 1 year ago

This allows users of StringHDF5Dataset to write data as fixed-length strings or as variable-length objects depending on whether length is passed. It handles various conversions including non-string types that can be converted to bytes.

The encoding parameter of string_dtype is exposed using the underlying default, "utf-8". This can be overidden to encode as ascii.

It updates the CI to run the hdf5dataset tests and adds a new test for this feature. It also fixes an error message and some existing formatting issues.