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

Refactor schema backends #1144

Merged
merged 6 commits into from
Apr 12, 2023
Merged

Refactor schema backends #1144

merged 6 commits into from
Apr 12, 2023

Conversation

cosmicBboy
Copy link
Collaborator

@cosmicBboy cosmicBboy commented Mar 28, 2023

This PR refactors the api package schemas to use the corresponding backends:

  • Add BaseSchema.register_backend and get_backend methods.
  • Refactor how backend core checks work by outputting a CoreCheckResults named tuple instead of raising a SchemaError
  • Clean up the core check invocations in the backend schema validate methods
  • Clean up the SchemaErrors.collect_error interface
  • Introduce BackendNotFoundError exception type

@codecov
Copy link

codecov bot commented Mar 28, 2023

Codecov Report

Patch coverage: 96.96% and project coverage change: -0.09 ⚠️

Comparison is base (76bfa4f) 97.45% compared to head (03cb986) 97.37%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1144      +/-   ##
==========================================
- Coverage   97.45%   97.37%   -0.09%     
==========================================
  Files          67       65       -2     
  Lines        4840     4912      +72     
==========================================
+ Hits         4717     4783      +66     
- Misses        123      129       +6     
Impacted Files Coverage Δ
pandera/backends/pandas/components.py 96.66% <68.75%> (-2.66%) ⬇️
pandera/backends/pandas/array.py 98.11% <95.83%> (-0.97%) ⬇️
pandera/backends/pandas/container.py 98.23% <98.43%> (+0.49%) ⬆️
pandera/__init__.py 89.47% <100.00%> (+1.23%) ⬆️
pandera/api/base/checks.py 100.00% <100.00%> (ø)
pandera/api/base/schema.py 100.00% <100.00%> (ø)
pandera/api/pandas/array.py 100.00% <100.00%> (ø)
pandera/api/pandas/components.py 99.11% <100.00%> (-0.03%) ⬇️
pandera/api/pandas/container.py 99.25% <100.00%> (-0.01%) ⬇️
pandera/backends/base/__init__.py 100.00% <100.00%> (ø)
... and 6 more

... and 3 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@cosmicBboy cosmicBboy merged commit c9e7a6e into main Apr 12, 2023
@cosmicBboy cosmicBboy deleted the refactor-schema-backends branch April 12, 2023 17:57
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.

1 participant