r-geoflow / geoflow

Tools to Orchestrate Geospatial (Meta)Data Management Workflows and Manage FAIR Services
https://github.com/r-geoflow/geoflow/wiki
Other
41 stars 14 forks source link

Refactor geoflow action fun args #262

Closed eblondel closed 1 year ago

eblondel commented 2 years ago

Relates to #261 This is the current status regarding the way actions can be interfaced:

my_fun <- function(entity, config, options){}

where my_fun should be the action id.

This is highly criticizable and not really convenient for the user, for multiple reasons detailed below:

Hence, any action (global embedded, global custom, local) will have to be designed within a function interface as follows:

function(action, entity, config){

   opts <- action$options
   ....
}

In addition, for global embedded actions, an attempt will be made to create a separate folder 'actions' under the 'inst' folder

@abennici @juldebar @wheintz if you have any questions, feel free. I will anyway assist you in changes where needed

bastienird commented 2 years ago

Are the global custom actions not concerned by this update ? As it still mandatory to have an "options" argument in the function ? (Line 517 of geoflow::initWorkflow https://github.com/eblondel/geoflow/blob/master/R/initWorkflow.R)

eblondel commented 2 years ago

All actions should be concerned by this code refactoring/harmonization