-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
Add support for PANDERA_VALIDATION_ENABLED
for pandas and Configuration docs
#1354
Conversation
PANDERA_VALIDATION_ENABLED
for pandas and Configuration docs
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1354 +/- ##
==========================================
+ Coverage 93.91% 94.24% +0.32%
==========================================
Files 91 91
Lines 6772 6982 +210
==========================================
+ Hits 6360 6580 +220
+ Misses 412 402 -10 ☔ View full report in Codecov by Sentry. |
Thanks for the PR @noklam! Let me know when you need a review |
Signed-off-by: Nok Lam Chan <[email protected]> Signed-off-by: Nok <[email protected]>
Signed-off-by: Nok Lam Chan <[email protected]> Signed-off-by: Nok <[email protected]>
@cosmicBboy It's ready for review now |
pandera/api/pandas/container.py
Outdated
@@ -345,6 +346,9 @@ def validate( | |||
4 0.80 dog | |||
5 0.76 dog | |||
""" | |||
if not CONFIG.validation_enabled: | |||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should return the original dataframe, as a call to schema.validate
must still return a dataframe.
pandera/api/pandas/array.py
Outdated
@@ -426,6 +426,9 @@ def validate( # type: ignore [override] | |||
dtype: float64 | |||
|
|||
""" | |||
if not CONFIG.validation_enabled: | |||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should return the original dataframe
just left a comment @noklam, those should actually handle the mypy linting error. |
We were just talking about this feature yesterday! Thanks for working on this @noklam, @derinwalters, @filipeo2-mck, @mjgp2 & @cosmicBboy 👍 |
Signed-off-by: Nok <[email protected]>
need approval to start the CI. |
still some CI errors. be sure to set up pre-commit to make sure those pass |
Signed-off-by: Nok <[email protected]>
|
pinging @cosmicBboy |
thanks @noklam and congrats on your first PR to pandera! 🚀 |
fixing #1345 (ready for review)