-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add script to extract CMake function descriptions #2422
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
Conversation
2b4a2d0
to
b9dd179
Compare
EDIT: Discussed offline. Reasons. 😉 |
b9dd179
to
42388f6
Compare
(Rebased onto #2423 for now, will rebase onto develop once that's merged) |
1a4906c
to
171daf7
Compare
would be good to see some sample PDF output for these... i wonder if there is a simple way we can deal with parameters... maybe treating any line which starts with a capitilized "SOME_VAR description" as a parameter |
Looking at the latest TSV file that this generates, each row is indeed now a single line ( 💯 ), but there seems to be multiple EDIT: Which you could probably fix with something like: desc = re.sub(r'^(?:\\\\n)*(.+?)(?:\\\\n)*$', r'\1', desc) |
IMHO the extracted TSV file is looking much better now, thanks 👍 (If you've not already seen it, there's a really nice "Rainbow CSV" extension for VSCode which gives the different columns different colours, which is pretty handy!) But the descriptions still have things like:
so perhaps it's worth doing |
I think it's better to leave those spaces in, as they align the |
Also print warnings for functions missing descriptions
They don't take a TARGET argument
brief - a brief description brief_nodesc - a brief description, which should be excluded from the full description param - a parameter and it's description
Detail unsupported characters ret -> desc Add some manual sorting of tools/cmake functions Use dicts for all_functions items
Adds entries to the TSV beginning with `_desc_` for the group name (in the brief column) and description
ed17d8e
to
e4b7b7c
Compare
|
||
# Group descriptions | ||
group_names_descriptions = { | ||
'boot_stage2': ('Boot Stage 2', 'CMake functions to create stage 2 bootloaders'), |
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 had thought to add these in the CMake files themselves, but this is certainly fine for now
|
This adds a script to extract CMake functions and output them as a TSV file, similar to
extract_cmake_configs.py
forPICO_CMAKE_CONFIG
variablesAlso adds basic descriptions for all functions missing them, other than some which are set as allowed to be missing them in the script