fix: replace personal filesystem paths with env vars / config
- docker-compose.yml: hardcoded iCloud Obsidian vault volume → ${OMBRE_HOST_VAULT_DIR:-./buckets}
- write_memory.py / migrate_to_domains.py / reclassify_domains.py / reclassify_api.py:
hardcoded ~/Documents/Obsidian Vault/Ombre Brain → OMBRE_BUCKETS_DIR > load_config() > ./buckets
- write_memory.py: also fix B-04 regression (activation_count: 1 → 0 in frontmatter template)
- reclassify_api.py: model + base_url now read from config (was hardcoded SiliconFlow / DeepSeek-V3)
- tests/dataset.py + test_feel_flow.py: anonymize fixture identifiers (P酱/P0lar1s/北极星 → TestUser/北方)
Project identifiers (git.p0lar1s.uk, p0luz/ombre-brain, P0luz/Ombre-Brain GitHub) intentionally retained as project branding per user decision.
This commit is contained in:
@@ -12,7 +12,25 @@ import os
|
||||
import re
|
||||
import shutil
|
||||
|
||||
VAULT_DIR = os.path.expanduser("~/Documents/Obsidian Vault/Ombre Brain")
|
||||
|
||||
def _resolve_vault_dir() -> str:
|
||||
"""
|
||||
Resolve the bucket vault root.
|
||||
Priority: $OMBRE_BUCKETS_DIR > config.yaml > built-in ./buckets.
|
||||
"""
|
||||
env_dir = os.environ.get("OMBRE_BUCKETS_DIR", "").strip()
|
||||
if env_dir:
|
||||
return os.path.expanduser(env_dir)
|
||||
try:
|
||||
from utils import load_config
|
||||
return load_config()["buckets_dir"]
|
||||
except Exception:
|
||||
return os.path.join(
|
||||
os.path.dirname(os.path.abspath(__file__)), "buckets"
|
||||
)
|
||||
|
||||
|
||||
VAULT_DIR = _resolve_vault_dir()
|
||||
DYNAMIC_DIR = os.path.join(VAULT_DIR, "dynamic")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user