From 4ee1c814fcd0d5b106a9439e8a69df0242110d30 Mon Sep 17 00:00:00 2001 From: spapa013 Date: Tue, 21 Dec 2021 14:51:24 -0600 Subject: [PATCH] add h01_materialization to api.schemas and change import to reflect new structure --- .../schemas/h01_materialization.py | 12 ++++++++++++ .../h01_materialization/h01_materialization.py | 11 +---------- 2 files changed, 13 insertions(+), 10 deletions(-) create mode 100644 python/microns-materialization-api/microns_materialization_api/schemas/h01_materialization.py diff --git a/python/microns-materialization-api/microns_materialization_api/schemas/h01_materialization.py b/python/microns-materialization-api/microns_materialization_api/schemas/h01_materialization.py new file mode 100644 index 0000000..05c5402 --- /dev/null +++ b/python/microns-materialization-api/microns_materialization_api/schemas/h01_materialization.py @@ -0,0 +1,12 @@ +""" +DataJoint tables for importing h01 from Jeff Lichtman group. +""" +import datajoint as dj +import datajoint.datajoint_plus as djp + +from ..config import h01_materialization_config + +h01_materialization_config.register_externals() +h01_materialization_config.register_adapters(context=locals()) + +schema = dj.schema(h01_materialization_config.schema_name, create_schema=True) diff --git a/python/microns-materialization/microns_materialization/h01_materialization/h01_materialization.py b/python/microns-materialization/microns_materialization/h01_materialization/h01_materialization.py index 5930220..8d68bf2 100644 --- a/python/microns-materialization/microns_materialization/h01_materialization/h01_materialization.py +++ b/python/microns-materialization/microns_materialization/h01_materialization/h01_materialization.py @@ -16,13 +16,4 @@ else: from tqdm import tqdm -from microns_materialization_api import config -schema_obj = config.SCHEMAS.H01_MATERIALIZATION - -config.register_adapters(schema_obj, context=locals()) -config.register_externals(schema_obj) - -# Schema creation -schema = dj.schema(schema_obj.value) -schema.spawn_missing_classes() -schema.connection.dependencies.load() \ No newline at end of file +from microns_materialization_api.schemas import h01_materialization as h01mat \ No newline at end of file