Skip to content

Commit

Permalink
chore: rearrange files to make the root tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
vedhav committed Jul 18, 2023
1 parent 3d61ff6 commit 8759db3
Show file tree
Hide file tree
Showing 28 changed files with 20 additions and 19 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ By sourcing the [\_utils.R](https://github.com/insightsengineering/teal.gallery/
Running the `run_teal_gallery("APP_NAME")` will run the `APP_NAME` by restoring the packages using [renv](https://rstudio.github.io/renv/)

```R
source("https://raw.github.com/insightsengineering/teal.gallery/main/sourceme.R")
source("https://raw.github.com/insightsengineering/teal.gallery/main/_internal/utils/sourceme.R")
# Assuming you want to run the "basic-teal" app. Refer to the list above to know which apps are possible
run_teal_gallery("basic-teal")
```
Expand All @@ -43,5 +43,5 @@ Adding a sample app involves the following steps:
1. Copy each sample app into a file named `app.R` into a sensible folder name inside it's own directory. The directory is also the `APP_NAME`.
2. Make sure that `{renv}` is used for the teal app.
3. Create a GIF recording ([KAP](https://getkap.co/) is a good tool for this). Make sure that the dimensions of the GIF is 970x555 px and the size is about 1 MB. (It can be done by recording using KAP in 1470x840 px and rendering 5fps and downsizing 33%). Place the GIF inside the `APP_NAME/assets/img` directory. Also, make sure that the name of the GIF is `APP_NAME.gif`
4. Update the `_quarto/demo-apps.yml` with a new `app/title`. This should be the `APP_NAME`.
4. Update the `_internal/_quarto/demo-apps.yml` with a new `app/title`. This should be the `APP_NAME`.
5. Run the `generate_app_readme.R` to generate the readme for the app inside it's own directory.
2 changes: 1 addition & 1 deletion RNA-seq/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

### Run the app yourself

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

### View the deployed app
Expand Down
1 change: 1 addition & 0 deletions _internal/quarto/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.quarto/
2 changes: 1 addition & 1 deletion _quarto.yml → _internal/quarto/_quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ format:
html:
search: false
theme:
light: [flatly, _quarto/assets/style.scss]
light: [flatly, assets/style.scss]
anchor-sections: true
smooth-scroll: true
code-link: true
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</a>
</div>
<a href="<%= item.deployment_server %>NEST_<%= app.title %>_main">
<img src="<%= app.title %>/assets/img/<%= app.title %>.gif" alt="Animation of the <%= app.title %> app"/>
<img src="assets/img/<%= app.title %>.gif" alt="Animation of the <%= app.title %> app"/>
</a>
</div>
<% } %>
Expand Down
4 changes: 2 additions & 2 deletions index.qmd → _internal/quarto/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ pagetitle: "Teal Gallery"
format: html
listing:
- id: apps-demo
template: _quarto/demo-template.ejs
contents: _quarto/demo-apps.yml
template: demo-template.ejs
contents: demo-apps.yml
---


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ x <- cat(paste0("# ", params$app_name, " app"))
### Run the app yourself

```
source("https://raw.github.com/insightsengineering/teal.gallery/main/sourceme.R")
source("https://raw.github.com/insightsengineering/teal.gallery/main/_internal/utils/sourceme.R")
run_teal_gallery("`r params$app_name`")
```

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Run this file to generate the readme inside each app directory
library(yaml)

app_names <- unlist(lapply(yaml::read_yaml("_quarto/demo-apps.yml"), function(x) x$apps))
app_names <- unlist(lapply(yaml::read_yaml("_internal/quarto/demo-apps.yml"), function(x) x$apps))

for (app_name in app_names) {
rmarkdown::render(
"app_readme_template.Rmd",
"_internal/utils/app_readme_template.Rmd",
output_dir = app_name,
output_file = "README.md",
knit_root_dir = app_name,
knit_root_dir = paste0("../../", app_name),
params = list(app_name = app_name)
)
}
File renamed without changes.
2 changes: 1 addition & 1 deletion basic-teal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

### Run the app yourself

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

### View the deployed app
Expand Down
2 changes: 1 addition & 1 deletion early-dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

### Run the app yourself

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

### View the deployed app
Expand Down
2 changes: 1 addition & 1 deletion efficacy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

### Run the app yourself

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

### View the deployed app
Expand Down
2 changes: 1 addition & 1 deletion exploratory/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

### Run the app yourself

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

### View the deployed app
Expand Down
2 changes: 1 addition & 1 deletion longitudinal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

### Run the app yourself

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

### View the deployed app
Expand Down
2 changes: 1 addition & 1 deletion patient-profile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

### Run the app yourself

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

### View the deployed app
Expand Down
2 changes: 1 addition & 1 deletion python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

### Run the app yourself

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

### View the deployed app
Expand Down
2 changes: 1 addition & 1 deletion safety/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

### Run the app yourself

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

### View the deployed app
Expand Down

0 comments on commit 8759db3

Please sign in to comment.