Skip to content

Commit

Permalink
Doc fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dipterix committed May 21, 2024
1 parent 93b975f commit 6cca34b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: ravedash
Type: Package
Title: Dashboard System for Reproducible Visualization of 'iEEG'
Version: 0.1.3.27
Version: 0.1.3.28
Authors@R: c(
person("Zhengjia", "Wang", email = "dipterix.wang@gmail.com", role = c("aut", "cre", "cph"))
)
Expand Down
16 changes: 10 additions & 6 deletions R/core-app.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ ensure_template <- function(path, use_cache = TRUE){
#' @param update logical, whether to update to latest 'RAVE' template
#' @param session,x session identification string, or session object; use
#' \code{list_session} to list all existing sessions
#' @param path root path to store the sessions; default is the
#' @param path,app_root root path to store the sessions; default is the
#' \code{"tensor_temp_path"} in \code{\link[raveio]{raveio_getopt}}
#' @param host host 'IP' address, default is 'localhost'
#' @param port port to listen
Expand Down Expand Up @@ -74,6 +74,7 @@ ensure_template <- function(path, use_cache = TRUE){
#' with page title be the first element and logo text be the second.
#' @param sidebar_open whether to open the side-bar by default; default \code{TRUE}
#' when more than one module is to be displayed
#' @param dry_run whether to dry-run (do not launch) the 'RAVE' session
#' @param ...,.list named list of key-value pairs of session options. The
#' keys must be characters, and values must be simple data types (such as
#' numeric vectors, characters)
Expand Down Expand Up @@ -788,7 +789,8 @@ list_session <- function(path = session_root(), order = c("none", "ascend", "des
start_session <- function(
session, new = NA, modules = NULL, page_title = NULL, sidebar_open = TRUE,
host = "127.0.0.1", port = NULL, jupyter = NA, jupyter_port = NULL,
as_job = TRUE, launch_browser = TRUE, single_session = FALSE) {
as_job = TRUE, launch_browser = TRUE, single_session = FALSE,
app_root = NULL, dry_run = FALSE) {

if(!missing(session) && length(session)) {
if(isTRUE(new)) {
Expand All @@ -806,13 +808,13 @@ start_session <- function(
})
}
} else if(isTRUE(new)) {
session <- new_session()
session <- new_session(app_root = app_root)
} else {
# find existing session (most recent)
all_sessions <- list_session(order = "descend")
all_sessions <- list_session(order = "descend", path = app_root)
if(!length(all_sessions)) {
# start a new session
session <- new_session()
session <- new_session(app_root = app_root)
} else {
session <- all_sessions[[1]]

Expand All @@ -827,7 +829,7 @@ start_session <- function(
if( last_updated > session_created ) {
# RAVE dash just got updated
# start a new session
session <- new_session()
session <- new_session(app_root = app_root)
}
}
}, error = function(e){ NULL })
Expand All @@ -854,6 +856,7 @@ start_session <- function(
host = host,
port = port,
modules = modules,
dry_run = dry_run,
options = list(
jupyter = jupyter,
jupyter_port = jupyter_port,
Expand All @@ -878,6 +881,7 @@ start_session <- function(
host = host,
port = port,
modules = modules,
dry_run = dry_run,
options = list(
jupyter = jupyter,
jupyter_port = jupyter_port,
Expand Down
8 changes: 6 additions & 2 deletions man/rave-session.Rd

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

0 comments on commit 6cca34b

Please sign in to comment.