-
Notifications
You must be signed in to change notification settings - Fork 149
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
Improve project and doxypress documentation #829
Conversation
6633717
to
da3e260
Compare
I noticed that too. I'm not sure it's always been that way. Maybe that problem would disappear by switching to the libclang parser?
|
I will review in the evening. |
I added target and config reference docs for the homepage. |
093fe8d
to
76da528
Compare
da96351
to
1f3061a
Compare
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.
Nice clean-up, thanks!
I want to merge this tomorrow, so please review until then (or don't, if you trust me ;-) |
I'll do a review tomorrow. |
|
||
namespace stlink | ||
{ | ||
/// @ingroup modm_board_nucleo_g474re |
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.
There are very few "wrong" ingroup
commands using a small script:
ERROR: Probably a bad doxygen group ('driver_mcp23x17') in file 'src/modm/driver/gpio/mcp23_transport.hpp'.
ERROR: Probably a bad doxygen group ('driver_mcp23x17') in file 'src/modm/driver/gpio/mcp23_transport.hpp'.
ERROR: Probably a bad doxygen group ('platform_uart') in file 'src/modm/driver/io/terminal.hpp'.
ERROR: Probably a bad doxygen group ('platform_uart') in file 'src/modm/driver/io/terminal.hpp'.
ERROR: Probably a bad doxygen group ('driver_ea_dog') in file 'src/modm/driver/display/st7036.hpp'.
ERROR: Probably a bad doxygen group ('driver_ea_dog') in file 'src/modm/driver/display/st7036.hpp'.
ERROR: Probably a bad doxygen group ('driver_ea_dog') in file 'src/modm/driver/display/st7565_defines.hpp'.
ERROR: Probably a bad doxygen group ('driver_ea_dog') in file 'src/modm/driver/display/st7565_defines.hpp'.
ERROR: Probably a bad doxygen group ('driver_ea_dog') in file 'src/modm/driver/display/st7565.hpp'.
ERROR: Probably a bad doxygen group ('driver_ea_dog') in file 'src/modm/driver/display/st7565.hpp'.
ERROR: Probably a bad doxygen group ('driver_i2c_eeprom') in file 'src/modm/driver/storage/cat24aa.hpp'.
ERROR: Probably a bad doxygen group ('driver_i2c_eeprom') in file 'src/modm/driver/storage/cat24aa.hpp'.
ERROR: Probably a bad doxygen group ('board_black_pill_f401') in file 'src/modm/board/black_pill_f411/board.hpp'.
ERROR: Probably a bad doxygen group ('board_nucleo_g474re') in file 'src/modm/board/nucleo_g431rb/board.hpp'.
ERROR: Probably a bad doxygen group ('board_nucleo_g474re') in file 'src/modm/board/nucleo_g431rb/board.hpp'.
ERROR: Probably a bad doxygen group ('board_nucleo_l552ze_q') in file 'src/modm/board/nucleo_l552-ze-q/board.hpp'.
ERROR: Probably a bad doxygen group ('board_nucleo_l552ze_q') in file 'src/modm/board/nucleo_l552-ze-q/board.hpp'.
ERROR: Probably a bad doxygen group ('architecture_1_wire') in file 'src/modm/architecture/interface/one_wire.hpp'.
ERROR: Probably a bad doxygen group ('math_matrix') in file 'src/modm/math/lu_decomposition.hpp'.
Found 19 suspicious doxygen groups in 727 ingroup commands.
Maybe we could add the script to the CI...? (But I don't know what is the best way to handle the false positives.)
#!/usr/bin/env python3
import re
import glob
from pathlib import Path
files = list(Path("src/").glob("**/*.hpp")) + list(Path("src/").glob("**/*.cpp"))
regex = r"[\\@]ingroup\s+modm_(?P<groupname>[0-9a-z_]+)"
error_counter = 0
ingroup_counter = 0
for f in files:
for l in open(f, "r"):
match = re.search(regex, l)
if match:
ingroup_counter += 1
groupname = match.group("groupname")
for s in groupname.split("_"):
if s.rstrip("x") not in str(f):
print(f"ERROR: Probably a bad doxygen group ('{groupname}') in file '{str(f)}'.")
error_counter += 1
print("")
print(f"Found {error_counter} suspicious doxygen groups in {ingroup_counter} ingroup commands.")
exit(error_counter)
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 thought about writing a script that runs an lbuild simulation to get the build log and then checks that the ingroup maps onto the module that generated the file. That would give fewer false positives. But I'm not motivated to do that now, this was supposed to just be a "quick" fix that escalated as always 😜
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.
Nice work, thank you a lot! 👍🏽
Ok, so I looked at the docs and I discovered significant issues, a lot of missing classes and wrong module names etc.
This fixes the doxypress
@ingroup
tags and some minor coding style issues.I also added reference docs for all targets grouped by platform and family and reference docs for all configurations, to make both of them discoverable via the website.
modm:module
andmodm:module:option
to themodm_module
group.release/
branch.modm::dummy
function in favor of lambdas.modm.io/reference/config/modm-config
docsmodm.io/reference/targets
that lists all target strings explicitly and documents the target/revX
mechanism.https://modm.io
URLs in the README relative for the mkdocs, so thatmkdocs serve
links to the local URL.modm_always_inline
I found several issues in Doxypress:
struct driver
that is inherited byclass Driver : public driver
is invisible, because Doxypress apparently does not respect letter case and merges both structs into one class.@ingroup
does not work across namespaces, so you need to close the group before a new namespace starts, then open the same group inside that namespace, then close it before it ends, then open the namespace after it has been closed. This has been a significant issue for our Board namespace and has been fixed, but it's ugly.x_t = Flags32<x>
becauseMODM_FLAGS32(x)
is not expanded correctly. Same withEXTERN_FLASH_STORAGE(x)
, which is used by theui/display/image
files.modm::platform::GpioConnector
with themodm::platform::detail
namespace just above it).modm::platform::GpioPort
on STM32 is lost).