Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

origin of data indication #9

Open
RonnyPfannschmidt opened this issue Jul 6, 2022 · 3 comments
Open

origin of data indication #9

RonnyPfannschmidt opened this issue Jul 6, 2022 · 3 comments

Comments

@RonnyPfannschmidt
Copy link

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

@cjw296
Copy link
Member

cjw296 commented Jul 6, 2022

Yes! This was very much something I wanted from the start, but it's hard :-)

@cjw296
Copy link
Member

cjw296 commented Jul 15, 2022

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?

@RonnyPfannschmidt
Copy link
Author

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

@cjw296 cjw296 mentioned this issue Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants