work_products

File Work Product

This is an implementation of a file work product. It can be used as an input/output type of a Task.

class mosaic_orchestrator.work_products.WPDirectory(path: Optional[str] = None)[source]

A WorkProduct representing a directory

class mosaic_orchestrator.work_products.WPEntry(path: Optional[str] = None)[source]

Common base class for Files and directories since they are handled the same.

calc_hash(task) str[source]

Get a new hash of this work product. Needed to check if the input inputs have changed

path: str = None
class mosaic_orchestrator.work_products.WPFile(path: Optional[str] = None)[source]

A WorkProduct representing a file

ascii_content() str[source]

Get the ascii content of a file in a quick way

Returns:

Content of the file

Return type:

str

open(mode='r')[source]
class mosaic_orchestrator.work_products.WorkProduct[source]

A WorkProduct is an input or output to a Task. Ideally, all results (return value of the run() method) should implement this protocol. Then the validity of the results can be checked automatically.

abstract calc_hash(task) str[source]

Get a new hash of this work product. Needed to check if the input inputs have changed