Skip to content

Commit

Permalink
more packages to suggests
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHWade committed Aug 27, 2024
1 parent 281f346 commit 1be0040
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,16 @@ Imports:
colorspace,
curl,
glue,
grDevices,
htmltools,
htmlwidgets,
httr2,
ids,
jsonlite,
magrittr,
promises,
purrr,
R6,
R6 (>=2.0.0),
rlang,
rstudioapi (>= 0.12),
rvest,
shiny (>= 1.9.0),
shiny.i18n,
SSEparser,
Expand All @@ -48,9 +45,12 @@ Imports:
yaml
Suggests:
AzureRMR,
grDevices,
knitr,
mockr,
promises,
rmarkdown,
rvest,
shinytest2,
spelling,
testthat (>= 3.0.0),
Expand Down
1 change: 1 addition & 0 deletions R/mod_app.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ mod_app_server <- function(id, ide_colors = get_ide_theme_info()) {
#'
#' @return hex color
rgb_str_to_hex <- function(rgb_string) {
check_installed("grDevices")
rgb_vec <- unlist(strsplit(gsub("[rgba() ]", "", rgb_string), ","))
grDevices::rgb(
red = as.numeric(rgb_vec[1]),
Expand Down
3 changes: 3 additions & 0 deletions R/mod_chat.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ mod_chat_server <- function(
settings,
history) {
moduleServer(id, function(input, output, session) {
check_installed(c("promises", ))


# Session data ----
rv <- reactiveValues(
reset_welcome_message = 0L,
Expand Down
3 changes: 3 additions & 0 deletions R/read_docs.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ read_docs <- function(user_prompt) {


read_html_docs <- function(pkg_ref, topic_name) {
check_installed("rvest")
# This should output a scalar character
file_location <- utils::help(topic = (topic_name), package = (pkg_ref), help_type = "html") %>%
as.character()
Expand Down Expand Up @@ -51,6 +52,7 @@ get_help_file_path <- function(file) {


docs_get_inner_text <- function(x) {
check_installed("rvest")
if (is.null(x)) {
return(NULL)
}
Expand Down Expand Up @@ -79,6 +81,7 @@ docs_get_inner_text <- function(x) {
}

docs_get_sections <- function(children) {
check_installed("rvest")
h3_locations <- children %>%
purrr::map_lgl(~ rvest::html_name(.x) == "h3") %>%
which()
Expand Down

0 comments on commit 1be0040

Please sign in to comment.