-
Notifications
You must be signed in to change notification settings - Fork 94
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
inconsistent metadata representation between JSON and HDF5 #594
Comments
Ping on this. We're doing a release for #599 relatively soon, so it would be good to lump in other bug fixes if they're attainable on short order |
I'm really not sure what the best solution is here. I think the JSON formatter is actually incorrect as there isn't metadata to store since the dicts are empty. We don't have a way to represent this in HDF5 as the metadata are datasets named by their key, which doesn't exist. I see two options here, either add a check into the JSON formatter for this edge case, or add a check into the constraints on table metadata such that, if all data are empty, that we set the metadata on an axis to be |
* TST: test case for table w/ empty metadata * BUG: empty metadata is actually now set to None, fixes #594
Metadata is handled differently depending on underlying file format (JSON or HDF5).
This is related to a previous issue (#585) and fix (#589). The original issue occurred in QIIME's rarefaction unit tests (biocore/qiime#1918).
Example:
Create an in-memory table with metadata as a list of empty dictionaries. Write this table as JSON and HDF5. Read the two tables back into memory and compare to the original table. The JSON table is equal to the in-memory table, but the HDF5 table is not because the metadata differ (
None
vs. a list ofdefaultdicts
):cc @josenavas @gregcaporaso @Jorge-C
The text was updated successfully, but these errors were encountered: