avworkspace: Workspace management

View source: R/avworkspace.R

avworkspaceR Documentation

Workspace management

Description

avworkspaces() returns a tibble with available workspaces.

avworkspace_namespace() and avworkspace_name() are utiliity functions to retrieve workspace namespace and name from environment variables or interfaces usually available in AnVIL notebooks or RStudio sessions. avworkspace() provides a convenient way to specify workspace namespace and name in a single command.

avworkspace_clone() clones (copies) an existing workspace, possibly into a new namespace (billing account).

Usage

avworkspaces()

avworkspace_namespace(namespace = NULL, warn = TRUE)

avworkspace_name(name = NULL, warn = TRUE)

avworkspace(workspace = NULL)

avworkspace_clone(
  namespace = avworkspace_namespace(),
  name = avworkspace_name(),
  to_namespace = namespace,
  to_name,
  bucket_location = "US"
)

Arguments

namespace

character(1) AnVIL workspace namespace as returned by, e.g., avworkspace_namespace()

warn

logical(1) when TRUE (default), generate a warning when the workspace namespace or name cannot be determined.

name

character(1) AnVIL workspace name as returned by, eg., avworkspace_name().

workspace

when present, a character(1) providing the concatenated namespace and name, e.g., "bioconductor-rpci-anvil/Bioconductor-Package-AnVIL"

to_namespace

character(1) workspace (billing account) in which to make the clone.

to_name

character(1) name of the cloned workspace.

bucket_location

character(1) region (NO multi-region, except the default) in which bucket attached to the workspace should be created.

Details

avworkspace_namespace() is the billing account. If the ⁠namespace=⁠ argument is not provided, try gcloud_project(), and if that fails try Sys.getenv("WORKSPACE_NAMESPACE").

avworkspace_name() is the name of the workspace as it appears in https://app.terra.bio/#workspaces. If not provided, avworkspace_name() tries to use Sys.getenv("WORKSPACE_NAME").

Namespace and name values are cached across sessions, so explicitly providing ⁠avworkspace_name*()⁠ is required at most once per session. Revert to system settings with arguments NA.

Value

avworkspaces() returns a tibble with columns including the name, last modification time, namespace, and owner status.

avworkspace_namespace(), and avworkspace_name() return character(1) identifiers. avworkspace() returns the character(1) concatenated namespace and name. The value returned by avworkspace_name() will be percent-encoded (e.g., spaces " " replaced by "%20").

avworkspace_clone() returns the namespace and name, in the format namespace/name, of the cloned workspace.

Examples

avworkspace_namespace()
avworkspace_name()
avworkspace()


Bioconductor/AnVIL documentation built on April 12, 2024, 6:41 p.m.