Open tomeichlersmith opened 1 year ago
I like the usage of an hps_home
var to reduce duplication, though I don't think I would load the full environment into the config parser. Part of the point of using these config files is separating the hps-mc configuration from the OS environment.
This will just make the config files more portable and reduce duplication since most folks have all their hps stuff underneath one parent directory.
This can be achieved by providing a
[DEFAULT]
section at the top of the config file and then using the variable-expansion syntax%(variable_name)s
. For example, I do the following:We could also support all environment variables by providing the
os.environ
map to theConfigParser
constructor as "defaults". Then folks could pull (for example)%(HPS_HOME)s
from the environment instead of having to change the config file.