A python command-line interface for interacting with micropython devices running mqterm.
Inspired by mqboard.
TODO
You need python and a build of micropython with asyncio support. Follow the steps in the CI workflow to get a micropython binary and add it to your PATH.
Before making changes, install the development (CPython) dependencies:
pip install -r dev-requirements.txtThis project uses ruff for linting. After making changes, you can run the linter:
ruff checkBefore running tests, install the test (micropython) dependencies:
./bin/setupYou can run the unit tests using unittest:
python -m unittestIntegration tests use a running MQTT broker (mosquitto), which you need to have installed (e.g. with brew).
There is a script that will set up the test environment, run the tests, and tear down the broker afterward:
./bin/test_e2eSometimes it's useful to debug an individual integration test. To do this, you need to run the broker yourself, then set up the environment and invoke the test directly:
mosquitto -v # keep open to check the broker logsThen in another terminal:
python ./tests/e2e/e2e_foo.pyTo release a new version, commit your changes and make a pull request. After merging, create a new tag and push to GitHub:
git tag vX.Y.Z
git push --tags