Documentation: Module Tree#3003
Closed
reneme wants to merge 5 commits into
Closed
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3003 +/- ##
==========================================
+ Coverage 92.57% 92.62% +0.05%
==========================================
Files 596 596
Lines 69729 69729
Branches 6613 6613
==========================================
+ Hits 64552 64588 +36
+ Misses 5144 5108 -36
Partials 33 33
Continue to review full report at Codecov.
|
Owner
|
I still need to review the code, but the concept is great and I would certainly encourage this kind of thing. |
This was referenced Aug 8, 2022
Collaborator
Author
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.
Description
As a user of the library I often struggle with managing the available modules, especially when trying to select the ones to enable/disable.
Hence, this is a first step towards a more accessible module system by providing auto-generated documentation of the available modules, their inter-dependencies, platform requirements and contents.
For that, I added short documentation-friendly "module infos" to each module's
info.txtfile and rendered them into the Doxygen documentation as@defgrouptags.For instance (AES-NI's
info.txt):Potentially, the same information could be used to improve the UX of
./configure.py --list-modulesand related configuration CUI features like error messages.Demo
Here are some screenshots of the resulting Doxygen renderings:
Module Overview Page
This renders a tree-view of all modules and their sub-modules. Optionally, the module author can add a short description of the module's content. Note the new "Modules" main-menu entry that Doxygen automatically creates for this view.
Sub-Module Description Page
Each module is represented by a description page listing the contained source files and providing some extra information on the module: e.g. which other modules it depends on. Also note the bread crumbs describing the sub-module relationships.
Platform-specific Requirements
The platform-requirements (that are defined in the
info.txt) can also be rendered into the detailed module description.Limitations
Sub-Module Relationship
The module list is still fairly hard to grasp, I feel. Improving the grouping of specific modules might be really helpful here. For instance, create a "virtual" module for "codec" to group Base64, Base58 and Base32.
Also, the sub-module dependency is currently not detected for modules that reside in sub-sub-folders without an intermediate
info.txt. For instance, the "Kyber"info.txtfiles are inpubkey/kyber/kyber_90s. But there is noinfo.txtat thepubkey/kyberlevel. As a result,Kyber 90sis currently treated as a top-level module. That might even cause functional bugs, as it probably breaks the implicit "parent modules are always required" assumption. Edit: e2ccb17 tacles that.Assign APIs to Modules
It would be great if Doxygen could annotate APIs (classes, functions, enum, ...) to their respective module (or "group" in Doxygen-terms). Technically, we could do that manually, by annotating each item with the correct
@ingroup ...tag, but that doesn't seem feasible.As an example, I annotated
Certificate_Store_MacOSresulting in the module bread-crumbs under the class' title as well as a list of contained APIs in the module description page.It remains to be seen whether there is an automatic approach to that without auto-altering the header files.
Detailed Documentation
Currently, the
info.txt<module_info>section doesn't provide a means to add more detailed descriptions for a specific module. Mainly, because I don't think it's desirable to add extensive text in there. If we'd want to add richer documentation to modules we'd need to see how those could be outsourced to dedicated documentation files.RFC
What do you think about this attempt to improve the documenntation of Botans modules?