Skip to content
Snippets Groups Projects
Unverified Commit 23cea096 authored by Todor Kondic's avatar Todor Kondic
Browse files

api, mix, shiny-ui-base: Adapt to new state and conf creation

parent b6a39ad0
No related branches found
No related tags found
No related merge requests found
......@@ -15,13 +15,11 @@
##' @export
run <- function(fn_conf) {
conf <- read_conf(fn_conf)
dir.create(conf$project,
m <- new_state(fn_conf=fn_conf,
GUI=F)
dir.create(m$conf$project,
showWarnings = F,
recursive = T)
m <- new_state(conf=conf,
GUI=F)
m <- withr::with_dir(new=conf$project,code = run_in_dir(m))
return(invisible(m))
}
......
......@@ -698,7 +698,6 @@ write_state <- function(m,fn_conf) {
tab2file(tab=m$input$tab$mzml,file=file.path(m$conf$project,FN_DATA_TAB))
}
new_state <- function(conf,GUI) {
read_conf <- function(fn) {
cf <- yaml::yaml.load_file(fn)
fnl <- cf$compound$lists
......
......@@ -103,7 +103,9 @@ list2rev <- function(lst) {
new_rv_state <- function(project) {
p <- normalizePath(path=project,winslash = '/')
x <- react_v(m=list2rev(new_state(list(project=p,data=""),GUI=T)))
nc <- new_conf()
nc$project <- project
x <- react_v(m=list2rev(new_state(conf=nc,GUI=T)))
x
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment