-
Notifications
You must be signed in to change notification settings - Fork 12
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
Gather all component configurations #71
Comments
An interesting idea, but would probably require substantial effort to implement properly. |
I may have to go with a specific validation framework for component configuration. Pydantic v2 is looking like a viable option for that. |
If you go with Pydantic, we could take advantage of the fields description to display help about configuration: from pydantic import BaseModel, Field
class Foo(BaseModel):
a: int = Field(description="a field")
Foo.__fields__["a"].field_info.description
# shows 'a field' |
Yes, that was part of the plan. I wonder if it would be better to just abstract out the API so it could accommodate other validation frameworks too? |
Yes why not, it would be even better. |
It would be nice to be able to gather the configuration of the whole application, from the root component and recursively to all sub-components. I'm especially interested in doing something like this at the command line:
And that would print all possible parameters. Ideally, there would be an explanation for each parameter, but I guess that it would require each component to use Click somehow.
The text was updated successfully, but these errors were encountered: