webperf_core
webperf_core copied to clipboard
Convert `SAMPLE-config.py` and `config.py` to `settings.json` Configuration
Feature/improvement
Description:
Currently, our application uses a config.py file to manage configuration settings. This file uses constant variables to store configuration data. This approach is not as flexible or scalable as using a JSON file for configuration.
I propose to convert the config.py file into a defaults/settings.json file. This will allow us to manage configuration in a more structured and flexible way, and it will also make it easier to add, remove, or modify configuration settings in the future.
Tasks:
- Create a new
defaults/settings.jsonfile. - Identify all constants in
config.pythat are used for configuration. - Convert these constants into a JSON structure in
defaults/settings.json. - Replace all references to the
config.pyconstants in the codebase with references to the corresponding settings indefaults/settings.json. - Test the application to ensure that it works correctly with the new configuration system.
- Remove the
SAMPLE-config.pyfile once everything is working correctly withdefaults/settings.json.
Acceptance Criteria:
- The application should function exactly as before, but it should now get its configuration from
defaults/settings.jsoninstead ofconfig.pyorSAMPLE-config.py. - All references to the constants previously in
config.pyshould be replaced with references to the corresponding settings indefaults/settings.json. - The
SAMPLE-config.pyfile should be removed.
Additional Context:
Please ensure that the settings.json file is properly included in the .gitignore file, especially if it contains sensitive information like API keys, database credentials, etc.
Labels:
- enhancement
- breaking-change