Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions _internal/quarto/demo-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
- title: longitudinal
- title: RNA-seq
- title: python
- title: bsafe
5 changes: 4 additions & 1 deletion _internal/utils/app_readme_template.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
output: github_document
params:
app_name: NULL
graphic: NULL
---

<!-- Generated by app_readme_template.Rmd and generate_app_readme.R: do not edit by hand-->
Expand Down Expand Up @@ -29,5 +30,7 @@ x <- cat(paste0("Deployed app: https://genentech.shinyapps.io/NEST_", params$app
### Preview the app

```{r gif, echo=FALSE}
knitr::include_graphics(paste0("../_internal/quarto/assets/img/", params$app_name, ".gif"))
if(graphic){
knitr::include_graphics(paste0("../_internal/quarto/assets/img/", params$app_name, ".gif"))
}
```
7 changes: 6 additions & 1 deletion _internal/utils/generate_app_readme.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@ library(yaml)
app_names <- unlist(lapply(yaml::read_yaml("_internal/quarto/demo-apps.yml"), function(x) x$apps))

for (app_name in app_names) {
if(app_name == "bsafe") {
graphic = FALSE
} else {
graphic = TRUE
}
rmarkdown::render(
"_internal/utils/app_readme_template.Rmd",
output_dir = app_name,
output_file = "README.md",
knit_root_dir = paste0("../../", app_name),
params = list(app_name = app_name)
params = list(app_name = app_name, graphic = graphic)
)
}
1 change: 1 addition & 0 deletions bsafe/.Rprofile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
source("renv/activate.R")
17 changes: 17 additions & 0 deletions bsafe/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

<!-- Generated by app_readme_template.Rmd and generate_app_readme.R: do not edit by hand-->

# bsafe app

### Run the app yourself

source("https://raw.github.com/insightsengineering/teal.gallery/main/_internal/utils/sourceme.R")

# Run the app
restore_and_run("bsafe", package_repo = "https://insightsengineering.r-universe.dev")

### View the deployed app

Deployed app: <https://genentech.shinyapps.io/NEST_bsafe_stable>

### Preview the app
25 changes: 25 additions & 0 deletions bsafe/app.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
library(teal)
library(bsafe)
library(teal.modules.bsafe)

data <- teal.modules.bsafe::test_data

data <- teal.data::teal_data(
bsafe_data = data,
code = expression({
bsafe_data <- teal.modules.bsafe::test_data
})
) |>
teal.data::verify()

app <- teal::init(
data = data,
modules = list(
teal.modules.bsafe:::tm_bsafe(
label = "teal.modules.bsafe",
dataset_name = "bsafe_data"
)
),
header = "BSAFE Application"
)
shiny::shinyApp(app$ui, app$server)
5,697 changes: 5,697 additions & 0 deletions bsafe/renv.lock

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions bsafe/renv/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
library/
local/
cellar/
lock/
python/
sandbox/
staging/
Loading