Contributing
Thanks for wanting to help! Tavern is a GTK 4 / Libadwaita Homebrew client written in Python with Blueprint UI definitions.
Dev setupβ
Install build dependencies (Homebrew on Linux or macOS):
brew install gtk4 libadwaita meson ninja pygobject3 gettext desktop-file-utils blueprint-compiler
Build, install to ~/.local, and launch:
./run.sh # normal run
TAVERN_LOG=debug ./run.sh # with verbose logging
For a sandboxed Flatpak build:
just dev # build + install + run as Flatpak
Testsβ
pytest tests/ # full suite
pytest tests/test_backend.py -v # one file
pytest tests/test_benchmarks.py --benchmark-enable # benchmarks
Tests run headlessly β the autouse fixtures in tests/conftest.py mock Gio.Settings and dialog .present() calls so nothing pops on screen. If you add new dialog types, extend that fixture.
Working on the UIβ
Blueprint files (.blp) compile to .ui XML at build time via blueprint-compiler. Always rebuild after editing a .blp:
./run.sh # re-runs blueprint-compiler
When adding a new page, follow the eight-step checklist in the developer guide β it covers Blueprint, Python, window wiring, gresource registration, and meson sources.
Pull requestsβ
- Keep PRs focused β one change, one PR.
- Include a screenshot or short clip for any user-visible UI change.
- Run
pytest tests/locally before opening. - Reference the issue you're closing (
Closes #123).
Code styleβ
- Match the surrounding style β Tavern is a small codebase, consistency matters more than any specific rule.
- Logging is off by default. New code should use
_log = get_logger('module_name')fromlogging_util, not bareprint. - Backend I/O goes on a thread and reports back via
GLib.idle_addβ don't block the UI thread.
Project docsβ
- README.md β user-facing docs.
- CLAUDE.md β full developer + architecture guide.
- ROADMAP.md β what's planned.