From 573b36b24205ad472593ec08ba26a955e09ce281 Mon Sep 17 00:00:00 2001 From: camorosi <50029049+camorosi@users.noreply.github.com> Date: Fri, 9 Jan 2026 14:08:59 -0800 Subject: [PATCH 1/5] Add prefix option for s3 boards --- R/dp_deploy.R | 2 +- R/dpinput_sync.R | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/dp_deploy.R b/R/dp_deploy.R index 594f7e4..01f12b6 100644 --- a/R/dp_deploy.R +++ b/R/dp_deploy.R @@ -99,7 +99,7 @@ dp_deployCore.s3_board <- function(conf, project_path, d, dlog, git_info, type, } board <- pins::board_s3( - prefix = "daap/", + prefix = paste0(conf$board_params$prefix, "daap/"), bucket = conf$board_params$bucket_name, region = conf$board_params$region, access_key = aws_creds$key, diff --git a/R/dpinput_sync.R b/R/dpinput_sync.R index c5a5b2f..42bbeb7 100644 --- a/R/dpinput_sync.R +++ b/R/dpinput_sync.R @@ -105,7 +105,7 @@ init_board.s3_board <- function(conf) { } pins::board_s3( - prefix = "dpinput/", + prefix = paste0(conf$board_params$prefix, "dpinput/"), bucket = conf$board_params$bucket_name, region = conf$board_params$region, access_key = aws_creds$key, From 48aaa56bd0e3ce58cecb19d3b4ffe508be6dda58 Mon Sep 17 00:00:00 2001 From: camorosi <50029049+camorosi@users.noreply.github.com> Date: Fri, 16 Jan 2026 12:26:20 -0800 Subject: [PATCH 2/5] Bump version --- DESCRIPTION | 2 +- NEWS.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 2fd07bc..adb32fb 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: dpdeploy Title: A package to manage deployment of data products -Version: 0.4.0 +Version: 0.5.0 Authors@R: c( person(given = "Afshin", family = "Mashadi-Hossein", email ="amashadihossein@gmail.com", role = c("aut", "cre")), person(given = "Yue", family = "Jiang", email = "rivehill@gmail.com", role = "aut") diff --git a/NEWS.md b/NEWS.md index 76333c0..5ce6ed3 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# dpdeploy 0.5.0 + +* Add s3 "prefix" option so that a subfolder can be used for s3 daaps + # dpdeploy 0.4.0 * Enable saving data objects in qs format via the "type" param in `dpinput_sync()`. Note that `dp_deploy()` now detects type automatically. From cb5afa1b0fca769457f07aad6d2088d02f005888 Mon Sep 17 00:00:00 2001 From: camorosi <50029049+camorosi@users.noreply.github.com> Date: Tue, 20 Jan 2026 13:20:27 -0800 Subject: [PATCH 3/5] Fix prefix bug where NA was converted to character --- R/dp_deploy.R | 2 +- R/dpinput_sync.R | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/dp_deploy.R b/R/dp_deploy.R index 01f12b6..08b295e 100644 --- a/R/dp_deploy.R +++ b/R/dp_deploy.R @@ -99,7 +99,7 @@ dp_deployCore.s3_board <- function(conf, project_path, d, dlog, git_info, type, } board <- pins::board_s3( - prefix = paste0(conf$board_params$prefix, "daap/"), + prefix = paste0(ifelse(is.na(conf$board_params$prefix), "", conf$board_params$prefix), "daap/"), bucket = conf$board_params$bucket_name, region = conf$board_params$region, access_key = aws_creds$key, diff --git a/R/dpinput_sync.R b/R/dpinput_sync.R index 42bbeb7..b79f9b0 100644 --- a/R/dpinput_sync.R +++ b/R/dpinput_sync.R @@ -105,7 +105,7 @@ init_board.s3_board <- function(conf) { } pins::board_s3( - prefix = paste0(conf$board_params$prefix, "dpinput/"), + prefix = paste0(ifelse(is.na(conf$board_params$prefix), "", conf$board_params$prefix), "dpinput/"), bucket = conf$board_params$bucket_name, region = conf$board_params$region, access_key = aws_creds$key, From ce3c6d55dc47cce0b3cf089171d9c70596f3368a Mon Sep 17 00:00:00 2001 From: camorosi <50029049+camorosi@users.noreply.github.com> Date: Wed, 4 Feb 2026 16:33:30 -0800 Subject: [PATCH 4/5] Try to fix qs deprecation issue --- DESCRIPTION | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index adb32fb..fdc3e6c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -34,7 +34,8 @@ Suggests: Encoding: UTF-8 LazyData: true Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.2 +RoxygenNote: 7.3.3 Remotes: github::camorosi/pinsLabkey + github::qsbase/qs Config/testthat/edition: 3 From 23f8981fc1c91ded64aff466c158e1dd1e454c89 Mon Sep 17 00:00:00 2001 From: camorosi <50029049+camorosi@users.noreply.github.com> Date: Tue, 17 Feb 2026 15:27:51 -0800 Subject: [PATCH 5/5] Remove qs --- DESCRIPTION | 2 -- R/dp_deploy.R | 28 ++++++++++++++-------------- tests/testthat/test-dp_deploy.R | 16 ++++++++-------- 3 files changed, 22 insertions(+), 24 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index fdc3e6c..c029dc8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -28,7 +28,6 @@ Imports: yaml Suggests: covr, - qs, roxygen2, testthat (>= 3.0.0) Encoding: UTF-8 @@ -37,5 +36,4 @@ Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.3 Remotes: github::camorosi/pinsLabkey - github::qsbase/qs Config/testthat/edition: 3 diff --git a/R/dp_deploy.R b/R/dp_deploy.R index 08b295e..20130fa 100644 --- a/R/dp_deploy.R +++ b/R/dp_deploy.R @@ -45,24 +45,24 @@ detect_type = function(project_path){ #' @description read the output data object, for now only rds and qs are supported #' @noRd object_read <- function(project_path, type){ - type = rlang::arg_match0(type, c('rds', 'qs')) + type = rlang::arg_match0(type, c('rds')) #, 'qs')) switch(type, - rds = readRDS(file = glue::glue("{project_path}/output_files/RDS_format/data_object.RDS")), - qs = read_qs(project_path) + rds = readRDS(file = glue::glue("{project_path}/output_files/RDS_format/data_object.RDS")) #, + # qs = read_qs(project_path) ) } -#' @title Reas qs object -#' @description Read in qs object -#' @noRd -read_qs <- function(path){ - rlang::check_installed("qs") - dataobj_path <- glue::glue( - "{path}/", - "output_files/qs_format/data_object.qs" - ) - qs::qread(dataobj_path) -} +# #' @title Reas qs object +# #' @description Read in qs object +# #' @noRd +# read_qs <- function(path){ +# rlang::check_installed("qs") +# dataobj_path <- glue::glue( +# "{path}/", +# "output_files/qs_format/data_object.qs" +# ) +# qs::qread(dataobj_path) +# } #' The dp_deploy is a wrapper around this. diff --git a/tests/testthat/test-dp_deploy.R b/tests/testthat/test-dp_deploy.R index bacabab..865d38f 100644 --- a/tests/testthat/test-dp_deploy.R +++ b/tests/testthat/test-dp_deploy.R @@ -9,14 +9,14 @@ test_that("properly checks valid repository ", { test_that("object_read properly detects type", { - project_path = withr::local_tempfile() - path = file.path(project_path, "output_files/qs_format/") - dir.create(path, recursive = TRUE) - qs::qsave(structure(list(), class = "dp"), file = file.path(path, "data_object.qs")) - expect_equal( - detect_type(project_path), - 'qs' - ) + # project_path = withr::local_tempfile() + # path = file.path(project_path, "output_files/qs_format/") + # dir.create(path, recursive = TRUE) + # qs::qsave(structure(list(), class = "dp"), file = file.path(path, "data_object.qs")) + # expect_equal( + # detect_type(project_path), + # 'qs' + # ) project_path = withr::local_tempfile() path = file.path(project_path, "output_files/RDS_format/")