Free Motion Capture for Everyone πβ¨
TypeScript
# =============================================================================
# Poe the Poet tasks β auto-discovered by poethepoet
# =============================================================================
#
# HOW TO RUN THESE TASKS:
#
# uv run poe <task-name>
#
# Examples:
# uv run poe test # run all backend tests
# uv run poe update # pull all repos + refresh dependencies
# uv run poe lint # run ruff linter
#
# List all tasks: uv run poe --help
#
# (The bare `poe` command works inside a Poe-activated shell, but `uv run poe`
# always works regardless of environment.)
#
# ---
#
# This file is loaded automatically because pyproject.toml has no [tool.poe]
# key. Poe searches for: 1) pyproject.toml, 2) poe_tasks.toml, 3) poe_tasks.yaml,
# 4) poe_tasks.json β and stops at the first one with content.
#
# Task types:
# cmd β single shell command (cross-platform: works on cmd.exe / bash / zsh)
# sequence β run multiple tasks in order (stops on first failure)
# script β run a Python function
# ref β alias / reference another task
#
# =============================================================================
# Global environment applied to every task below. PYTHONUTF8=1 puts Python into
# UTF-8 mode so bumpver's `--dry` diff β which includes the πβ¨ emoji from the
# [project] description β prints on Windows' cp1252 console instead of dying with
# UnicodeEncodeError. Kept as ONE global setting (not copy-pasted onto each bump
# task) so it can't drift; it's harmless for the other tasks and also heads off the
# same emoji-encoding crash in pytest log output on Windows.
[tool.poe]
env = { PYTHONUTF8 = "1" }
[tool.poe.tasks]
# ββ Type-checking βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
tc-check = { cmd = "ruff check --select TC freemocap/", help = "Preview type-only imports that can move behind TYPE_CHECKING" }
tc-fix = { cmd = "ruff check --select TC --fix freemocap/", help = "Move type-only imports behind TYPE_CHECKING" }
tc = { sequence = ["tc-fix", "test"], help = "Move type-only imports + run tests to verify" }
# ββ Linting βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
lint = { cmd = "ruff check freemocap/", help = "Run all ruff lint rules" }
lint-fix = { cmd = "ruff check --fix freemocap/", help = "Auto-fix all ruff lint violations" }
# ββ Testing βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
test = { cmd = "pytest freemocap/tests/ -v", help = "Run all backend tests" }
test-schema = { cmd = "pytest freemocap/tests/test_schema_contract.py -v", help = "Run schema contract tests (frontend/backend sync)" }
test-settings = { cmd = "pytest freemocap/tests/test_settings_manager.py -v", help = "Run SettingsManager unit tests" }
test-http = { cmd = "pytest freemocap/tests/test_http_config_endpoints.py -v", help = "Run HTTP endpoint integration tests" }
test-ws = { cmd = "pytest freemocap/tests/test_websocket_settings_protocol.py -v", help = "Run WebSocket protocol tests" }
test-e2e = { cmd = "pytest freemocap/tests/test_e2e_http_settings_sync.py freemocap/tests/test_e2e_websocket_settings_sync.py -v", help = "Run end-to-end integration tests (HTTP + WebSocket round-trip)" }
test-sync = { cmd = "pytest freemocap/tests/test_schema_contract.py freemocap/tests/test_settings_manager.py freemocap/tests/test_http_config_endpoints.py freemocap/tests/test_websocket_settings_protocol.py freemocap/tests/test_e2e_http_settings_sync.py freemocap/tests/test_e2e_websocket_settings_sync.py -v", help = "Run all frontend/backend sync tests" }
test-calibration = { cmd = "pytest freemocap/tests/calibration/ -v -s --timeout=600", help = "Run calibration integration tests (requires --test-data-path or FREEMOCAP_TEST_DATA_PATH)" }
test-pipelines = { cmd = "pytest freemocap/tests/pipelines/ -v --timeout=600 --timeout-method=thread", help = "Run E2E posthoc+realtime pipeline tests against FREEMOCAP_TEST_DATA_PATH (skips if data absent)" }
test-pipelines-fast = { cmd = "pytest freemocap/tests/pipelines/ -v -m 'not slow' --timeout=600 --timeout-method=thread", help = "E2E pipeline tests minus the slow full-skeleton realtime case" }
test-all = { sequence = ["test"], help = "Run all backend tests (run `npm test` in freemocap-ui/ separately for frontend)" }
# ββ Version bumping (bumpver) βββββββββββββββββββββββββββββββββββββββββββ
# The canonical version lives in [tool.bumpver] current_version (pyproject.toml).
# bumpver rewrites it into the Python package, Electron package.json, and docs
# in each ecosystem's format, then commits + tags + pushes (see [tool.bumpver]).
#
# --ignore-vcs-tag skips the stale v1.x git tags (git describe finds v1.4.7 on
# `development`, which predates the v2 rewrite). Add --dry to preview any bump.
version = { cmd = "bumpver show", help = "Show the current canonical version" }
bump-alpha = { cmd = "bumpver update --tag=alpha --tag-num --ignore-vcs-tag", help = "Bump alpha number: v2.0.0-alpha.2 -> v2.0.0-alpha.3" }
bump-beta = { cmd = "bumpver update --tag=beta --ignore-vcs-tag", help = "Promote to beta: v2.0.0-alpha.X -> v2.0.0-beta.0" }
bump-rc = { cmd = "bumpver update --tag=rc --ignore-vcs-tag", help = "Promote to rc: v2.0.0-beta.X -> v2.0.0-rc.0" }
bump-final = { cmd = "bumpver update --tag=final --ignore-vcs-tag", help = "Promote to final: v2.0.0-rc.X -> v2.0.0" }
bump-minor = { cmd = "bumpver update --minor --tag=alpha --tag-num --ignore-vcs-tag", help = "Next minor alpha: v2.0.0 -> v2.1.0-alpha.0" }
bump-major = { cmd = "bumpver update --major --tag=alpha --tag-num --ignore-vcs-tag", help = "Next major alpha: v2.0.0 -> v3.0.0-alpha.0" }
[tool.poe.tasks.test-ui]
cmd = "npm run test"
cwd = "freemocap-ui"
help = "Run frontend tests (npm test in freemocap-ui/)"
# ββ Project maintenance βββββββββββββββββββββββββββββββββββββββββββββββββ
#
# Running `uv run poe update` will:
# 1. Pull latest commits from all sibling repos (skellycam, etc.)
# 2. Delete uv.lock to force a full re-resolve
# 3. Reinstall everything from scratch
#
# Why nuke the lockfile? `uv lock` caches resolutions and won't always
# notice new git commits on dependency branches. Deleting uv.lock forces
# `uv sync` to re-resolve every package against the latest commits.
#
[tool.poe.tasks.update]
sequence = [
{ cmd = "git -C ../skellycam pull" },
{ cmd = "git -C ../skellytracker pull" },
{ cmd = "git -C ../skellyforge pull" },
{ cmd = "git -C ../freemocap_blender_addon pull" },
{ cmd = "git pull" },
{ cmd = "uv run python -c \"from pathlib import Path; p = Path('uv.lock'); existed = p.exists(); p.unlink(missing_ok=True); print('uv.lock deleted β will re-resolve from scratch' if existed else 'uv.lock already gone')\"" },
{ cmd = "uv sync --group dev" },
]
help = "Pull all sibling repos, nuke uv.lock, and reinstall from scratch"
[tool.poe.tasks.go]
sequence = [
{ cmd = "poe update" },
{ cmd = "freemocap" },
]
help = "Pull all sibling repos, nuke uv.lock, and reinstall from scratch"