-
Notifications
You must be signed in to change notification settings - Fork 28
V7.0 dev feat colnames #451
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
base: v7.0-dev
Are you sure you want to change the base?
Conversation
ESCRI11
left a comment
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.
Besides the little detail on utils.R, I think the PR looks fine and can be used as a guide for the effort of converting the other functions.
R/utils.R
Outdated
| if (!any(permitted_classes %in% typ)) { | ||
| msg <- glue( | ||
| "The server-side object must be of type {glue_collapse(permitted_classes, sep = ' or ')}. ", | ||
| "'{obj_name}' is type {typ}." |
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.
Sometimes objects have multiple classes, which might create multiple error messages.
> a <- tibble::tibble("1")
> class(a)
[1] "tbl_df" "tbl" "data.frame"
> typ <- class(a)
> glue::glue("hello {typ}")
hello tbl_df
hello tbl
hello data.frame
So I think it would be a good idea to also use glue_collapse to print typ.
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 spot Xavi! I've amended this, and also used the option to separate strings with more than three words to 'x, x, and x' so the message looks nicer. I've added tests to capture these eventualities.
|
I've also moved the PR template into the .github folder as R check didn't like it in root |
ESCRI11
left a comment
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 like how this looks
No description provided.