workflow#

pyleem.workflow.resolve_path(path, root)[source]#

Resolve a path against the root directory.

pyleem.workflow.get_reader_paths(reader_content, root)[source]#

Return reader paths resolved against the workflow root.

pyleem.workflow.get_metadata_list(reader_content, length)[source]#

Return the metadata list from the reader content.

Allow configuration to apply the same metadata to all readers. The individual reader metadata overrides the overall metadata. The behavior is allowed but not recommended.

class pyleem.workflow.Workflow(config=None, root=None, **kwargs)[source]#

Bases: object

Build and run analyzers from Config content.

The workflow requires the analyzer to always take readers, roi, and allows additional kwargs.

The workflow only runs the analyze method of the analyzer. If the result contains content that are not pickleable, the analyzer should specify the result keys to save.

build_readers()[source]#

Resolve path and build readers.

build_roi()[source]#

Build the ROI from the configuration.

build_analyzer()[source]#

Build the analyzer from the configuration.

run(**parameters)[source]#

Run the workflow.

get_saved_result(result)[source]#

Return the result content that should be stored in Config.

save(path)[source]#

Export the workflow to a configuration file.