From c37ff0562c15362243f07068f3eec44639da7dba Mon Sep 17 00:00:00 2001 From: wendtalexander Date: Wed, 8 Oct 2025 16:03:19 +0200 Subject: [PATCH] [main] adding simple checks --- oephys2nix/main.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/oephys2nix/main.py b/oephys2nix/main.py index 1b6d48e..1c783f1 100644 --- a/oephys2nix/main.py +++ b/oephys2nix/main.py @@ -35,6 +35,13 @@ def main( log.info(f"Selected data_path is {data_path}") open_ephys_data_paths = list(Path(data_path).rglob("*open-ephys")) relacs_data_paths = list(Path(data_path).rglob("*relacs/*.nix")) + if not open_ephys_data_paths: + log.error("Did not find any open-ephys data") + raise typer.Exit() + + if not relacs_data_paths: + log.error("Did not find any relacs data") + raise typer.Exit() if len(open_ephys_data_paths) != len(relacs_data_paths): log.error(