Prompt
Always use the configuration system’s default values instead of hardcoding defaults in the code. This ensures consistency across the application and makes configuration management more maintainable.
Bad:
DEFAULT_QUEUE: str = conf.get("operators", "default_queue", "default")
Good:
DEFAULT_QUEUE: str = conf.get_mandatory_value("operators", "default_queue")
For provider-specific configurations:
- Ensure provider configurations are properly loaded using @providers_configuration_loaded decorator
- Run pre-commits to generate provider configuration files
- Use conf.get() without fallback when the default is already defined in the configuration system
- When deprecating configuration options, properly version them in the deprecated_options dictionary
This approach centralizes configuration management, improves maintainability, and ensures consistent behavior across the application.