-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
chunks_new() wrapper #39
Conversation
Code Coverage Summary
Results for commit: 9821671 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
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.
A few comments but it's looking good
R/chunks.R
Outdated
@@ -734,10 +734,10 @@ clone_env <- function(envir_from, envir_to) { | |||
#' | |||
#' @examples | |||
#' all_chunks <- chunks$new() |
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 we replace chunks$new() throughout codebase (except inside code/docs of the chunks R6 object itself?)
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.
done.
tests/testthat/test-chunks.R
Outdated
|
||
testthat::test_that("chunks_new accepts NULL or empty as input", { | ||
testthat::expect_error(chunks_new(), NA) | ||
testthat::expect_error(chunks_new(envir = NULL), "") |
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.
If envir
is NULL is that ok?
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.
Nop removed that.
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.
I think the bottom three of these probably need changing?
Otherwise looks good - I wonder if there are any internal chunks tests which should use chunks$new()
- i.e. if we're testing chunks$f()
should we actually use chunks$new()
to keep everything internal to chunks (but if testing chunks_f()
then we should def use chunks_new()
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!
closes #35 and #37
chunks$new
withchunks_new()
in all vignettes and examples.chunks$new
when testing the R6 methods andchunks_new()
when testing the wrappers.chunks_push
andchunks_push_chunks
so thatchunks
parameter is first.