laborchestrator.pythonlab_reader module¶
Contains an implementation of ProcessReader for PythonLab processes
- class laborchestrator.pythonlab_reader.PythonLabReader[source]¶
Bases:
ProcessReader- _abc_impl = <_abc._abc_data object>¶
- static find_origin(idx, data: Dict[str, Any], topo_sort: List[str], g: DiGraph) UsedDevice | None[source]¶
- static get_available_processes(file_dir: str) List[Any][source]¶
Searches a directory for available process descriptions. :param file_dir: :return: A list containing all found process descriptions (in their native language).
- static preprocess_wfg(plp: PLProcess)[source]¶
Some regularisation, translation of priorities into waiting costs and filling of missing values.
- static read_jobs(g: DiGraph)[source]¶
Extracts all information on jobs in a workflow. The attributes of the jobs are assumed to be in the data-dictionary which networkx provides for each node.
- Parameters:
g – The graph containing the whole workflow
- Returns:
A list of all jobs described in the graph
- static read_process(process: PLProcess | None = None, file_path: str | None = None, name: str | None = None, src=None, **kwargs) SMProcess[source]¶
The main function. It takes a PythonLabProcess and derives a SMProcess from it. The Information is stored in Job and ContainerInfo classes from the structures-module.