From ef44fb902b83d507b5095d1d18897dd4291c1b64 Mon Sep 17 00:00:00 2001 From: Jakub Nowicki Date: Thu, 4 Apr 2024 12:12:43 +0200 Subject: [PATCH 1/3] docs: Update package documentation to follow the roxygen2 7 setup. --- R/shiny.R | 24 ------------------- R/shiny.semantic-package.R | 21 ++++++++++++++++ ....semantic.Rd => shiny.semantic-package.Rd} | 6 +++-- 3 files changed, 25 insertions(+), 26 deletions(-) create mode 100644 R/shiny.semantic-package.R rename man/{shiny.semantic.Rd => shiny.semantic-package.Rd} (91%) diff --git a/R/shiny.R b/R/shiny.R index 9484ba68..1a9f64d7 100644 --- a/R/shiny.R +++ b/R/shiny.R @@ -1,27 +1,3 @@ -#' Semantic UI wrapper for Shiny -#' -#' -#' @description With this library it’s easy to wrap Shiny with Semantic UI -#' components. Add a few simple lines of code and some CSS classes to give -#' your UI a fresh, modern and highly interactive look. -#' -#' @section Options: -#' There are a number of global options that affect shiny.semantic as well as -#' Shiny behavior.The options can be set globally with `options()` -#' \describe{ -#' \item{shiny.custom.semantic.cdn (defaults to `NULL`)}{This controls from where the css -#' and javascripts will be downloaded.} -#' \item{shiny.custom.semantic (defaults to `NULL`)}{This allows to set custom local path -#' to semantic dependencies.} -#' \item{shiny.minified (defaults to `TRUE`)}{Defines including JavaScript as a minified or -#' un-minified file.} -#' } -#' -#' @docType package -#' @name shiny.semantic -#' @aliases shiny.semantic-package -NULL - #' Internal function that expose javascript bindings to Shiny app. #' #' @param libname library name diff --git a/R/shiny.semantic-package.R b/R/shiny.semantic-package.R new file mode 100644 index 00000000..fc7552bb --- /dev/null +++ b/R/shiny.semantic-package.R @@ -0,0 +1,21 @@ +#' Semantic UI wrapper for Shiny +#' +#' +#' @description With this library it’s easy to wrap Shiny with Semantic UI +#' components. Add a few simple lines of code and some CSS classes to give +#' your UI a fresh, modern and highly interactive look. +#' +#' @section Options: +#' There are a number of global options that affect shiny.semantic as well as +#' Shiny behavior.The options can be set globally with `options()` +#' \describe{ +#' \item{shiny.custom.semantic.cdn (defaults to `NULL`)}{This controls from where the css +#' and javascripts will be downloaded.} +#' \item{shiny.custom.semantic (defaults to `NULL`)}{This allows to set custom local path +#' to semantic dependencies.} +#' \item{shiny.minified (defaults to `TRUE`)}{Defines including JavaScript as a minified or +#' un-minified file.} +#' } +#' +#' @keywords internal +"_PACKAGE" diff --git a/man/shiny.semantic.Rd b/man/shiny.semantic-package.Rd similarity index 91% rename from man/shiny.semantic.Rd rename to man/shiny.semantic-package.Rd index c2dd5573..0f937582 100644 --- a/man/shiny.semantic.Rd +++ b/man/shiny.semantic-package.Rd @@ -1,7 +1,7 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/shiny.R +% Please edit documentation in R/shiny.semantic-package.R \docType{package} -\name{shiny.semantic} +\name{shiny.semantic-package} \alias{shiny.semantic} \alias{shiny.semantic-package} \title{Semantic UI wrapper for Shiny} @@ -45,6 +45,7 @@ Authors: \item Paweł Przytuła \email{pawel@appsilon.com} \item Jakub Chojna \email{jakub.chojna@appsilon.com} \item Olga Mierzwa-Sulima \email{olga@appsilon.com} + \item Tymoteusz Makowski \email{tymoteusz.makowski@appsilon.com} } Other contributors: @@ -58,3 +59,4 @@ Other contributors: } } +\keyword{internal} From cc8b4d6526723eaaf46dc6d6fad564d80103a86d Mon Sep 17 00:00:00 2001 From: Jakub Nowicki Date: Thu, 4 Apr 2024 12:13:09 +0200 Subject: [PATCH 2/3] test: Disable Crashpad for shinytest2. --- tests/testthat/setup-disable-crashpad.R | 30 +++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tests/testthat/setup-disable-crashpad.R diff --git a/tests/testthat/setup-disable-crashpad.R b/tests/testthat/setup-disable-crashpad.R new file mode 100644 index 00000000..73e56ee6 --- /dev/null +++ b/tests/testthat/setup-disable-crashpad.R @@ -0,0 +1,30 @@ +# ❯ checking for detritus in the temp directory ... NOTE +# Found the following files/directories: +# ‘Crashpad’ +# +# 0 errors ✔ | 0 warnings ✔ | 1 note ✖ +# Error: Error: R CMD check found NOTEs +# Flavors: ubuntu-22.04 (devel), ubuntu-22.04 (release), ubuntu-22.04 (oldrel) + +# References (shinytest2 github): +# 1. https://github.com/rstudio/shinytest2/blob/main/cran-comments.md +# 2. https://github.com/rstudio/shinytest2/blob/main/tests/testthat/setup-disable-crashpad.R + +# Disable crash reporting on CRAN machines. (Can't get the report anyways) +chromote::set_chrome_args(c( + # https://peter.sh/experiments/chromium-command-line-switches/#disable-crash-reporter + #> Disable crash reporter for headless. It is enabled by default in official builds + "--disable-crash-reporter", + chromote::default_chrome_args() +)) + +# Make sure the temp folder is removed when testing is complete +withr::defer({ + + # Clean up chromote sessions + gc() # Run R6 finalizer methods + Sys.sleep(2) # Wait for any supervisors to exit + + # Delete the Crashpad folder if it exists + unlink(file.path(tempdir(), "Crashpad"), recursive = TRUE) +}, envir = testthat::teardown_env()) From f852789ce9d6d1233c4227ef27f57b4e9f46ae2e Mon Sep 17 00:00:00 2001 From: Jakub Nowicki Date: Thu, 4 Apr 2024 12:13:35 +0200 Subject: [PATCH 3/3] chore: Bump package version and update authors. --- DESCRIPTION | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index b28aa45a..842cfb02 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: shiny.semantic Title: Semantic UI Support for Shiny -Version: 0.5.0.9003 +Version: 0.5.1 Authors@R: c(person("Filip", "Stachura", email = "filip@appsilon.com", role = "aut"), person("Dominik", "Krzeminski", role = "aut"), person("Krystian", "Igras", role = "aut"), @@ -10,6 +10,7 @@ Authors@R: c(person("Filip", "Stachura", email = "filip@appsilon.com", role = "a person("Jakub", "Chojna", email = "jakub.chojna@appsilon.com", role = "aut"), person("Olga", "Mierzwa-Sulima", email = "olga@appsilon.com", role = "aut"), person("Jakub", "Nowicki", email = "opensource+kuba@appsilon.com", role = c("aut", "cre")), + person("Tymoteusz", "Makowski", email = "tymoteusz.makowski@appsilon.com", role = "aut"), person("Ashley", "Baldry", role = "ctb"), person("Pedro", "Manuel Coutinho da Silva", email = "pedro@appsilon.com", role = "ctb"), person("Kamil", "Żyła", email = "kamil@appsilon.com", role = "ctb"), @@ -39,6 +40,7 @@ Imports: stats Suggests: covr, + chromote, dplyr, DT, gapminder,