70 lines
2.2 KiB
TOML
70 lines
2.2 KiB
TOML
[tools]
|
|
python = "3.12"
|
|
hk = "latest"
|
|
pkl = "latest"
|
|
|
|
[tasks]
|
|
# =====================
|
|
# Development
|
|
# =====================
|
|
|
|
test = "uv run pytest"
|
|
test-v = "uv run pytest -v"
|
|
test-cov = "uv run pytest --cov=engine --cov-report=term-missing --cov-report=html"
|
|
test-cov-open = "uv run pytest --cov=engine --cov-report=term-missing --cov-report=html && open htmlcov/index.html"
|
|
|
|
lint = "uv run ruff check engine/ mainline.py"
|
|
lint-fix = "uv run ruff check --fix engine/ mainline.py"
|
|
format = "uv run ruff format engine/ mainline.py"
|
|
|
|
# =====================
|
|
# Runtime
|
|
# =====================
|
|
|
|
run = "uv run mainline.py"
|
|
run-poetry = "uv run mainline.py --poetry"
|
|
run-firehose = "uv run mainline.py --firehose"
|
|
|
|
daemon = "nohup uv run mainline.py > /dev/null 2>&1 &"
|
|
daemon-stop = "pkill -f 'uv run mainline.py' 2>/dev/null || true"
|
|
daemon-restart = "mise run daemon-stop && sleep 2 && mise run daemon"
|
|
|
|
# =====================
|
|
# Command & Control
|
|
# =====================
|
|
|
|
cmd = "uv run cmdline.py"
|
|
cmd-stats = "bash -c 'uv run cmdline.py -w \"/effects stats\"';:"
|
|
|
|
# Initialize ntfy topics (warm up before first use - also done automatically by mainline)
|
|
topics-init = "curl -s -d 'init' https://ntfy.sh/klubhaus_terminal_mainline_cc_cmd > /dev/null && curl -s -d 'init' https://ntfy.sh/klubhaus_terminal_mainline_cc_resp > /dev/null && curl -s -d 'init' https://ntfy.sh/klubhaus_terminal_mainline > /dev/null"
|
|
|
|
# =====================
|
|
# Environment
|
|
# =====================
|
|
|
|
sync = "uv sync"
|
|
sync-all = "uv sync --all-extras"
|
|
install = "mise run sync"
|
|
install-dev = "mise run sync && uv sync --group dev"
|
|
|
|
bootstrap = "uv sync && uv run mainline.py --help"
|
|
|
|
clean = "rm -rf .venv htmlcov .coverage tests/.pytest_cache .mainline_cache_*.json nohup.out"
|
|
|
|
# Aggressive cleanup - removes all generated files, caches, and venv
|
|
clobber = "git clean -fdx && rm -rf .venv htmlcov .coverage tests/.pytest_cache .mainline_cache_*.json nohup.out"
|
|
|
|
# =====================
|
|
# CI/CD
|
|
# =====================
|
|
|
|
ci = "mise run topics-init && uv sync --group dev && uv run pytest --cov=engine --cov-report=term-missing --cov-report=xml"
|
|
ci-lint = "uv run ruff check engine/ mainline.py"
|
|
|
|
# =====================
|
|
# Git Hooks (via hk)
|
|
# =====================
|
|
|
|
pre-commit = "hk run pre-commit"
|