clipwright/clipwright/core/paths.py
pedro-bento 1dec0dd1af
All checks were successful
CI / backend-tests (push) Successful in 28s
CI / frontend-build (push) Successful in 20s
chore/dead-code-removal (#4)
Reviewed-on: #4
Co-authored-by: pedro-bento <mail@pbento.pt>
Co-committed-by: pedro-bento <mail@pbento.pt>
2026-10-04 22:11:11 +01:00

26 lines
793 B
Python

"""Canonical filesystem locations for the Clipwright backend.
The importable package lives at ``<repo>/clipwright`` while the shared runtime
resources (``fonts/``, ``assets/``, ``yolov8n.pt``) stay at the repository root.
Keeping the constants here means every module resolves them the same way,
independently of the current working directory or of how deep a module sits in
the package.
"""
from __future__ import annotations
from pathlib import Path
# .../clipwright (kept private: only used below to locate REPO_ROOT)
PACKAGE_DIR = Path(__file__).resolve().parent.parent
# Repository root (also the Docker WORKDIR /app).
REPO_ROOT = PACKAGE_DIR.parent
FONTS_DIR = REPO_ROOT / "fonts"
ASSETS_DIR = REPO_ROOT / "assets"
__all__ = [
"REPO_ROOT",
"FONTS_DIR",
"ASSETS_DIR",
]