peal.global_utils.integrate_argument

peal.global_utils.integrate_argument(arg_name, arg_value, config)[source]

Write one parsed command line value into a (possibly nested) config.

A dotted arg_name descends into the corresponding sub-config. If the field currently holds a *Config object, arg_value is treated as the path of a yaml file and loaded into that config class; otherwise it is set directly. None means “not given on the command line” and is ignored.

Parameters:
  • arg_name (str) – Field name, possibly dotted.

  • arg_value (object) – Parsed value, or None.

  • config (object) – Config to modify in place.