[Qgis-psc] PyQGIS documentation improvements - report
Nyall Dawson
nyall.dawson at gmail.com
Sun Sep 15 16:56:35 PDT 2024
Hi PSC,
Thanks for the opportunity to do further work on the PyQGIS
documentation and further improve this vital resource. Here's a quick
summary of the improvements made during this round:
1. Correct documentation is now shown for signals. Previously, we'd
just get a generic useless string for all signals (see eg
https://qgis.org/pyqgis/3.34/core/QgsBookmarkManager.html#qgis.core.QgsBookmarkManager.bookmarkAboutToBeAdded
). Now, the site shows the proper documentation and signature for all
signals. (Partially visible at
https://qgis.org/pyqgis/master/core/QgsBookmarkManager.html#qgis.core.QgsBookmarkManager.bookmarkAboutToBeAdded,
with the signature display pending the next scheduled weekly update of
the documentation site)
2. Overloaded method documentation is now correctly displayed. Compare
before (eg https://web.archive.org/web/20230202072455/https://qgis.org/pyqgis/master/core/QgsLayoutExporter.html#qgis.core.QgsLayoutExporter.exportToPdf)
where the two exportToPdf methods are confusingly displayed, vs now:
https://qgis.org/pyqgis/master/core/QgsLayoutExporter.html#qgis.core.QgsLayoutExporter.exportToPdf
. This fix also ensures that the full parameters and return type
documentation are visible for all overloads.
3. Qt classes in the "base class" list and inheritance diagrams now
link across to the Qt docs. See eg
https://qgis.org/pyqgis/master/core/QgsFieldModel.html
4. Function objects are now properly documented, see eg
https://qgis.org/pyqgis/master/processing/createAlgorithmDialog.html
5. Attributes in structs are now correctly documented. See eg missing
documentation in
https://qgis.org/pyqgis/3.38/core/QgsLayoutExporter.html#qgis.core.QgsLayoutExporter.ImageExportSettings
. (The fixed documentation is pending the next weekly update)
Thanks again!
Nyall
More information about the QGIS-PSC
mailing list