From 54451b2182c3317d79e0b612548fe2f16531aeb8 Mon Sep 17 00:00:00 2001 From: Daphne Grasselly Date: Tue, 5 Sep 2023 17:46:58 +0200 Subject: [PATCH 01/10] add templates --- .github/workflows/templates.yml | 19 +++++++++++++++++++ inst/templates/ad_adbcva.R | 11 ++++++++--- inst/templates/ad_adoe.R | 13 +++++++++---- inst/templates/ad_advfq.R | 11 +++++++++-- 4 files changed, 45 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/templates.yml diff --git a/.github/workflows/templates.yml b/.github/workflows/templates.yml new file mode 100644 index 00000000..54d284fb --- /dev/null +++ b/.github/workflows/templates.yml @@ -0,0 +1,19 @@ +--- +name: Check Templates + +on: + workflow_dispatch: + push: + branches: + - main + - devel + - 618_templates_action + +jobs: + templates: + name: Check Templates + uses: pharmaverse/admiralci/.github/workflows/check-templates.yml@618_templates_action + secrets: inherit + #if: github.event_name == 'pull_request' + with: + r-version: "4.1" diff --git a/inst/templates/ad_adbcva.R b/inst/templates/ad_adbcva.R index 641253cc..1dfafcee 100644 --- a/inst/templates/ad_adbcva.R +++ b/inst/templates/ad_adbcva.R @@ -300,7 +300,12 @@ adbcva_crtflag <- adbcva_adsl %>% admiralophtha_adbcva <- adbcva_crtflag -# ---- Save output ---- +# Save output ---- -dir <- tempdir() # Change to whichever directory you want to save the dataset in -save(admiralophtha_adbcva, file = file.path(dir, "admiralophtha_adbcva.rda"), compress = "bzip2") +dir <- file.path(getwd(), "tmp") +print(dir) +if (!file.exists(dir)) { + # Create the folder + dir.create(dir) +} +save(admiralophtha_adbcva, file = file.path(dir, "adbcva.rda"), compress = "bzip2") diff --git a/inst/templates/ad_adoe.R b/inst/templates/ad_adoe.R index 416f3332..e0aa22ad 100644 --- a/inst/templates/ad_adoe.R +++ b/inst/templates/ad_adoe.R @@ -196,7 +196,12 @@ adoe_adsl <- adoe_aseq %>% admiralophtha_adoe <- adoe_adsl -# ---- Save output ---- - -dir <- tempdir() # Change to whichever directory you want to save the dataset in -save(admiralophtha_adoe, file = file.path(dir, "admiralophtha_adoe.rda"), compress = "bzip2") +# Save output ---- + +dir <- file.path(getwd(), "tmp") +print(dir) +if (!file.exists(dir)) { + # Create the folder + dir.create(dir) +} +save(admiralophtha_adoe, file = file.path(dir, "adoe.rda"), compress = "bzip2") diff --git a/inst/templates/ad_advfq.R b/inst/templates/ad_advfq.R index b0b4d1e0..3cc0d6a2 100644 --- a/inst/templates/ad_advfq.R +++ b/inst/templates/ad_advfq.R @@ -306,5 +306,12 @@ admiralophtha_advfq <- advfq_adsl # ---- Save output ---- -dir <- tempdir() # Change to whichever directory you want to save the dataset in -save(admiralophtha_advfq, file = file.path(dir, "admiralophtha_advfq.rda"), compress = "bzip2") +# Save output ---- + +dir <- file.path(getwd(), "tmp") +print(dir) +if (!file.exists(dir)) { + # Create the folder + dir.create(dir) +} +save(admiralophtha_advfq, file = file.path(dir, "advfq.rda"), compress = "bzip2") From f83ece6164e7a4fab562de2ec383990907d74a11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daphn=C3=A9=20Grasselly?= <56442075+dgrassellyb@users.noreply.github.com> Date: Thu, 7 Sep 2023 13:02:39 +0200 Subject: [PATCH 02/10] trigger --- .github/workflows/templates.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/templates.yml b/.github/workflows/templates.yml index 54d284fb..e6eb757d 100644 --- a/.github/workflows/templates.yml +++ b/.github/workflows/templates.yml @@ -14,6 +14,6 @@ jobs: name: Check Templates uses: pharmaverse/admiralci/.github/workflows/check-templates.yml@618_templates_action secrets: inherit - #if: github.event_name == 'pull_request' + #if: github.event_name == 'pull_request' with: r-version: "4.1" From 3f97154fcabfdccb4727291df578561303c3db47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daphn=C3=A9=20Grasselly?= <56442075+dgrassellyb@users.noreply.github.com> Date: Mon, 11 Sep 2023 11:13:34 +0200 Subject: [PATCH 03/10] Update templates.yml --- .github/workflows/templates.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/templates.yml b/.github/workflows/templates.yml index e6eb757d..803ad18b 100644 --- a/.github/workflows/templates.yml +++ b/.github/workflows/templates.yml @@ -17,3 +17,4 @@ jobs: #if: github.event_name == 'pull_request' with: r-version: "4.1" + push-templates-data: true From 695e1bc44283f7eaea5b37476dcdbc75c9e2ece5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daphn=C3=A9=20Grasselly?= <56442075+dgrassellyb@users.noreply.github.com> Date: Mon, 11 Sep 2023 11:50:51 +0200 Subject: [PATCH 04/10] trigger --- .github/workflows/templates.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/templates.yml b/.github/workflows/templates.yml index 803ad18b..ff6ef07e 100644 --- a/.github/workflows/templates.yml +++ b/.github/workflows/templates.yml @@ -14,7 +14,7 @@ jobs: name: Check Templates uses: pharmaverse/admiralci/.github/workflows/check-templates.yml@618_templates_action secrets: inherit - #if: github.event_name == 'pull_request' + #if: github.event_name == 'pull_request' with: r-version: "4.1" push-templates-data: true From ef1374b8b58477ce1e0d494854054788c92736c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daphn=C3=A9=20Grasselly?= <56442075+dgrassellyb@users.noreply.github.com> Date: Mon, 11 Sep 2023 11:52:56 +0200 Subject: [PATCH 05/10] trigger --- .github/workflows/templates.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/templates.yml b/.github/workflows/templates.yml index ff6ef07e..803ad18b 100644 --- a/.github/workflows/templates.yml +++ b/.github/workflows/templates.yml @@ -14,7 +14,7 @@ jobs: name: Check Templates uses: pharmaverse/admiralci/.github/workflows/check-templates.yml@618_templates_action secrets: inherit - #if: github.event_name == 'pull_request' + #if: github.event_name == 'pull_request' with: r-version: "4.1" push-templates-data: true From 44b0d91da00cdbf921e63f5cabb2f8eaa8f888f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daphn=C3=A9=20Grasselly?= <56442075+dgrassellyb@users.noreply.github.com> Date: Mon, 11 Sep 2023 12:04:38 +0200 Subject: [PATCH 06/10] trigger --- .github/workflows/templates.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/templates.yml b/.github/workflows/templates.yml index 803ad18b..ff6ef07e 100644 --- a/.github/workflows/templates.yml +++ b/.github/workflows/templates.yml @@ -14,7 +14,7 @@ jobs: name: Check Templates uses: pharmaverse/admiralci/.github/workflows/check-templates.yml@618_templates_action secrets: inherit - #if: github.event_name == 'pull_request' + #if: github.event_name == 'pull_request' with: r-version: "4.1" push-templates-data: true From 326fad97fbbc8711c4250697013ef4e20b70ce6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daphn=C3=A9=20Grasselly?= <56442075+dgrassellyb@users.noreply.github.com> Date: Mon, 11 Sep 2023 13:23:02 +0200 Subject: [PATCH 07/10] trigger --- .github/workflows/templates.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/templates.yml b/.github/workflows/templates.yml index ff6ef07e..803ad18b 100644 --- a/.github/workflows/templates.yml +++ b/.github/workflows/templates.yml @@ -14,7 +14,7 @@ jobs: name: Check Templates uses: pharmaverse/admiralci/.github/workflows/check-templates.yml@618_templates_action secrets: inherit - #if: github.event_name == 'pull_request' + #if: github.event_name == 'pull_request' with: r-version: "4.1" push-templates-data: true From 1a6c034906add6d4c68d4f7676920e14fb17075c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daphn=C3=A9=20Grasselly?= <56442075+dgrassellyb@users.noreply.github.com> Date: Mon, 11 Sep 2023 13:27:48 +0200 Subject: [PATCH 08/10] Update templates.yml --- .github/workflows/templates.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/templates.yml b/.github/workflows/templates.yml index 803ad18b..ff6ef07e 100644 --- a/.github/workflows/templates.yml +++ b/.github/workflows/templates.yml @@ -14,7 +14,7 @@ jobs: name: Check Templates uses: pharmaverse/admiralci/.github/workflows/check-templates.yml@618_templates_action secrets: inherit - #if: github.event_name == 'pull_request' + #if: github.event_name == 'pull_request' with: r-version: "4.1" push-templates-data: true From 936e0f83dce3be13f95ca3cd6cf90b7319f997b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daphn=C3=A9=20Grasselly?= <56442075+dgrassellyb@users.noreply.github.com> Date: Mon, 11 Sep 2023 13:55:10 +0200 Subject: [PATCH 09/10] trigger --- .github/workflows/templates.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/templates.yml b/.github/workflows/templates.yml index ff6ef07e..803ad18b 100644 --- a/.github/workflows/templates.yml +++ b/.github/workflows/templates.yml @@ -14,7 +14,7 @@ jobs: name: Check Templates uses: pharmaverse/admiralci/.github/workflows/check-templates.yml@618_templates_action secrets: inherit - #if: github.event_name == 'pull_request' + #if: github.event_name == 'pull_request' with: r-version: "4.1" push-templates-data: true From 43ceca2a62ee39773491997c0c608190b95cf6e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daphn=C3=A9=20Grasselly?= <56442075+dgrassellyb@users.noreply.github.com> Date: Mon, 11 Sep 2023 15:59:39 +0200 Subject: [PATCH 10/10] Update templates.yml --- .github/workflows/templates.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/templates.yml b/.github/workflows/templates.yml index 803ad18b..986745ad 100644 --- a/.github/workflows/templates.yml +++ b/.github/workflows/templates.yml @@ -3,18 +3,16 @@ name: Check Templates on: workflow_dispatch: - push: + pull_request: branches: - main - devel - - 618_templates_action jobs: templates: name: Check Templates - uses: pharmaverse/admiralci/.github/workflows/check-templates.yml@618_templates_action + uses: pharmaverse/admiralci/.github/workflows/check-templates.yml@main secrets: inherit - #if: github.event_name == 'pull_request' with: r-version: "4.1" push-templates-data: true