110 Commits

Author SHA1 Message Date
Nyall Dawson
1896cf2247 [sipify] Better cleanup of method state 2025-05-04 07:42:31 +10:00
Nyall Dawson
12fe733a2b [sipify] Discard docstrings for skipped operators 2025-05-04 07:42:31 +10:00
Nyall Dawson
4a6fef278e Cleanup docs, don't mention QString in python docs 2025-04-19 18:17:34 +10:00
Nyall Dawson
161ef62ca0 Fix inconsistent heading warnings when building PyQGIS docs
Fixes missing subclass/base class sections in some class docs (
eg QgsVectorLayer)
2025-04-19 18:17:34 +10:00
Alexander Bruy
a584e533d9 use enum for return value instead of plain int in the QgsNineCellFilter 2025-04-10 14:11:19 +10:00
Nyall Dawson
bdb5904283 Fix more malformed docstrings, enforce correct format in sipify 2025-04-09 14:04:24 +10:00
Nyall Dawson
e5327c3749 Fix build error for PyQGIS docs
Correctly convert typehints for c++ pointer arguments
2025-04-09 14:04:24 +10:00
Nyall Dawson
d4027f3c09 [sipify] Strip \ref tags 2025-04-03 11:44:59 +10:00
Nyall Dawson
a9fc31921e No need to use string for bool type 2025-04-03 01:05:31 +10:00
Nyall Dawson
d597113368 [sipify] Store __annotations__ for class member typehints
This allows python's introspection functions to retrieve them,
(e.g. inspect.getannotations), and ultimately makes them
accessible to Sphinx when the PyQGIS documentation is being built

Fixes https://github.com/qgis/pyqgis-api-docs-builder/issues/184
2025-04-03 01:05:31 +10:00
Nyall Dawson
2eed9f3a01 [sipify] Automatically re-format docstrings to fit ideal line lengths
This improves the experience in IDEs or when querying documentation
via the Python introspection methods
2025-04-02 11:11:10 +10:00
Nyall Dawson
19755421f6 Make doxygen check enfore full sentences, sentence case for class briefs
Some of this needs to be checked in sipify, as doxygen internally
appends a trailing '.' to briefs when they aren't present.
2025-04-01 09:44:00 +10:00
Nyall Dawson
0556cbfd11 Ensure sipify strips initial empty lines from docstrings 2025-03-30 20:48:07 +10:00
Nyall Dawson
d52974eb69 [sipify] Enforce single sentence first paragraph for class docstrings
While doxygen automatically just splits off the first sentence for
the class brief description, Python docstrings require these to be separate paragraphs
2025-03-30 20:48:07 +10:00
Nyall Dawson
0254fc5fb7 Enforce no namespace rule in sipify 2025-03-29 07:55:27 +10:00
Nyall Dawson
8d30dc3448 Tag virtual, overridden and abstract methods in sip bindings 2025-03-27 14:00:26 +10:00
Nyall Dawson
632d196e62 Don't show useless "available in python as" notes in PyQGIS docs
Since the method name used in the docs is ALREADY the python version!
2025-02-28 18:32:09 +10:00
David Koňařík
4d86676c35 Fix SIP build errors by using /NoTypeName/
The typedef is only present in the .sip file, but without this
annotation SIP assumes it also exists in QGIS headers. This didn't
completely break the build, since we concatenate multiple SIP headers
into larger files, so the typedefs from one part "fixed" another. Run
sip-build without --concatenate to see the issue clearly.

