Skip to content

Commit

Permalink
improve software/setParameters
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Nov 26, 2024
1 parent d7427f7 commit 6f3797c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions R/geoflow_software.R
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,8 @@ geoflow_software <- R6Class("geoflow_software",
},

#'@description Set properties. Function to call to pass argument values for a given \code{geoflow_software}
#'@param ... named list of properties
setProperties = function(...){
props <- list(...)[[1]]
#'@param props named list of properties
setProperties = function(props){
propNames <- names(props)
if(length(propNames)>0){
for(propName in propNames){
Expand All @@ -144,9 +143,8 @@ geoflow_software <- R6Class("geoflow_software",
},

#'@description Set parameters. Function to call to pass argument values for a given \code{geoflow_software}
#'@param ... named list of parameters
setParameters = function(...){
params <- list(...)[[1]]
#'@param params named list of parameters
setParameters = function(params){
paramNames <- names(params)
if(length(paramNames)>0){
for(paramName in paramNames){
Expand Down
2 changes: 1 addition & 1 deletion R/initWorkflow.R
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ initWorkflow <- function(file, dir = ".", jobDirPath = NULL, handleMetadata = TR
config$logger.info(sprintf("Configuring %s software '%s' (%s)", software$type, software$id, software$software_type))
target_software$setId(software$id)
target_software$setType(software$type)
if(!is.null(software$parameters)) target_software$setParameters(unlist(software$parameters))
if(!is.null(software$parameters)) target_software$setParameters(software$parameters)

#check software dependencies
target_software$checkPackages()
Expand Down

0 comments on commit 6f3797c

Please sign in to comment.