-
Notifications
You must be signed in to change notification settings - Fork 74
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 2661 - ignore_seconds_flag
now defaults to TRUE.
#2670
base: main
Are you sure you want to change the base?
Closes 2661 - ignore_seconds_flag
now defaults to TRUE.
#2670
Conversation
…Need to review vignettes.
This is |
Hi @jimrothstein as far as I know @zdz2101 is not involved in admiral anymore so no need to ping him or assign him as a reviewer. |
Hi @jimrothstein I started to investigate each issue that was causing errors in the checks. Most are related to what the argument is checking. You can see how I adjusted things as I went in the files changed. I would start with understanding what the argument is doing originally and how I have changed it and what that is impacting on the examples, vignettes and tests. I left you the test to update. We might need to re-visit how we present the examples and vignettes later, but for now I think you should focus on what has been updated in this one argument and how this minor changes percolates throughout admiral. Once the checks are all pass we can revisit if the examples and vignettes are coherent. Also note we might want to alert the users that we have changed this default behavior...but not sure on that yet |
…efault' of github.com:pharmaverse/admiral into 2661-general-issue-ignore_seconds_flag-true-is-set-as-default
Test # 21 Test # 22
Changes made:
NEXT? If this much is ok, then will go through vignettes/examples etc. |
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.
- The default of
ignore_seconds_flag
incompute_tmf()
should be updated as well to be consistent. - The change should added to the "Breaking Changes" section in
NEWS.md
.
@@ -58,7 +58,7 @@ | |||
#' | |||
#' mhdt <- tribble( | |||
#' ~MHSTDTC, | |||
#' "2019-07-18T15:25:40", | |||
#' "2019-07-18T15:25", |
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.
The first and the second record are the same. One of them should be removed.
Further updates of the examples are required as the first and third example are the same.
- The third example should be updated such that it shows the behaviour when
ignore_seconds_flag = FALSE
is used. - An example should be added to show that an error is issued if seconds are present in the DTC variable and
ignore_seconds_flag
is not set toFALSE
. This should also be mentioned in the description of theignore_seconds_flag
argument.
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.
@bundfussr
Working on the changes ... thanks
An example should be added to show that an error is issued if seconds are present in the DTC variable and >ignore_seconds_flag is not set to FALSE.
Meaning: "2019-07-18T15:25:40" will throw error when ignore_seconds_flag is DEFAULT (ie TRUE)?
- By hand, I will work out a chart of what happens, given --DTF and various parameters.
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.
Meaning: "2019-07-18T15:25:40" will throw error when ignore_seconds_flag is DEFAULT (ie TRUE)?
Yes
@@ -789,7 +782,7 @@ test_that("derive_vars_dtm Test 31: catch ignore_seconds_flag error", { | |||
dtc = XXSTDTC, | |||
ignore_seconds_flag = TRUE | |||
), | |||
error = TRUE | |||
error = FALSE |
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.
This unit test should test that an error is issued. I.e., the input data needs to be updated such that the error is thrown.
@@ -789,7 +782,7 @@ test_that("derive_vars_dtm Test 31: catch ignore_seconds_flag error", { | |||
dtc = XXSTDTC, | |||
ignore_seconds_flag = TRUE |
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.
Should be removed as it is the default now.
vignettes/imputation.Rmd
Outdated
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.
The note in the "Imputation Flags" section needs to be updated.
@jimrothstein we discussed in today's core meeting. We want to try something new in admiral where we are first going to alert the users to this upcoming change in 1.3 and in 1.4 implement the change. so i'll make a new issue messaging alert and then this change can be done much later |
add ignore_seconds_flag = FALSE to expect_equal(compute_tmf(...)) so tests PASS
|
Hi @jimrothstein just want to make sure you understand that we are not going to implement this change for 1.3 (June release). We are just going to alert users to the coming change which will be implemented in 1.4 (EOY release). |
@bms63 |
Hi @jimrothstein and @bundfussr for
|
@jeffreyad |
I think we should check if the value specified for I'm not sure if we should accept @bms63 , @manciniedoardo , what do you think? |
… Need to review vignettes.
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()