Contributing
Contributions are welcome.
The first step to contribute is to install the package in editable mode. For any changes, check that the tests still pass as detailed below.
Local development¶
- Install uv.
- Create a venv and install signalbot with its dependencies in it
uv sync - Install the prek hook for linting and formatting
uv run prek install
Unit Testing¶
The tests can be executed with
uv run pytest
In many cases, we can mock receiving and sending messages to speed up development time.
To do so, you can use signalbot.utils.ChatTestCase which sets up a "skeleton" bot.
Then, you can send messages using the @mock_chat decorator in signalbot.utils.
You can find an example implementation in tests/test_chat.py.
Serving the documentation locally¶
- Install the docs dependencies
uv sync --group docs - Run the mkdocs serve command
uv run mkdocs serve --livereload --watch ./