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

fix: preserve Check options in schema statistics roundtrip #1844

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alexismanuel
Copy link

fix: preserve Check options in schema statistics roundtrip (#694)

What does this PR do?

Fixes #694 by ensuring check options (like raise_warning and ignore_na) are preserved when schemas are serialized and deserialized.

Changes

  • Update parse_checks to include check options in statistics
  • Update parse_check_statistics to reconstruct checks with their original options
  • Update test suite to verify options persistence

Testing

Updated existing test cases in test_schema_statistics.py to verify options persistence
All tests passing locally
All pre-commit are passing
No new warnings introduced

Related Issues

Closes #694

Let me know if you need any additional information or would like me to make any adjustments.

Copy link

codecov bot commented Nov 13, 2024

Codecov Report

Attention: Patch coverage is 93.87755% with 3 lines in your changes missing coverage. Please review.

Project coverage is 93.26%. Comparing base (812b2a8) to head (9c026bb).
Report is 154 commits behind head on main.

Files with missing lines Patch % Lines
pandera/io/pandas_io.py 91.17% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1844      +/-   ##
==========================================
- Coverage   94.28%   93.26%   -1.02%     
==========================================
  Files          91      120      +29     
  Lines        7013     9236    +2223     
==========================================
+ Hits         6612     8614    +2002     
- Misses        401      622     +221     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@cosmicBboy
Copy link
Collaborator

@alexismanuel looks like there are some failing unit tests

Signed-off-by: alexismanuel <alexis.manuelpro@gmail.com>
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

Successfully merging this pull request may close these issues.

raise_warning option in a Check is not kept when saving the Schema to yaml or script.
2 participants