Skip to content
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

Create CLI documentation with a Rust script (instead of Python) + style improvement #10680

Merged
merged 5 commits into from
Sep 6, 2024

Conversation

heeckhau
Copy link
Contributor

@heeckhau heeckhau commented Sep 3, 2024

I noticed that the CLI documentation was being generated using a Python script, so I rewrote it in Rust to make it easier to understand and more maintainable. Although it’s not a 1-to-1 conversion, I aimed to stay close to the original implementation to facilitate the review process. The output remains identical.

Additionally, I made a small change to the Markdown template (in a separate commit) to enhance the appearance of the generated documentation:
image

Copy link
Member

@onbjerg onbjerg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

personally love this, we should give some love to the cargo script feature. curious what others think cc @mattsse @DaniPopes @rkrasiuk @Rjected

Copy link
Member

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this is way better, thanks! Also needs to install nightly in CI

This was adapted from the Foundry book (https://github.com/foundry-rs/book/blob/8f8215a10248f8e4d4870e3c03dd836d64169fd1/scripts/gen_output/help.py#L1), would you mind also opening a PR there too?

book/cli/help.rs Outdated Show resolved Hide resolved
@shekhirin shekhirin added C-docs An addition or correction to our documentation C-enhancement New feature or request A-cli Related to the reth CLI and removed C-enhancement New feature or request labels Sep 4, 2024
Copy link
Member

@Rjected Rjected left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

epic, looks like the current book CI lint uses a stable toolchain, so you will have to install the nightly toolchain as well in the lint workflow

+ add Rust nightly to GitHub book lint job
@heeckhau
Copy link
Contributor Author

heeckhau commented Sep 6, 2024

This change was merged in Foundry: foundry-rs/book#1281
@DaniPopes I have updated the PR to include your changes.

I've also added Rust nightly to the GitHub workflow file

@DaniPopes DaniPopes added this pull request to the merge queue Sep 6, 2024
Merged via the queue into paradigmxyz:main with commit d1d544e Sep 6, 2024
35 checks passed
@heeckhau heeckhau deleted the test branch September 9, 2024 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Related to the reth CLI C-docs An addition or correction to our documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants