sampo.userinput.parser.general_build#
Overview#
|
Eliminate all cycles in received work graph. Algo breaks cycle by removing edge with the lowest weight |
|
- |
|
- |
|
- |
|
Sort DataFrame of works in topological order |
|
- |
|
- |
- |
|
- |
Classes#
Functions#
- sampo.userinput.parser.general_build.break_loops_in_input_graph(works_info: pandas.DataFrame) pandas.DataFrame#
Eliminate all cycles in received work graph. Algo breaks cycle by removing edge with the lowest weight (e.x. frequency of occurrence of the link in historical data).
- Parameters:
works_info – given work info
- Returns:
work info without cycles
- sampo.userinput.parser.general_build.fix_df_column_with_arrays(column: pandas.Series, cast: Callable[[str], Any] | None = str, none_elem: Any | None = NONE_ELEM) pandas.Series#
- sampo.userinput.parser.general_build.preprocess_graph_df(frame: pandas.DataFrame) pandas.DataFrame#
- sampo.userinput.parser.general_build.add_graph_info(frame: pandas.DataFrame) pandas.DataFrame#
- sampo.userinput.parser.general_build.topsort_graph_df(frame: pandas.DataFrame) pandas.DataFrame#
Sort DataFrame of works in topological order
- Parameters:
frame – DataFrame of works
- Returns:
topologically sorted DataFrame
- sampo.userinput.parser.general_build.build_work_graph(frame: pandas.DataFrame, resource_names: list[str]) sampo.schemas.graph.WorkGraph#
- sampo.userinput.parser.general_build.get_graph_contractors(path: str, contractor_name: str | None = 'ООО "***"')#
Attributes#
- sampo.userinput.parser.general_build.UNKNOWN_CONN_TYPE = 0#
- sampo.userinput.parser.general_build.NONE_ELEM = '-1'#