tests/test_conda.R

library("stanza")

writeLines("Test conda")

#
# testing_levels = c("minimal" = 1L, default" = 2L, "download" = 3L, "install" = 4L, "all" = 5L)
#
CLEANUP <- as.logical(Sys.getenv("STANZA_TEST_CLEANUP", FALSE))
if ((stanza_options("testing_level") >= 3L) && CLEANUP) {
    writeLines("- cleanup previous stanza installations")
    library("reticulate")
    envs <- grep("stanza", conda_list()$name, value = TRUE)
    for (stanza_env in envs) {
        conda_remove(stanza_env)
    }
}


if (stanza_options("testing_level") >= 4L) {
    writeLines("- Install stanza")
    conda_install_stanza()
}

Try the stanza package in your browser

Any scripts or data that you put into this service are public.

stanza documentation built on June 8, 2025, 1:23 p.m.