-
Notifications
You must be signed in to change notification settings - Fork 68
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
Closes #2581 - enhance test coverage: derive_var_trtemfl.R #2608
Closes #2581 - enhance test coverage: derive_var_trtemfl.R #2608
Conversation
expect_error( | ||
derive_var_trtemfl( | ||
adae, | ||
group_var = AEGRPID, | ||
subject_keys = NULL | ||
) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use expect_snapshot()
to ensure that the correct error message is issued.
By the way, unit test for errors and warnings should never accept any error or warning but always check that the expected one is issued (by using expect_snapshot()
or the class
argument of expect_error()
/expect_warning()
).
@bms63 , maybe we should add this to the unit test guidance. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes good idea we should update!! - i think i cleared an update for tests in derive_vars_transposed() that didn't meet our practices. @jimrothstein no problems with the last PR that was on me I should of remembered this!!
but now we can document it...maybe it should even go in the PR template? Hard to remember all these details!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think i cleared an update for tests in derive_vars_transposed() that didn't meet our practices.
I've fixed it in #2592.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is your daily caffeine, food intake, and general regimen!!?? how are you so productive!! thanks!!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @bundfussr.
Made note to myself and will look over your other suggestions.
Please use
expect_snapshot()
to ensure that the correct error message is issued.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is your daily caffeine, food intake, and general regimen!!?? how are you so productive!! thanks!!!
no coffee, just tea 🍵
…b.com:pharmaverse/admiral into 2581_enhance_test_coverage_derive_var_trtemfl
…so exact error msg is caught
Feels strange that there are 20 files being changed here. They look like all recent updates, but wondering why github is detecting them as new changes??? |
So...for this type of git issue I think the easiest course of action is to just create a new branch off I wouldn't fuss with all this git-fu needed to fix this issue. If it was a huge rework of 20+ files, then yes we should do it this way, but I like simple!! As I am a simple man :) |
Thank you for your Pull Request! We have developed this task checklist from the Development Process Guide to help with the final steps of the process. Completing the below tasks helps to ensure our reviewers can maximize their time on your code as well as making sure the admiral codebase remains robust and consistent.
Please check off each taskbox as an acknowledgment that you completed the task or check off that it is not relevant to your Pull Request. This checklist is part of the Github Action workflows and the Pull Request will not be merged into the
main
branch until you have checked off each task.styler::style_file()
to style R and Rmd filesinst/cheatsheet/admiral_cheatsheet.pptx
and re-upload a PDF and a PNG version of it to the same folder. (The PNG version can be created by taking a screenshot of the PDF version.)devtools::document()
so all.Rd
files in theman
folder and theNAMESPACE
file in the project root are updated appropriatelyNEWS.md
under the header# admiral (development version)
if the changes pertain to a user-facing function (i.e. it has an@export
tag) or documentation aimed at users (rather than developers). A Developer Notes section is available inNEWS.md
for tracking developer-facing issues.pkgdown::build_site()
and check that all affected examples are displayed correctly and that all new functions occur on the "Reference" page.lintr::lint_package()
R CMD check
locally and address all errors and warnings -devtools::check()