-
-
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
Add docstub checks to CI #13270
Conversation
|
@dbaston - I've added a new Output is: I'll need some guidance on where this should be added in the CI, and default build options.
Once finalised, I presume I should remove the |
dbaston
left a comment
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'll need some guidance on where this should be added in the CI, and default build options.
I'd add it to one of the Linux builds, maybe Ubuntu 24.04, for faster feedback / easier reproducibility.
A new CMake option BUILD_PYTHON_STUBS has been added, and set to OFF by default. I presume we don't want to set to ON until the stubs are useful?
I'd be inclined to leave it OFF except in one CI configuration, otherwise we have to do test that docstub is actually available, etc.
https://pypi.org/project/docstub/#files - only has docstub-0.4.0.tar.gz available - so there is no Windows option (apart from through conda).
Looks like 0.5.0 is available now.
Once finalised, I presume I should remove the ctest code?
That makes sense to me.
Co-authored-by: Dan Baston <[email protected]>
f635b66 to
07ceb6b
Compare
07ceb6b to
50b4f0b
Compare
|
@dbaston - I've tried a few different ways to add the stub building to CI but without success. The
IMHO I think it would be useful to keep the Note - the current CI failure seems unrelated (I rolled back all recent CI changes). |
dbaston@641e8e3 updates the Ubuntu 24.04 configuration to build the stubs. But a lot of warnings come out (https://github.com/dbaston/gdal/actions/runs/18979916443/job/54209573643#step:14:5542) which for some reason don't seem to block the build.
That makes sense. My only request for the docs check piece would be to remove |
Done.
Strange - this wasn't happening with the ctest. docstub 0.5.0 has been released since then - I'll check locally to see if I can recreate. |
|
are we good to merge this PR or is there still something to be done? |
|
OK to squash/merge as far as I'm concerned, we can sort out the build warnings in a subsequent PR. |
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