Currently, the schema activation function can be called with any valid module name as long as the tables already exist.
from element_array_ephys import ephys
ephys.activate(ephys_schema_name='test_ephys', probe_schema_name='test_probe', linking_module=__name__)
ephys.get_ephys_root_data_dir() # AttributeError: module '__main__' has no attribute 'get_ephys_root_data_dir'
We could do more to check for the relevant functions on activation. For example,
assert hasattr(_linking_module, 'get_ephys_root_data_dir'), "Linking module must specify a root directory"
assert hasattr(_linking_module, 'get_session_directory'), "Linking module must specify a session directory lookup function"
Currently, the schema activation function can be called with any valid module name as long as the tables already exist.
We could do more to check for the relevant functions on activation. For example,