From 326b3a0a9710120b55e5ed726dde13a4096a6e7c Mon Sep 17 00:00:00 2001 From: Mossa Date: Fri, 27 Feb 2026 08:19:27 +0100 Subject: [PATCH 1/3] wp: spec get --- spec/get.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 spec/get.md diff --git a/spec/get.md b/spec/get.md new file mode 100644 index 0000000..953d67f --- /dev/null +++ b/spec/get.md @@ -0,0 +1,29 @@ +# get / `dvs get` / `dvs::dvs_get` + +## CLI + +The option to return `--json` must be present. + +```shell +$ dvs get [OPTIONS] --help + +Paths: + Optional list of files to retrieve from storage. If missing, then all files + are retrieved, analogous to `dvs sync` + +Options: + --json Outputs are emitted in a JSON format + --glob Specify a glob expression for which tracked datafiles to retrieve + --help, -h +``` + +## R + +Signature: + +```r +dvs_get <- function( + files = character(), + glob = character(), +) +``` From 87ff5fd513d5f3094eec34221c5b9fa4c7d7ac1a Mon Sep 17 00:00:00 2001 From: Mossa Date: Fri, 27 Feb 2026 09:00:41 +0100 Subject: [PATCH 2/3] timeout concern --- spec/get.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/spec/get.md b/spec/get.md index 953d67f..17bcd10 100644 --- a/spec/get.md +++ b/spec/get.md @@ -22,8 +22,22 @@ Options: Signature: ```r +#' @param files,glob provide a list of files to sync from backend, either explicitly `files` or via glob expression `glob`. +#' @param progress provide a progress bar +#' @param parallel control number of threads to use, `FALSE`/`0`, while `TRUE` implies at most 16 threads, or provide non-zero integer for more. dvs_get <- function( files = character(), glob = character(), + progress = FALSE, + parallel = TRUE ) ``` + +## Initial release concerns + +### Timeout / cancellation + +In case of retrieving large amount of data (either a lot of files, or big files, or both) the user may cancel the operation via `Ctrl+C`, or a connection can timeout, or similar. The `get` command ought to be able to continue from elapsed progress, and it should tell the user, that indeed, +it is resuming a previous retrieval. + + From 476ab918744b54dd62b26f65c18c4960c71c2c53 Mon Sep 17 00:00:00 2001 From: Mossa Date: Fri, 27 Feb 2026 13:23:34 +0100 Subject: [PATCH 3/3] added detail about files vs. directories --- spec/get.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/get.md b/spec/get.md index 17bcd10..36d26b8 100644 --- a/spec/get.md +++ b/spec/get.md @@ -8,25 +8,27 @@ The option to return `--json` must be present. $ dvs get [OPTIONS] --help Paths: - Optional list of files to retrieve from storage. If missing, then all files + Optional list of files or directories to retrieve from storage. If missing, then all files are retrieved, analogous to `dvs sync` Options: --json Outputs are emitted in a JSON format - --glob Specify a glob expression for which tracked datafiles to retrieve + --glob Specify a glob expression for which tracked datafiles and/or directories to retrieve --help, -h ``` +`dvs get` shall accept directories as arguments, unlike `dvs add`, the activity of syncing a complete directory is within expected user workflow, while adding directories can be done unintentionally, and have ramifications on the coherence of the dvs backend/storage. + ## R Signature: ```r -#' @param files,glob provide a list of files to sync from backend, either explicitly `files` or via glob expression `glob`. +#' @param paths,glob provide a list of files to sync from backend, either explicitly `files` or via glob expression `glob`. #' @param progress provide a progress bar #' @param parallel control number of threads to use, `FALSE`/`0`, while `TRUE` implies at most 16 threads, or provide non-zero integer for more. dvs_get <- function( - files = character(), + paths = character(), glob = character(), progress = FALSE, parallel = TRUE @@ -39,5 +41,3 @@ dvs_get <- function( In case of retrieving large amount of data (either a lot of files, or big files, or both) the user may cancel the operation via `Ctrl+C`, or a connection can timeout, or similar. The `get` command ought to be able to continue from elapsed progress, and it should tell the user, that indeed, it is resuming a previous retrieval. - -