-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
38 lines (30 loc) · 924 Bytes
/
config.py
File metadata and controls
38 lines (30 loc) · 924 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
"""Application configuration for DB Insight Visualizer."""
import os
# Server
HOST = "0.0.0.0"
PORT = int(os.environ.get("DBINSIGHT_PORT", 8025))
DEBUG = os.environ.get("DBINSIGHT_DEBUG", "false").lower() == "true"
# Database (internal metadata store)
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
DATABASE_PATH = os.path.join(BASE_DIR, "instance", "dbinsight.db")
SQLALCHEMY_DATABASE_URI = os.environ.get(
"DATABASE_URL", f"sqlite:///{DATABASE_PATH}"
)
# Sample database path
SAMPLE_DB_PATH = os.path.join(BASE_DIR, "seed_data", "sample.db")
# Scan settings
MAX_TABLES = 500
MAX_COLUMNS_PER_TABLE = 200
# Health score weights
HEALTH_WEIGHTS = {
"pk_coverage": 0.20,
"fk_density": 0.15,
"nullable_ratio": 0.15,
"index_coverage": 0.20,
"naming_convention": 0.15,
"type_consistency": 0.15,
}
# Naming convention preference
NAMING_CONVENTION = "snake_case"
# Testing
TESTING = False