Re: [QGIS-Developer] Documentation: pyqgis cookbook python code tests

2019-03-26 Thread Arnaud Morvan
Same is coming for the Python API docstrings: 
https://github.com/qgis/QGIS/pull/9615


Cheers

Arnaud Morvan
Ingénieur logiciel
Tél: +33 (0)4 58 48 20 32

Camptocamp France SAS
18 rue du Lac Saint André
Savoie Technolac - Bâtiment Le Dauphin
F-73370 Le Bourget du Lac
http://www.camptocamp.com

Le 24/03/2019 à 22:44, Tim Sutton a écrit :

Yeah this is a really great step forward - thanks Arnaud!

Regards

Tim

On 24 Mar 2019, at 20:52, Luigi Pirelli > wrote:


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 
mailto:rdmaili...@duif.net>> 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
> QGIS-Developer@lists.osgeo.org

> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe:
https://lists.osgeo.org/mailman/listinfo/qgis-developer
>

___
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

___
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


—







*Tim Sutton*

*Co-founder:*Kartoza
*Ex Project chair:*QGIS.org 

Visit http://kartoza.com  to find out about open 
source:


Desktop GIS programming services
Geospatial web development
GIS Training
Consulting Services

*Skype*: timlinux
*IRC:*timlinux on #qgis at freenode.net 

___
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

Re: [QGIS-Developer] Documentation: pyqgis cookbook python code tests

2019-03-24 Thread Tim Sutton
Yeah this is a really great step forward - thanks Arnaud!

Regards

Tim

> On 24 Mar 2019, at 20:52, Luigi Pirelli  wrote:
> 
> 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  > 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
> > QGIS-Developer@lists.osgeo.org 
> > List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
> > 
> > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
> > 
> > 
> 
> ___
> 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 
> ___
> 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

—








Tim Sutton

Co-founder: Kartoza
Ex Project chair: QGIS.org

Visit http://kartoza.com  to find out about open source:

Desktop GIS programming services
Geospatial web development
GIS Training
Consulting Services

Skype: timlinux 
IRC: timlinux on #qgis at freenode.net

___
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

Re: [QGIS-Developer] Documentation: pyqgis cookbook python code tests

2019-03-24 Thread Luigi Pirelli
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 
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
> > QGIS-Developer@lists.osgeo.org
> > List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> >
>
> ___
> 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
___
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

Re: [QGIS-Developer] Documentation: pyqgis cookbook python code tests

2019-03-16 Thread Richard Duivenvoorde
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
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> 

___
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

[QGIS-Developer] Documentation: pyqgis cookbook python code tests

2019-03-16 Thread Richard Duivenvoorde
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
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer