The easiest way to get set up for development is to install Python (3.9
to 3.12
) and poetry, and then run the following from the top-level project directory:
cd python
poetry install
poetry shell
pre-commit install
When developing for uAgents
make sure to have the poetry shell active. This ensures that linting and formatting will automatically be checked during git commit
.
We are using Ruff with added rules for formatting and linting.
Please consider adding ruff
to your IDE to speed up the development process and ensure you only commit clean code.
Alternately you can invoke ruff by typing the following from within the ./python
folder
ruff check --fix && ruff format
To run tests use the following command:
pytest