-
Notifications
You must be signed in to change notification settings - Fork 0
Initial spec: get #56
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| # get / `dvs get` / `dvs::dvs_get` | ||
|
|
||
| ## CLI | ||
|
|
||
| The option to return `--json` must be present. | ||
|
|
||
| ```shell | ||
| $ dvs get <PATHS> [OPTIONS] --help | ||
|
|
||
| Paths: | ||
| 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 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 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( | ||
| paths = character(), | ||
| glob = character(), | ||
| progress = FALSE, | ||
| parallel = TRUE | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i don't like operator overloading in general - its confusing/ambiguous as to what to pass, i also think in general users shouldn't need to think about this that often. It is important that its tuneable, but its an edge case that a user should think about it. Similar to data table threads or vroom number of cpus. eg |
||
| ) | ||
| ``` | ||
|
|
||
| ## 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. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this not part of the shell spec? will this not be a bit more complicated to implement if this is happening in rust land where its harder?? to tick a progress bar?