Closes #5096: unit tests for inherited functions in arkouda extension array #5102
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR: Comprehensive Pandas ExtensionArray Inheritance Tests + Categorical Stubs
Summary
This PR introduces a comprehensive test suite verifying that Arkouda’s
ArkoudaArray,ArkoudaStringArray, andArkoudaCategoricalArraycorrectly inherit behavior frompandas.api.extensions.ExtensionArray.Tests ensure:
1. Arkouda Does Not Override pandas EA Methods
For each method, the suite asserts:
Verified inherited methods include:
_fill_mask_inplace,_formatter,_from_scalars,_get_repr_footer,_hash_pandas_object,_putmask,_rank,_repr_2d,_values_for_argsort,delete,dropna,insert,isin,map,ravel,repeat,searchsorted,shift,tolist,transpose,unique, and more.2. Behavior-Level Parity With pandas
Tests check:
3. Known Unsupported Behavior Is Explicitly Tested
Some pandas behaviors require dtype conversions Arkouda does not support yet.
Locked-in expected behaviors:
ArkoudaCategoricalArray.map→ xfailArkoudaCategoricalArray.shift→ raisesNotImplementedError_repr_2don numeric EAs → raisesTypeError4. Added
NotImplementedErrorStubs for Categorical InternalsStubs added for pandas Categorical-internal helper APIs:
_set_categories,_replace,_reverse_indexer,_values_for_rank,add_categories,rename_categories,remove_unused_categories, etc.5. Test Coverage Improvements
Covers:
Motivation
Previously:
This PR establishes a correctness baseline.
Examples
Test Commands
Closes #5096: unit tests for inherited functions in arkouda extension array