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

Automatically generate docs pages for all possible config values and cli commands #2230

Open
sh-rp opened this issue Jan 22, 2025 · 0 comments
Assignees

Comments

@sh-rp
Copy link
Collaborator

sh-rp commented Jan 22, 2025

  1. Config values page

It should be fairly easy to create a markdown page for all possible config values from all known Configurations. This would be a super helpful addition to the docs. What probably needs to be done:

  • Collect all Configuration definitions, maybe we can use ast to find all classes that implement BaseConfiguration in the codebase
  • Detect which configuration section these configuration may appear under, this may be manual, I am not sure. The configuration classes have no awareness of which section the are available.
  • Generate a markdown file with all possible configuration values, extract the string below each class with ast to describe what the setting does. We will probably have to add more of those string in places where they have not been added.
  1. Cli documentation

Inspect the populated argparse object to be able to generate a markdown page with all possible cli commands. I asked chatgpt to do it, and it came up with something, so maybe this is a good way, you will have to see. Typer has this built in, you could check out how Typer formats these generated docs and use those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant