Skip to content

🐛 return None when rounding 0 #172

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

Merged
merged 3 commits into from
Feb 24, 2023
Merged

🐛 return None when rounding 0 #172

merged 3 commits into from
Feb 24, 2023

Conversation

jvdd
Copy link
Member

@jvdd jvdd commented Feb 24, 2023

Fixes #171

When rounding numbers or timedelta's, None is returned when the number (i.e., diff) == 0

  • update code to make timedelta & float rounding return None when rounding 0
  • update docs
  • update tests

@jvdd jvdd requested a review from jonasvdd February 24, 2023 09:42
@jvdd
Copy link
Member Author

jvdd commented Feb 24, 2023

Is ready for review! @jonasvdd

Copy link
Member

@jonasvdd jonasvdd left a comment

Choose a reason for hiding this comment

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

Good catch! 🔍

I would just add two little tests for the negative time and number check and then it's mergeable!

@jvdd
Copy link
Member Author

jvdd commented Feb 24, 2023

Negative numbers should now be supported in round_number_str

@codecov-commenter
Copy link

codecov-commenter commented Feb 24, 2023

Codecov Report

Merging #172 (eba52be) into main (39072f5) will increase coverage by 0.00%.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@           Coverage Diff           @@
##             main     #172   +/-   ##
=======================================
  Coverage   97.30%   97.31%           
=======================================
  Files          12       12           
  Lines         891      894    +3     
=======================================
+ Hits          867      870    +3     
  Misses         24       24           
Impacted Files Coverage Δ
plotly_resampler/figure_resampler/utils.py 96.49% <100.00%> (+0.19%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@jonasvdd jonasvdd left a comment

Choose a reason for hiding this comment

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

LGTM!

@jonasvdd jonasvdd merged commit 1c55cf2 into main Feb 24, 2023
@jvdd jvdd deleted the zero_diff branch March 21, 2023 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error with graph whan a column has a boolean with always same value
3 participants