We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Improving QGIS plugin developer experience

Formale Metadaten

Titel
Improving QGIS plugin developer experience
Serientitel
Anzahl der Teile
266
Autor
Lizenz
CC-Namensnennung 3.0 Deutschland:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen.
Identifikatoren
Herausgeber
Erscheinungsjahr2023
SpracheEnglisch

Inhaltliche Metadaten

Fachgebiet
Genre
Abstract
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.