Reviewed-on: #4 Co-authored-by: pedro-bento <mail@pbento.pt> Co-committed-by: pedro-bento <mail@pbento.pt>
26 lines
793 B
Python
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",
|
|
]
|