Describe the bug
When developing an application meant to be shared through different methods like a pip package, Docker, or as pure Python, managing configuration effectively is crucial. The order of precedence for configuration parameters should follow a logical hierarchy that considers the flexibility and specificity of each method. Here’s a structured approach for determining the order of precedence:
General Principles:
CLI Arguments: These should have the highest precedence because they are typically the most specific and are defined at runtime, providing immediate override capabilities.
Environment Variables: These come next, offering a convenient way to configure applications without modifying code or configuration files.
Configuration Files: These provide a persistent and centralized way to manage settings, suitable for defaults and shared settings.
Defaults in Code: Hard-coded defaults in the application should be the fallback when no other configuration is provided.
Recommended Order of Precedence:
Command Line Arguments (CLI Args)
Environment Variables
Configuration File (conga.yaml)
Supplementary Files (feeds.txt)
Defaults in Code
This order allows the most immediate and context-specific configurations (CLI arguments and environment variables) to override more general and persistent settings (configuration files and defaults).
Describe the bug When developing an application meant to be shared through different methods like a pip package, Docker, or as pure Python, managing configuration effectively is crucial. The order of precedence for configuration parameters should follow a logical hierarchy that considers the flexibility and specificity of each method. Here’s a structured approach for determining the order of precedence:
General Principles:
Recommended Order of Precedence:
conga.yaml
)feeds.txt
)This order allows the most immediate and context-specific configurations (CLI arguments and environment variables) to override more general and persistent settings (configuration files and defaults).