Handle schema v1.1.0 (#2002)

Correctly display datasets that follow schema version 1.1.0
This commit is contained in:
Marcus Kinsella
2020-12-14 15:20:29 -08:00
committed by GitHub
parent 0b91371ea8
commit 46d02b1987
7 changed files with 132 additions and 9 deletions
+2 -2
View File
@@ -63,9 +63,9 @@ def corpora_get_props_from_anndata(adata):
raise KeyError(f"missing Corpora schema field {key}")
corpora_props[key] = adata.uns[key]
for key in CorporaConstants.REQUIRED_JSON_ENCODED_METADATA_FIELD:
for key in CorporaConstants.OPTIONAL_JSON_ENCODED_METADATA_FIELD:
if key not in adata.uns:
raise KeyError(f"missing Corpora schema field {key}")
continue
try:
corpora_props[key] = json.loads(adata.uns[key])
except json.JSONDecodeError: