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