Skip to content

Merge Flow call functions #42

@jbrezmorf

Description

@jbrezmorf

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)

    1. check existence of files (possibly use search_file)
  • flow_call_wit_check

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions