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

Extent executeWorkflow with a function to monitor progress #225

Closed eblondel closed 2 years ago

eblondel commented 2 years ago

The proposal is to have a parameter to which we could pass a function (with 2 parameters: value - percent, message - associated to the percent of completion) to monitor the progress of a workflow. Before implementing it, this should be discussed, in particular

1/ to know how to compute the percentage of completion of a workflow. They are several options, not necessarily exclusive (we could think of a "percent mode"):

2/ to know how to quantify percent of completion of local actions, ie:

percent is calculated on number of entities x number of actions (global + local)

3) arbitrary percent of completion to be set for initWorkflow (1%, 5%, 10% ??)

4) message that could be associated to each percent value; knowing that in a case of monitor that is Shiny oriented, we may want to display the percent of completion, but also some message associated, eg. Computing action '....' for entity '....'

To compute the percentage, the total number of steps of the workflow is required. One step would be a pair entity x action . Since entities, actions are prepared at initWorkflow, the total number of steps to be computed should be done in this function.

Each time a step of computation is done, we calculate the percent of completion.

In addition to the monitor function, which remains optional for the workflow, a systematic monitoring should be written as log. Other logging (such as dynamic console % display, could be tackled later, eg. pbapply)

please @juldebar , @wheintz , @abennici any comments?