From ac38bbb7dea10cc8984e094d8b6ffd251f7e8d7e Mon Sep 17 00:00:00 2001 From: AARON-CLARK Date: Tue, 7 Feb 2023 11:10:56 -0500 Subject: [PATCH 1/5] update lock file to use latest version of fontawesome --- renv.lock | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/renv.lock b/renv.lock index db9c61a0e..25130c27f 100644 --- a/renv.lock +++ b/renv.lock @@ -1,6 +1,6 @@ { "R": { - "Version": "4.1.2", + "Version": "4.2.2", "Repositories": [ { "Name": "CRAN", @@ -337,7 +337,7 @@ "RemoteUsername": "thinkr-open", "RemoteRef": "HEAD", "RemoteSha": "d2e4fcada1b094d7af06324f6c54301c7586ffee", - "Hash": "694eebe322e5cbdf101c152ad0a67d28", + "Hash": "8d87a3819d6169dbcbcf236c16a84c89", "Requirements": [ "cli", "desc", @@ -470,7 +470,7 @@ "RemoteUsername": "r-lib", "RemoteRef": "HEAD", "RemoteSha": "7ea4e479bdf780adadd1bd421a5ca23e5f951697", - "Hash": "795b8389734f11481fdcdf9cdde3002f", + "Hash": "9d300343b59a7fa8803429f575874f64", "Requirements": [ "callr", "cranlike", @@ -487,7 +487,7 @@ "Package": "cranlike", "Version": "1.0.2", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Hash": "2a531c8d1d45799fe2e880708dfc1097", "Requirements": [ "DBI", @@ -586,7 +586,7 @@ "Package": "debugme", "Version": "1.1.0", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Hash": "2d8a9e4f08f3dd669cb8ddd1eb575959", "Requirements": [ "crayon" @@ -751,10 +751,10 @@ }, "fontawesome": { "Package": "fontawesome", - "Version": "0.2.2", + "Version": "0.5.0", "Source": "Repository", - "Repository": "CRAN", - "Hash": "55624ed409e46c5f358b2c060be87f67", + "Repository": "RSPM", + "Hash": "e80750aec5717dedc019ad7ee40e4a7c", "Requirements": [ "htmltools", "rlang" @@ -888,7 +888,7 @@ "Package": "gmailr", "Version": "1.0.1", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Hash": "185e047cb2392acf320b8bc657a55c92", "Requirements": [ "base64enc", @@ -1652,14 +1652,14 @@ "Package": "revdepcheck", "Version": "1.0.0.9001", "Source": "GitHub", - "Remotes": "r-lib/crancache", "RemoteType": "github", + "Remotes": "r-lib/crancache", "RemoteHost": "api.github.com", "RemoteRepo": "revdepcheck", "RemoteUsername": "r-lib", "RemoteRef": "HEAD", "RemoteSha": "73933982d9bb34244902b80fa95d8a5fd965470e", - "Hash": "0840f4cc4619466fe424153d8426c0be", + "Hash": "3c7a98adfcec2ae0b10515a76bbc01dd", "Requirements": [ "DBI", "RSQLite", @@ -1808,10 +1808,10 @@ }, "rlang": { "Package": "rlang", - "Version": "1.0.2", + "Version": "1.0.6", "Source": "Repository", "Repository": "CRAN", - "Hash": "04884d9a75d778aca22c7154b8333ec9", + "Hash": "4ed1f8336c8d52c3e750adcdc57228a7", "Requirements": [] }, "rmarkdown": { @@ -2458,10 +2458,10 @@ }, "xfun": { "Package": "xfun", - "Version": "0.31", + "Version": "0.37", "Source": "Repository", - "Repository": "CRAN", - "Hash": "a318c6f752b8dcfe9fb74d897418ab2b", + "Repository": "RSPM", + "Hash": "a6860e1400a8fd1ddb6d9b4230cc34ab", "Requirements": [] }, "xml2": { From 22e562c9797320f4381fa1086ae048ae23558ccd Mon Sep 17 00:00:00 2001 From: AARON-CLARK Date: Tue, 7 Feb 2023 11:13:08 -0500 Subject: [PATCH 2/5] update gha workflows to not rely on (manually install) fa v0.3.0 --- .github/workflows/R-CMD-check-dev.yaml | 5 ----- .github/workflows/R-CMD-check-master.yaml | 6 +----- .github/workflows/test-coverage.yaml | 4 ---- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/.github/workflows/R-CMD-check-dev.yaml b/.github/workflows/R-CMD-check-dev.yaml index b8c2b1ec9..91f1a9255 100644 --- a/.github/workflows/R-CMD-check-dev.yaml +++ b/.github/workflows/R-CMD-check-dev.yaml @@ -49,9 +49,4 @@ jobs: use-public-rspm: true extra-packages: rcmdcheck - - # install packages needed - - name: install required fontawesome version - run: Rscript -e "remotes::install_version('fontawesome', version = '0.3.0', repos = 'http://cran.us.r-project.org')" - - uses: r-lib/actions/check-r-package@v2 diff --git a/.github/workflows/R-CMD-check-master.yaml b/.github/workflows/R-CMD-check-master.yaml index d67af4260..de05eb9ea 100644 --- a/.github/workflows/R-CMD-check-master.yaml +++ b/.github/workflows/R-CMD-check-master.yaml @@ -48,9 +48,5 @@ jobs: http-user-agent: ${{ matrix.config.http-user-agent }} use-public-rspm: true extra-packages: rcmdcheck - - # install packages needed - - name: install required fontawesome version - run: Rscript -e "remotes::install_version('fontawesome', version = '0.3.0', repos = 'http://cran.us.r-project.org')" - + - uses: r-lib/actions/check-r-package@v2 diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 499ba3d44..925ddcef9 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -27,10 +27,6 @@ jobs: with: extra-packages: covr - # install packages needed - - name: Install required fontawesome version - run: Rscript -e "remotes::install_version('fontawesome', version = '0.3.0', repos = 'http://cran.us.r-project.org')" - - name: Test coverage run: covr::codecov() shell: Rscript {0} From ab8575cf83e90fc74381d4d363df808625a14fb5 Mon Sep 17 00:00:00 2001 From: AARON-CLARK Date: Tue, 7 Feb 2023 13:15:14 -0500 Subject: [PATCH 3/5] since we are requiring a certain version bound of fontawesome, it should probably be listed in the Suggests field of the description --- DESCRIPTION | 1 + R/mod_downloadHandler.R | 14 ++++++-------- R/run_app.R | 5 ++--- R/utils_startup.R | 3 +-- dev/02_dev.R | 1 + 5 files changed, 11 insertions(+), 13 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 49d897dc0..441a46fc4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -62,6 +62,7 @@ Imports: shinyWidgets, stringr Suggests: + fontawesome, knitr, rstudioapi, shinytest2, diff --git a/R/mod_downloadHandler.R b/R/mod_downloadHandler.R index 4ad3e83fc..5aec73584 100644 --- a/R/mod_downloadHandler.R +++ b/R/mod_downloadHandler.R @@ -72,16 +72,14 @@ mod_downloadHandler_server <- function(id, pkgs, user, metric_weights){ # https://github.com/rstudio/fontawesome/issues/99 # Here, we make sure user has a functional version of fontawesome fa_v <- packageVersion("fontawesome") - if(fa_v != '0.3.0') { - msg1 <- "HTML reports require {fontawesome} v0.3.0 to render." - msg2 <- glue::glue("You currently have v{fa_v} installed. If the report download failed, please install correct version using code:") - code <- "remotes::install_version('fontawesome', version = '0.3.0', repos = 'http://cran.us.r-project.org')" - warning(paste(msg1, msg2, code)) + if(fa_v == '0.4.0') { + msg1 <- "HTML reports will not render with {fontawesome} v0.4.0." + msg2 <- glue::glue("You currently have v{fa_v} installed. If the report download failed, please install a stable version. We recommend v0.5.0 or higher.") + warning(paste(msg1, msg2)) showModal(modalDialog( size = "l", - title = h3("HTML report requires {fontawesome} v0.3.0", class = "mb-0 mt-0 txt-color"), - h5(msg2), - wellPanel(code) + title = h3(msg1, class = "mb-0 mt-0 txt-color"), + h5(msg2) )) } diff --git a/R/run_app.R b/R/run_app.R index 253cc3243..86546fa18 100644 --- a/R/run_app.R +++ b/R/run_app.R @@ -35,15 +35,14 @@ run_app <- function( if(is.null(assessment_db_name)) assessment_db_name <- "database.sqlite" if(is.null(credentials_db_name)) credentials_db_name <- "credentials.sqlite" if(is.null(login_note)) { - # TODO: Remove temporary warning once bug in fa v0.4.0 is fixed. # https://github.com/rstudio/fontawesome/issues/99 # Here, we make sure user has a functional version of fontawesome fa_v <- packageVersion("fontawesome") #TODO: Remove once bug is fixed if(!file.exists(credentials_db_name)) { login_note <- HTML('Note: To log in for the first time, use the admin user: admin with password QWERTY1.') - } else if(fa_v != '0.3.0') { #TODO: Remove once bug is fixed - login_note <- HTML(glue::glue("Note: HTML reports may require fontawesome v0.3.0 to render. You currently have v{fa_v} installed. If the report download fails, please run: `remotes::install_version('fontawesome', version = '0.3.0', repos = 'http://cran.us.r-project.org')`")) + } else if(fa_v == '0.4.0') { #TODO: Remove once bug is fixed + login_note <- HTML(glue::glue("Note: HTML reports will not render with {fontawesome} v0.4.0. You currently have v{fa_v} installed. If the report download fails, please install a more stable version. We recommend v.0.5.0 or higher.")) } } diff --git a/R/utils_startup.R b/R/utils_startup.R index 4e9440d0d..792eec2b8 100644 --- a/R/utils_startup.R +++ b/R/utils_startup.R @@ -177,11 +177,10 @@ initialize_raa <- function(assess_db, cred_db) { # Start logging info. if (isRunning()) loggit::set_logfile("loggit.json") - # TODO: Remove temporary warning once bug in fa v0.4.0 is fixed. # https://github.com/rstudio/fontawesome/issues/99 # Here, we make sure user has a functional version of fontawesome fa_v <- packageVersion("fontawesome") - if(fa_v != '0.3.0') warning(glue::glue("HTML reports may require fontawesome 0.3.0 to render. You currently have v{fa_v} installed. If the report download failed, please install correct version using code: remotes::install_version('fontawesome', version = '0.3.0', repos = 'http://cran.us.r-project.org')")) + if(fa_v == '0.3.0') warning(glue::glue("HTML reports will not render with {fontawesome} v0.4.0. You currently have v{fa_v} installed. If the report download failed, please install a stable version. We recommend v0.5.0 or higher.")) # TODO: Erase when pushing to master if (!get_golem_config("app_prod") && !is.null(golem::get_golem_options('pre_auth_user')) && !file.exists(credentials_db)) create_credentials_dev_db(credentials_db) diff --git a/dev/02_dev.R b/dev/02_dev.R index cfe7401f5..b18283807 100644 --- a/dev/02_dev.R +++ b/dev/02_dev.R @@ -39,6 +39,7 @@ usethis::use_mit_license() # # usethis::use_package("data.table") # usethis::use_package("gt") # # usethis::use_package("shinyBS") +usethis::use_package("fontawesome", type = "Suggests") # usethis::use_package("knitr", type = "Suggests") # usethis::use_package("tinytex", type = "Suggests") # usethis::use_package("pkgdown", type = "Suggests")#, min_version = "1.6.1") From b85195e121ebef3679ee05ab68c12292460dc043 Mon Sep 17 00:00:00 2001 From: AARON-CLARK Date: Tue, 7 Feb 2023 13:17:47 -0500 Subject: [PATCH 4/5] update downloadhandler --- R/mod_downloadHandler.R | 1 - 1 file changed, 1 deletion(-) diff --git a/R/mod_downloadHandler.R b/R/mod_downloadHandler.R index 5aec73584..23b56a9cc 100644 --- a/R/mod_downloadHandler.R +++ b/R/mod_downloadHandler.R @@ -68,7 +68,6 @@ mod_downloadHandler_server <- function(id, pkgs, user, metric_weights){ my_tempdir <- tempdir() if (input$report_format == "html") { - # TODO: Remove temporary warning once bug in fa v0.4.0 is fixed. # https://github.com/rstudio/fontawesome/issues/99 # Here, we make sure user has a functional version of fontawesome fa_v <- packageVersion("fontawesome") From ae77b005cdadb4a6772ce82ad5fa3318cc49c692 Mon Sep 17 00:00:00 2001 From: AARON-CLARK Date: Tue, 7 Feb 2023 15:16:00 -0500 Subject: [PATCH 5/5] reverting pkg 'xfun' down to 0.36 from 0.37 since deprecation error message doesn't exist whenever knitting --- renv.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/renv.lock b/renv.lock index 25130c27f..e0762eb78 100644 --- a/renv.lock +++ b/renv.lock @@ -2458,10 +2458,10 @@ }, "xfun": { "Package": "xfun", - "Version": "0.37", + "Version": "0.36", "Source": "Repository", "Repository": "RSPM", - "Hash": "a6860e1400a8fd1ddb6d9b4230cc34ab", + "Hash": "f5baec54606751aa53ac9c0e05848ed6", "Requirements": [] }, "xml2": {