-
Notifications
You must be signed in to change notification settings - Fork 0
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
address #6: allow custom messages #11
base: main
Are you sure you want to change the base?
Conversation
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 haven't had time to understand the full context for this package and this PR yet so my review focuses on purely technical aspects but may be missing important design considerations.
DESCRIPTION
Outdated
devtools | ||
devtools, | ||
cli, | ||
rlang |
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.
is rlang used somewhere?
@@ -69,7 +69,7 @@ coerceDT <- function( | |||
if (is.character(data)) { | |||
if (grepl(pattern = "\\.rds$", x = data, ignore.case = TRUE)) { | |||
doargs$data <- setDT(readRDS( | |||
tryCatch(normalizePath(data), warning = function(e) stop(e)) | |||
tryCatch(normalizePath(data), warning = internal_error) |
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.
Is it intended that no args are passed to internall_error()
here?
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.
yes - it's passing the functional handler.
R/zzz.R
Outdated
if (requireNamespace("cli", quietly = TRUE)) { | ||
packageStartupMessage("coerceDT: using `cli` messaging.") | ||
} else { | ||
packageStartupMessage("coerceDT: using `base` messaging; to use `cli` messages, install `cli`.") |
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 it be documented somewhere that you'll need to reload this package after installing cli to get the improved conditions?
Description
This PR will close #6 - may need to rebase after resolving the introduction of
default
args.This introduces load-if-available for
cli
messaging and will add arguments for custom messages / message templatesChecklist