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: remove Category inheritance from ArrowDictionary #1848

Merged
merged 2 commits into from
Dec 3, 2024

Conversation

darenliang
Copy link
Contributor

This PR removes Category inheritance from ArrowDictionary because it does not need the category attribute check here: https://github.com/unionai-oss/pandera/blob/main/pandera/dtypes.py#L483

Old behavior:

import pyarrow
from pandera.engines.pandas_engine import ArrowDictionary

int64_dictionary = ArrowDictionary(value_type=pyarrow.int64())
string_dictionary = ArrowDictionary(value_type=pyarrow.string())

int64_dictionary.check(string_dictionary)  # True

New behavior:

int64_dictionary.check(string_dictionary)  # False

@cosmicBboy
Copy link
Collaborator

@darenliang thanks for the contribution!

mind resolving the merge conflict?

Signed-off-by: Daren Liang <daren@darenliang.com>
@darenliang
Copy link
Contributor Author

@cosmicBboy Fixed the merge conflicts

@cosmicBboy
Copy link
Collaborator

Signed-off-by: Daren Liang <daren@darenliang.com>
Copy link

codecov bot commented Nov 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.29%. Comparing base (812b2a8) to head (9284441).
Report is 155 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1848      +/-   ##
==========================================
- Coverage   94.28%   93.29%   -1.00%     
==========================================
  Files          91      120      +29     
  Lines        7013     9198    +2185     
==========================================
+ Hits         6612     8581    +1969     
- Misses        401      617     +216     

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

@cosmicBboy cosmicBboy merged commit 95110a6 into unionai-oss:main Dec 3, 2024
145 of 146 checks passed
@cosmicBboy
Copy link
Collaborator

thanks @darenliang, and congrats on your first contribution to pandera! 🚀

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.

2 participants