-
Notifications
You must be signed in to change notification settings - Fork 64
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 #2526 data raw data round 2 #2527
Closes #2526 data raw data round 2 #2527
Conversation
Thanks @jimrothstein - did the scripts get re-run? I am wondering if there is some way to could apply a timestamp in the attributes of the datasets that could help us keep track of when this dataset was last created?? This way at least GitHub would detect the change in the timestamp as I am hoping the data doesn't change in the future - or if it does we know why!?! @bundfussr WDYT? |
@bms63 , what do you want to achieve? If we add an attribute with a timestamp, git considers the file as changed even if the dataset was just recreated without any change (except the timestamp attribute). Therefore I'm not sure if this is a good idea. I think we should rerun the |
god-like powers. :) I want some way to track when the datasets were last run. if i see the datasets timestamp was run a couple of days before release then I will be happy. if i see the datasest timestamp was run two months before the release then I will be sad and know I need to run them. maybe we should just run them with a custom script with GHA with each PR???? maybe this is where diffdf could be used to give us a report of any changes occurring in vignettes where these datasets are being used? simplest solution is just to add a checkbox in my release checklist :) #2394 (comment) |
Will add something like:
Just fyi, I saw this older thread about |
I realized I can see the timestamp in GitHub so the attributes update might be overkill @bundfussr |
Ran package check. Admiral templates use tools:R_user_dir() to store generated files; update scripts here to use same function.
@bms63 , I wouldn't add an extra GHA for checking because the templates and pharmaversesdtm change rarely. Adding a checkbox to the release checklist seems the better option to me. |
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 comparison shouldn't be removed and the code should be simplified:
# Create dataset data/admiral_adlb.rda
# Run template script to create adlb
source("inst/templates/ad_adlb.R", echo = TRUE) # nolint
# Limit rows by selecting only these USUBJIDs
usubjids <-
c(
"01-701-1015",
"01-701-1023",
"01-701-1028",
"01-701-1033",
"01-701-1034",
"01-701-1047",
"01-701-1097",
"01-705-1186",
"01-705-1292",
"01-705-1310",
"01-708-1286"
)
admiral_adlb <- filter(adlb, USUBJID %in% usubjids)
# Get previous dataset for comparison
adlb_old <- admiral::admiral_adlb
# Finally, save reduced dataset
usethis::use_data(admiral_adlb, overwrite = TRUE)
# Compare with previous version
diffdf::diffdf(
base = adlb_old,
compare = admiral_adlb,
keys = c("USUBJID", "PARAMCD", "AVISIT", "ADT")
)
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.
Hey @jimrothstein did this get updated?
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.
Hey @jimrothstein did this get updated?
Let me double-check everything ... this weekend.
…uestion: is diffdf correctly comparing old & new datasets? (load_all() re-reads datasets)
data-raw/create_admiral_adlb.R
Outdated
@@ -7,7 +7,7 @@ library(diffdf) # nolint | |||
|
|||
# To clarify directories (can be removed) |
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.
Code from line 5 to 19 should be removed (also in create_admiral_adsl.R
).
Created separate branch for this issue/PR. |
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()