Skip to content

praekeltfoundation/vumi2

Repository files navigation

Vumi2

Vumi, but with Python 3 and Trio async

Currently under development.

  • To address router
  • HTTP RPC USSD transport
  • SMPP SMS transport

Development

This project uses uv for packaging and dependency management, so install that first.

Ensure you're also running at least python 3.11, python --version.

Then you can install the dependencies

~ uv sync --all-groups

You will also need an AMQP broker (eg. RabbitMQ) installed and running to be able to run a local worker, or to run the local tests.

To run a local worker, there is the vumi2 command, eg.

~ uv run vumi2 worker vumi2.routers.ToAddressRouter

To run the autoformatting, linting, and type checking, run

~ uv run ruff format && uv run ruff check && uv run ty check src tests

For the test runner, we use pytest:

~ uv run pytest

Generating documentation

This project uses sphinx to generate the documentation. To build, run

~ uv run sphinx-build -b html docs docs/_build/html

The built documentation will be in docs/_build/html

Editor configuration

If you'd like your editor to handle linting and/or formatting for you, here's how to set it up.

Visual Studio Code

  1. Install the Python, Ruff, and ty extensions
  2. In settings, set Ruff as the default Python formatter
  3. If you want to have formatting automatically apply, in settings, check the "Editor: Format On Save" checkbox

Alternatively, add the following to your settings.json:

{
    "python.defaultInterpreterPath": ".venv/bin/python",
    "[python]": {
        "editor.defaultFormatter": "charliermarsh.ruff"
    },
    "editor.formatOnSave": true
}

Release process

To release a new version, follow these steps:

  1. Make sure all relevant PRs are merged and that all necessary QA testing is complete
  2. Make sure release notes are up to date and accurate
  3. In one commit on the main branch:
    • Update the version number in pyproject.toml to the release version
    • Replace the UNRELEASED header in CHANGELOG.md with the release version and date
  4. Tag the release commit with the release version (for example, v0.2.1 for version 0.2.1)
  5. Push the release commit and tag
  6. In one commit on the main branch:
    • Update the version number in pyproject.toml to the next pre-release version
    • Add a new UNRELEASED header in CHANGELOG.md
  7. Push the post-release commit

About

Vumi, but targeting python 3 and trio async

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages