Skip to content

Commit

Permalink
move load_dependencies to end of fxn
Browse files Browse the repository at this point in the history
  • Loading branch information
spapa013 committed Oct 3, 2022
1 parent b089902 commit f260525
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions datajoint_plus/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from .hash import generate_table_id
from .utils import classproperty
from .table import FreeTable
# from datajoint.schemas import VirtualModule

logger = getLogger(__name__)

Expand Down Expand Up @@ -140,9 +139,6 @@ def __init__(self, module_name=None, schema_name=None, module=None, schema_obj_n
if schema_name:
assert not module, 'Provide either schema_name or module but not both.'
super().__init__(module_name=module_name if module_name else schema_name, schema_name=schema_name, add_objects=add_objects, create_schema=create_schema, create_tables=create_tables, connection=connection)

if load_dependencies:
self.load_dependencies(verbose=False)

elif module:
super(dj.VirtualModule, self).__init__(name=module.__name__)
Expand All @@ -165,9 +161,6 @@ def __init__(self, module_name=None, schema_name=None, module=None, schema_obj_n
if spawn_missing_classes:
schema_obj.spawn_missing_classes(context=self.__dict__)

if load_dependencies:
self.load_dependencies(verbose=False)

if add_objects:
self.__dict__.update(add_objects)

Expand All @@ -179,7 +172,10 @@ def __init__(self, module_name=None, schema_name=None, module=None, schema_obj_n

if enable_dj_flags:
enable_datajoint_flags()


if load_dependencies:
self.load_dependencies(verbose=False)

add_datajoint_plus(self)

def load_dependencies(self, verbose=True):
Expand Down

0 comments on commit f260525

Please sign in to comment.