webperf_core icon indicating copy to clipboard operation
webperf_core copied to clipboard

Convert `SAMPLE-config.py` and `config.py` to `settings.json` Configuration

Open cockroacher opened this issue 1 year ago • 0 comments

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:

  1. Create a new defaults/settings.json file.
  2. Identify all constants in config.py that are used for configuration.
  3. Convert these constants into a JSON structure in defaults/settings.json.
  4. Replace all references to the config.py constants in the codebase with references to the corresponding settings in defaults/settings.json.
  5. Test the application to ensure that it works correctly with the new configuration system.
  6. Remove the SAMPLE-config.py file once everything is working correctly with defaults/settings.json.

Acceptance Criteria:

  • The application should function exactly as before, but it should now get its configuration from defaults/settings.json instead of config.py or SAMPLE-config.py.
  • All references to the constants previously in config.py should be replaced with references to the corresponding settings in defaults/settings.json.
  • The SAMPLE-config.py file 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

cockroacher avatar May 10 '24 17:05 cockroacher