-
Notifications
You must be signed in to change notification settings - Fork 1
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
resolved issue #22. Yes/No will not be converted to booleans #23
base: main
Are you sure you want to change the base?
Conversation
DSchreyer
commented
Dec 11, 2024
Would be cool to add a unit test for that |
@grst I updated and included a testthat script. Feedback is highly appreciated |
R/read_params.R
Outdated
@@ -73,7 +72,7 @@ read_params <- function(stage_path = NULL, return_list = FALSE) { | |||
} | |||
) | |||
|
|||
yaml <- read_yaml(tmp_config_file) | |||
yaml <- read_clean_yaml(tmp_config_file) |
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 this be read_safe_yaml
?
R/read_params.R
Outdated
#' @return a list | ||
#' @importFrom yaml read_yaml | ||
#' @importFrom purrr modify_tree | ||
#' @export |
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.
#' @export |
I don't think we need to export that. Should also make this warning go away
Warning: Undocumented code objects:
‘read_safe_yaml’
tests/testthat/test-read_params.R
Outdated
expect_true(safe_yaml$false_true == safe_yaml$false_true) | ||
expect_true(safe_yaml$false_false == safe_yaml$false_false) | ||
expect_true(safe_yaml$false_true2 == safe_yaml$false_true2) | ||
expect_true(safe_yaml$false_false2 == safe_yaml$false_false2) |
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 would always evaluate to true, would't it? Should the second part be data$
?
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.
oh damn, yeah my bad
found a couple of issues, but should be straightforward to resolve |