-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Detect package requirements for plugins. (#337)
* Detect package requirements for plugins. Right now this is fairly manual. I'm working toward automating it more. We'll make the user tell us SOME things, but I'm trying to make it a light lift. Closes #322. * See if rsconnect picks up ggplot2 and safetyCharts automatically. * Another attempt to poke renv to see packages. * Quick test of dependency-library-er for shiny deployment. * Load packages on plugin read. * Function for shinyapps workflow. * Handle metrics with 0 flags. If a site doesn't have any flags, display a placeholder GT table. This isn't perfect but it's an easy, stop-gap fix. To test, update app.R, adding this filter to dfResults: `dfResults = dplyr::filter(gsm.app::sample_dfResults, GroupID != "0X159")`. * Document and export plugin dependency functions. * Document and test Plugin dependency functions and other uncovered pieces. * More documentation. * Plugins vignette. * Work around testthat 3.2.2 bug (r-lib/testthat#2037). * Use standardized function converter. Mostly. * Explicitly point to release file for gsm. * Try to make it find gsm 2.2.0. * Revert to normal gsm & wait. * Try a specific commit. * Revert to tag. This is what I want long-term. Let's use this one and see if we can make it work eventually. * One more try to pass the time. * Give shinyapps a GITHUB_PAT. We might have to supply a "real" PAT (with permissions to read other repos), at least until shinyapps fixes their bug (and it wouldn't hurt to have it in place to protect against future bugs). * Update shinyapps-deploy.yaml * Simplify shinyapps workflow. In theory it should finally work without the gt/gsm hacks.
- Loading branch information
1 parent
7e5bba9
commit a71a36c
Showing
36 changed files
with
631 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,3 +42,4 @@ docs | |
|
||
rsconnect | ||
scratch.R | ||
inst/doc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,6 @@ Imports: | |
cli, | ||
dplyr, | ||
favawesome, | ||
ggplot2, | ||
glue, | ||
gsm (>= 2.1.2), | ||
gt (>= 0.11.1.9000), | ||
|
@@ -31,7 +30,6 @@ Imports: | |
magrittr, | ||
purrr, | ||
rlang, | ||
safetyCharts (>= 0.4.0), | ||
shiny (>= 1.6.0), | ||
shinycssloaders, | ||
shinyjs, | ||
|
@@ -40,18 +38,21 @@ Suggests: | |
chromote (>= 0.3.1), | ||
devtools, | ||
here, | ||
knitr, | ||
pak, | ||
rmarkdown, | ||
shinytest2, | ||
stringr, | ||
testthat (>= 3.0.0), | ||
usethis, | ||
withr | ||
Remotes: | ||
gsm=Gilead-BioStats/[email protected], | ||
gt=url::https://rstudio.r-universe.dev/src/contrib/gt_0.11.1.9000.tar.gz, | ||
safetyCharts=url::https://safetygraphics.r-universe.dev/src/contrib/safetyCharts_0.4.0.tar.gz | ||
gsm=gilead-biostats/[email protected], | ||
gt=url::https://rstudio.r-universe.dev/src/contrib/gt_0.11.1.9000.tar.gz | ||
Config/testthat/edition: 3 | ||
Encoding: UTF-8 | ||
Language: en-US | ||
LazyData: true | ||
Roxygen: list(markdown = TRUE) | ||
RoxygenNote: 7.3.2 | ||
VignetteBuilder: knitr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
# Generated by roxygen2: do not edit by hand | ||
|
||
S3method(util_AsFunction,character) | ||
S3method(util_AsFunction,default) | ||
export("%>%") | ||
export(plugin_GetDependencySources) | ||
export(plugin_InstallDependencySources) | ||
export(plugin_LoadDependencies) | ||
export(plugin_Read) | ||
export(run_gsm_app) | ||
export(run_sample_gsm_app) | ||
export(sample_fnFetchData) | ||
import(shiny) | ||
importFrom(cli,cli_alert) | ||
importFrom(cli,cli_alert_info) | ||
importFrom(ggplot2,ggplot) | ||
importFrom(magrittr,"%>%") | ||
importFrom(rlang,"%||%") | ||
importFrom(rlang,.data) | ||
importFrom(safetyCharts,safetyOutlierExplorer_ui) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#' Load a Function for a Plugin | ||
#' | ||
#' @inheritParams shared-params | ||
#' | ||
#' @returns The function, if it can be found. | ||
#' @keywords internal | ||
util_AsFunction <- function(strFunction) { | ||
UseMethod("util_AsFunction") | ||
} | ||
|
||
#' @export | ||
util_AsFunction.default <- function(strFunction) { | ||
rlang::as_function(strFunction) | ||
} | ||
|
||
#' @export | ||
util_AsFunction.character <- function(strFunction) { | ||
fnFunction <- gsm::GetStrFunctionIfNamespaced(strFunction) | ||
# Extra step to work around things that are still character. | ||
rlang::as_function(fnFunction) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.