From 59b226323764809fa58891185ef98b4a50192330 Mon Sep 17 00:00:00 2001 From: matt garber Date: Fri, 13 Dec 2024 10:44:02 -0500 Subject: [PATCH] Skip DB connection check for prepare mode (#327) --- cumulus_library/__init__.py | 2 +- cumulus_library/cli.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cumulus_library/__init__.py b/cumulus_library/__init__.py index 4fcd391..ea82c2b 100644 --- a/cumulus_library/__init__.py +++ b/cumulus_library/__init__.py @@ -6,4 +6,4 @@ from cumulus_library.study_manifest import StudyManifest __all__ = ["BaseTableBuilder", "CountsBuilder", "StudyConfig", "StudyManifest"] -__version__ = "4.1.1" +__version__ = "4.1.2" diff --git a/cumulus_library/cli.py b/cumulus_library/cli.py index e5948ca..f25c634 100755 --- a/cumulus_library/cli.py +++ b/cumulus_library/cli.py @@ -317,8 +317,9 @@ def run_cli(args: dict): ) try: runner = StudyRunner(config, data_path=args.get("data_path")) - console.print("[italic] Connecting to database...") - runner.config.db.cursor().execute("SHOW DATABASES") + if not args.get("prepare"): + console.print("[italic] Connecting to database...") + runner.config.db.cursor().execute("SHOW DATABASES") study_dict = get_study_dict(args.get("study_dir")) if "prefix" not in args.keys(): if args.get("target"): @@ -481,7 +482,6 @@ def main(cli_args=None): if args.get("data_path"): args["data_path"] = get_abs_path(args["data_path"]) - return run_cli(args)