Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

618 templates action@devel #251

Merged
merged 9 commits into from
Sep 18, 2023
Merged
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
19 changes: 19 additions & 0 deletions .github/workflows/templates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Check Templates

on:
workflow_dispatch:
pull_request:
branches:
- main
- devel

jobs:
templates:
name: Check Templates
uses: pharmaverse/admiralci/.github/workflows/check-templates.yml@main
secrets: inherit
with:
r-version: "4.1"
push-templates-data: true
exclude-templates-data: "adrs_basic"
9 changes: 7 additions & 2 deletions inst/templates/ad_adrs.R
Original file line number Diff line number Diff line change
Expand Up @@ -398,5 +398,10 @@ adrs <- adrs %>%

# Save output ----

dir <- tempdir() # Change to whichever directory you want to save the dataset in
saveRDS(adrs, file = file.path(dir, "adrs.rds"), compress = "bzip2")
dir <- file.path(getwd(), "tmp")
print(dir)
if (!file.exists(dir)) {
# Create the folder
dir.create(dir)
}
save(adrs, file = file.path(dir, "adrs.rda"), compress = "bzip2")
9 changes: 7 additions & 2 deletions inst/templates/ad_adrs_basic.R
Original file line number Diff line number Diff line change
Expand Up @@ -372,5 +372,10 @@ adrs <- adrs %>%

# ---- Save output ----

dir <- tempdir() # Change to whichever directory you want to save the dataset in
saveRDS(adrs, file = file.path(dir, "adrs.rds"), compress = "bzip2")
dir <- file.path(getwd(), "tmp")
print(dir)
if (!file.exists(dir)) {
# Create the folder
dir.create(dir)
}
save(adrs, file = file.path(dir, "adrs_basic.rda"), compress = "bzip2")
10 changes: 10 additions & 0 deletions inst/templates/ad_adtr.R
Original file line number Diff line number Diff line change
Expand Up @@ -280,3 +280,13 @@ adtr <- adtr %>%
dataset_add = select(adsl, !!!negate_vars(adsl_vars)),
by_vars = exprs(STUDYID, USUBJID)
)

# Save output ----

dir <- file.path(getwd(), "tmp")
print(dir)
if (!file.exists(dir)) {
# Create the folder
dir.create(dir)
}
save(adtr, file = file.path(dir, "adtr.rda"), compress = "bzip2")
9 changes: 7 additions & 2 deletions inst/templates/ad_adtte.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,10 @@ adtte <- adtte %>%

# Save output ----

dir <- tempdir() # Change to whichever directory you want to save the dataset in
saveRDS(adtte, file = file.path(dir, "adtte.rds"), compress = "bzip2")
dir <- file.path(getwd(), "tmp")
print(dir)
if (!file.exists(dir)) {
# Create the folder
dir.create(dir)
}
save(adtte, file = file.path(dir, "adtte.rda"), compress = "bzip2")
Loading