-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Automatically generate API overview documentation #61994
Conversation
In the current output, the list is just unusable, who's going to look at this https://builds.zephyrproject.io/zephyr/pr/61994/docs/develop/api/overview.html through 625 rows of APIs to find an API to use? The existing documentation has 94 so the table size has jumped 7 times |
I agree. Having this list in our documentation adds no real, user-oriented value to the project. |
Indenting with |
Versions also seem to be part of the (0.1.0, 0.8.0 and 1.0.0) set only. I am not sure how has this even decided. This doesn't make any sense. |
this is explained in the overview, added another note now. The version numbers are based on current life cycle status as we have it documented for some of the APIs right now. Those versions will change as the API evolves over time. |
yes, not my favorite as well, probably there is a better way to display a tree, suggestions welcome. Change to _ now, looks a bit better. |
"It is what it is" This is how many APIs we have. If you are interested in 1 API, you can search for it in the table. The table loads juist fine for me. |
* @since 1.0 | ||
* @version 1.0.0 |
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 don't think this should have any version information, as it is an umbrella entry without anything in the group. All the other network related groups are children of this "networking" group but it does not make them stable. If one looks at the generated documentation list, it gives an impression that all the network APIs are v1.0.0 which is not the case.
as a quick hack, I am guessing |
I tried this, did not work. |
I had a version that indented with spaces, but for HTML only, not for PDF - but the feedback was "need to work with PDF". Sphinx is quite keen on removing whitespaces... |
Based on information from doc/develop/api/overview.rst, add current version for some groups representing APIs, following the following table: - Experimental: 0.1.0 - Unstable: 0.8.0 - Stable: 1.0.0 Also based on doc/develop/api/overview.rst, add 'since' tag to the groups. Signed-off-by: Ederson de Souza <ederson.desouza@intel.com> Signed-off-by: Anas Nashif <anas.nashif@intel.com>
It will be necessary to parse the doxygen XML files to extract `since` and `version` from them. Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
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.
The overall idea and implementation is fine. I am not particularly a fan of versioning individual APIs but I'll take it as a means to help our users.
But I completely disagree that we should sacrifice the cleanliness of the HTML build to improve the .pdf one. I think the HTML one should come first, and those _
are just very distracting and reflect poorly on the quality of our doc. I suggest @edersondisouza reverts back to spaces.
yes, I am also fine with that, the indentation and table looks bad with the '_' |
A new extension, api_overview.py, is used to, leveraging doxygen's Python module doxmlparser, parse the doxygen generated XML files. All groups ('defgroup' and 'addtogroup' tags) are collected, alongside their 'version' and 'since' info. From there, a new Sphinx directive `api-overview-table` is populated, including the name of the group, and if available, their 'since' and 'version' information. Signed-off-by: Ederson de Souza <ederson.desouza@intel.com> Signed-off-by: Anas Nashif <anas.nashif@intel.com>
c1e2bbe
to
e105068
Compare
Ok, found a way to indent with spaces that seems to work both with HTML and PDF. |
"\U000000A0", nice |
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.
LGTM now, thank you!
This PR should address #50922. It basically:
Generate \since tags from doxgen and git (it may not be perfect, but it's a fairly comprehensive start);fixadd some based on current information from doc/develop/api.overview.rst;More details of each step are on the commit messages. Two things that still stand out:
xrefitem
tag to reference it, but then we'd have doxygen pointing to RST and RST pointing to doxygen, which could be an issue; or b) have another file to map RST pages for some doxygen groups, but it would be another burden to maintain. Any thoughts about this?Fixes #50922