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

feat: Expressify dt.round #15861

Merged
merged 3 commits into from Apr 26, 2024
Merged

feat: Expressify dt.round #15861

merged 3 commits into from Apr 26, 2024

Conversation

reswqa
Copy link
Collaborator

@reswqa reswqa commented Apr 24, 2024

No description provided.

@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars labels Apr 24, 2024
@@ -344,7 +344,7 @@ def truncate(
@unstable()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@MarcoGorelli This function was marked as experimental since 2022-10, do you think it's stabilized now?

Copy link
Collaborator

Choose a reason for hiding this comment

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

sorry for the delay - I think so, yes!

@@ -90,8 +90,8 @@ impl PyExpr {
self.inner.clone().dt().dst_offset().into()
}

fn dt_round(&self, every: &str, offset: &str) -> Self {
self.inner.clone().dt().round(every, offset).into()
fn dt_round(&self, every: Self, offset: &str) -> Self {
Copy link
Collaborator Author

@reswqa reswqa Apr 24, 2024

Choose a reason for hiding this comment

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

We only expressify the every since offset is deprecated since 0.20.19.

Copy link

codspeed-hq bot commented Apr 24, 2024

CodSpeed Performance Report

Merging #15861 will not alter performance

Comparing reswqa:round_expr (4a38498) with main (1a4327d)

Summary

✅ 13 untouched benchmarks

Copy link

codecov bot commented Apr 24, 2024

Codecov Report

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

Project coverage is 81.33%. Comparing base (ba85175) to head (4a38498).
Report is 16 commits behind head on main.

Files Patch % Lines
crates/polars-time/src/round.rs 97.87% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15861      +/-   ##
==========================================
+ Coverage   80.39%   81.33%   +0.94%     
==========================================
  Files        1263     1384     +121     
  Lines      165368   176935   +11567     
  Branches        0     3033    +3033     
==========================================
+ Hits       132941   143918   +10977     
- Misses      32427    32531     +104     
- Partials        0      486     +486     
Flag Coverage Δ
python 74.71% <98.41%> (?)
rust 78.46% <93.65%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@reswqa reswqa marked this pull request as ready for review April 24, 2024 12:52
Copy link
Member

@ritchie46 ritchie46 left a comment

Choose a reason for hiding this comment

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

💯

@ritchie46 ritchie46 merged commit b7ee95a into pola-rs:main Apr 26, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants