diff --git a/backend/src/viasp/server/database.py b/backend/src/viasp/server/database.py index bc9ed4c6..0741a320 100644 --- a/backend/src/viasp/server/database.py +++ b/backend/src/viasp/server/database.py @@ -1,6 +1,3 @@ -from os.path import join, dirname, abspath -from typing import Set, List -from uuid import UUID, uuid4 from functools import wraps from flask import session @@ -17,8 +14,7 @@ except ImportError: from threading import get_ident as _get_ident # type: ignore -SQLALCHEMY_DATABASE_URL = "sqlite:////" + join(dirname(abspath(__file__)), - GRAPH_PATH) +SQLALCHEMY_DATABASE_URL = f"sqlite:///{GRAPH_PATH}" engine = create_engine(SQLALCHEMY_DATABASE_URL)#, connect_args={"check_same_thread": False}) db_session = scoped_session( diff --git a/backend/src/viasp/shared/defaults.py b/backend/src/viasp/shared/defaults.py index 1d9d301a..84fb576b 100644 --- a/backend/src/viasp/shared/defaults.py +++ b/backend/src/viasp/shared/defaults.py @@ -12,6 +12,7 @@ LOCALES_PATH = pathlib.Path(__file__).parent.parent.resolve() / "locales" / DEFAULT_LOCALE SHARED_PATH = pathlib.Path(__file__).parent.resolve() GRAPH_PATH = SHARED_PATH / "viasp_graph_storage.db" +print(f'Type of GRAPH_PATH: {type(GRAPH_PATH)}', flush=True) SERVER_PATH = pathlib.Path(__file__).parent.parent.resolve() / "server/" STATIC_PATH = os.path.join(SERVER_PATH, "static") CLINGRAPH_PATH = os.path.join(STATIC_PATH, "clingraph") diff --git a/docs/conf.py b/docs/conf.py index 5915f466..a2082d72 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -23,8 +23,8 @@ # sys.path.append(os.path.join(os.path.abspath(os.pardir))) autodoc_mock_imports = [ "clingo", "_clingo", "graphviz", "networkx", "viasp.shared", - "viasp.wrapper", "viasp.clingoApiClient", - "viasp_dash", "dash" + "viasp.wrapper", "viasp.clingoApiClient", "viasp_dash", "dash", + "viasp.server", "viasp.asp", "viasp.locales" ] # -- General configuration ---------------------------------------------------