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
I am using DynaConf for loading settings for CLI scripts which are widely distributed. The TOML settings files are located in common configuration paths in the user space such as ~/.config/cli/config.toml or ~/Library/Application Support/cli/config.toml.
It is confusing to ask end-users to place their values under a an environment header such as [default]. End users will never need different environments. However, when running pytest to test my CLI there is no easy way to override the values of the settings_files configuration option.
Similar to how you can add settings.configure(FORCE_ENV_FOR_DYNACONF="testing") to force an environment to be used in testing, it would be great to have SETTINGS.configure(FORCE_SETTINGS_FILES=[path/to/settings.toml]) to override the files that are loaded. This would allow easy creation of multiple configuration files to be used in integration tests.
Maybe there is an easier way to do this, but I haven't found one yet.
The text was updated successfully, but these errors were encountered:
I am using DynaConf for loading settings for CLI scripts which are widely distributed. The TOML settings files are located in common configuration paths in the user space such as
~/.config/cli/config.toml
or~/Library/Application Support/cli/config.toml
.It is confusing to ask end-users to place their values under a an environment header such as
[default]
. End users will never need different environments. However, when running pytest to test my CLI there is no easy way to override the values of thesettings_files
configuration option.Similar to how you can add
settings.configure(FORCE_ENV_FOR_DYNACONF="testing")
to force an environment to be used in testing, it would be great to haveSETTINGS.configure(FORCE_SETTINGS_FILES=[path/to/settings.toml])
to override the files that are loaded. This would allow easy creation of multiple configuration files to be used in integration tests.Maybe there is an easier way to do this, but I haven't found one yet.
The text was updated successfully, but these errors were encountered: