turbaszek opened a new issue #52: URL: https://github.com/apache/kibble/issues/52
Hello, Currently, Apache Kibble is configured via `kibble.yaml` which is generated by running the `setup.py` script. This file is referenced in multiple places in the codebase which is not necessary in my opinion. I would like to propose to use for the standard Python library `configparser ` instead of yaml. https://docs.python.org/3.7/library/configparser.html So instead of: ```yaml accounts: allowSignup: true verify: true api: database: 2 version: 0.1.0 elasticsearch: dbname: kibble host: elasticsearch port: 9200 ssl: false mail: mailhost: localhost mailport: 25 sender: Kibble <[email protected]> ``` we would have: ```ini [accounts] allowSignup = True verify = True [api] database = 2 version = 0.1.0 [elasticsearch] dbname = kibble host = elasticsearch port = 9200 ss = false [mail] mailhost = localhost mailport = 25 sender = Kibble <[email protected]> ``` The main advantage of using configparser is that we will be able to parse the config file once and then access any value doing something like `config.get("section", "key")`. Additionally, we may take some inspiration from Apache Airflow project and: - introduce "default config" that will be used for fallback values that were not defined by user - use env variables to override the config (dead useful for configuring environments) for example `export KIBBLE__MAIL__MAILPORT=34` would override the config value of mail.mailport ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
