HalConfigurer is useful to set defaults in config.json when used in the CLI, but hand writing config files or an update to a module may lead to missing expected keys. HalConfigurer already sets the defaults for any expected configuration key, so module developers should not have to repeat those defaults throughout their source in various self.config.get() calls.
A potential approach to solving this may be to run HalConfigurer on the blob pulled from config.json prior to loading, so that all missing keys are filled with defaults.
Another approach may be to rework HalConfigurer and config loading slightly so that they communicate better. (e.g. have an accessable table of expected keys/defaults in HalConfigurer parseable by the config loader)
HalConfigurer is useful to set defaults in
config.jsonwhen used in the CLI, but hand writing config files or an update to a module may lead to missing expected keys. HalConfigurer already sets the defaults for any expected configuration key, so module developers should not have to repeat those defaults throughout their source in variousself.config.get()calls.A potential approach to solving this may be to run HalConfigurer on the blob pulled from
config.jsonprior to loading, so that all missing keys are filled with defaults.Another approach may be to rework HalConfigurer and config loading slightly so that they communicate better. (e.g. have an accessable table of expected keys/defaults in HalConfigurer parseable by the config loader)