Skip to content

Refactor validation#171

Merged
jwildfire merged 7 commits intodev-v0.8.0from
refactor-validation
Feb 13, 2019
Merged

Refactor validation#171
jwildfire merged 7 commits intodev-v0.8.0from
refactor-validation

Conversation

@jwildfire
Copy link
Copy Markdown
Contributor

Fixes #118 and #164 (but leaving #170 for later)

Copy link
Copy Markdown
Contributor

@pburnsdata pburnsdata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Looks good to me! Less hacky and more modular

#' safetyGraphics:::checkFieldSettings(fieldKey=fields,settings=testSettings, data=adlbc)
#'
#' @importFrom stringr str_split
#' @importFrom magrittr "%>%"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may need to adjust dependencies

@jwildfire
Copy link
Copy Markdown
Contributor Author

jwildfire commented Feb 13, 2019

@pburnsdata @bzkrouse - Added #172 here. If one of you can take a look at the new commits, and then we can merge this tomorrow!

There is a note regarding the use of . in the tibbles, but thinking that #175 will clear it up.

@pburnsdata pburnsdata self-requested a review February 13, 2019 16:05
Copy link
Copy Markdown
Contributor

@pburnsdata pburnsdata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the validation tibble changes look good to me too


#valid=true if all checks pass, false otherwise
settingStatus$valid <- settingStatus$checkList%>%purrr::map_lgl(~.x[["valid"]])%>%all
settingStatus$valid <- settingStatus$checks%>%select(valid)%>%unlist%>%all
Copy link
Copy Markdown
Contributor

@bzkrouse bzkrouse Feb 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we will need this to clear notes:
select(.$valid) or select(.data$valid)

#create summary string
failCount <- settingStatus$checkList%>%purrr::map_dbl(~!.x[["valid"]])%>%sum
checkCount <- length(settingStatus$checkList)
failCount <- nrow(settingStatus$checks%>%filter(!valid))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

filter(!.data$valid) or filter(!.$valid)

@jwildfire jwildfire merged commit aedab8d into dev-v0.8.0 Feb 13, 2019
@jwildfire jwildfire deleted the refactor-validation branch February 13, 2019 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants