-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Description
Context
Config is currently managed via two files: boaviztapi/data/config.yml, and tests/data/config.yml.
There are a couple of issues with the current setup:
- It's not possible to override config at runtime (e.g. with environment variables)
- The two existing YAML files are almost identical
- The
ALLOWED_ORIGINSandSPECIAL_MESSAGEparameters are configurable via environment variables, but is managed inline inmain.pyhere and here - The doc has a small typo, referencing
config.json
Changes
- Allow overriding default config values with environment variables
- Have a single definition of the default config values, and override for tests only where necessary
- Update doc to reflect changes
We could use pydantic-settings to manage the settings, and the pytest-env package could be used to modify environment variables for all tests.
We could also move the configuration of our data directories to this config, as they are currently handled in Python code here.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels