I raise this topic with a new thread, because I think it's worth a dedicated discussion. Some questions were asked in another thread [1] about the status of Processing scripts. It was noticed that the scripts are a "chimera", with a special syntax and not very pythonic. The current implementation accentuate it, because API refactoring poured necessarely into scripts too...
In short my proposal is to get rid of scripts as we know them, and make ScriptAlgorithmProvider a simpler option to create GeoProcessingAlgorithms, without the burden of implementing a brand new GeoAlgorithmProvider and / or a plugin to ship it. ScriptAlgorithmProvider could load GeoProcessingAlgorithms from the same special folder as it is for scripts now, maybe using the features offered by Python's imp module (e.g. for module reloading while testing in the script editor). As suggested by Etienne Trimaille, an alogrithm skeleton could also be offered to start developing the algorithm, similar to what can be found here [2]. The gain would a unified way for writing (Python) algorithms, less code (and bugs) to mantain, and a pure pythonic approach in coding. What's your opinion? All the best, Giovanni [1] https://lists.osgeo.org/pipermail/qgis-developer/2018-January/051511.html [2] https://github.com/qgis/QGIS/blob/master/python/plugins/processing/algs/exampleprovider/ExampleAlgorithm.py
_______________________________________________ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer