Open RonnyPfannschmidt opened 2 years ago
Yes! This was very much something I wanted from the start, but it's hard :-)
So, one tricky thing... even if .data
objects know their origin, how do we provide that information in such a way that downstream (for example: exceptions raised by validation with voluptous or pydantic) can sensibly make use of them?
Surfacing in both str and repr maybe be one way, but that feels a bit unclean. Thoughts?
unless those libraries provide a entrypint for this, its not something to be concerned with directly, a layer that adds the details to validation errors is a separate concern
the key is that the data is easily available for debugging values/their origin all the better if frameworks have standard ways to consume them, but we shouldnt shoehorn them
sometimes when debugging merged configurations, its really helpful to be able to tell what file/line/source an element came from
for example, if a setting can be provided by cli, default settings file and optional settings file it would be a great help to tell
a) where the final setting came from b) if its a parsed file what line it was