feat: config docs generator#6171
Merged
Jiloc merged 25 commits intostacks-network:developfrom Jun 19, 2025
Merged
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6171 +/- ##
===========================================
+ Coverage 83.42% 83.70% +0.27%
===========================================
Files 546 549 +3
Lines 392583 396519 +3936
Branches 323 323
===========================================
+ Hits 327531 331901 +4370
+ Misses 65044 64610 -434
Partials 8 8
... and 52 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
…or literal and folded block scalars
Contributor
|
I definitely love it, I would just make it less "hardcoded" (see my comments) |
rdeioris
reviewed
Jun 5, 2025
wileyj
reviewed
Jun 6, 2025
wileyj
reviewed
Jun 6, 2025
fdefelici
previously approved these changes
Jun 12, 2025
fdefelici
previously approved these changes
Jun 13, 2025
kantai
reviewed
Jun 13, 2025
wileyj
reviewed
Jun 16, 2025
fdefelici
approved these changes
Jun 19, 2025
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Dpn't be too scared! Many of the line changes are due to the final Markdown, the updated comments (already in review in #6168) and the tests!
This PR introduces a new workspace member,
config-docs-generator, a tool designed to automatically generate Markdown documentation for Stacks node TOML configuration options. The documentation is extracted directly from Rust source code comments, primarily fromstackslib/src/config/mod.rsand other specified locations.The
config-docs-generatorconsists of two main binaries:extract-docs: This binary usescargo +nightly rustdoc --output-format jsonto generate documentation in JSON format. It then parses this JSON to extract structured documentation for specified configuration structs, including descriptions, default values (resolving constant references across crates), notes, deprecation messages, and TOML examples.generate-markdown: This binary takes the JSON output fromextract-docsand converts it into a comprehensive Markdown file (docs/generated/configuration-reference.md), complete with a table of contents and cross-references.A shell script,
contrib/tools/config-docs-generator/generate-config-docs.sh, orchestrates the building of these tools and the entire documentation generation pipeline.A
Dockerfilebuilds theconfig-docs-generatortools and sets its entrypoint togenerate-config-docs.sh. This allows for generating configuration documentation in a consistent, containerized environment.Applicable issues
Additional info (benefits, drawbacks, caveats)
Benefits:
Drawbacks/Caveats:
extract-docstool relies on the nightlyrustdocJSON output format (-Z unstable-options --output-format json)Checklist
docs/rpc/openapi.yamlandrpc-endpoints.mdfor v2 endpoints,event-dispatcher.mdfor new events)clarity-benchmarkingrepobitcoin-tests.yml