File tree Expand file tree Collapse file tree
src/codegraphcontext/core Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,6 +26,13 @@ def _is_kuzudb_available() -> bool:
2626 except ImportError :
2727 return False
2828
29+ def _is_ladybugdb_available () -> bool :
30+ """Check if LadybugDB is installed."""
31+ try :
32+ return importlib .util .find_spec ("ladybug" ) is not None
33+ except ImportError :
34+ return False
35+
2936def _is_falkordb_available () -> bool :
3037 """Check if FalkorDB Lite is installed (Unix only)."""
3138 if platform .system () == "Windows" :
@@ -127,8 +134,8 @@ def get_database_manager(db_path: Optional[str] = None) -> Union['DatabaseManage
127134 info_logger ("Using Nornic DB (explicit)" )
128135 return NornicDBManager ()
129136 elif db_type == 'ladybugdb' :
130- if not _is_kuzudb_available ():
131- raise ValueError ("Database set to 'ladybugdb' but LadybugDB core (kuzu) is not installed.\n Run 'pip install kuzu '" )
137+ if not _is_ladybugdb_available ():
138+ raise ValueError ("Database set to 'ladybugdb' but LadybugDB is not installed.\n Run 'pip install ladybug '" )
132139 from .database_ladybug import LadybugDBManager
133140 info_logger (f"Using LadybugDB (explicit) at { db_path or 'default path' } " )
134141 return LadybugDBManager (db_path = db_path )
You can’t perform that action at this time.
0 commit comments