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

depr(python): Rename Series.equals parameter strict to check_dtypes and rename assertion utils parameter check_dtype to check_dtypes #16573

Merged
merged 3 commits into from
May 30, 2024

Conversation

stinodego
Copy link
Contributor

@stinodego stinodego commented May 29, 2024

Related to #13231

Changes

  • In the assertion utils, rename parameter check_dtype to check_dtypes. This better matches the other parameter check_names (plural). I considered changing check_names to check_name instead, but plural makes more sense here.
  • In Series.equals, rename strict parameter to check_dtypes. This aligns with assert_series_equal and is much clearer.

@github-actions github-actions bot added deprecation Add a deprecation warning to outdated functionality python Related to Python Polars labels May 29, 2024
@stinodego stinodego force-pushed the fix-assert-behavior branch from d3db443 to 49a111d Compare May 29, 2024 12:12
@@ -34,7 +34,7 @@ impl Series {
&& {
let eq = self.equal_missing(other);
match eq {
Ok(b) => b.sum().map(|s| s as usize).unwrap_or(0) == self.len(),
Ok(b) => b.all(),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drive-by change - this should be more efficient.

Copy link

codecov bot commented May 29, 2024

Codecov Report

Attention: Patch coverage is 93.33333% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 81.48%. Comparing base (0eb8384) to head (2c08342).
Report is 2 commits behind head on main.

Files Patch % Lines
py-polars/polars/series/series.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16573      +/-   ##
==========================================
- Coverage   81.49%   81.48%   -0.01%     
==========================================
  Files        1414     1414              
  Lines      185561   185568       +7     
  Branches     2997     3002       +5     
==========================================
- Hits       151219   151209      -10     
- Misses      33826    33843      +17     
  Partials      516      516              

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

@stinodego stinodego changed the title depr(python): Rename strict to check_dtype in Series.equals and rename check_names to check_name in assert_series_equal depr(python): Rename Series.equals parameter strict to check_dtypes and rename assertion utils parameter check_dtype to check_dtypes May 29, 2024
@stinodego stinodego force-pushed the fix-assert-behavior branch from 49a111d to 2c08342 Compare May 29, 2024 13:20
@stinodego stinodego marked this pull request as ready for review May 29, 2024 14:20
@ritchie46 ritchie46 merged commit d190e02 into main May 30, 2024
27 checks passed
@ritchie46 ritchie46 deleted the fix-assert-behavior branch May 30, 2024 08:42
@c-peters c-peters added the accepted Ready for implementation label Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation deprecation Add a deprecation warning to outdated functionality python Related to Python Polars
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants