Development
Dependencies
Development
- just
- Alternatively, can run commands manually
- uv
- Alternatively, can use
requirements_dev.txtand run commands manually - shellcheck
- npx for running
pyright
Publishing
- COPR tools
- coprctl
- MacOS:
brew install jfhbrook/joshiverse/coprctl
- MacOS:
- tito
- MacOS:
brew install jfhbrook/joshiverse/tito
- MacOS:
- COPR CLI
- MacOS:
brew install jfhbrook/joshiverse/copr
- MacOS:
- MacOS: Docker
- yq
- gomplate
opCLI, with a secret calledPyPIand a field calledAPI Tokenwith an API token in it
Common Tasks
Setup
install- Install dependenciesupdate- Update all dependenciesupgrade- Update all dependencies and rebuild the environment
Quality Assurance
default- Format, run checks and tests, and lintformat- Format Python files withblackcheck- Check types withpyrighttest- Run unit testssnap- Update snapshots for unit testsintegration- Run integration tests (need a real Plus Deck 2C)lint- Lint the project
Interactive
run- Thin wrapper arounduv runclient- Runplusdeckserial client CLIservice- Runplusdeck.dbus.serviceDBus service on user session busdbus-client- Runplusdeck.dbus.clientDBus client CLI on user session busconsole- Run a Python replshell- Start a bash shell with a sourced virtualenv
Other
compile- Compilerequirements.txtandrequirements_dev.txtdocs- Serve the mkdocs documentationpublish- Run all publish tasks
Integration Tests
You can run integration tests with just integration. It optionally takes arguments. You can show them with just integration --help:
./scripts/integration.sh --help
USAGE: ./scripts/integration.sh [OPTIONS] [COMPONENTS]
Run integration tests for the supplied components. By default, runs client tests.
Components:
client Run plusdeck client integration tests
dbus Start plusdeck dbus integration tests
Options:
--help Show this help text
--snapshot-update Update snapshots
--system Run any dbus tests against the system bus
Other options are passed to pytest.
Environment:
PLUSDECK_CONFIG_FILE Use an alternative config file. The default is
./tests/fixtures/plusdeck.yaml.
PLUSDECK_LOG_LEVEL
To run standard client tests, you can do just integration. For DBus tests, do just integration dbus.
CHANGELOG.md
When submitting features, be sure to update the changelog!