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 Crystalfontz LCD)lint- Lint the project
Interactive
run- Thin wrapper arounduv runclient- Runcrystalfontzserial client CLIservice- Runcrystalfontz.dbus.serviceDBus service on user session busdbus-client- Runcrystalfontz.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 cli tests.
Components:
cli Run crystalfontz cli integration tests
dbus Start cystalfontzd and run crystalfontzctl 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:
CRYSTALFONTZ_CONFIG_FILE Use an alternative config file. The default is
./tests/fixtures/crystalfontz.yaml.
CRYSTALTONTZ_LOG_LEVEL
To run standard CLI tests, you can do just integration. For DBus tests, do just integration dbus.
CHANGELOG.md
When submitting features, be sure to update the changelog!
Issues
There is a really long tail of things that I'd like to tackle for this library. Most of those things are captured in GitHub Issues.