From 3595df6bf078747b9fb87008e8277c168048dca6 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 24 Aug 2023 20:05:10 +0000 Subject: [PATCH 01/12] Re-build README.Rmd before pkgdown --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b0b72f12..a0c60ab6 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Package ***bio*** [![GitHub -version](https://img.shields.io/badge/GitHub-0.2.2.3-brightgreen.svg)](https://github.com/mokymai/bio) +version](https://img.shields.io/badge/GitHub-0.2.3-brightgreen.svg)](https://github.com/mokymai/bio) [![R-CMD-check](https://github.com/mokymai/bio/workflows/R-CMD-check/badge.svg)](https://github.com/mokymai/bio/actions) [![Updated-on](https://img.shields.io/badge/Updated%20on-2023--08--24-yellowgreen.svg)](/commits/master) [![Lifecycle: From 2af2d6835b70f56d1f4cf2f02f6e0644a2efd58e Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sat, 26 Aug 2023 18:58:28 +0000 Subject: [PATCH 02/12] Re-build README.Rmd before pkgdown --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a0c60ab6..3963445c 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Package ***bio*** [![GitHub version](https://img.shields.io/badge/GitHub-0.2.3-brightgreen.svg)](https://github.com/mokymai/bio) [![R-CMD-check](https://github.com/mokymai/bio/workflows/R-CMD-check/badge.svg)](https://github.com/mokymai/bio/actions) -[![Updated-on](https://img.shields.io/badge/Updated%20on-2023--08--24-yellowgreen.svg)](/commits/master) +[![Updated-on](https://img.shields.io/badge/Updated%20on-2023--08--26-yellowgreen.svg)](/commits/master) [![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental) [![R-CMD-check](https://github.com/mokymai/bio/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/mokymai/bio/actions/workflows/R-CMD-check.yaml) From 811cd1a90b3bc26b66601df0f92b5eb7bd6d4390 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Sun, 27 Aug 2023 00:23:51 +0300 Subject: [PATCH 03/12] Fix datatype for "busy_exclusion_list" Add conditional data type correction. purrr::map_at("busy_exclusion_list", as.list) --- R/settings--preferences.R | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/R/settings--preferences.R b/R/settings--preferences.R index 09915b09..7edc49ce 100644 --- a/R/settings--preferences.R +++ b/R/settings--preferences.R @@ -163,7 +163,7 @@ rstudio_set_preferences <- function(file) { pref <- jsonlite::fromJSON(file) purrr::walk2( names(pref), unname(pref), - ~{ + ~ { tryCatch( rstudioapi::writeRStudioPreference(.x, .y), error = function(e) { @@ -206,14 +206,16 @@ rstudio_set_preferences <- function(file) { #' }} rstudio_compare_user_settings <- function(to = "bio-default") { to <- match.arg(to, c("bio-default", "rstudio-default")) + file <- get_path_rstudio_config_file(which = to) default_prefs <- jsonlite::fromJSON(file) %>% - purrr::map_if(is.integer, as.numeric) + purrr::map_if(is.integer, as.numeric) |> + purrr::map_at("busy_exclusion_list", as.list) pref_names <- names(default_prefs) %>% purrr::set_names(., .) current_prefs <- - purrr::map(pref_names, ~rstudioapi::readRStudioPreference(., NULL)) %>% + purrr::map(pref_names, ~rstudioapi::readRStudioPreference(., NULL)) %>% purrr::map_if(is.integer, as.numeric) usethis::ui_info( From ce443a835388de9e039c51ea6b6eb265c83684e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Sun, 27 Aug 2023 00:26:05 +0300 Subject: [PATCH 04/12] Improve code style --- R/helpers--make_unique_obj_names.R | 6 ++++-- R/helpers.R | 6 +++--- R/packages--find.R | 11 +++++------ R/restart_reload.R | 5 ++--- README.Rmd | 14 +++++++------- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/R/helpers--make_unique_obj_names.R b/R/helpers--make_unique_obj_names.R index aa4d28db..cdecabdb 100644 --- a/R/helpers--make_unique_obj_names.R +++ b/R/helpers--make_unique_obj_names.R @@ -1,6 +1,8 @@ make_unique_obj_names <- function(names, prefix = "", suffix = "", - list_of_choices = objects(all.names = TRUE, - envir = .GlobalEnv), + list_of_choices = objects( + all.names = TRUE, + envir = .GlobalEnv + ), all_numbered = TRUE) { if (length(names) == 0) { return(NULL) diff --git a/R/helpers.R b/R/helpers.R index 4902440e..2cad8546 100644 --- a/R/helpers.R +++ b/R/helpers.R @@ -34,9 +34,9 @@ ui_msg_restart_rstudio <- function() { } # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # str_glue_eval ============================================================== -str_glue_eval <- function(..., envir = parent.frame(), .sep = "", - .open = "{", .close = "}", envir_eval = envir, envir_glue = envir) { - +str_glue_eval <- function( + ..., envir = parent.frame(), .sep = "", + .open = "{", .close = "}", envir_eval = envir, envir_glue = envir) { commands_as_text <- glue::glue(..., .envir = envir_glue, .open = .open, diff --git a/R/packages--find.R b/R/packages--find.R index 8e9c0ccf..c23cf88a 100644 --- a/R/packages--find.R +++ b/R/packages--find.R @@ -57,7 +57,7 @@ list_pkgs_used_in_dir_code <- function(path = ".", regexp = "(?i)[.](rmd|r)$", . # TODO: ignore code in comments list_pkgs_used_in_files <- function(files) { files %>% - purrr::map(~readr::read_file(.)) %>% + purrr::map(~ readr::read_file(.)) %>% stringr::str_extract_all( paste0( "(?<=(library|require|require2)\\()(.*?)(?=\\))|", # library(dplyr) @@ -74,10 +74,10 @@ list_pkgs_used_in_files <- function(files) { list_pkgs_used_in_files_code <- function(files) { files %>% - purrr::map(~readr::read_file(.)) %>% + purrr::map(~ readr::read_file(.)) %>% stringr::str_extract_all( paste0( - "(library|require|require2)\\((.*?)\\)|", # library(dplyr) + "(library|require|require2)\\((.*?)\\)|", # library(dplyr) "(\\s|\\n|\\(|\\{|\\[)[a-zA-Z0-9.]*?( )*:{2,3}[a-zA-Z0-9._]*|", # dplyr::select "package\\s*=\\s*(\"|')[a-zA-Z0-9.]*?(\"|')" # data(package = "dplyr") ) @@ -90,7 +90,6 @@ list_pkgs_used_in_files_code <- function(files) { get_pkg_dependencies <- function(pkg) { pkg <- stringr::str_replace(pkg, "[.]", "[.]") desc::desc_get_deps(fs::dir_ls(.libPaths(), regexp = glue::glue("/{pkg}$"))) %>% - dplyr::filter(.data$type %in% c("Depends", "Imports")) %>% - dplyr::pull(.data$package) + dplyr::filter(.data$type %in% c("Depends", "Imports")) %>% + dplyr::pull(.data$package) } - diff --git a/R/restart_reload.R b/R/restart_reload.R index 40adc65b..25670622 100644 --- a/R/restart_reload.R +++ b/R/restart_reload.R @@ -10,7 +10,7 @@ #' @concept utilities #' rstudio_restart_r <- function() { - if (rstudioapi::isAvailable(version_needed = "1.2.1261") ) { + if (rstudioapi::isAvailable(version_needed = "1.2.1261")) { invisible(rstudioapi::executeCommand("restartR", quiet = TRUE)) } } @@ -19,7 +19,7 @@ rstudio_restart_r <- function() { #' @export #' @concept utilities rstudio_reload_ui <- function() { - if (rstudioapi::isAvailable(version_needed = "1.2.1261") ) { + if (rstudioapi::isAvailable(version_needed = "1.2.1261")) { invisible(rstudioapi::executeCommand("reloadUi", quiet = TRUE)) } } @@ -35,4 +35,3 @@ restart_r <- function() { restart_rstudio <- function() { rstudio_restart_r() } - diff --git a/README.Rmd b/README.Rmd index 9f9849c7..c4776cc0 100644 --- a/README.Rmd +++ b/README.Rmd @@ -110,7 +110,7 @@ Options: ```{r README-7a, eval=FALSE} bio::check_installed_programs() ## ✔ Program R (4.3.1) is installed (recommended >= 4.3.1). -## ✖ Program RStudio is not installed or is not running. +## ✖ Program RStudio is not installed or is not running. ## ✔ Tool Quarto (1.4.268) is installed (recommended >= 1.3.336). ## ✔ Tool Rtools is installed. ``` @@ -157,13 +157,13 @@ cat(res) ```{r README-8a, eval=FALSE, paged.print=FALSE} bio::check_packages_by_topic("mini") -## ℹ Reading list 'mini' +## ℹ Reading list 'mini' ## ✔ Minimal required versions of all 19 packages (from list 'mini') are already installed. ``` ```{r README-8b, eval=FALSE, paged.print=FALSE} bio::check_packages_by_topic("mini", include = "newer_on_cran") -## ℹ Reading list 'mini' +## ℹ Reading list 'mini' ## ✔ Minimal required versions of all 19 packages (from list 'mini') are already installed. ## ℹ Note: 1 package has newer version on CRAN. ``` @@ -186,9 +186,9 @@ Check if there are updates for **bio** or its dependency packages. ```{r README-3b, eval=FALSE, paged.print=FALSE} bio::check_updates_pkg_bio() ## ℹ Analyzing dependencies of package bio -## +## ## [... truncated ...] -## +## ## ✔ Minimal required versions of all 26 packages (from list 'bio') are already installed. ``` @@ -221,7 +221,7 @@ bio::rstudio_install_spellcheck_dictionaries() Install improved Lithuanian dictionary. ```{r eval=FALSE} bio::rstudio_install_spellcheck_dictionary_lt() -## ✔ lt_LT dictionary installed. +## ✔ lt_LT dictionary installed. ## 'C:/Users/ViG/AppData/Roaming/RStudio/dictionaries/languages-system/lt_LT.dic' ``` @@ -348,7 +348,7 @@ snippets::install_snippets_from_package("snippets", backup = TRUE) ## 'C:/Users/User/AppData/Roaming/RStudio/snippets/markdown.snippets' ## ✔ File with r snippets was updated: ## 'C:/Users/User/AppData/Roaming/RStudio/snippets/r.snippets' -## +## ## ℹ You will be able to use the snippets after RStudio is closed and reopened. ``` From 032b86e67fcdf848128e76dcdd3081376d868ce2 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sat, 26 Aug 2023 21:28:22 +0000 Subject: [PATCH 05/12] Re-build README.Rmd before pkgdown --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 3963445c..3ab2faae 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ Options: ``` r bio::check_installed_programs() ## ✔ Program R (4.3.1) is installed (recommended >= 4.3.1). -## ✖ Program RStudio is not installed or is not running. +## ✖ Program RStudio is not installed or is not running. ## ✔ Tool Quarto (1.4.268) is installed (recommended >= 1.3.336). ## ✔ Tool Rtools is installed. ``` @@ -149,13 +149,13 @@ Details ``` r bio::check_packages_by_topic("mini") -## ℹ Reading list 'mini' +## ℹ Reading list 'mini' ## ✔ Minimal required versions of all 19 packages (from list 'mini') are already installed. ``` ``` r bio::check_packages_by_topic("mini", include = "newer_on_cran") -## ℹ Reading list 'mini' +## ℹ Reading list 'mini' ## ✔ Minimal required versions of all 19 packages (from list 'mini') are already installed. ## ℹ Note: 1 package has newer version on CRAN. ``` @@ -176,9 +176,9 @@ Check if there are updates for **bio** or its dependency packages. ``` r bio::check_updates_pkg_bio() ## ℹ Analyzing dependencies of package bio -## +## ## [... truncated ...] -## +## ## ✔ Minimal required versions of all 26 packages (from list 'bio') are already installed. ``` @@ -213,7 +213,7 @@ Install improved Lithuanian dictionary. ``` r bio::rstudio_install_spellcheck_dictionary_lt() -## ✔ lt_LT dictionary installed. +## ✔ lt_LT dictionary installed. ## 'C:/Users/ViG/AppData/Roaming/RStudio/dictionaries/languages-system/lt_LT.dic' ``` @@ -336,7 +336,7 @@ snippets::install_snippets_from_package("snippets", backup = TRUE) ## 'C:/Users/User/AppData/Roaming/RStudio/snippets/markdown.snippets' ## ✔ File with r snippets was updated: ## 'C:/Users/User/AppData/Roaming/RStudio/snippets/r.snippets' -## +## ## ℹ You will be able to use the snippets after RStudio is closed and reopened. ``` From 52d365f23af8c9d3e24fb25a1caf4cff51bbe601 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Thu, 8 Feb 2024 14:12:40 +0200 Subject: [PATCH 06/12] Update programs.R --- R/programs.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/programs.R b/R/programs.R index f5921493..ce24625d 100644 --- a/R/programs.R +++ b/R/programs.R @@ -288,7 +288,7 @@ check_r_version <- function(v_recommended = "4.3.0", ) } # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -check_quarto_version <- function(v_recommended = "1.2.313", +check_quarto_version <- function(v_recommended = "1.4.549", skip_online_check = FALSE) { check_program_version( @@ -301,7 +301,7 @@ check_quarto_version <- function(v_recommended = "1.2.313", } # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -check_rs_version <- function(v_recommended = "2022.7.1", skip_online_check = FALSE) { +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. ") From c6bce48a8b7d6d5d3d3473bd206c77781e0e3fa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Thu, 8 Feb 2024 14:12:43 +0200 Subject: [PATCH 07/12] Update packages--check.R --- R/packages--check.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/packages--check.R b/R/packages--check.R index 44edaa86..a3c1eb38 100644 --- a/R/packages--check.R +++ b/R/packages--check.R @@ -1027,7 +1027,7 @@ get_pkgs_installation_code <- function(x = NULL, ..., to_clipboard = FALSE, # help("options") # Opens help on options options( repos = "https://cran.rstudio.com/", - pkgType = "{ifelse(get_os_type() == "linux", "source", "both")}", + pkgType = "{ifelse(get_os_type() == "windows", "both", "source")}", install.packages.check.source = "yes", install.packages.compile.from.source = "always" ) From cd2a3874a066c4f32b03a07baf03f5e256c6fe0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Thu, 8 Feb 2024 14:12:46 +0200 Subject: [PATCH 08/12] Update get_os.R ti remove warnings --- R/get_os.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/get_os.R b/R/get_os.R index 522f065b..e0867a6a 100644 --- a/R/get_os.R +++ b/R/get_os.R @@ -20,8 +20,8 @@ get_os_type <- function() { if (os == "Darwin") {os <- "mac"} } else { os <- .Platform$OS.type - if (grepl("^darwin", R.version$os)) {os <- "mac"} - if (grepl("linux-gnu", R.version$os)) {os <- "linux"} + if (grepl("^darwin", R.version$os, useBytes = TRUE)) {os <- "mac"} + if (grepl("linux-gnu", R.version$os, useBytes = TRUE)) {os <- "linux"} } unname(tolower(os)) } From ff499905cdeacc891ec4870ef3502d5451b04cdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Thu, 8 Feb 2024 14:13:22 +0200 Subject: [PATCH 09/12] Update bio-package.Rd --- man/bio-package.Rd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/bio-package.Rd b/man/bio-package.Rd index 683ed160..81c2f253 100644 --- a/man/bio-package.Rd +++ b/man/bio-package.Rd @@ -4,7 +4,7 @@ \name{bio-package} \alias{bio} \alias{bio-package} -\title{bio: Resources Manager for BS-2023} +\title{bio: Resources Manager for R, RStudio and Related Software} \description{ Resources manager for course unit BS-2023. } From 93736acc4f177aab0fd2632cb73f3e9de6e441db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Thu, 8 Feb 2024 14:13:25 +0200 Subject: [PATCH 10/12] 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 1bcde54e..0df794f7 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: 2023-08-24 +date: 2024-02-08 notes: "" @@ -9,7 +9,7 @@ notes: "" --- # This text must be in line 10 ----------------------------------------------- program | required_version | ignore | notes_version -R | 4.3.1 | FALSE | -RStudio | 2023.06.2 | FALSE | For 32-bit systems v 1.1.463 -Quarto | 1.4.330 | FALSE | +R | 4.3.2 | FALSE | +RStudio | 2023.12.1 | FALSE | For 32-bit systems v 1.1.463 +Quarto | 1.4.549 | FALSE | From 5b4df7eb116d0e6a3422009e8d45fbdd232d00c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilmantas=20G=C4=97g=C5=BEna?= Date: Thu, 8 Feb 2024 14:13:29 +0200 Subject: [PATCH 11/12] Update DESCRIPTION --- DESCRIPTION | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index d5569e05..f5867342 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: bio Type: Package -Title: Resources Manager for BS-2023 -Version: 0.2.3 -Date: 2023-08-24 +Title: Resources Manager for R, RStudio and Related Software +Version: 0.2.4 +Date: 2024-12-08 Authors@R: person("Vilmantas", "Gegzna", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-9500-5167"), @@ -18,7 +18,7 @@ Language: en-US Encoding: UTF-8 LazyData: true Roxygen: list(markdown = TRUE) -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.1 Additional_repositories: https://mokymai.github.io/download/ Imports: From a6229cdbef5c60cab13777231d1afcc4b32ab96d Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 8 Feb 2024 12:17:26 +0000 Subject: [PATCH 12/12] Re-build README.Rmd before pkgdown --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3ab2faae..14d9dfd2 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,9 @@ Package ***bio*** [![GitHub -version](https://img.shields.io/badge/GitHub-0.2.3-brightgreen.svg)](https://github.com/mokymai/bio) +version](https://img.shields.io/badge/GitHub-0.2.4-brightgreen.svg)](https://github.com/mokymai/bio) [![R-CMD-check](https://github.com/mokymai/bio/workflows/R-CMD-check/badge.svg)](https://github.com/mokymai/bio/actions) -[![Updated-on](https://img.shields.io/badge/Updated%20on-2023--08--26-yellowgreen.svg)](/commits/master) +[![Updated-on](https://img.shields.io/badge/Updated%20on-2024--02--08-yellowgreen.svg)](/commits/master) [![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental) [![R-CMD-check](https://github.com/mokymai/bio/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/mokymai/bio/actions/workflows/R-CMD-check.yaml)