-
Notifications
You must be signed in to change notification settings - Fork 9
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
Fix 415 #441
Fix 415 #441
Conversation
… finish updating domain function headers and QC functions
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.
Looks good to me in general! Will leave full review and approval to @mattroumaya.
Lets file an issue to set up the action to generate the content in man/md
and assign to @kodesiba
@mattroumaya, cleaned the header documentation up a bit to assuage |
add action and move build function to R file
@samussiah just looked at the failing CI check and it's pretty confusing, only learned about this last week because @kodesiba clued me in: Just need to add the new functions you developed to - generate_md_table
- parse_data_mapping
- parse_data_spec It looks like we could also use |
Ayyy, it's working! |
@@ -0,0 +1,52 @@ | |||
on: | |||
pull_request: | |||
branches: [dev, fix-415] |
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.
can you change this to just dev @samussiah, I put this in as a test so the fix-415 branch can get taken out
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 documentation updates and attention to detail are super impressive, awesome work!
Most things are directly noted, and apologies if being too tedious.
The only question I have is about NA
values in the mapping documentation (e.g., here). I'm wondering if this is intended, and if so, maybe we should note what NA
means, or instead default to replacing NA
with FALSE
when there isn't a specified value for a data frame.
man/md/AE_Map_Adam.md
Outdated
@@ -0,0 +1,9 @@ | |||
# Data specification | |||
|
|||
|domain |col_key |col_value |vRequired | |
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.
AE_Map_Adam
is missing a vUniqueCols
column
man/md/Consent_Map_Raw.md
Outdated
|dfSUBJ |strIDCol |SubjectID |TRUE |NA |TRUE | | ||
|dfSUBJ |strSiteCol |SiteID |TRUE |NA |FALSE | | ||
|dfSUBJ |strRandDateCol |RandDate |TRUE |NA |FALSE | | ||
|dfCONSENT |strIDCol |SubjectID |TRUE |FALSE |NA | |
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 vUniqueCols
for dfCONSENT
be NA
here?
R/IE_Assess.R
Outdated
if (any(unname(map_dbl(lTags, ~ length(.))) > 1)) { | ||
lTags <- map(lTags, ~ paste(.x, collapse = ", ")) |
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 was almost certainly my oversight from before but just caught it
if (any(unname(map_dbl(lTags, ~ length(.))) > 1)) { | |
lTags <- map(lTags, ~ paste(.x, collapse = ", ")) | |
if (any(unname(purrr::map_dbl(lTags, ~ length(.))) > 1)) { | |
lTags <- purrr:::map(lTags, ~ paste(.x, collapse = ", ")) |
R/IE_Map_Raw.R
Outdated
#' | ||
#' Convert from raw data format to needed input format for Inclusion/Exclusion Assessment. | ||
#' @description | ||
#' Convert raw inclusion/exclusion (IE) data, typically processed case report from data, to formatted |
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.
#' Convert raw inclusion/exclusion (IE) data, typically processed case report from data, to formatted | |
#' Convert raw inclusion/exclusion (IE) data, typically processed case report form data, to formatted |
man/md/IE_Map_Raw.md
Outdated
|:------|:--------------|:-----------|:---------|:-----------| | ||
|dfSUBJ |strIDCol |SubjectID |TRUE |TRUE | | ||
|dfSUBJ |strSiteCol |SiteID |TRUE |FALSE | | ||
|dfIE |strIDCol |SubjectID |TRUE |NA | |
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 there be NA
cols?
R/IE_Assess.R
Outdated
#' - `dfFlagged`, returned by {gsm::dfFlagged()} | ||
#' - `dfSummary`, returned by {gsm::dfSummary()} |
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.
#' - `dfFlagged`, returned by {gsm::dfFlagged()} | |
#' - `dfSummary`, returned by {gsm::dfSummary()} | |
#' - `dfFlagged`, returned by {gsm::Flag()} | |
#' - `dfSummary`, returned by {gsm::Summarize()} |
man/md/AE_Map_Raw.md
Outdated
|dfSUBJ |strIDCol |SubjectID |TRUE |TRUE | | ||
|dfSUBJ |strSiteCol |SiteID |TRUE |FALSE | | ||
|dfSUBJ |strTimeOnTreatmentCol |TimeOnTreatment |TRUE |FALSE | | ||
|dfAE |strIDCol |SubjectID |TRUE |NA | |
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.
NA
here too - I'll leave a top-level comment about addressing this but is likely an easy-ish solution or something that we don't need to worry about
man/md/PD_Map_Raw.md
Outdated
|dfSUBJ |strIDCol |SubjectID |TRUE |TRUE | | ||
|dfSUBJ |strSiteCol |SiteID |TRUE |FALSE | | ||
|dfSUBJ |strTimeOnStudyCol |TimeOnStudy |TRUE |FALSE | | ||
|dfPD |strIDCol |SubjectID |TRUE |NA | |
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.
Just noting NA
here
tests/testthat/test_Consent_Assess.R
Outdated
@@ -54,7 +54,19 @@ test_that("incorrect lTags throw errors",{ | |||
|
|||
|
|||
# custom tests ------------------------------------------------------------ | |||
test_that('dfAnalyzed has appropriate model output regardless of statistical method', { | |||
assessment <- Consent_Assess(consentInput) | |||
expect_true(all(c('Estimate') %in% names(assessment$dfAnalyzed))) |
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.
expect_true(all(c('Estimate') %in% names(assessment$dfAnalyzed))) | |
expect_true('Estimate' %in% names(assessment$dfAnalyzed))) |
Just being very tedious here. could also be:
expect_true(hasName(assessment$dfAnalyzed, 'Estimate'))
tests/testthat/test_IE_Assess.R
Outdated
@@ -51,7 +51,19 @@ test_that("incorrect lTags throw errors",{ | |||
}) | |||
|
|||
# custom tests ------------------------------------------------------------ | |||
test_that('dfAnalyzed has appropriate model output regardless of statistical method', { | |||
assessment <- IE_Assess(ieInput) | |||
expect_true(all(c('Estimate') %in% names(assessment$dfAnalyzed))) |
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.
Same here but feel free to ignore
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.
Looks great!
return(list(dfInput=dfInput, lChecks=checks)) | ||
}else{ | ||
if (bReturnChecks) { | ||
return(list(df = dfInput, lChecks = checks)) |
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.
good catch!
Overview
Test Notes/Sample Code
Notes: