[QGIS-Developer] PyQGIS docs / plugins and use of Constant and Enumerations

Nyall Dawson nyall.dawson at gmail.com
Sat Mar 2 20:39:31 PST 2019


On Sat, 2 Mar 2019 at 02:48, Richard Duivenvoorde <rdmailings at duif.net> wrote:

> So what would work:
> - add comments in the header files? Would these show up in the python
> docs then?

Unfortunately not -- they are already there, and appear in the c++
docs. There's a few related parts here:
- sip does not support generation of python docstrings for
enumerations (or member variables, which are effectively what c++
enumerations are converted to in Python)
- Python itself has no standard for member variable docstrings (see
https://stackoverflow.com/questions/8820276/docstring-for-variable)
(probably why sip doesn't support these)
- Sphinx does seem to have support for this - see
https://stackoverflow.com/a/8820599/1861260 , but without the sip
support for generating the docstrings we can't take advantage of this

So I think this change would first need to be address in sip, and then
in the QGIS pyqgis doc generation scripts and sphinx templates.

Nyall

> - create (automated?) lists of these constants in the pycookbook?
> - do a lot of blogging about it :-)
>
> Or: who has an idea (so somebody can maybe pick this up in A Coruna....
> :-) )
>
> Regards,
>
> Richard Duivenvoorde
>
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


More information about the QGIS-Developer mailing list