feat(docs): sort dds topics, fix formatting (#27794)

This commit is contained in:
Balduin
2026-07-03 00:44:15 +02:00
committed by GitHub
parent 60ed1a27d4
commit 3e9841cbb6

View File

@@ -867,17 +867,17 @@ Topic | Type| Rate Limit
--- | --- | ---
"""
for message in data["publications"]:
for message in sorted(data["publications"], key=lambda elem: elem['topic']):
type = message['type']
px4Type=type.split("::")[-1]
dds_markdown += f"`{message['topic']}` | [{type}](../msg_docs/{px4Type}.md) | {message.get('rate_limit','')}\n"
dds_markdown += "\n## Subscriptions\n\nTopic | Type\n--- | ---\n"
for message in data["subscriptions"]:
for message in sorted(data["subscriptions"], key=lambda elem: elem['topic']):
type = message['type']
px4Type=type.split("::")[-1]
dds_markdown += f"{message['topic']} | [{type}](../msg_docs/{px4Type}.md)\n"
dds_markdown += f"`{message['topic']}` | [{type}](../msg_docs/{px4Type}.md)\n"
dds_markdown += "\n## Subscriptions Multi\n\n"
@@ -897,7 +897,7 @@ Topic | Type| Rate Limit
# Print the topics that are not exported to DDS
dds_markdown += "\n## Not Exported\n\nThese messages are not listed in the yaml file.\nThey are not build into the module, and hence are neither published or subscribed."
dds_markdown += "\n\n::: details See messages\n"
for item in messagesNotExported:
for item in sorted(messagesNotExported):
dds_markdown += f"\n- [{item}](../msg_docs/{item}.md)"
dds_markdown += "\n:::\n" # End of details block