-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Add docstub checks to CI #13270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add docstub checks to CI #13270
Conversation
| WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) | ||
|
|
||
| # Check docstub annotations | ||
| add_test(NAME docstub-annotations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This command is actually generating the annotations, right? Would it make sense to register a custom target for the stub files, rather than going through ctest ? CI would still fail if the target cannot be built.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct - it will generate the stub files. I saw this PR as an intermediate step to ensure valid annotations until we are ready to package the stub files. The custom target would be better suited to gdal\swig\python\CMakeLists.txt rather than the gdal\doc\CMakeLists.txt one used here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd lean towards going straight for gdal/swig/python/CMakeLists.txt, yes.
The stub files aren't terribly useful until #13145 is done but they are at least able to provide return types. Should we go ahead and package them once 3.12 is separated from the master branch?
What does this PR do?
Adds in a new ctest check to ensure docstub annotations can be correctly generated. If errors are introduced, the docs CI action will fail.
This will prevent invalid annotations being added to the Python docstrings, in preparation for creating stubs as part of the Python bindings.
If the CI fails then the errors will be reported in the logs similar to below:
A few errors were introduced since #13198 was merged, and these have also been fixed.
What are related issues/pull requests?
#13198