Support release#567
Conversation
Code Coverage SummaryDiff against mainResults for commit: e9959fd Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Unit Tests Summary 1 files 273 suites 1m 9s ⏱️ Results for commit e9959fd. ♻️ This comment has been updated with latest results. |
Unit Test Performance Difference
Additional test case details
Results for commit 6410a3c ♻️ This comment has been updated with latest results. |
| expect_message( | ||
| expect_message( | ||
| expect_message( | ||
| print_ard_conditions(ard), | ||
| "were returned during" | ||
| ), | ||
| "tis an error" | ||
| ), | ||
| "were returned during" | ||
| ) |
There was a problem hiding this comment.
This can be replaced by testthat::capture_messages() so to avoid nesting
There was a problem hiding this comment.
But I don't want to do so! The documentation help pages of testthat::capture_messages() says: "We no longer recommend that you use these functions, instead relying on the expect_message()". We already have a snapshot below to capture all the messages and warnings.
This is to ensure we get exactly these three messages and on this order. But maybe there is a different way to express it.
| variables = list(AGEGR1 = factor(c("<65", "65-80", ">80"), levels = c("<65", "65-80", ">80"))), | ||
| by = list(TRTA = c("Placebo", "Xanomeline High Dose", "Xanomeline Low Dose")) | ||
| ) |> | ||
| apply_fmt_fun() |
There was a problem hiding this comment.
hi @llrs-roche , I was wondering why we remove the apply_fmt_fun here? thanks
There was a problem hiding this comment.
The description of the (unit) test explains it is for mock_categorical(). There's no need to test apply_fmt_fun(), which is covered on its own unit test on file test-apply_fmt_fun.R.
If there is need for integration test the description of what we are testing should be clearer
| mock_continuous( | ||
| variables = c("AGE", "BMIBL") | ||
| ) |> | ||
| apply_fmt_fun() |
There was a problem hiding this comment.
The description of the (unit) test explains it is for mock_continuous(). There's no need to test apply_fmt_fun(), which is covered on its own unit test on file test-apply_fmt_fun.R.
If there is need for integration test the description of what we are testing should be clearer. Besides it makes tests faster.
| mock_missing( | ||
| variables = c("AGE", "BMIBL") | ||
| ) |> | ||
| apply_fmt_fun() |
There was a problem hiding this comment.
i was wondering if this function was tested anywhere>
There was a problem hiding this comment.
It is covered on its own unit test on file test-apply_fmt_fun.R.
shajoezhu
left a comment
There was a problem hiding this comment.
Thanks @llrs-roche , some minor question regarding the test, but most looks good to me.
shajoezhu
left a comment
There was a problem hiding this comment.
Thanks a lot @llrs-roche for checking the tests. I have no further questions.
|
@llrs-roche @shajoezhu there are a lot of changes here unrelated to the release. I know we all have our own "styles" for pkg development, and any of these opinionated changes you want to make should be discussed before they are put into a PR. Please revert changes unrelated to the release, so we can merge and submit to CRAN. If it's tricky to disentangle the updates, i can go ahead and submit without this PR. Please don't delete unit tests. |
|
Hi @ddsjoberg , yes, absolutely agree, we should align these changes before merging into main. please go ahead with the CRAN relase, adn we can update these changes for later. |
This PR makes tests more robust: there are snapshosts but the core functionality/output is also tested outside of it.
It also helps with some documentation checks for CRAN.
This is to help with the release of the package started on #562
Pre-review Checklist (if item does not apply, mark is as complete)
usethis::pr_merge_main()devtools::test_coverage()Reviewer Checklist (if item does not apply, mark is as complete)
pkgdown::build_site(). Check the R console for errors, and review the rendered website.devtools::test_coverage()When the branch is ready to be merged:
NEWS.mdwith the changes from this pull request under the heading "# cards (development version)". If there is an issue associated with the pull request, reference it in parentheses at the end update (seeNEWS.mdfor examples).Optional Reverse Dependency Checks:
Install
checkedwithpak::pak("Genentech/checked")orpak::pak("checked")