Hi Nyall, scripts seem way more complex then before. I guess it is the simplest way that could be found to accomodate Processing scripts to the refactored code. Some questions from the previous scripts examples:
1) Is automatic output / sink parameter conversion impossible to obtain? In [1] self.parameterAsSink is used, and it's not very clear to me what the second method output (Biggest_parts) represent. Input / source (Polygons) is used directly instead, as it was in QGIS 2.x 2) There are some global vars that appear to be automagically injected by the script execution context, like "parameters" and "context". Are they documented somewhere? 3) The test scripts use different approaches. Centroids.py use source / sink, while the others two define vector / vectorDestination. Are they supposed to work? Thanks! Giovanni [1] https://github.com/qgis/QGIS/blob/master/python/plugins/processing/algs/qgis/scripts/Keep_n_biggest_parts.py#L19 2018-01-23 11:59 GMT+01:00 Nyall Dawson <[email protected]>: > On 23 January 2018 at 18:28, Alexander Bruy <[email protected]> > wrote: > > There are some scripts in the Processing tests > > https://github.com/qgis/QGIS/tree/master/python/plugins/ > processing/tests/testdata/scripts > > > > There's also https://github.com/qgis/QGIS/blob/master/python/plugins/ > processing/algs/qgis/scripts/Keep_n_biggest_parts.py > , although I'd ideally like to port this script to a proper algorithm > before release. > > Nyall > _______________________________________________ > QGIS-Developer mailing list > [email protected] > List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer >
_______________________________________________ QGIS-Developer mailing list [email protected] List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
