<div dir="ltr">impressive... tnx Arnoud<div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Luigi Pirelli<br><br>**************************************************************************************************<br>* LinkedIn: <a href="https://www.linkedin.com/in/luigipirelli" target="_blank">https://www.linkedin.com/in/luigipirelli</a><br>* Stackexchange: <a href="http://gis.stackexchange.com/users/19667/luigi-pirelli" target="_blank">http://gis.stackexchange.com/users/19667/luigi-pirelli</a><br>* GitHub: <a href="https://github.com/luipir" target="_blank">https://github.com/luipir</a><br>* Mastering QGIS 2nd Edition:<br>* <a href="https://www.packtpub.com/big-data-and-business-intelligence/mastering-qgis-second-edition" target="_blank">https://www.packtpub.com/big-data-and-business-intelligence/mastering-qgis-second-edition</a><br>* Hire me: <a href="http://goo.gl/BYRQKg" target="_blank">http://goo.gl/BYRQKg</a><br>**************************************************************************************************</div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 16 Mar 2019 at 14:02, Richard Duivenvoorde <<a href="mailto:rdmailings@duif.net">rdmailings@duif.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">See also:<br>
<a href="https://docs.qgis.org/testing/en/docs/documentation_guidelines/cookbook_guidelines.html" rel="noreferrer" target="_blank">https://docs.qgis.org/testing/en/docs/documentation_guidelines/cookbook_guidelines.html</a><br>
<br>
R<br>
<br>
On 16/03/2019 11.05, Richard Duivenvoorde wrote:<br>
> Hi,<br>
> <br>
> For those not aware of Arnaud's work during the Hackfest:<br>
> <br>
> His work makes it relatively easy to test the python snippets in the<br>
> pyqgisbook. In this way keeping the python snippets up to date with<br>
> code/api changes of QGIS itself is much easier.<br>
> <br>
> We use a Sphinx extension:<br>
> <a href="https://www.sphinx-doc.org/en/master/usage/extensions/doctest.html" rel="noreferrer" target="_blank">https://www.sphinx-doc.org/en/master/usage/extensions/doctest.html</a><br>
> <br>
> In short:<br>
> - you run the snippets from within the cookbook rst using QGIS(libs)<br>
> either from your build/install dir, OR from within a QGIS-Desktop docker<br>
> instance (same as is being used for automatic tests)<br>
> - so we (have to!) adapt the code in the pycookbook a little to make it<br>
> testable (adding testsetup:: and testcode:: directives)<br>
> - he slightly changed the way you can build the documentation (on Linux)<br>
> using one or two extra make (.mk) files.<br>
> <br>
> See:<br>
> <a href="https://github.com/qgis/qgis-documentation#testing-python-snippets" rel="noreferrer" target="_blank">https://github.com/qgis/qgis-documentation#testing-python-snippets</a><br>
> <br>
> I've just tested and this 1 test :-) works flawlessly if you create a<br>
> '<a href="http://user.mk" rel="noreferrer" target="_blank">user.mk</a>' pointing to your QGIS_PREFIX_PATH<br>
> <br>
> So: now we can make all code snippets testable!<br>
> If I am correct he was also busy to get the code examples in the<br>
> doxygen/pyqgiscook work with this too @arnaud ?)<br>
> <br>
> Please try!<br>
> <br>
> Regards,<br>
> <br>
> Richard Duivenvoorde<br>
> <br>
> PS this is Sphinx/Python only, but if somebody jumps in to make it work<br>
> in a Windows way this would be even nicer. Or we should update the paver<br>
> way again?<br>
> _______________________________________________<br>
> QGIS-Developer mailing list<br>
> <a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">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/mailman/listinfo/qgis-developer</a><br>
> Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
> <br>
<br>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">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/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></blockquote></div>