From fb7156303a9050d9a31b2adcb17b299f47f18ff5 Mon Sep 17 00:00:00 2001 From: "Dr. Connie Brett" Date: Mon, 3 Jul 2023 14:26:33 -0700 Subject: [PATCH] Cran 1.0.2 release (#64) --- .circleci/config.yml | 16 ++++++---------- DESCRIPTION | 4 ++-- NEWS.md | 2 ++ R/downloadFile.R | 4 ++-- R/fw_helpers_external.R | 2 +- R/fw_helpers_internal.R | 2 +- R/generate_template.R | 4 ++-- R/periscope.R | 2 +- README.md | 2 +- cran-comments.md | 15 +++++---------- inst/fw_templ/p_example/ui_sidebar_right.R | 2 +- inst/fw_templ/ui_plus.R | 2 +- inst/fw_templ/ui_plus_no_sidebar.R | 2 +- tests/testthat/_snaps/body_footer.md | 2 +- tests/testthat/_snaps/download_file.md | 4 ++-- tests/testthat/_snaps/downloadable_plot.md | 8 ++++---- tests/testthat/_snaps/downloadable_table.md | 4 ++-- tests/testthat/_snaps/ui_functions.md | 8 ++++---- .../program/ui_sidebar_right.R | 2 +- tests/testthat/sample_app_both_sidebar/ui.R | 2 +- .../program/ui_sidebar_right.R | 2 +- tests/testthat/sample_app_r_sidebar/ui.R | 2 +- tests/testthat/setup.R | 2 +- 23 files changed, 44 insertions(+), 51 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8b21076..6968cda 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,15 +3,6 @@ # - Builds attempted for 3.6.3, 4.0.5, and the *latest* R edition supported by rocker. version: 2.1 - -workflows: - - version: 2 - Prepare-All-R-Editions: - jobs: - - Build-for-r4_0_5 - - Build-for-rLATEST - jobs: Build-for-r4_0_5: @@ -56,7 +47,6 @@ jobs: # Perform package check R CMD check *tar.gz - Build-for-rLATEST: docker: - image: rocker/verse:latest @@ -104,3 +94,9 @@ jobs: # Perform package check R CMD check *tar.gz +workflows: + version: 2 + Prepare-All-R-Editions: + jobs: + - Build-for-r4_0_5 + - Build-for-rLATEST diff --git a/DESCRIPTION b/DESCRIPTION index e589ab8..0195af0 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: periscope Type: Package Title: Enterprise Streamlined 'Shiny' Application Framework -Version: 1.0.1 +Version: 1.0.2 Authors@R: c( person("Constance", "Brett", email="connie@aggregate-genius.com", role = c("aut", "cre")), person("Isaac", "Neuhaus", role = "aut", comment = "canvasXpress JavaScript Library Maintainer"), @@ -33,7 +33,7 @@ Imports: fresh, yaml, grDevices -RoxygenNote: 7.1.2 +RoxygenNote: 7.2.3 Suggests: knitr, rmarkdown, diff --git a/NEWS.md b/NEWS.md index 19a7742..b1c1399 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ #Revisions and Change Log +### v1.0.2 +* Minor bugfixes - handled classes and packageversion checking in compliance with latest R requirements to resolve notes ### v1.0.1 * Minor bugfixes - updated font awesome icons (to v5 compatible) diff --git a/R/downloadFile.R b/R/downloadFile.R index 5039b24..f83a570 100755 --- a/R/downloadFile.R +++ b/R/downloadFile.R @@ -274,7 +274,7 @@ download_file <- function(input, # excel file else if (type == "xlsx") { if ("openxlsx" %in% utils::installed.packages()) { - if ((class(data) == "Workbook") && ("openxlsx" %in% attributes(class(data)))) { + if (("Workbook" %in% class(data)) && ("openxlsx" %in% attributes(class(data)))) { openxlsx::saveWorkbook(data, file) } else { show_rownames <- attr(data, "show_rownames") @@ -288,7 +288,7 @@ download_file <- function(input, } # text file processing else if (type == "txt") { - if (class(data) == "character") { + if ("character" %in% class(data)) { writeLines(data, file) } else if (is.data.frame(data) || is.matrix(data)) { diff --git a/R/fw_helpers_external.R b/R/fw_helpers_external.R index 15c46cb..7697459 100755 --- a/R/fw_helpers_external.R +++ b/R/fw_helpers_external.R @@ -164,7 +164,7 @@ fw_create_body <- function() { app_info <- shiny::isolate(.g_opts$app_info) info_content <- NULL - if (!is.null(app_info) && (class(app_info)[1] == "html")) { + if (!is.null(app_info) && ("html" %in% class(app_info))) { info_content <- shinyBS::bsModal( id = "titleinfobox", title = shiny::isolate(.g_opts$app_title), diff --git a/R/fw_helpers_internal.R b/R/fw_helpers_internal.R index e7d1ea9..93b7d6e 100755 --- a/R/fw_helpers_internal.R +++ b/R/fw_helpers_internal.R @@ -49,7 +49,7 @@ "$(\"
", ifelse(is.null(app_info), app_title, - ifelse(class(app_info)[1] == "html", + ifelse("html" %in% class(app_info), paste("", app_title, ""), paste(" 0) { - if (utils::packageVersion('shinydashboardPlus') < 2) { + if (utils::packageVersion('shinydashboardPlus') < "2") { .g_sdp_oldver <<- TRUE } .g_sdp_installed <<- TRUE diff --git a/README.md b/README.md index e74f782..fcc6cbc 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ output: [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/periscope?color=9bc2cf)](https://cran.r-project.org/package=periscope) [![CRAN_Downloads_Badge](https://cranlogs.r-pkg.org/badges/grand-total/periscope?color=9bc2cf)](https://cran.r-project.org/package=periscope) [![CircleCI](https://circleci.com/gh/cb4ds/periscope/tree/master.svg?style=shield)](https://app.circleci.com/pipelines/github/cb4ds/periscope?branch=master) -[![Coverage Status](https://img.shields.io/codecov/c/github/cb4ds/periscope/master.svg)](https://codecov.io/github/cb4ds/periscope?branch=master) +[![Coverage Status](https://img.shields.io/codecov/c/github/cb4ds/periscope/master.svg)](https://app.codecov.io/github/cb4ds/periscope?branch=master) ***periscope*** was originally developed as the core Shiny component for bioinformatics and systems biology analysis applications. It provides a predefined but flexible template for new Shiny applications with a default dashboard layout, three locations for user alerts, a nice busy indicator and logging features. diff --git a/cran-comments.md b/cran-comments.md index bccd7ed..6d5f3c4 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,26 +1,21 @@ ## Comments from Maintainer -Resubmission Comments: -* permanent redirect for CircleCI was not caught, corrected the URL in the readme - -Original Comments: -Minor bugfix release to update icons, templated examples +Bugfixes for the changes in utils::packageVersion and class checks in the package and tests --- ## Test Environments -RStudio Server Pro (Ubuntu 18.04.2) - -* R 3.6.3 +RStudio Server Pro (Ubuntu 20.04) * R 4.0.5 -* R 4.1.1 +* R 4.2.3 +* R 4.3.0 CircleCI * R 4.0.5 -* R 4.1.2 +* R latest WinBuilder diff --git a/inst/fw_templ/p_example/ui_sidebar_right.R b/inst/fw_templ/p_example/ui_sidebar_right.R index e804c40..fe4df88 100755 --- a/inst/fw_templ/p_example/ui_sidebar_right.R +++ b/inst/fw_templ/p_example/ui_sidebar_right.R @@ -23,7 +23,7 @@ # -- Create Elements -if (utils::packageVersion('shinydashboardPlus') < 2) { +if (utils::packageVersion('shinydashboardPlus') < "2") { tab1 <- rightSidebarTabContent( id = 1, icon = "desktop", diff --git a/inst/fw_templ/ui_plus.R b/inst/fw_templ/ui_plus.R index c3eb2c8..1ae6097 100644 --- a/inst/fw_templ/ui_plus.R +++ b/inst/fw_templ/ui_plus.R @@ -20,7 +20,7 @@ source(paste("program", "ui_body.R", sep = .Platform$file.sep), addl_opts <- list() -if (utils::packageVersion('shinydashboardPlus') < 2) { +if (utils::packageVersion('shinydashboardPlus') < "2") { plus_fxn <- getExportedValue("shinydashboardPlus", "dashboardPagePlus") addl_opts <- list(sidebar_fullCollapse = TRUE) } else { diff --git a/inst/fw_templ/ui_plus_no_sidebar.R b/inst/fw_templ/ui_plus_no_sidebar.R index 278184c..13702bd 100644 --- a/inst/fw_templ/ui_plus_no_sidebar.R +++ b/inst/fw_templ/ui_plus_no_sidebar.R @@ -18,7 +18,7 @@ source(paste("program", "ui_body.R", sep = .Platform$file.sep), addl_opts <- list() -if (utils::packageVersion('shinydashboardPlus') < 2) { +if (utils::packageVersion('shinydashboardPlus') < "2") { plus_fxn <- getExportedValue("shinydashboardPlus", "dashboardPagePlus") addl_opts <- list(sidebar_fullCollapse = TRUE) } else { diff --git a/tests/testthat/_snaps/body_footer.md b/tests/testthat/_snaps/body_footer.md index 34345e8..aff20b3 100644 --- a/tests/testthat/_snaps/body_footer.md +++ b/tests/testthat/_snaps/body_footer.md @@ -6,7 +6,7 @@

User Action Log

diff --git a/tests/testthat/_snaps/download_file.md b/tests/testthat/_snaps/download_file.md index 8d58768..288e535 100644 --- a/tests/testthat/_snaps/download_file.md +++ b/tests/testthat/_snaps/download_file.md @@ -2,7 +2,7 @@ - + @@ -11,7 +11,7 @@