-
-
Notifications
You must be signed in to change notification settings - Fork 311
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
raise_warning option in a Check is not kept when saving the Schema to yaml or script. #694
Comments
thanks for filing this bug @michaelwalshe! So we want the checks to serialize into something like this:
The relevant parts of the codebase that would need to be updated are:
This is fairly in the weeds of the pandera codebase, but let me know if you'd be open to making a contribute for this bugfix! I've also added a "help wanted" tag on this issue in case anyone in the community wants to tackle it before I get to it. |
Is the issue being worked on ? If not I am willing to do it. |
Hi @alexismanuel, go for it!
|
While working on #694 about preserving Currently by following your guidance on the functions to update:
This creates an asymmetry in the roundtrip: checks = [pa.Check.greater_than(1, raise_warning=True)]
check_statistics = parse_checks(checks) # includes options
reconstructed_checks = parse_check_statistics(check_statistics) # loses options Should Let me know your thoughts on this approach. |
As in the title, if you create a Schema and set 'raise_warning = True' in a check, then this behaviour will not persist if you then save the Schema to a yaml file or even as a Python script. This is on pandera v0.8.0.
Example:
This returns:
However when I save to yaml and re-create the Schema:
This returns (after all the traceback):
Expected behavior
I would expect the error/warning behaviour for Checks to persist if saving a Schema to file.
The text was updated successfully, but these errors were encountered: