<div dir="ltr">Hi Nyall,<div>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.</div><div>Some questions from the previous scripts examples:</div><div><br></div><div>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</div><div><br></div><div>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? </div><div><br></div><div>3) The test scripts use different approaches. Centroids.py use source / sink, while the others two define vector / vectorDestination. Are they supposed to work?</div><div><br></div><div>Thanks!</div><div>Giovanni</div><div><br></div><div>[1] <a href="https://github.com/qgis/QGIS/blob/master/python/plugins/processing/algs/qgis/scripts/Keep_n_biggest_parts.py#L19">https://github.com/qgis/QGIS/blob/master/python/plugins/processing/algs/qgis/scripts/Keep_n_biggest_parts.py#L19</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-01-23 11:59 GMT+01:00 Nyall Dawson <span dir="ltr"><<a href="mailto:nyall.dawson@gmail.com" target="_blank">nyall.dawson@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 23 January 2018 at 18:28, Alexander Bruy <<a href="mailto:alexander.bruy@gmail.com">alexander.bruy@gmail.com</a>> wrote:<br>
> There are some scripts in the Processing tests<br>
> <a href="https://github.com/qgis/QGIS/tree/master/python/plugins/processing/tests/testdata/scripts" rel="noreferrer" target="_blank">https://github.com/qgis/QGIS/<wbr>tree/master/python/plugins/<wbr>processing/tests/testdata/<wbr>scripts</a><br>
><br>
<br>
</span>There's also <a href="https://github.com/qgis/QGIS/blob/master/python/plugins/processing/algs/qgis/scripts/Keep_n_biggest_parts.py" rel="noreferrer" target="_blank">https://github.com/qgis/QGIS/<wbr>blob/master/python/plugins/<wbr>processing/algs/qgis/scripts/<wbr>Keep_n_biggest_parts.py</a><br>
, although I'd ideally like to port this script to a proper algorithm<br>
before release.<br>
<span class="HOEnZb"><font color="#888888"><br>
Nyall<br>
</font></span><div class="HOEnZb"><div class="h5">______________________________<wbr>_________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a></div></div></blockquote></div><br></div>