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] improved deep_equals utility - plugins for custom types #238

Merged
merged 39 commits into from
Oct 26, 2023

Conversation

fkiraly
Copy link
Contributor

@fkiraly fkiraly commented Oct 16, 2023

This PR improves the deep_equals utility by introducing the ability to provide custom plugins.

Ultimately, this enables more flexibility in soft dependencies for data containers such as polars (see, e.g., sktime/sktime#5423) throughout the sktime package ecosystem, as deep_equals is used for extrinsic testing and validity checking.
Similarly, the ForecastingHorizon check should be moved as a plugin into sktime.

In addition, makes the following changes:

  • splits up the deep_equals file into a module with multiple files

Depends on #239.

@fkiraly fkiraly added the enhancement Adding new functionality label Oct 16, 2023
@fkiraly fkiraly marked this pull request as draft October 16, 2023 06:55
skbase/utils/deep_equals/_deep_equals.py Fixed Show resolved Hide resolved
skbase/utils/deep_equals/_deep_equals.py Fixed Show fixed Hide fixed
skbase/utils/deep_equals/_deep_equals.py Fixed Show fixed Hide fixed
@fkiraly fkiraly marked this pull request as ready for review October 21, 2023 20:53
@codecov-commenter
Copy link

codecov-commenter commented Oct 22, 2023

Codecov Report

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

Comparison is base (d55abc6) 83.72% compared to head (04b048d) 84.18%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #238      +/-   ##
==========================================
+ Coverage   83.72%   84.18%   +0.45%     
==========================================
  Files          41       43       +2     
  Lines        2857     2889      +32     
==========================================
+ Hits         2392     2432      +40     
+ Misses        465      457       -8     
Files Coverage Δ
skbase/utils/deep_equals/__init__.py 100.00% <100.00%> (ø)
skbase/utils/tests/test_deep_equals.py 100.00% <100.00%> (ø)
skbase/utils/deep_equals/_common.py 92.30% <92.30%> (ø)
skbase/utils/deep_equals/_deep_equals.py 74.19% <84.12%> (ø)

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

@fkiraly fkiraly merged commit e2271b5 into main Oct 26, 2023
20 checks passed
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.

2 participants