<div dir="ltr"><div dir="ltr"><div>Hi qgis-devs,</div><div><br></div><div>I recently updated 15 QGIS-plugins to be QGIS3-ready. Most of them were self written (in house) plugins but four of them were also plugins from the official repository which were written by someone else.</div><div><br></div><div>I noticed that there are severals tasks that have many plugins in common like:</div><div>- load a vectorlayer</div><div>- add a layer to the layertree</div><div>- iterate through all
 (visible?)

 layers of the layertree<br></div><div>- show a message with different levels (info, warning, critical)</div><div>- log messages</div><div>- reading setting, writing settings<br></div><div>- ...</div><div><br></div><div>It seems a bit ineffective that every developer writes these common task 'from scratch'.</div><div><br></div><div>There already were some ideas to collect common functions that could be re-used by plugin-developers:</div><div><br></div><div>
<p>-some older functions (GIS2) like</p>

<p><a href="https://github.com/NathanW2/parfait" rel="nofollow noreferrer">https://github.com/NathanW2/parfait</a></p>

<p><a href="https://github.com/qgis/pyqgis_wrappers" rel="nofollow noreferrer">https://github.com/qgis/pyqgis_wrappers</a></p>

<p>and something newer like</p>

<p><a href="https://github.com/boundlessgeo/lib-qgis-commons" rel="nofollow noreferrer">https://github.com/boundlessgeo/lib-qgis-commons</a> 
<a href="https://pypi.org/project/qgiscommons/" rel="nofollow noreferrer">https://pypi.org/project/qgiscommons/</a> <br></p><p><br></p><p>One nice example for utilities collected for a (huge) plugin is:</p><p><a href="https://github.com/inasafe/inasafe/tree/master/safe/utilities" rel="nofollow noreferrer">https://github.com/inasafe/inasafe/tree/master/safe/utilities</a></p>

</div><div><br></div><div><br></div><div>Wouldn't it be possible to provide such a collection not only from privat persons/projects but from the QGIS-project itself so users could add common functions? <br></div><div>I think the chances would be higher that such a "official" collection would be used in the long run and constantly extended.</div><div><br></div><div>Apart from the fact that developers could save time while writing their plugins this could perhaps also help to improve the overall quality of the qgis-plugins as there would probably be several persons who could/would countercheck these common functions to make sure they are well written.</div><div><br></div><div>regards,</div><div>Thomas</div><div><br></div><div>PS: I asked something similar also on gis.stackexchange recently: <br></div><div><br></div><div><a href="https://gis.stackexchange.com/questions/311755/looking-for-common-pyqgis-functions-for-qgis-3">https://gis.stackexchange.com/questions/311755/looking-for-common-pyqgis-functions-for-qgis-3</a>

</div><div><br></div><div><br></div><div><br></div><div><br></div></div></div>