Setup and checks¶
Build¶
You need Python 3.12 or later, uv, and Rust 1.88 or later. From a checkout:
uv sync doesn't notice changes to the Rust code. After changing it, rebuild the extension:
Dependencies are compiled with optimisations even in development builds (see Cargo.toml): unoptimised, iced takes about a second per simulated click, which would make the tests unbearably slow.
Test¶
The tests open no windows: they drive apps through yugui.testing.Driver. The whole suite takes a few seconds. It includes the examples, and the tutorial, whose code blocks are run in order as one script.
To see an app, run it, or open the gallery, which launches any example with a click:
Lint and type-check¶
make lint # ruff, then ty, pyrefly, zuban and mypy on src/
make format # ruff format and ruff's fixes
For the Rust code:
The pre-commit hook runs ruff and a few file checks on what you commit. Install it with uv run pre-commit install.
Continuous integration¶
The jobs in .builds/ run on sourcehut for each push: the tests and linters on Ubuntu 24.04 and on Alpine, and the Linux wheels (see Releases).