From 2f97ee1b6dea9034fb2e9f49cf51853e552095e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Wed, 31 Jul 2024 16:24:57 +0300 Subject: [PATCH 01/29] New internal function `msg_offline()` --- R/programs.R | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/R/programs.R b/R/programs.R index ce24625d..fb2e2cc4 100644 --- a/R/programs.R +++ b/R/programs.R @@ -215,7 +215,15 @@ get_available_rs_version <- function(force = FALSE, skip = FALSE) { # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -check_internet_connection <- function() { +msg_offline <- function(get_what = "versions") { + cli::cli_warn(c( + "To get the newest available {get_what}, network connection is required.", + "x" = "This computer is offline. " + )) +} + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +check_internet_connection <- function(get_what = "versions") { if (pingr::is_online()) { FALSE # Online From db9d6323fb9aa166c2ff627ea027249f556ad12b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Wed, 31 Jul 2024 16:25:50 +0300 Subject: [PATCH 02/29] Use `msg_offline()` Generalize code --- R/programs.R | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/R/programs.R b/R/programs.R index fb2e2cc4..740f7b2f 100644 --- a/R/programs.R +++ b/R/programs.R @@ -181,10 +181,7 @@ get_available_r_version <- function(force = FALSE, skip = FALSE) { max() } else { - ui_warn(paste( - "To get the newest availableR version, network connection is required.", - "You are offline. " - )) + msg_offline(get_what = "R version") NULL } } @@ -206,10 +203,7 @@ get_available_rs_version <- function(force = FALSE, skip = FALSE) { max() } else { - ui_warn(paste( - "To get the newest available RStudio version,", - "network connection is required. You are offline. " - )) + msg_offline(get_what = "RStudio version") } } @@ -228,10 +222,7 @@ check_internet_connection <- function(get_what = "versions") { FALSE # Online } else { - ui_warn(paste0( - "To get the newest available versions, network connection is required. ", - "You are offline. " - )) + msg_offline(get_what = get_what) TRUE # Offline } } From d17517459cb2362ea3b0a0d937cc758bd6566754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Wed, 31 Jul 2024 16:26:33 +0300 Subject: [PATCH 03/29] =?UTF-8?q?Replace=20`warning()`=20=E2=86=92=20`cli:?= =?UTF-8?q?:warn()`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- R/programs.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/programs.R b/R/programs.R index 740f7b2f..4efe80bb 100644 --- a/R/programs.R +++ b/R/programs.R @@ -313,7 +313,7 @@ check_rs_version <- function(v_recommended = "2023.12.1", skip_online_check = FA tryCatch( get_available_rs_version(skip = skip_online_check), error = function(e) { - warning(e) + cli::warn(e) NULL } ), From c83fb49b678024c3109aafcbb32d6eccb0046b60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Wed, 31 Jul 2024 16:27:32 +0300 Subject: [PATCH 04/29] Replace to `as.numeric_version()` --- R/programs.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/programs.R b/R/programs.R index 4efe80bb..b890efb1 100644 --- a/R/programs.R +++ b/R/programs.R @@ -177,7 +177,7 @@ get_available_r_version <- function(force = FALSE, skip = FALSE) { purrr::reduce(c) %>% stringr::str_extract("(?<=R-).\\d*[.].\\d*[.]\\d*(?=.tar.gz)") %>% .[!is.na(.)] %>% - numeric_version() %>% + as.numeric_version() %>% max() } else { @@ -199,7 +199,7 @@ get_available_rs_version <- function(force = FALSE, skip = FALSE) { readr::read_lines() %>% stringr::str_extract("(?<=RStudio-).*?(?=.exe)") %>% .[!is.na(.)] %>% - numeric_version() %>% + as.numeric_version() %>% max() } else { From 3aa7740850fc062d573c2d899093ffd932131ce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Wed, 31 Jul 2024 16:31:06 +0300 Subject: [PATCH 05/29] Replace `usethis::ui_*` with cli analogues --- R/programs.R | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/R/programs.R b/R/programs.R index b890efb1..f481933b 100644 --- a/R/programs.R +++ b/R/programs.R @@ -65,7 +65,7 @@ check_installed_programs <- function(type = "main", skip_online_check = FALSE) { type_lwr <- tolower(type) if (!type_lwr %in% c("main", "all", "gmc-bs", "gmc-r")) { - ui_warn("Unknown value of type = '{type}'") + cli::cli_warn("Unknown value of type = '{type}'") } @@ -232,7 +232,7 @@ check_internet_connection <- function(get_what = "versions") { check_program_version <- function(name = "", v_installed = NULL, v_recommended = NULL, v_available = NULL, type = "Program") { - print_fun <- ui_info + print_fun <- cli::cli_alert_info v_color <- red r_color <- red install_status <- "" @@ -256,13 +256,13 @@ check_program_version <- function(name = "", v_installed = NULL, } if (v_installed < v_recommended) { - print_fun <- ui_todo + print_fun <- cli::cli_ul v_color <- red r_color <- green install_status <- "should be updated" } else { - print_fun <- ui_done + print_fun <- cli::cli_alert_danger v_color <- green r_color <- yellow install_status <- "is installed" @@ -303,7 +303,9 @@ check_quarto_version <- function(v_recommended = "1.4.549", check_rs_version <- function(v_recommended = "2023.12.1", skip_online_check = FALSE) { if (!rstudioapi::isAvailable()) { - ui_oops("Program {red('RStudio')} is not installed or is not running. ") + cli::cli_alert_danger( + "Program {red('RStudio')} is not installed or is not running. " + ) } else { check_program_version( @@ -322,7 +324,7 @@ check_rs_version <- function(v_recommended = "2023.12.1", skip_online_check = FA } try({ if (is_32bit_os()) { - ui_info(stringr::str_c( + cli::cli_alert_info(paste0( "For 32-bit operating systems, the newest available RStudio version ", "is {yellow('1.1.463')}." )) @@ -392,10 +394,10 @@ check_program_installed <- function(program = "", condition = NULL, what = "Program") { if (condition) { - ui_done("{what} {blue(program)} is installed.") + cli::cli_alert_success("{what} {blue(program)} is installed.") } else { - ui_oops("{what} {red(program)} is not detected.") + cli::cli_alert_danger("{what} {red(program)} is not detected.") } } From c9a7b3c0db8528ce8c2285256733df98492c365b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Wed, 31 Jul 2024 16:32:48 +0300 Subject: [PATCH 06/29] Use `as.numeric_version()` --- R/programs.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/programs.R b/R/programs.R index f481933b..99494cc7 100644 --- a/R/programs.R +++ b/R/programs.R @@ -237,8 +237,8 @@ check_program_version <- function(name = "", v_installed = NULL, r_color <- red install_status <- "" - v_recommended <- numeric_version(v_recommended) - v_installed <- numeric_version(v_installed) + v_recommended <- as.numeric_version(v_recommended) + v_installed <- as.numeric_version(v_installed) if (!is.null(v_available)) { From 9bbe892c0881cf86522d81ad1b3f41aff213c9c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Wed, 31 Jul 2024 16:50:55 +0300 Subject: [PATCH 07/29] Fix incorrect output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use ✔ as correct output indicator. --- R/programs.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/programs.R b/R/programs.R index 99494cc7..813d3d1b 100644 --- a/R/programs.R +++ b/R/programs.R @@ -262,7 +262,7 @@ check_program_version <- function(name = "", v_installed = NULL, install_status <- "should be updated" } else { - print_fun <- cli::cli_alert_danger + print_fun <- cli::cli_alert_success v_color <- green r_color <- yellow install_status <- "is installed" From dd277164307682ba6d2405fe8902866883932fdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Wed, 31 Jul 2024 16:51:46 +0300 Subject: [PATCH 08/29] Do not check for RTools by default --- R/programs.R | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/R/programs.R b/R/programs.R index 813d3d1b..acbf404f 100644 --- a/R/programs.R +++ b/R/programs.R @@ -41,7 +41,7 @@ check_user_info <- function() { #' @param skip_online_check (logical) If `TRUE`, the numbers of newest available #' stable programs are downloaded, when internet connection is connected. #' @param type (character) Which programs should be checked? Options: -#' `main`, `all`, `gmc-bs`, `gmc-r`. +#' `main`, `all`, `dev`, `gmc-bs`, `gmc-r`. #' #' @return #' Invisible `NULL`. @@ -64,7 +64,7 @@ check_installed_programs <- function(type = "main", skip_online_check = FALSE) { type_lwr <- tolower(type) - if (!type_lwr %in% c("main", "all", "gmc-bs", "gmc-r")) { + if (!type_lwr %in% c("main", "dev", "all", "gmc-bs", "gmc-r")) { cli::cli_warn("Unknown value of type = '{type}'") } @@ -92,17 +92,17 @@ check_installed_programs <- function(type = "main", skip_online_check = FALSE) { "R Build Tools" } - check_tool_installed( - tool_name, - if (rstudioapi::isAvailable()) { - # Requires RStudio to be running - rstudioapi::buildToolsCheck() - } else { - pkgbuild::has_build_tools() - } - ) - - + if (type_lwr %in% c("all", "dev")) { + check_tool_installed( + tool_name, + if (rstudioapi::isAvailable()) { + # Requires RStudio to be running + rstudioapi::buildToolsCheck() + } else { + pkgbuild::has_build_tools() + } + ) + } # XQuartz (on Mac) if (type_lwr %in% c("all", "gmc-bs")) { From bfdfe0598b11c23ff69f8e73f4078ec20a510764 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Wed, 31 Jul 2024 16:52:02 +0300 Subject: [PATCH 09/29] Update programs-required-version.txt --- inst/install-r/programs-required-version.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inst/install-r/programs-required-version.txt b/inst/install-r/programs-required-version.txt index 9710cf9f..88e496ee 100644 --- a/inst/install-r/programs-required-version.txt +++ b/inst/install-r/programs-required-version.txt @@ -1,6 +1,6 @@ --- title: "Minimal required versions of programs" -date: 2024-05-27 +date: 2024-07-31 notes: "" @@ -9,8 +9,8 @@ notes: "" --- # This text must be in line 10 ----------------------------------------------- program | required_version | ignore | notes_version -R | 4.3.3 | FALSE | -RStudio | 2023.12.1 | FALSE | For 32-bit systems v 1.1.463 -Quarto | 1.4.554 | FALSE | +R | 4.4.0 | FALSE | +RStudio | 2024.04 | FALSE | For 32-bit systems v 1.1.463 +Quarto | 1.5.55 | FALSE | From ae04d429368d2d2182166dc922487dcfec5f42f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Wed, 31 Jul 2024 16:56:01 +0300 Subject: [PATCH 10/29] Indicate version as string --- R/paths-and-files.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/paths-and-files.R b/R/paths-and-files.R index 2381fa80..8b207f71 100644 --- a/R/paths-and-files.R +++ b/R/paths-and-files.R @@ -195,7 +195,7 @@ get_path_rstudio_internal_state_dir <- function(..., .check = FALSE) { # Linux/Mac: ~/.rstudio-desktop - if (rstudioapi::isAvailable() && rstudioapi::versionInfo()$version >= 1.4) { + if (rstudioapi::isAvailable() && rstudioapi::versionInfo()$version >= "1.4") { # RStudio 1.4 base <- switch(get_os_type(), From 042283b764e035fdece70dd54d88431c71ae5357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Wed, 31 Jul 2024 18:52:32 +0300 Subject: [PATCH 11/29] Style code --- R/packages--check.R | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/R/packages--check.R b/R/packages--check.R index a3c1eb38..41bd257e 100644 --- a/R/packages--check.R +++ b/R/packages--check.R @@ -208,7 +208,8 @@ read_pkgs_list <- function(list_name, "It seems that there is no online version of list ", "{list_name_blue} or it cannot be accessed. ", "\nCheck if the list name is correct. ", - "Did you mean one of: \n{usethis::ui_value(bio::get_pkg_lists_local())}, ..." + "Did you mean one of: \n", + "{usethis::ui_value(bio::get_pkg_lists_local())}, ..." )) } else { usethis::ui_stop(w$message) @@ -239,7 +240,8 @@ get_path_pkgs_list <- function(list_name, local_list) { usethis::ui_stop(paste0( "List {list_name_blue} was not found on your computer. \n", "Check if the list name is correct. ", - "Did you mean one of: \n{usethis::ui_value(bio::get_pkg_lists_local())}, ..." + "Did you mean one of: \n", + "{usethis::ui_value(bio::get_pkg_lists_local())}, ..." )) } @@ -475,7 +477,8 @@ merge_pkgs_status_lists <- function(pkgs_list, pkgs_installed, #' head(get_pkgs_installation_status_raw("mini")) get_pkgs_installation_status_raw <- function(list_name = NULL, pkgs = NULL, local_list = getOption( - "bio.local_list", TRUE)) { + "bio.local_list", TRUE + )) { checkmate::assert_character(list_name, null.ok = TRUE) checkmate::assert_character(pkgs, null.ok = TRUE) if (is.null(list_name) && is.null(pkgs)) { @@ -508,7 +511,6 @@ get_pkgs_installation_status_raw <- function(list_name = NULL, pkgs = NULL, - # Installation status -------------------------------------------------------- # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # From ab5acd9267f2d4467071efda6a17029b17a9c35d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Wed, 31 Jul 2024 18:52:48 +0300 Subject: [PATCH 12/29] Update documentation --- man/check_installed_programs.Rd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/check_installed_programs.Rd b/man/check_installed_programs.Rd index eba5f486..a012d3c9 100644 --- a/man/check_installed_programs.Rd +++ b/man/check_installed_programs.Rd @@ -8,7 +8,7 @@ check_installed_programs(type = "main", skip_online_check = FALSE) } \arguments{ \item{type}{(character) Which programs should be checked? Options: -\code{main}, \code{all}, \code{gmc-bs}, \code{gmc-r}.} +\code{main}, \code{all}, \code{dev}, \code{gmc-bs}, \code{gmc-r}.} \item{skip_online_check}{(logical) If \code{TRUE}, the numbers of newest available stable programs are downloaded, when internet connection is connected.} From 177cc6033eaa84b05fe14cea540e3eb875652241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Wed, 31 Jul 2024 18:54:20 +0300 Subject: [PATCH 13/29] Update DESCRIPTION --- DESCRIPTION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 08b76421..360afca0 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: bio Type: Package Title: Resources Manager for R, RStudio and Related Software -Version: 0.2.5 -Date: 2024-05-27 +Version: 0.2.6 +Date: 2024-07-31 Authors@R: person("Vilmantas", "Gegzna", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-9500-5167"), From e7daa6f080b25e37cc9268bfd84eb5710f663d6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Wed, 31 Jul 2024 16:27:32 +0300 Subject: [PATCH 14/29] Replace to `as.numeric_version()` --- R/programs.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/programs.R b/R/programs.R index 740f7b2f..4c88caf2 100644 --- a/R/programs.R +++ b/R/programs.R @@ -177,7 +177,7 @@ get_available_r_version <- function(force = FALSE, skip = FALSE) { purrr::reduce(c) %>% stringr::str_extract("(?<=R-).\\d*[.].\\d*[.]\\d*(?=.tar.gz)") %>% .[!is.na(.)] %>% - numeric_version() %>% + as.numeric_version() %>% max() } else { @@ -199,7 +199,7 @@ get_available_rs_version <- function(force = FALSE, skip = FALSE) { readr::read_lines() %>% stringr::str_extract("(?<=RStudio-).*?(?=.exe)") %>% .[!is.na(.)] %>% - numeric_version() %>% + as.numeric_version() %>% max() } else { From b5ba0e731845ac57e71388047d46f68cbb17775a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Wed, 31 Jul 2024 16:32:48 +0300 Subject: [PATCH 15/29] Use `as.numeric_version()` --- R/programs.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/programs.R b/R/programs.R index 4c88caf2..deb57f4d 100644 --- a/R/programs.R +++ b/R/programs.R @@ -237,8 +237,8 @@ check_program_version <- function(name = "", v_installed = NULL, r_color <- red install_status <- "" - v_recommended <- numeric_version(v_recommended) - v_installed <- numeric_version(v_installed) + v_recommended <- as.numeric_version(v_recommended) + v_installed <- as.numeric_version(v_installed) if (!is.null(v_available)) { From 55967ef407243b6cf85633cd50822be669f28607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Wed, 31 Jul 2024 16:51:46 +0300 Subject: [PATCH 16/29] Do not check for RTools by default --- R/programs.R | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/R/programs.R b/R/programs.R index deb57f4d..1244b085 100644 --- a/R/programs.R +++ b/R/programs.R @@ -41,7 +41,7 @@ check_user_info <- function() { #' @param skip_online_check (logical) If `TRUE`, the numbers of newest available #' stable programs are downloaded, when internet connection is connected. #' @param type (character) Which programs should be checked? Options: -#' `main`, `all`, `gmc-bs`, `gmc-r`. +#' `main`, `all`, `dev`, `gmc-bs`, `gmc-r`. #' #' @return #' Invisible `NULL`. @@ -64,7 +64,7 @@ check_installed_programs <- function(type = "main", skip_online_check = FALSE) { type_lwr <- tolower(type) - if (!type_lwr %in% c("main", "all", "gmc-bs", "gmc-r")) { + if (!type_lwr %in% c("main", "dev", "all", "gmc-bs", "gmc-r")) { ui_warn("Unknown value of type = '{type}'") } @@ -92,17 +92,17 @@ check_installed_programs <- function(type = "main", skip_online_check = FALSE) { "R Build Tools" } - check_tool_installed( - tool_name, - if (rstudioapi::isAvailable()) { - # Requires RStudio to be running - rstudioapi::buildToolsCheck() - } else { - pkgbuild::has_build_tools() - } - ) - - + if (type_lwr %in% c("all", "dev")) { + check_tool_installed( + tool_name, + if (rstudioapi::isAvailable()) { + # Requires RStudio to be running + rstudioapi::buildToolsCheck() + } else { + pkgbuild::has_build_tools() + } + ) + } # XQuartz (on Mac) if (type_lwr %in% c("all", "gmc-bs")) { From 736c41c0c93a87e3f27cca480fa034f89a43e2af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Wed, 31 Jul 2024 16:52:02 +0300 Subject: [PATCH 17/29] Update programs-required-version.txt --- inst/install-r/programs-required-version.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inst/install-r/programs-required-version.txt b/inst/install-r/programs-required-version.txt index 9710cf9f..88e496ee 100644 --- a/inst/install-r/programs-required-version.txt +++ b/inst/install-r/programs-required-version.txt @@ -1,6 +1,6 @@ --- title: "Minimal required versions of programs" -date: 2024-05-27 +date: 2024-07-31 notes: "" @@ -9,8 +9,8 @@ notes: "" --- # This text must be in line 10 ----------------------------------------------- program | required_version | ignore | notes_version -R | 4.3.3 | FALSE | -RStudio | 2023.12.1 | FALSE | For 32-bit systems v 1.1.463 -Quarto | 1.4.554 | FALSE | +R | 4.4.0 | FALSE | +RStudio | 2024.04 | FALSE | For 32-bit systems v 1.1.463 +Quarto | 1.5.55 | FALSE | From 2d75c46a1acea75b6b5d542df7aee805a3451a7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Wed, 31 Jul 2024 16:56:01 +0300 Subject: [PATCH 18/29] Indicate version as string --- R/paths-and-files.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/paths-and-files.R b/R/paths-and-files.R index 2381fa80..8b207f71 100644 --- a/R/paths-and-files.R +++ b/R/paths-and-files.R @@ -195,7 +195,7 @@ get_path_rstudio_internal_state_dir <- function(..., .check = FALSE) { # Linux/Mac: ~/.rstudio-desktop - if (rstudioapi::isAvailable() && rstudioapi::versionInfo()$version >= 1.4) { + if (rstudioapi::isAvailable() && rstudioapi::versionInfo()$version >= "1.4") { # RStudio 1.4 base <- switch(get_os_type(), From 1fec54f7a67865fcb5df2b277ab7c92402942fe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Wed, 31 Jul 2024 18:52:32 +0300 Subject: [PATCH 19/29] Style code --- R/packages--check.R | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/R/packages--check.R b/R/packages--check.R index a3c1eb38..41bd257e 100644 --- a/R/packages--check.R +++ b/R/packages--check.R @@ -208,7 +208,8 @@ read_pkgs_list <- function(list_name, "It seems that there is no online version of list ", "{list_name_blue} or it cannot be accessed. ", "\nCheck if the list name is correct. ", - "Did you mean one of: \n{usethis::ui_value(bio::get_pkg_lists_local())}, ..." + "Did you mean one of: \n", + "{usethis::ui_value(bio::get_pkg_lists_local())}, ..." )) } else { usethis::ui_stop(w$message) @@ -239,7 +240,8 @@ get_path_pkgs_list <- function(list_name, local_list) { usethis::ui_stop(paste0( "List {list_name_blue} was not found on your computer. \n", "Check if the list name is correct. ", - "Did you mean one of: \n{usethis::ui_value(bio::get_pkg_lists_local())}, ..." + "Did you mean one of: \n", + "{usethis::ui_value(bio::get_pkg_lists_local())}, ..." )) } @@ -475,7 +477,8 @@ merge_pkgs_status_lists <- function(pkgs_list, pkgs_installed, #' head(get_pkgs_installation_status_raw("mini")) get_pkgs_installation_status_raw <- function(list_name = NULL, pkgs = NULL, local_list = getOption( - "bio.local_list", TRUE)) { + "bio.local_list", TRUE + )) { checkmate::assert_character(list_name, null.ok = TRUE) checkmate::assert_character(pkgs, null.ok = TRUE) if (is.null(list_name) && is.null(pkgs)) { @@ -508,7 +511,6 @@ get_pkgs_installation_status_raw <- function(list_name = NULL, pkgs = NULL, - # Installation status -------------------------------------------------------- # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # From 5ac0b055e353c46de0498ce91b16416f776d4a39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Wed, 31 Jul 2024 18:52:48 +0300 Subject: [PATCH 20/29] Update documentation --- man/check_installed_programs.Rd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/check_installed_programs.Rd b/man/check_installed_programs.Rd index eba5f486..a012d3c9 100644 --- a/man/check_installed_programs.Rd +++ b/man/check_installed_programs.Rd @@ -8,7 +8,7 @@ check_installed_programs(type = "main", skip_online_check = FALSE) } \arguments{ \item{type}{(character) Which programs should be checked? Options: -\code{main}, \code{all}, \code{gmc-bs}, \code{gmc-r}.} +\code{main}, \code{all}, \code{dev}, \code{gmc-bs}, \code{gmc-r}.} \item{skip_online_check}{(logical) If \code{TRUE}, the numbers of newest available stable programs are downloaded, when internet connection is connected.} From ba4d37c01971117272a6b760b5db79b9a6b7eed5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Wed, 31 Jul 2024 18:54:20 +0300 Subject: [PATCH 21/29] Update DESCRIPTION --- DESCRIPTION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 08b76421..360afca0 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: bio Type: Package Title: Resources Manager for R, RStudio and Related Software -Version: 0.2.5 -Date: 2024-05-27 +Version: 0.2.6 +Date: 2024-07-31 Authors@R: person("Vilmantas", "Gegzna", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-9500-5167"), From 0b1766828a577aa67ed8a29d2a9e1f94ed7d49b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Wed, 31 Jul 2024 19:18:06 +0300 Subject: [PATCH 22/29] Update RoxygenNote --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 7faaf812..c06cff37 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -18,7 +18,7 @@ Language: en-US Encoding: UTF-8 LazyData: true Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.1 +RoxygenNote: 7.3.2 Additional_repositories: https://mokymai.github.io/download/ Imports: From 0762b96f5c2a523a86aa5fd052351be89d12428f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Wed, 31 Jul 2024 19:30:14 +0300 Subject: [PATCH 23/29] Require `cli` (in imports) --- DESCRIPTION | 1 + 1 file changed, 1 insertion(+) diff --git a/DESCRIPTION b/DESCRIPTION index c06cff37..afcbe3c6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -24,6 +24,7 @@ Additional_repositories: Imports: backup.tools (>= 0.0.3), checkmate, + cli, clipr, crayon, desc, From 0a487f7441f6160e6838108779a12ea74f1e6195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Wed, 31 Jul 2024 19:30:24 +0300 Subject: [PATCH 24/29] Update pkgs-required-version.txt --- inst/install-r/pkgs-required-version.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inst/install-r/pkgs-required-version.txt b/inst/install-r/pkgs-required-version.txt index 221d41d8..5f2cfe2a 100644 --- a/inst/install-r/pkgs-required-version.txt +++ b/inst/install-r/pkgs-required-version.txt @@ -1,6 +1,6 @@ --- title: "Minimal required versions of packages" -date: 2024-05-27 +date: 2024-07-31 notes: "" @@ -13,7 +13,7 @@ addin.tools | 0.0.10 | FALSE | - addins.rmd | 0.0.14 | FALSE | - addins.rs | 0.0.12 | FALSE | - backup.tools | 0.0.3 | FALSE | - -bio | 0.2.5 | FALSE | - +bio | 0.2.6 | FALSE | - BiocManager | 1.30.20 | FALSE | - blogdown | 1.9 | FALSE | - bookdown | 0.32 | FALSE | - From 66c9d8206c69f053d2876836e09beb7d10cc803e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Wed, 31 Jul 2024 19:32:08 +0300 Subject: [PATCH 25/29] Change key bindings Ctrl + R inserts R code block now. No default key binding to insert Python code block. --- inst/rs-settings/keybindings--addins.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/inst/rs-settings/keybindings--addins.json b/inst/rs-settings/keybindings--addins.json index b07f0d80..f883903d 100644 --- a/inst/rs-settings/keybindings--addins.json +++ b/inst/rs-settings/keybindings--addins.json @@ -1,6 +1,5 @@ { - "addins.rmd::rmd_code_block_python" : "Ctrl+R", - "addins.rmd::rmd_code_block_r" : "Ctrl+E", + "addins.rmd::rmd_code_block_r" : "Ctrl+R", "addins.rmd::rmd_code_inline_highlighted_as_r" : "Ctrl+Shift+Alt+T", "addins.rmd::rmd_equation_a_inline" : "Shift+Alt+S", "addins.rmd::rmd_format_bold" : "Ctrl+Alt+B", From 8a439f245020f466b38d13675185f85838f0988f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Wed, 31 Jul 2024 19:55:34 +0300 Subject: [PATCH 26/29] Update rstudio-prefs--bio-default.json --- inst/rs-settings/rstudio-prefs--bio-default.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/inst/rs-settings/rstudio-prefs--bio-default.json b/inst/rs-settings/rstudio-prefs--bio-default.json index 5e992228..28823f7c 100644 --- a/inst/rs-settings/rstudio-prefs--bio-default.json +++ b/inst/rs-settings/rstudio-prefs--bio-default.json @@ -116,7 +116,7 @@ "publish_ca_bundle" : "", "publish_check_certificates" : true, "python_project_environment_automatic_activate": true, - "rainbow_fenced_divs" : true, + "rainbow_fenced_divs" : false, "rainbow_parentheses" : true, "real_time_spellchecking" : true, "reduced_motion" : false, @@ -167,7 +167,7 @@ "show_rmd_render_command" : false, "show_terminal_tab" : true, "show_user_home_page" : "sessions", - "soft_wrap_r_files" : true, + "soft_wrap_r_files" : false, "soft_wrap_rmd_files" : true, "sort_file_names_naturally" : true, "source_with_echo" : true, @@ -198,7 +198,6 @@ "ui_language" : "en", "use_dataimport" : true, "use_devtools" : true, - "use_internet2" : true, "use_newlines_in_makefiles" : true, "use_publish_ca_bundle" : false, "use_roxygen" : false, From d9474a7d20b9e702d667dd6f34ef38c1a883566e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Wed, 31 Jul 2024 20:13:17 +0300 Subject: [PATCH 27/29] Change `visual_markdown_editing_max_content_width` --- inst/rs-settings/rstudio-prefs--bio-default.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/rs-settings/rstudio-prefs--bio-default.json b/inst/rs-settings/rstudio-prefs--bio-default.json index 28823f7c..7c364b16 100644 --- a/inst/rs-settings/rstudio-prefs--bio-default.json +++ b/inst/rs-settings/rstudio-prefs--bio-default.json @@ -214,7 +214,7 @@ "visual_markdown_editing_font_size_points" : 0, "visual_markdown_editing_is_default" : false, "visual_markdown_editing_list_spacing" : "tight", - "visual_markdown_editing_max_content_width" : 700, + "visual_markdown_editing_max_content_width" : 1000, "visual_markdown_editing_references_location" : "section", "visual_markdown_editing_show_doc_outline" : true, "visual_markdown_editing_show_margin" : true, From 241ff8a13ac69546562374a25577adae0b753324 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Wed, 31 Jul 2024 20:13:32 +0300 Subject: [PATCH 28/29] Update README.Rmd --- README.Rmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.Rmd b/README.Rmd index c4776cc0..72a04599 100644 --- a/README.Rmd +++ b/README.Rmd @@ -39,8 +39,8 @@ Convenience functions to facilitate installation and management of required reso

-This package is intended to be used with RStudio 2022.06.0 or newer
-and R 4.3.1 or newer.
+This package is intended to be used with RStudio 2024.04 or newer
+and R 4.4.0 or newer.
Functions may not work correctly with the previous versions of RStudio and R. From 0f53f370307c6e53e940a039dc4a4e0e65f06025 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Wed, 31 Jul 2024 20:18:25 +0300 Subject: [PATCH 29/29] Update rstudio-prefs--bio-default.json --- inst/rs-settings/rstudio-prefs--bio-default.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/rs-settings/rstudio-prefs--bio-default.json b/inst/rs-settings/rstudio-prefs--bio-default.json index 7c364b16..a46c1ee3 100644 --- a/inst/rs-settings/rstudio-prefs--bio-default.json +++ b/inst/rs-settings/rstudio-prefs--bio-default.json @@ -105,7 +105,7 @@ "memory_query_interval_seconds" : 10, "native_file_dialogs" : true, "navigate_to_build_error" : true, - "new_proj_git_init" : true, + "new_proj_git_init" : false, "new_proj_use_renv" : false, "num_spaces_for_tab" : 2, "packages_pane_enabled" : true,