Setting up for development¶
TL;DR. A development checkout runs overpressure with uv and Python 3.12 or newer,
from the repository root: uv sync, then uv run overpressure and uv run python -m unittest. make lint runs
ruff and ty as CI does. A headset is worked on as a Git clone in devices/<codename>/. The app runs from the
checkout with pnpm tauri dev, on its demo engine unless asked otherwise; pnpm bundle builds its installer with
the bundled engine.
A checkout¶
The tool runs without any package: each pinned runtime package is imported where it is used, with a fallback.
Working on it uses uv, ruff and
ty, pinned in pyproject.toml's dev group (exact versions in uv.lock).
uv sync # .venv with the tool (editable) and its packages, ruff and ty
uv run overpressure headset list # the headsets there are, and which release devices/ holds
uv run overpressure headset add phoenix # its newest stable release, never a beta (--channel beta|preview, --version V, --branch NAME)
uv run overpressure headset update phoenix # what its channel offers now, when newer
uv run overpressure devices # the headsets in devices/, and those this version cannot run
uv run overpressure doctor # what this computer lacks, with fixes
uv run overpressure install # the installer in a terminal; also upgrade, restore
uv run overpressure steps # the headset's steps and the command lines they run
Every command is in the command line. A checkout is its own data root: its
settings.json, backup/, assets/, cache/, out/ and devices/ lie in it and are ignored by Git, as is
.env, a developer's overrides (settings). See
CONTRIBUTING.md and SECURITY.md.
Lint and tests¶
uv run python -m unittest # the host tests, and each downloaded headset's, in seconds
make lint # as CI, and the headsets in devices/: ruff format --check, ruff check, ty check
make format # ruff format, ruff check --fix
ruff runs every rule (select = ["ALL"], line length 120). pyproject.toml turns off only what conflicts: two
incompatible docstring rules, the formatter's trailing commas, pytest's assertion style (the tests are unittest).
The target is Python 3.12, the app's. Tests need no docstrings or return annotations, and print is allowed
outside the tests. Any other exception is a # noqa: RULE with its reason. The headsets' own programs are packages
in overpressure/packages, whose builds run their tests.
overpressure container run -- make test runs the host tests and every headset's shell tests on Linux, in the
build container, on any host (Linux-root steps).
A headset's folder¶
A headset is a repository of its own. Its development checkout is a Git clone in its folder, which
headset add never replaces:
A headset's folder is outside this repository's Git, and ruff/ty skip it when run on .; name it
(uv run ruff check devices/phoenix, uv run ty check devices/phoenix) and run its tests with
uv run python -m unittest discover -t . -s devices/phoenix/tests. uv run python -m unittest from the root runs
them too. A new headset: adding a headset.
The app from a checkout¶
app/ is the app: a web front end (Svelte 5, TypeScript, Vite) in a Tauri 2 shell
(how it fits together).
cd app && pnpm install --frozen-lockfile
pnpm dev # the front end in a browser at http://127.0.0.1:1420, the demo engine behind it
pnpm check && pnpm test # types and unit tests
pnpm tauri dev # the app's window: needs rustup (app/src-tauri/rust-toolchain.toml pins Rust) and, on
# Windows, the Visual Studio Build Tools' C++ workload
pnpm tauri build --bundles nsis # Windows' per-user installer, in src-tauri/target/release/bundle/
pnpm bundle --bundles nsis # the same with the bundled engine (scripts/bundle-app.py first, through uv; on
# Windows it builds the command line's twin with cargo)
A development build runs the demo engine unless OVERPRESSURE_APP_REAL=1, so that a developer's own headset is
touched only on request.
Its pages are each in light and dark and down to the app's smallest window. Tiles stay plain, as in the mockup: details go into tooltips and small icon badges, which show on hover and on keyboard focus, always whole inside the window. Paths come from the system's file dialogs in the app and from a prompt in a browser. Every wait shows that something runs: what can be measured with a bar, what cannot with a spinner beside its words. What the owner sees on each page: the app.
The headsets' pictures are overpressure/brand's matrix/ icons, copied unchanged into
app/src/assets/headsets/ (docs/logo).
The bundled engine¶
pnpm bundle (tauri build with src-tauri/tauri.bundle.json) runs
scripts/bundle-app.py first, which fills src-tauri/engine/, and ships it as the
app's resources: a relocatable Python with the locked packages, overpressure's tracked files compiled to bytecode,
on Windows the command line's console twin, and a bundle.json that names what is inside
(the bundled engine). Each release builds it for Windows, macOS
and Linux (the app's release).
The demo engine¶
overpressure serve --json --demo runs nothing: a demo engine, steps, checks and backup jobs, a download that
fetches nothing, releases of its own, and an install as if an earlier run had done all but its last stage and
stopped a day ago (--demo-fresh: nothing done). It treats a development checkout as a downloaded release.
| Variable | What the demo then does |
|---|---|
OVERPRESSURE_DEMO_CARRY_OVER=1 |
offers carry-over from an earlier folder; ask asks after one as the app's data folder does |
OVERPRESSURE_DEMO_APP_UPDATE=1 |
offers an app update, whose install downloads nothing |
OVERPRESSURE_DEMO_STATE |
the state its headset shows up in on USB, 2.5 s after the page's first look: maker by default; overpressure, bootloader, edl, unknown |
The server's requests and events: the engine's protocol.