2023 | Improving QGIS plugin developer experience - Antero Komi

Описание к видео 2023 | Improving QGIS plugin developer experience - Antero Komi

FOSS4G 2023 Prizren

The National Land Survey of Finland (NLS) has developed a solution for sharing common QGIS plugin code among various plugins while maintaining a good developer experience. The challenge arises from the uncertainty of the runtime environment when sharing library code across different QGIS plugins. Python's import machinery doesn't readily support multiple versions of dependencies, limiting the available version of a library to the first-run code and making code sharing and API changes challenging. To overcome these limitations, NLS has created tools that improve the development process and enable easy sharing of QGIS plugin code using standard Python libraries. This streamlined workflow includes virtual environments, dependency management, debugger sessions, and runtime dependency reorganization during build-time, enhancing developer feedback and simplifying QGIS plugin development.

NLS's approach involves initializing a QGIS plugin's development environment using a virtual environment and installing dependencies, enabling developers to launch QGIS with the plugin and its dependencies configured. This method simplifies testing, debugging, and code changes by providing a quicker feedback cycle. Additionally, runtime dependencies are reorganized during build-time, ensuring that the exact packaged version of a dependency is used at runtime, thus avoiding version conflicts. The tool also generates metadata files compatible with standard Python packaging tools, enabling code to be shared both as a Python library and a QGIS plugin. This approach offers an efficient and streamlined way to handle QGIS plugin development and code sharing, enhancing the overall developer experience and compatibility.

Комментарии

Информация по комментариям в разработке