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

Add numeric rounding value initialisation in test.data.table() #6103

Merged
merged 8 commits into from
Apr 30, 2024

Conversation

markseeto
Copy link
Contributor

Closes #6082

Added setNumericRounding(0) to initialise the numeric rounding value in test.data.table() to avoid failed tests if the user has set a different value. The user's value is restored on exit.

Add setNumericRounding(0) initialisation and restore user's value on exit.
Add test file for testing setNumericRounding(0) initialisation in test.data.table().
@markseeto markseeto marked this pull request as draft April 25, 2024 09:48
@markseeto
Copy link
Contributor Author

markseeto commented Apr 25, 2024

I've updated this comment because the check results changed, even though I didn't change anything.

Originally, the R-CMD-check / ubuntu-20.04 (release) (pull_request) and Autocomment atime-based performance regression analysis on PRs / comment (pull_request) checks failed and the R-CMD-check / windows-latest (devel) (pull_request) check was cancelled.

I was surprised that the R-CMD-check failed, because before doing the PR I had built the package and run R CMD check data.table_1.15.99.tar.gz and it finished with Status: OK.

However, when I looked at the PR again the next day, it said both of the R-CMD-check checks were successful. So now the only failure was the Autocomment check, which tdhock explained is expected to fail for PRs that come from forks.

@markseeto markseeto marked this pull request as ready for review April 25, 2024 11:16
@tdhock
Copy link
Member

tdhock commented Apr 25, 2024

it is normal that Autocomment atime-based performance regression analysis on PRs / comment (pull_request) fails for PRs that come from forks.

@markseeto
Copy link
Contributor Author

Thanks for the explanation @tdhock.

NEWS.md Outdated Show resolved Hide resolved
@MichaelChirico
Copy link
Member

LGTM! Two small tweaks & we can merge.

Remove new test as requested by @MichaelChirico, to avoid nesting a test of test.data.table() in a script run by test.data.table().
Delete inst/tests/issue_6082_tests.Rraw because the test that used it was removed.
Move test.data.table() numeric rounding initialisation item from Bug Fixes to Notes as requested by @MichaelChirico.
@markseeto markseeto marked this pull request as draft April 30, 2024 09:31
@markseeto markseeto marked this pull request as ready for review April 30, 2024 09:36
@markseeto
Copy link
Contributor Author

@MichaelChirico Thanks for reviewing. I've deleted the test, deleted the file issue_6082_tests.Rraw, and moved the News item from Bug Fixes to Notes.

Copy link
Member

@MichaelChirico MichaelChirico left a comment

Choose a reason for hiding this comment

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

Thanks!

@MichaelChirico MichaelChirico merged commit e04d801 into Rdatatable:master Apr 30, 2024
3 of 5 checks passed
@MichaelChirico
Copy link
Member

Thanks @markseeto! You should have received an invite to become a project Member. The main thing this does is give you rights to create branches on this repo directly to facilitate future collaboration -- please do so as it makes the review process a bit easier. Welcome!

@markseeto
Copy link
Contributor Author

@MichaelChirico Thanks for approving and thanks for the invitation.

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.

test.data.table() needs to initialize/reset setNumericRounding()
3 participants