This fix is currently sadly not fully effective due to a SIP bug:
https://github.com/Python-SIP/sip/issues/66
2025-01-06 21:31:40 +01:00
Julien Cabieces
0fdb3508a5 api(Deprecated): Remove strong requirement on \deprecated
Because some method (only QgsGeometry::set actually) can be deprecated
only in python, not in C++. But \deprecated triggers the need for Q_DECL_DEPRECATED
2024-12-17 09:06:44 +01:00
Julien Cabieces
51dc2ec2ac api(Deprecated): Generate always /Deprecated/ annotation with text
Use cmake to remove text when SIP version is less than 6.9.0
2024-12-17 09:06:44 +01:00
Julien Cabieces
92db5c2d82 feat(Deprecated): Add message to SIP deprecated annotation
Works only with SIP 6.9.0
2024-12-17 09:05:46 +01:00
Denis Rouzaud
5fdf6dd77a fix SIP_SKIP and SIP_FORCE being left alone 2024-12-07 05:16:00 +10:00
Denis Rouzaud
8c4b08dc07 fix windows build take 2 2024-12-07 05:16:00 +10:00
Denis Rouzaud
244a7c1bd1 [sipify] exit type header code 2024-12-05 13:19:50 +01:00
Denis Rouzaud
25ad1b8e38 [sipify] do not exit header code if commentting 2024-12-05 13:19:50 +01:00
Denis Rouzaud
2f2c54095c Revert "[sipify] close type header code earlier"
This reverts commit 0fe88cf945fd2da710453e2a55a4cdc4e2f82802.
2024-12-05 13:19:50 +01:00
Denis Rouzaud
7f4ae01b8c [sipify] better handling of type header includes (multiple) 2024-12-05 13:19:50 +01:00
Denis Rouzaud
05062c386f [sipify] better handling of type header includes 2024-12-05 13:19:50 +01:00
Denis Rouzaud
3a08533103 [sipify] close type header code earlier 2024-12-05 13:19:50 +01:00
Denis Rouzaud
ee8cc2c2ad comment methodcode 2024-12-05 13:19:50 +01:00
Denis Rouzaud
c12f94c316 [sipify] supports code in comment 2024-12-05 13:19:50 +01:00
Denis Rouzaud
4ddc236145
[sipify] Fix staticmethod (#59517)
* [sipify] Fix staticmethod 

When building bindings for Kadas, we get an AttributeError on startup and not a NameError.

* [pre-commit.ci lite] apply automatic fixes

---------

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2024-12-03 08:43:55 +01:00
Denis Rouzaud
0f032e5f2d run pre-commit on all files 2024-11-29 15:38:02 +01:00
Denis Rouzaud
3ddf3917f6
follow-up 2024-11-18 15:38:52 +01:00
Denis Rouzaud
8a453a7bb5
fix nested enums 2024-11-18 15:22:24 +01:00
Denis Rouzaud
a135e21727
[sipify] allow namespace/class spec in static const declarations 2024-11-18 10:00:48 +01:00
Nyall Dawson
fe78267c66 'throw' is not used/required on sip >=6
And generates hundreds of deprecation warnings during build
2024-11-04 15:13:37 +10:00
Germán Carrillo
614ce76156 [gui] Introduce StackedDiagramProperties and use it as dialog and as vector properties page. For the moment, it works with single diagrams, hiding controls for stacked diagrams 2024-09-17 23:56:22 -05:00
Nyall Dawson
059a37f87d
Fix struct attributes descriptions missing from PyQGIS docs (#58672)
Fixes https://github.com/qgis/pyqgis-api-docs-builder/issues/177
2024-09-12 07:12:52 +02:00
Nyall Dawson
391b61544e
Handle SIP_OUT with void functions 2024-09-10 11:46:47 +10:00
Nyall Dawson
b39f760cbc
Correctly handle multiline SIP_OUT param documentation 2024-09-10 11:11:25 +10:00
Nyall Dawson
f21722a0f1 [sipify] Minor cleanup to auto additions
Condense injections into a single block instead of multiple
separate blocks
2024-09-09 16:56:29 +10:00
Nyall Dawson
cfd251e7f7 Capture signal arguments 2024-09-08 16:06:22 +10:00
Nyall Dawson
cbb741fb35 Use correct subheader underline 2024-09-04 13:54:39 +10:00
Nyall Dawson
af6919a36c Lint 2024-09-04 13:54:39 +10:00
Nyall Dawson
2e60236344 Fix list in return value 2024-09-04 13:54:39 +10:00
Nyall Dawson
94f6e9c71b Correctly handle \param[in,out] in sipify 2024-09-04 13:54:39 +10:00
Nyall Dawson
e1a1b064b2 Fix multiline return with SIP_OUT 2024-09-04 13:54:39 +10:00
Nyall Dawson
f2e4c3dfb7 Don't mangle http see links in PyQGIS docs 2024-09-04 06:32:03 +10:00
Nyall Dawson
534ca73c59 Fix missing see also trailing notes in PyQGIS documentation 2024-09-04 06:32:03 +10:00