From a8af195f3109ea3fdd0df6927e01a2b92be91d97 Mon Sep 17 00:00:00 2001 From: eblondel Date: Tue, 18 Jun 2024 06:55:45 +0200 Subject: [PATCH] fix #391 --- R/debugWorkflow.R | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/R/debugWorkflow.R b/R/debugWorkflow.R index 1dc80b4..c48fe66 100644 --- a/R/debugWorkflow.R +++ b/R/debugWorkflow.R @@ -42,21 +42,6 @@ debugWorkflow <- function(file, dir = ".", entityIndex = 1, .geoflow$debug = list() .geoflow$debug$config = config - #entities - entities <- config$getEntities() - entity <- entities[[entityIndex]] - .geoflow$debug$entity <- entity - - #skipDataDownload - skipDataDownload = FALSE - if(!is.null(config$profile$options$skipFileDownload)){ - config$logger.warn("Global option 'skipFileDownload' is deprecated, use 'skipDataDownload instead!") - skipDataDownload = config$profile$options$skipFileDownload - } - skipDataDownload <- if(!is.null(config$profile$options$skipDataDownload)) config$profile$options$skipDataDownload else FALSE - skipEnrichWithData = if(!is.null(config$profile$options$skipEnrichWithData)) config$profile$options$skipEnrichWithData else FALSE - skipEnrichWithDatatypes = if(!is.null(config$profile$options$skipEnrichWithDatatypes)) config$profile$options$skipEnrichWithDatatypes else FALSE - #run software actions? if(runSoftwareActions){ #function to run software actions @@ -82,6 +67,25 @@ debugWorkflow <- function(file, dir = ".", entityIndex = 1, runSoftwareActions(config, "output", "onstart") } + #if raw mode we end here + if(config$profile$mode == "raw") return(.geoflow$debug) + + #skipDataDownload + skipDataDownload = FALSE + if(!is.null(config$profile$options$skipFileDownload)){ + config$logger.warn("Global option 'skipFileDownload' is deprecated, use 'skipDataDownload instead!") + skipDataDownload = config$profile$options$skipFileDownload + } + skipDataDownload <- if(!is.null(config$profile$options$skipDataDownload)) config$profile$options$skipDataDownload else FALSE + skipEnrichWithData = if(!is.null(config$profile$options$skipEnrichWithData)) config$profile$options$skipEnrichWithData else FALSE + skipEnrichWithDatatypes = if(!is.null(config$profile$options$skipEnrichWithDatatypes)) config$profile$options$skipEnrichWithDatatypes else FALSE + + + #entities + entities <- config$getEntities() + entity <- entities[[entityIndex]] + .geoflow$debug$entity <- entity + #create entity jobdir jobdir = config$job entity$prepareEntityJobDir(config, jobdir)