We want reduce duplicities between
common/flow_call.py and bayes_orig/flow123d_simulation.py
Functionalities of flow123d_simulation.py:call_flow(...):
- call 'env -i' to clean environment, should be optional
- calculation skipping logic (parameter 'result_files') out of call_flow
- merge logic detecting successful calculation:
success if: zero return code and requested_files exist (optional parameter)
Proposed functions:
-
'env -i' move to 'cfg/flow_executable' list
-
flow_call(workdir, executable_list, input_template, params={})
.. corresponding to _prepare_inputs + _flow_subprocess
(params are optional, cfg have specific dataclass)
vraci stdout, stderr, ProcessResult
-
output dir only with default name, every flow call in separate directory
-
stdout, stderr without filebase ... common filename
-
flow_check(stdout, stderr, ProcessResult, result_files:List(Path)=[], timeout=0)
- check existence of files (possibly use search_file)
-
flow_call_wit_check
We want reduce duplicities between
common/flow_call.pyandbayes_orig/flow123d_simulation.pyFunctionalities of flow123d_simulation.py:call_flow(...):
success if: zero return code and requested_files exist (optional parameter)
Proposed functions:
'env -i' move to 'cfg/flow_executable' list
flow_call(workdir, executable_list, input_template, params={})
.. corresponding to _prepare_inputs + _flow_subprocess
(params are optional, cfg have specific dataclass)
vraci stdout, stderr, ProcessResult
output dir only with default name, every flow call in separate directory
stdout, stderr without filebase ... common filename
flow_check(stdout, stderr, ProcessResult, result_files:List(Path)=[], timeout=0)
flow_call_wit_check