Conversation
Moohan
requested changes
Apr 23, 2026
Member
Moohan
left a comment
There was a problem hiding this comment.
Some comments and suggestions. You should also add yourself to the description at a contributor (role = "ctb")
| invalid_idx <- !colourname %in% names(phs_colour_values) | ||
| if (any(invalid_idx)) { | ||
| col_not_list <- colourname[invalid_idx] | ||
| stop("These colours are not available: ", |
Member
There was a problem hiding this comment.
We tend to use {cli} for phs packages per tidyverse style, in this case cli::cli_abort(...
Author
There was a problem hiding this comment.
Can you give me more details about it?
Author
There was a problem hiding this comment.
This suggestion may be considered in another PR
Member
There was a problem hiding this comment.
Moohan
reviewed
May 5, 2026
| paste(invalid_colours, collapse = ","), | ||
| "\nPlease run phs_colours() to see all the available colours" | ||
| ) | ||
| stop(msg) |
Member
There was a problem hiding this comment.
I think {cli} will also need adding to imports usethis::use_package("cli")
Suggested change
| stop(msg) | |
| cli::cli_abort(c( | |
| "Some colours are not available.", | |
| x = "Unavailable colour{?s}: {.val {invalid_colours}}.", | |
| i = "Run {.fn phs_colours} to see all available colours." | |
| )) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Minor changes have been made to improve efficiency. These changes will not affect current projects and are primarily related to refactoring.
R/phs_colours.R
R/phs_data.R