File size: 560 Bytes
ae31e87
 
 
f8a97e6
 
ae31e87
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# src/paths.py
import os
from pathlib import Path
# src/paths.py
from .db import DB_PATH, SCHEMA_PATH

# App root (repo root when running on HF Spaces)
APP_DIR = Path(__file__).resolve().parents[1]  # .../your-repo

# Ensure parent exists (important if DB_PATH includes subfolders)
DB_PATH.parent.mkdir(parents=True, exist_ok=True)

def debug_print_paths():
    print(f"[paths] APP_DIR     = {APP_DIR}")
    print(f"[paths] SCHEMA_PATH = {SCHEMA_PATH} (exists={SCHEMA_PATH.exists()})")
    print(f"[paths] DB_PATH     = {DB_PATH} (exists={DB_PATH.exists()})")