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

Fix days to hours boundary for precise delta #19

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

eldipa
Copy link
Contributor

@eldipa eldipa commented May 16, 2022

Fixes #14

Changes proposed in this pull request:

  • Propagate correctly the days to hours in precisedelta
  • Propose a truncate flag to truncate and remove values too close to zero in precisedelta

Note: I don't feel that truncate is the correct name and I think that it could be easily misinterpreted. We need a better name.
This PR also does not include a documentation for this flag nor tests (but a file in tests/issue-14-days-hours-boundary-in-precisedelta.md describes and tests all the cases discussed in #14 so it can be used as the base for an unit test and/or as the tests themselves running them with byexample )

Closes #14

@codecov-commenter
Copy link

codecov-commenter commented May 16, 2022

Codecov Report

Merging #19 (6cef97b) into main (410b51d) will decrease coverage by 2.13%.
The diff coverage is 30.00%.

❗ Current head 6cef97b differs from pull request most recent head cf7ec9d. Consider uploading reports for the commit cf7ec9d to get more accurate results

@@            Coverage Diff             @@
##             main      #19      +/-   ##
==========================================
- Coverage   99.68%   97.54%   -2.14%     
==========================================
  Files           9        9              
  Lines         635      653      +18     
==========================================
+ Hits          633      637       +4     
- Misses          2       16      +14     
Flag Coverage Δ
macos-latest 96.32% <30.00%> (-2.11%) ⬇️
ubuntu-latest 96.32% <30.00%> (-2.11%) ⬇️
windows-latest 96.01% <30.00%> (-2.10%) ⬇️

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

Impacted Files Coverage Δ
src/humanize/time.py 93.91% <30.00%> (-6.09%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 410b51d...cf7ec9d. Read the comment docs.

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.

Issues with odd months when restricting to "day" precision (precisedelta)
2 participants