aman/src/constants.py
Thales Maciel a3368056ff
Some checks are pending
ci / test-and-build (push) Waiting to run
Ship the portable X11 bundle lifecycle
Implement milestone 2 around a portable X11 release bundle instead of\nkeeping distro packages as the only end-user path.\n\nAdd make/package scripts plus a portable installer helper that builds the\ntarball, creates a user-scoped venv install, manages the user service, handles\nupgrade rollback, and supports uninstall with optional purge.\n\nFlip the end-user docs to the portable bundle, add a dedicated install guide\nand validation matrix, and leave the roadmap milestone open only for the\nremaining manual distro validation evidence.\n\nValidation: python3 -m py_compile src/*.py packaging/portable/portable_installer.py tests/test_portable_bundle.py; PYTHONPATH=src python3 -m unittest tests.test_portable_bundle; PYTHONPATH=src python3 -m unittest tests.test_aman_cli tests.test_diagnostics tests.test_portable_bundle; PYTHONPATH=src python3 -m unittest discover -s tests -p 'test_*.py'
2026-03-12 15:01:26 -03:00

29 lines
1.1 KiB
Python

import sys
from pathlib import Path
DEFAULT_CONFIG_PATH = Path.home() / ".config" / "aman" / "config.json"
RECORD_TIMEOUT_SEC = 300
TRAY_UPDATE_MS = 250
_MODULE_ASSETS_DIR = Path(__file__).parent / "assets"
_PREFIX_SHARE_ASSETS_DIR = Path(sys.prefix) / "share" / "aman" / "assets"
_LOCAL_SHARE_ASSETS_DIR = Path.home() / ".local" / "share" / "aman" / "src" / "assets"
_SYSTEM_SHARE_ASSETS_DIR = Path("/usr/local/share/aman/assets")
if _MODULE_ASSETS_DIR.exists():
ASSETS_DIR = _MODULE_ASSETS_DIR
elif _PREFIX_SHARE_ASSETS_DIR.exists():
ASSETS_DIR = _PREFIX_SHARE_ASSETS_DIR
elif _LOCAL_SHARE_ASSETS_DIR.exists():
ASSETS_DIR = _LOCAL_SHARE_ASSETS_DIR
else:
ASSETS_DIR = _SYSTEM_SHARE_ASSETS_DIR
MODEL_NAME = "Qwen2.5-1.5B-Instruct-Q4_K_M.gguf"
MODEL_URL = (
"https://huggingface.co/bartowski/Qwen2.5-1.5B-Instruct-GGUF/resolve/main/"
"Qwen2.5-1.5B-Instruct-Q4_K_M.gguf"
)
MODEL_SHA256 = "1adf0b11065d8ad2e8123ea110d1ec956dab4ab038eab665614adba04b6c3370"
MODEL_DOWNLOAD_TIMEOUT_SEC = 60
MODEL_DIR = Path.home() / ".cache" / "aman" / "models"
MODEL_PATH = MODEL_DIR / MODEL_NAME