-
Notifications
You must be signed in to change notification settings - Fork 696
feat: config docs generator #6171
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
Merged
Jiloc
merged 25 commits into
stacks-network:develop
from
Jiloc:feat/config-docs-generator
Jun 19, 2025
+5,636
−1
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
a6f68bd
Add config-docs-generator tool for automated documentation generation
Jiloc 5d74eee
move Dockerfile to the right folder
Jiloc 5f353cb
clippy and fmt
Jiloc 0ad7569
add support for @required and @units annotations. Implement parsing f…
Jiloc e5b6f92
add documentation of format
Jiloc dcef804
improve html formatting
Jiloc d2a0bfa
Merge branch 'chore/enhance-config-docs' into feat/config-docs-generator
Jiloc d5084f9
update configuration-reference.md
Jiloc 4aeb7c1
Merge branch 'chore/enhance-config-docs' into feat/config-docs-generator
Jiloc fe86039
update reference
Jiloc a2b1508
add custom section mappings and template support
Jiloc 51c0e10
fix tests
Jiloc cb07367
Merge branch 'chore/enhance-config-docs' into feat/config-docs-generator
Jiloc 90de815
update generated docs
Jiloc 31beefe
remove CARGO_HOME from dockerfile
Jiloc c2212a2
simplify json parsing logic
Jiloc 45917e4
improve test coverage
Jiloc d40be62
make required parsing strict. only true/false
Jiloc 39ddc9c
use mapping file for TARGET_STRUCTS
Jiloc 01005ce
Merge branch 'develop' into feat/config-docs-generator
Jiloc 5e5e6a2
do not run docker as root
Jiloc 358fe35
remove generated configuration documentation
Jiloc e36db35
Merge branch 'develop' into feat/config-docs-generator
Jiloc 0366c26
add prerequisites for running locally
Jiloc 826c7cc
generate docs in target folder
Jiloc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[package] | ||
name = "config-docs-generator" | ||
version = "0.1.0" | ||
edition = "2024" | ||
|
||
[[bin]] | ||
name = "extract-docs" | ||
path = "src/extract_docs.rs" | ||
|
||
[[bin]] | ||
name = "generate-markdown" | ||
path = "src/generate_markdown.rs" | ||
|
||
# Add integration test configuration | ||
[[test]] | ||
name = "integration" | ||
path = "tests/integration.rs" | ||
|
||
[dependencies] | ||
serde = { version = "1.0", features = ["derive"] } | ||
serde_json = "1.0" | ||
clap = { version = "4.0", features = ["derive"] } | ||
regex = "1.0" | ||
anyhow = "1.0" | ||
once_cell = "1.18" | ||
|
||
# Add test dependencies | ||
[dev-dependencies] | ||
tempfile = "3.0" | ||
assert_cmd = "2.0" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Use a specific nightly toolchain for reproducible builds | ||
FROM rustlang/rust@sha256:04690ffa09cddd358b349272173155319f384e57816614eea0840ec7f9422862 | ||
|
||
RUN apt-get update -y \ | ||
&& apt-get install -y --no-install-recommends \ | ||
jq \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Set the working directory for building | ||
WORKDIR /build | ||
|
||
# Copy the entire project root to preserve structure | ||
# Copy from three levels up (project root) to maintain the directory structure | ||
COPY ../../../ /build | ||
|
||
RUN useradd -ms /bin/bash docs-builder | ||
RUN chown docs-builder -R /build | ||
USER docs-builder | ||
|
||
# Pre-build the config-docs-generator binaries during image build | ||
RUN cargo build --package config-docs-generator --release | ||
|
||
# Set the working directory where the project will be mounted at runtime | ||
WORKDIR /project_root | ||
|
||
# Set environment variables for generate-config-docs.sh | ||
ENV PROJECT_ROOT=/project_root \ | ||
CARGO_TARGET_DIR=/tmp/stacks-config-docs/target \ | ||
TEMP_DIR=/tmp/stacks-config-docs/doc-generation \ | ||
EXTRACT_DOCS_BIN=/build/target/release/extract-docs \ | ||
GENERATE_MARKDOWN_BIN=/build/target/release/generate-markdown \ | ||
OUTPUT_DIR=/project_root/target/generated-docs \ | ||
SKIP_BUILD=true | ||
|
||
# Create the Docker-specific temp directory | ||
RUN mkdir -p /tmp/stacks-config-docs | ||
|
||
ENTRYPOINT ["/build/generate-config-docs.sh"] |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.