cosmic-ray
cosmic-ray copied to clipboard
Improve configuration system
Right now the config system is pretty freewheeling. It can be difficult for users to know what to put in the config, and incorrect/invalid configs generally result in hard-to-understand errors. A better config system would include all or some of these features:
-
Documentation of configuration options. It would be awesome if we could generate sphinx docs from these docs.
-
Validation of configurations. Given a configuration, we should be able to determine if it has the right elements (e.g. the right key-value pairs) and if those elements are of the right form (e.g. if required values are not empty).
-
Extensibility. We need allow plugins to specify their configuration options. This is made more interesting by the fact that we need to first check the config for the active plugins before we know which ones participate in the config validation.
This is apropos to #275 and #277.
See python-anyconfig as one possible tool to help here.