Add Python Docstrings From Doxygen Comments#8895
Merged
opencv-pushbot merged 1 commit intoopencv:masterfrom Jun 29, 2017
Merged
Add Python Docstrings From Doxygen Comments#8895opencv-pushbot merged 1 commit intoopencv:masterfrom
opencv-pushbot merged 1 commit intoopencv:masterfrom
Conversation
29e8f4e to
7ae10da
Compare
e89a115 to
078b4cc
Compare
Contributor
|
@lewisjb , looks great! Do you plan to add support for other doxygen comments? /*! doc */
//! doc
/// doc
some_identifier //!< doc |
Contributor
Author
|
@mshabunin Thanks! To be honest, I had forgotten to check if they were being used; I will add support for them now. EDIT: I did a quick check and couldn't find any usages. I can add better Doxygen support if you would like (different comment styles, concatenating comment blocks); but it will increase the complexity of the code due to all the different Doxygen commands. |
Contributor
|
👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request changes:
The automatic generation of Python bindings.
Specifically, it parses the Doxygen comments; and adds them as the docstrings for python.
This allows OpenCV Python users to see information about a function without having to use Google:
previously, this would just show different ways of calling this function; but now will show that and the Doxygen comments.
There is the slight issue that the comments use C++ examples; but if the user were to Google the function, they would get that anyway.
Another benefit to this is that it could be used to help make Python-specific docs.
Notable code changes
Previously, a declaration generated by hdr_parser.py was 4 elements long, with an undocumented optional 5th (original return type). I have changed this so that it is always 6 elements long, with no optionals, to keep things simple.
Current issues
List of issues I have found and am currently working on fixing
None, if you find any issues, please leave a comment