You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
523 B
Python

"""FastAPI dependency injection helpers."""
from __future__ import annotations
from pathlib import Path
# Project root is two levels up from this file (apps/web/dependencies.py -> fithia2/)
_PROJECT_ROOT = Path(__file__).parent.parent.parent
def get_project_root() -> Path:
return _PROJECT_ROOT
def get_configs_dir() -> Path:
return _PROJECT_ROOT / "configs" / "experiments"
def get_journal_dir() -> Path:
return _PROJECT_ROOT / "journal"
def get_runs_dir() -> Path:
return _PROJECT_ROOT / "runs"