Skip to content

#2611 Fix week() calculation to start week 1 at days 1–7#7380

Merged
ben-schwen merged 16 commits intomasterfrom
issue_2611
Oct 25, 2025
Merged

#2611 Fix week() calculation to start week 1 at days 1–7#7380
ben-schwen merged 16 commits intomasterfrom
issue_2611

Conversation

@venom1204
Copy link
Contributor

Closes #2611

Hi @jangorecki, @tdhock, and @ben-schwen,

Due to some issues, I had to delete the previous branch and continue the work in this new one.

Thank you for the earlier feedback! I’ve updated the PR to address the concerns regarding the breaking change in week().

The updated fix now includes the warning system as discussed:

  • The warning is shown only when the result differs from the old (buggy) behavior.
  • It appears only once per session.
  • It can be suppressed entirely using options(datatable.warn.week.change = FALSE).

I’ve also updated NEWS.md and the test suite to reflect these changes.
This should now cover all the requested adjustments — does this modification align with what you had in mind?

If any further tweaks or changes are needed, please let me know.

Thanks again for your time and guidance!

@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.13%. Comparing base (b3acf2a) to head (eff4fad).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7380   +/-   ##
=======================================
  Coverage   99.13%   99.13%           
=======================================
  Files          85       85           
  Lines       16556    16577   +21     
=======================================
+ Hits        16412    16433   +21     
  Misses        144      144           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link

github-actions bot commented Oct 21, 2025

  • HEAD=issue_2611 slower P<0.001 for memrecycle regression fixed in #5463
    Comparison Plot

Generated via commit eff4fad

Download link for the artifact containing the test results: ↓ atime-results.zip

Task Duration
R setup and installing dependencies 2 minutes and 51 seconds
Installing different package versions 43 seconds
Running and plotting the test cases 2 minutes and 36 seconds

@jangorecki
Copy link
Member

jangorecki commented Oct 22, 2025

How about warning about coming fix in next release now, and switching the fix on in next dev cycle? And possibly option to force new behavior already now, so revdep code can be already adapted.
Change like this can literally cost money for automates decision systems.

@venom1204 venom1204 requested a review from ben-schwen October 22, 2025 18:23
venom1204 and others added 3 commits October 23, 2025 05:13
Co-authored-by: Benjamin Schwendinger <52290390+ben-schwen@users.noreply.github.com>
Co-authored-by: Benjamin Schwendinger <52290390+ben-schwen@users.noreply.github.com>
@jangorecki jangorecki closed this Oct 23, 2025
@jangorecki jangorecki reopened this Oct 23, 2025
@jangorecki
Copy link
Member

Sorry for closing, it must have been an accident.

Copy link
Member

@ben-schwen ben-schwen left a comment

Choose a reason for hiding this comment

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

last two style NITs and then we are good go to go from my side!

NB: when we do suggestions for a single test like the options style we suspect all tests to adapt to this style (otherwise we would introduce inconsistencies which reads even worse than different styles)

@venom1204 venom1204 requested a review from ben-schwen October 23, 2025 19:20
@ben-schwen ben-schwen merged commit dac4255 into master Oct 25, 2025
10 checks passed
@ben-schwen ben-schwen deleted the issue_2611 branch October 25, 2025 11:30
@ben-schwen
Copy link
Member

TY!

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.

bug in week means first week only has 6 days?

5 participants