Skip to content

solanus-systems/mqshell

Repository files navigation

mqshell

ci

A python command-line interface for interacting with micropython devices running mqterm.

Inspired by mqboard.

Usage

TODO

Developing

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.txt

Linting

This project uses ruff for linting. After making changes, you can run the linter:

ruff check

Testing

Before running tests, install the test (micropython) dependencies:

./bin/setup

Unit tests

You can run the unit tests using unittest:

python -m unittest

Integration tests

Integration 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_e2e

Sometimes 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 logs

Then in another terminal:

python ./tests/e2e/e2e_foo.py

Releasing

To 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

About

A CLI for interacting with micropython devices running mqterm

Resources

License

Stars

Watchers

Forks