From b52d7f41161eeaff9e535435feded9e2768ddc7c Mon Sep 17 00:00:00 2001 From: Kushal Bakshi <52367253+kushalbakshi@users.noreply.github.com> Date: Fri, 19 Apr 2024 14:31:55 +0000 Subject: [PATCH] Check for activated schema instead of pulling info from `dj.config` --- element_array_ephys/export/nwb/nwb.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/element_array_ephys/export/nwb/nwb.py b/element_array_ephys/export/nwb/nwb.py index a45eb754..a0b3cc8d 100644 --- a/element_array_ephys/export/nwb/nwb.py +++ b/element_array_ephys/export/nwb/nwb.py @@ -17,13 +17,15 @@ from spikeinterface import extractors from tqdm import tqdm -from ... import ephys_no_curation as ephys +from ... import ephys_no_curation from ... import probe -ephys_mode = os.getenv("EPHYS_MODE", dj.config["custom"].get("ephys_mode", "acute")) -if ephys_mode != "no-curation": + +if ephys_no_curation.schema.is_activated(): + from ... import ephys_no_curation as ephys +else: raise NotImplementedError( - "This export function is designed for the no_curation " + "schema" + f"This export function is only designed for the `ephys_no_curation` schema." )