PR #142 introduced a new configuration structure using classes, but in practice the objects are converted to dictionaries in the end.
A reevaluation of the new structure might also reveal further room for improvement.
Incomplete:
accessing the configuration is done mostly using config['key'] and not config.key
config.variables contains a dictionary generated from Variables and not the objects themselves (in main the objects are used again)
the new classes use to_dict (or similar) instead of implementing the necessary methods for a MutableMapping (see docs, especially .items())
Possible improvements (time will tell):
central defaults file vs defaults near the implementation
a system default.yaml file which is read before profit.yaml
config classes in a central file vs near the implementation
PR #142 introduced a new configuration structure using classes, but in practice the objects are converted to dictionaries in the end. A reevaluation of the new structure might also reveal further room for improvement.
Incomplete:
config['key']
and notconfig.key
config.variables
contains a dictionary generated fromVariables
and not the objects themselves (inmain
the objects are used again)to_dict
(or similar) instead of implementing the necessary methods for aMutableMapping
(see docs, especially.items()
)Possible improvements (time will tell):
default.yaml
file which is read beforeprofit.yaml