Skip to content

Commit

Permalink
docs and messages
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau committed Feb 4, 2025
1 parent 2b8bf2c commit f2e89bc
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 5 deletions.
15 changes: 14 additions & 1 deletion R/class_workspace.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,20 @@ workspace_save <- function(workspace, path_store) {
workspace_read <- function(name, path_store) {
path <- path_workspace(path_store = path_store, name = name)
tar_assert_store(store = path_store)
tar_assert_path(path, paste0("no workspace found for target ", name, "."))
tar_assert_path(
path,
paste0(
"no workspace found for target ",
name,
". If your pipeline uses cloud storage, you may need to run ",
"tar_workspace_download(",
name,
") first to download the workspace locally, ",
"then try tar_workspace(",
name,
") again."
)
)
readRDS(path)
}

Expand Down
5 changes: 4 additions & 1 deletion R/tar_option_set.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
#' `repository` but excluding content-addressable storage
#' (`"aws"`, `"gcp"`, `"local"`). Cloud repository
#' for the metadata text files in `_targets/meta/`, including target
#' metadata and progress data. Defaults to `tar_option_get("repository")`
#' metadata and progress data.
#' Also enables cloud backup of workspace files in `_targets/workspaces/`
#' which can be downloaded with [tar_workspace_download()].
#' `repository_meta` defaults to `tar_option_get("repository")`
#' except in the case of content-addressable storage (CAS).
#' When `tar_option_get("repository")` is a CAS repository,
#' the default value of `repository_meta` is `"local"`.
Expand Down
2 changes: 1 addition & 1 deletion R/tar_workspace_download.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#' )
#' f <- function() stop("this is an error and thus triggers a workspace")
#' list(
#' tar_target(x, f()),
#' tar_target(x, f())
#' )
#' }, ask = FALSE)
#' # The following code throws an error for demonstration purposes.
Expand Down
5 changes: 4 additions & 1 deletion man/tar_option_set.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/tar_workspace_download.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions targets.Rproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Version: 1.0
ProjectId: 45c326ed-3afb-44d4-9b50-07ada6a2e80e

RestoreWorkspace: Default
SaveWorkspace: Default
Expand Down

0 comments on commit f2e89bc

Please sign in to comment.