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

Feature: hdf5 formatter with json metadata #445

Merged
merged 8 commits into from
May 8, 2017

Conversation

peendebak
Copy link
Contributor

This PR adds a new formatters that uses the HDF5 formatter as a base. The metadata is written in plain JSON. In this way the data read back from the metadata is identical to the original data (for all common data types).

  • Write metadata as JSON
  • Add generic test for all formatters

@AdriaanRol @Unga @core

@peendebak
Copy link
Contributor Author

@AdriaanRol @jenshnielsen The build system is complaining about the type of the arguments of write_metadata in the HDF5Formatter. Here:

https://github.com/VandersypenQutech/Qcodes/blob/feat/hdf5json/qcodes/data/hdf5_format.py#L239

The io_manager and location have default value None, which is not the case in the parent class Formatter. Do we want to add None as the default value for all the other formatters as well?

@jenshnielsen
Copy link
Collaborator

IMHO this is not a big issue as I understand it location and io_manager is required for the json metadata but not for the pure HDF5 formatter so the signatures are "correct" as is. Ways that this could be solved to not raise a style warning

  • refactor the common parts of HDF5FormatMetadata and HDF5Format format into a common base class.
  • Change the inheritance order and make HDF5Format a subclass of HDF5FormatMetadata pylint/codeacy seems to think it's fine with a subclass with less arguments

but I fail to see how this archives anything other than make the linter happy

@peendebak
Copy link
Contributor Author

@jenshnielsen I made the linter happy. Long term fix would be to specifiy the arguments of write_metadata and make the formatters obey.

@giulioungaretti giulioungaretti self-assigned this May 8, 2017
@giulioungaretti giulioungaretti merged commit eb9dc20 into microsoft:master May 8, 2017
giulioungaretti pushed a commit that referenced this pull request May 8, 2017
Author: peendebak <P.T.eendebak@tudelft.nl>

    feat: add hdf5 formatter with json metadata (#445)
@peendebak peendebak deleted the feat/hdf5json branch July 11, 2017 13:23
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.

4 participants