Files
sideline/mise.toml
David Gwilliam f136bd75f1 chore(mise): Rename 'run' task to 'mainline'
Rename the mise task from 'run' to 'mainline' to make it more semantic:
  - 'mise run mainline' is clearer than 'mise run run'
  - Old 'run' task is kept as alias that depends on sync-all
  - Preserves backward compatibility with existing usage
2026-03-21 17:10:40 -07:00

82 lines
2.6 KiB
TOML

[tools]
python = "3.12"
hk = "latest"
pkl = "latest"
uv = "latest"
[tasks]
# =====================
# Core
# =====================
test = "uv run pytest"
test-cov = { run = "uv run pytest --cov=engine --cov-report=term-missing -m \"not benchmark\"", depends = ["sync-all"] }
benchmark = { run = "uv run python -m engine.benchmark", depends = ["sync-all"] }
lint = "uv run ruff check engine/ mainline.py"
format = "uv run ruff format engine/ mainline.py"
# =====================
# Run
# =====================
mainline = "uv run mainline.py"
run = { run = "uv run mainline.py", depends = ["sync-all"] }
run-pygame = { run = "uv run mainline.py --display pygame", depends = ["sync-all"] }
run-terminal = { run = "uv run mainline.py --display terminal", depends = ["sync-all"] }
# =====================
# Presets
# =====================
run-demo = { run = "uv run mainline.py --preset demo --display pygame", depends = ["sync-all"] }
# =====================
# Daemon
# =====================
daemon = "nohup uv run mainline.py > nohup.out 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"
# =====================
# Environment
# =====================
sync = "uv sync"
sync-all = "uv sync --all-extras"
install = "mise run sync"
clean = "rm -rf .venv htmlcov .coverage tests/.pytest_cache .mainline_cache_*.json nohup.out"
clobber = "git clean -fdx && rm -rf .venv htmlcov .coverage tests/.pytest_cache .mainline_cache_*.json nohup.out"
# =====================
# CI
# =====================
ci = "mise run topics-init && mise run lint && mise run test-cov && mise run benchmark"
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"
# =====================
# Hooks
# =====================
pre-commit = "hk run pre-commit"
# =====================
# Diagrams
# =====================
# Render Mermaid diagrams to ASCII art
diagram-ascii = "python3 scripts/render-diagrams.py docs/ARCHITECTURE.md"
# Validate Mermaid syntax in docs (check all diagrams parse)
# Note: classDiagram not supported by mermaid-ascii but works in GitHub/GitLab
diagram-validate = """
python3 scripts/validate-diagrams.py
"""
# Render diagrams and check they match expected output
diagram-check = "mise run diagram-validate"
[env]
KAGI_API_KEY = "lOp6AGyX6TUB0kGzAli1BlAx5-VjlIN1OPCPYEXDdQc.FOKLieOa7NgWUUZi4mTZvHmrW2uNnOr8hfgv7jMvRQM"