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

[ENH] deep_equals - clearer return on diffs from dtypes and index, relaxation of MultiIndex equality check #246

Merged
merged 4 commits into from
Dec 22, 2023

Conversation

fkiraly
Copy link
Contributor

@fkiraly fkiraly commented Nov 18, 2023

This PR improves error messaging in deep_equals and makes checks on pandas based indices stricter.

Changes:

  • dtypes of pd.DataFrame-s are now checked explicitly
  • providing a clearer return on pd.DataFrame dtypes no being equal
  • pd.Index dtypes are now checked explicitly
  • index equality check is slightly relaxed. DataFrame.equals may consider MultiIndex as unequal due to irrelevant typing in some python versions, so instead we now explicitly check equality in names, values

Mirror of sktime/sktime#5560, for links to sktime dask failures see there.

@fkiraly fkiraly added the enhancement Adding new functionality label Nov 18, 2023
Copy link

codecov bot commented Nov 18, 2023

Codecov Report

Attention: 21 lines in your changes are missing coverage. Please review.

Comparison is base (12a1884) 84.19% compared to head (11f955b) 83.94%.
Report is 6 commits behind head on main.

Files Patch % Lines
skbase/utils/deep_equals/_deep_equals.py 32.25% 21 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #246      +/-   ##
==========================================
- Coverage   84.19%   83.94%   -0.25%     
==========================================
  Files          43       43              
  Lines        2891     2922      +31     
==========================================
+ Hits         2434     2453      +19     
- Misses        457      469      +12     

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

@fkiraly fkiraly changed the title [ENH] deep_equals - clearer return on pd.DataFrame dtypes no being equal [ENH] deep_equals - clearer return on pd.DataFrame dtypes not being equal Dec 22, 2023
@fkiraly fkiraly merged commit ee7e589 into main Dec 22, 2023
21 of 23 checks passed
@fkiraly fkiraly changed the title [ENH] deep_equals - clearer return on pd.DataFrame dtypes not being equal [ENH] deep_equals - clearer return on diffs from dtypes and index, relaxation of MultiIndex equality check Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding new functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant