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

Config Validation #62

Open
briandconnelly opened this issue Feb 2, 2012 · 1 comment
Open

Config Validation #62

briandconnelly opened this issue Feb 2, 2012 · 1 comment

Comments

@briandconnelly
Copy link
Owner

It would be nice for a plugin to define the properties that will be associated with it. Then, when loaded, it scans all of the parameters in its config section and gives an error/warning for unrecognized parameters.

@briandconnelly
Copy link
Owner Author

Maybe have a function like register_config_parameters(name=X, type=X, default=X, description=X) to be called by the class. A function like get_config_parameters() would get the parameters from the config file and return a dict. During get_config_parameters, if it encounters a parameter that's not been registered, could raise a warning (or error if configured). The description could be shown in GUIs or when there's an error with a parameter. Other tools, such as GUIs, could use the description to print help.

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

No branches or pull requests

1 participant