The code for the plugin is in the src folder. Make sure you have required tools, such as Qt with Qt Editor and Qt Linquist installed by following this tutorial.
This project uses [uv] to manage python packages. Make sure to have it installed first.
- Create a venv that is aware of system QGIS libraries:
uv venv --system-site-packages- On Windows OSGeo4W v2 installs use
<osgeo>/apps/PythonXX/python.exewith necessary patches
- On Windows OSGeo4W v2 installs use
- Activate the venv
- Install the dependencies:
uv sync --all-packages --all-groups- Install pre-commit (prek implementation):
prek install - Create a
.envfrom.env.example, and configure at least the QGIS executable path - Launch development QGIS:
uv run --directory components/plugin qpdt s- If you are in the components/plugin directory, you can also run
uv run qpdt sorqpdt s
- If you are in the components/plugin directory, you can also run
To update requirements, do uv lock --upgrade-package <package>.
Commit messages should follow Conventional Commits notation.
If you create or edit source files make sure that:
-
they contain absolute imports:
from plugin.utils.exceptions import TestException # Good from ..utils.exceptions import TestException # Bad
-
you consider adding test files for the new functionality
Install python packages listed in requirements.txt to the virtual environment and run tests with:
pytest