Package 'AnVILPublish'

Title: Publish Packages and Other Resources to AnVIL Workspaces
Description: Use this package to create or update AnVIL workspaces from resources such as R / Bioconductor packages. The metadata about the package (e.g., select information from the package DESCRIPTION file and from vignette YAML headings) are used to populate the 'DASHBOARD'. Vignettes are translated to python notebooks ready for evaluation in AnVIL.
Authors: Marcel Ramos [aut, cre] (ORCID: <https://orcid.org/0000-0002-3242-0582>), Martin Morgan [aut] (ORCID: <https://orcid.org/0000-0002-5874-8148>), Kayla Interdonato [aut], Vincent Carey [ctb] (ORCID: <https://orcid.org/0000-0003-4046-0063>), NHGRI [fnd] (GrantNo.: U24HG010263)
Maintainer: Marcel Ramos <[email protected]>
License: Artistic-2.0
Version: 1.23.5
Built: 2026-05-30 09:43:53 UTC
Source: https://github.com/bioc/AnVILPublish

Help Index


Add Bioconductor_User group to workspace access

Description

add_access() adds the Bioconductor_User group to a workspace with READER permissions. Users gain access to the workspace (and others) by being added to the Bioconductor_User group.

Usage

add_access(namespace, name, dry.run = FALSE)

Arguments

namespace

character(1) namespace (billing account) under which the workspace belongs.

name

character(1) name of the workspace to add access credentials.

dry.run

logical(1) When TRUE, no changes are made to the workspace ACL. A message is printed describing what would have been done.

Value

add_access() returns TRUE, invisibly.

Examples

add_access("landmarkanvil2", "Bioconductor-Package-AnVILHCAR", TRUE)

Render vignettes as .ipynb notebooks

Description

as_notebook() renders Rmarkdown (.Rmd) or Quarto (.qmd) vignettes as Juptyer (.ipynb) notebooks. The vignettes and notebooks are updated in an AnVIL workspace.

Usage

as_notebook(
  rmd_paths,
  namespace,
  name,
  update = FALSE,
  type = c("ipynb", "rmd", "both"),
  quarto = c("render", "convert"),
  dry.run = FALSE
)

Arguments

rmd_paths

character() paths to Rmd or Qmd files.

namespace

character(1) AnVIL namespace (billing project) to be used.

name

character(1) AnVIL workspace name.

update

logical(1) Update (over-write any similarly named notebooks) an existing workspace? The default (FALSE) creates notebooks locally, e.g., for previewing via ⁠jupyter notebook *ipynb⁠.

type

character(1) The type of notebook to be copied to the workspace. Must be on of ipynb, rmd, or both. ipynb copies only the Jupyter notebook. rmd copies Rmarkdown and Quarto vignettes. both copies both notebooks and vignettes.

quarto

character(1) Method to convert vignettes to .ipynb. Either "render" (runs ⁠quarto render --to ipynb⁠) or "convert" (runs ⁠quarto convert⁠). Note that the quarto CLI must be installed.

dry.run

logical(1) When TRUE, notebooks are created locally but no files are copied to the workspace. Use this to preview the conversion without modifying the workspace.

Details

See the vignette "Publishing R / Bioconductor Packages To AnVIL Workspaces" for details on the conversion process; best results are obtained when the quarto command line interface (CLI) is available.

Value

as_notebook() returns the paths to the local (if update = FALSE or dry.run = TRUE) or the workspace notebooks.

Examples

exampleRmd <-
    system.file("extdata", "example.Rmd", package = "AnVILPublish")
as_notebook(
    exampleRmd,
    "landmarkanvil2",
    "Bioconductor-Package-AnVILHCAR",
    dry.run = TRUE
)

Render R packages as AnVIL workspaces

Description

as_workspace() renders a package source tree (e.g., from a git checkout) as an AnVIL workspace.

Usage

as_workspace(
  path,
  namespace,
  name = NULL,
  create = FALSE,
  update = FALSE,
  use_readme = FALSE,
  type = c("ipynb", "rmd", "both"),
  quarto = c("render", "convert"),
  dry.run = FALSE
)

Arguments

path

character(1) path to the location of the package source code.

namespace

character(1) AnVIL namespace (billing project) to be used.

name

character(1) AnVIL workspace name.

create

logical(1) Create a new project?

update

logical(1) Update (over-write the existing DASHBOARD and any similarly named notebooks) an existing workspace? If neither create nor update is TRUE, the code to create a workspace is run but no output generated; this can be useful during debugging.

use_readme

logical(1) Defaults to FALSE; if TRUE the content of README.md in package top-level folder is used with the package DESCRIPTION version and provenance metadata for rendering in the workspace 'DASHBOARD'.

type

character(1) The type of notebook to be copied to the workspace. Must be on of ipynb, rmd, or both. ipynb copies only the Jupyter notebook. rmd copies Rmarkdown and Quarto vignettes. both copies both notebooks and vignettes.

quarto

character(1) Method to convert vignettes to .ipynb. Either "render" (runs ⁠quarto render --to ipynb⁠) or "convert" (runs ⁠quarto convert⁠). Note that the quarto CLI must be installed.

dry.run

logical(1) When TRUE, all local processing (dashboard rendering, notebook conversion) is performed but no changes are pushed to the workspace. Overrides create and update. Use this to preview results without modifying AnVIL.

Details

Information from the DESCRIPTION file and Rmd YAML are used to populate the 'DASHBOARD' tab. See ?as_notebook() for details on how vignettes are processed to notebooks.

Value

as_workspace() returns the URL of the updated workspace, invisibly.

Examples

as_workspace(
    path = "../AnVILPublish",
    namespace = "landmarkanvil2",
    name = "Bioconductor-Package-AnVILHCAR",
    dry.run = TRUE
)

Create an AnVIL Workspace

Description

Call the Terra() API to create a new AnVIL workspace. This is a helper function for as_workspace(), but can be used directly if you want to create a workspace without populating it with content from an R package. This is typically used by developers who want to create a workspace and then run other functions to populate it with content, e.g., importing data into the workspace.

Usage

create_workspace(namespace, name)

Arguments

namespace

character(1) AnVIL namespace (billing project) to be used.

name

character(1) AnVIL workspace name.

Value

create_workspace() returns TRUE invisibly if the workspace was created successfully; otherwise, an error is raised.

Examples

create_workspace("my-namespace", "my-workspace")