You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
This might actually be an easy fix if someone wants to dive into the changes I made in #112 , and branch from there.
The idea should be to validate that conf blob passed in to Halibot core's .load_object() call. It should be able to fill in the default values that are missing from what was hand-written.
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 variousself.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)
The text was updated successfully, but these errors were encountered: