Skip to content

config: Add config module

David Caro requested to merge add_generic_config_functions into main

This is quite flexible, it loads the config files with this order:

  • /etc/toolforge/{client_name}.yaml
  • /etc/toolforge/common.yaml
  • ~/.toolforge.yaml
  • ~/.config/toolforge.yaml
  • $XDG_CONFIG_HOME/toolforge.yaml

with the latter getting more priority, and where client_name is passed through by the clients.

You can also pass any number of validation functions that will allow to set defaults and/or raise validation errors.

Bug: T337953 Signed-off-by: David Caro dcaro@wikimedia.org

Merge request reports