- Developer Guide
This document provides a guide for developers to set up their development environment and contribute to the project.
Steps consists of generic steps that are required only once,
and module-specific steps that are required for each module.
The document also provides information on how to contribute to the project.
The following steps are required only once when setting up the development environment.
sudo apt install makeNote
For up-to-date installation instructions, please refer to official website
curl https://pyenv.run | bashTo get a list of latest Python versions available:
pyenv install --list | grep 3.10Currently, the latest version is 3.10.19. To install it:
pyenv install 3.10.19Set the global Python version to 3.10.19:
pyenv global 3.10.19pip install setuptoolsNote
If tox is installed globally, it will be available for all virtual environments.
If it's not installed globally, you will need to install it for each virtual environment.
pip install toxThe following steps are required for each module when setting up the development environment.
Note
Replace collector with the module's name
pyenv virtualenv collectorNote
Replace collector with the module's name
pyenv activate collectorAfter following the setup steps, you can start developing the module. The following commands are available for each module.
The following command will run lint checks, type checking, and tests:
toxtox -e linttox -e typetox -e py310Important
When opening a pull request, please provide a signed Contributor Licence Agreement (CLA). More information can be found here.
For each module, run tox to make sure that the code is linted, typed, and tested.
toxFor each module, make sure that the license headers are up to date using this command:
make licensePlease follow the style guide for branch names, PRs, and commit messages as described in the style guide.
To build a docker image or run module(s) in docker, please refer to Docker README.
In order to create .deb packages for a module, each module is built inside a controlled Docker environment that reproduces the target Ubuntu release. The Dockerfile installs all required build tools and dependencies, compiles the module, and uses Debian’s packaging utilities such as dpkg-buildpackage to generate the .deb file. This ensures consistent, reproducible builds that match the expected distribution environment.
Replace <module_name> with the actual name of your module and <jammy|noble> with the target Ubuntu version you want to build for.
You can build a module package using:
docker buildx build --build-arg MODULE_NAME=<module_name>_module . --target=artifacts --output type=local,dest=./output -f Dockerfile_<jammy|noble>Then you can check the created package for compliance with the Debian policy and for other common packaging errors using:
lintian *.debpyenv virtualenvsAn example output:
The * indicates which virtualenv is active.
3.10.16/envs/collector (created from /home/xrduser/.pyenv/versions/3.10.16)
* collector (created from /home/xrduser/.pyenv/versions/3.10.16)pyenv deactivatepyenv virtualenv-delete collectorpyenv versionspyenv uninstall 3.10.19