Refactoring cxg utility classes in preparation for CXG conversion tooling (#1739)

This commit is contained in:
maniarathi
2020-08-14 16:51:13 -07:00
committed by GitHub
parent b034055c35
commit 508889f74b
23 changed files with 607 additions and 177 deletions
+3 -3
View File
@@ -2,9 +2,9 @@ from abc import ABCMeta, abstractmethod
import fastobo
import fsspec
from server.common.errors import OntologyLoadFailure
from server.common.utils import series_to_schema
from server.common.errors import OntologyLoadFailure
from server.common.utils.type_conversion_utils import get_schema_type_hint_of_array
class Annotations(metaclass=ABCMeta):
@@ -44,7 +44,7 @@ class Annotations(metaclass=ABCMeta):
if labels is not None and not labels.empty:
for col in labels.columns:
col_schema = dict(name=col, writable=True)
col_schema.update(series_to_schema(labels[col]))
col_schema.update(get_schema_type_hint_of_array(labels[col]))
schema.append(col_schema)
return schema