avnotebooks: Notebook management

View source: R/avnotebooks.R

avnotebooksR Documentation

Notebook management

Description

avnotebooks() returns the names of the notebooks associated with the current workspace.

avnotebooks_localize() synchronizes the content of the workspace bucket to the local file system.

avnotebooks_delocalize() synchronizes the content of the notebook location of the local file system to the workspace bucket.

Usage

avnotebooks(
  local = FALSE,
  namespace = avworkspace_namespace(),
  name = avworkspace_name()
)

avnotebooks_localize(
  destination,
  namespace = avworkspace_namespace(),
  name = avworkspace_name(),
  dry = TRUE
)

avnotebooks_delocalize(
  source,
  namespace = avworkspace_namespace(),
  name = avworkspace_name(),
  dry = TRUE
)

Arguments

local

= logical(1) notebooks located on the workspace (local = FALSE, default) or runtime / local instance (local = TRUE). When local = TRUE, the notebook path is ⁠<avworkspace_name>/notebooks⁠.

namespace

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

name

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

destination

missing or character(1) file path to the local file system directory for synchronization. The default location is ⁠~/<avworkspace_name>/notebooks⁠. Out-of-date local files are replaced with the workspace version.

dry

logical(1), when TRUE (default), return the consequences of the operation without actually performing the operation.

source

missing or character(1) file path to the local file system directory for synchronization. The default location is ⁠~/<avworkspace_name>/notebooks⁠. Out-of-date local files are replaced with the workspace version.

Value

avnotebooks() returns a character vector of buckets / files located in the workspace 'Files/notebooks' bucket path, or on the local file system.

avnotebooks_localize() returns the exit status of gsutil_rsync().

avnotebooks_delocalize() returns the exit status of gsutil_rsync().

Examples

if (gcloud_exists() && nzchar(avworkspace_name()))
    avnotebooks()

if (gcloud_exists() && nzchar(avworkspace_name()))
    avnotebooks_localize()  # dry run

if (gcloud_exists() && nzchar(avworkspace_name()))
    try(avnotebooks_delocalize())  # dry run, fails if no local resource


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