code cleansing

This commit is contained in:
Florian Förster 2026-01-29 14:08:16 +01:00
parent 4b31142d13
commit 80aea577d8

View File

@ -566,11 +566,7 @@ class PipelineResult:
self,
data: pl.DataFrame,
) -> None:
print(self._results)
res = pl.concat([self._results, data])
# self._results = res.with_columns(
# (pl.arange(0, res.height) + 1).alias("ID").cast(db.results_schema_map["ID"])
# )
self._results = res
def merge_pipeline(
@ -687,59 +683,6 @@ def get_expr_order_qty(
return func
# post-processing the results
# TODO: order quantity not always necessary
# TODO: change relevant criterion for order quantity
# def _write_results(
# pipe_result: PipelineResult,
# data: pl.DataFrame,
# vorlage: bool,
# wf_id: int,
# freigabe_auto: types.Freigabe,
# is_out: bool,
# ) -> PipelineResult:
# ORDER_QTY_CRIT: typing.Final[str] = "BEDP_MENGE_BEDARF_VM"
# results = data.rename(db.map_to_result)
# order_qty_expr: pl.Expr
# if is_out:
# order_qty_expr = (
# pl.lit(0)
# .alias("ORDER_QTY_CRIT")
# .alias("best_menge")
# .cast(db.results_schema_map["best_menge"])
# )
# else:
# order_qty_expr = pl.col(ORDER_QTY_CRIT).alias("best_menge")
# results = results.with_columns(
# [
# pl.lit(vorlage).alias("vorlage").cast(db.results_schema_map["vorlage"]),
# pl.lit(wf_id).alias("wf_id").cast(db.results_schema_map["wf_id"]),
# order_qty_expr,
# pl.lit(freigabe_auto.value)
# .alias("freigabe_auto")
# .cast(db.results_schema_map["freigabe_auto"]),
# ]
# )
# results = results.drop(
# [
# "BEDP_TITELNR",
# "BEDP_MAN",
# "BEDP_MENGE_BEDARF_VM",
# "MELDENUMMER",
# "VERLAGSNR",
# "MENGE_VORMERKER",
# "MANDFUEHR",
# ]
# )
# pipe_result.subtract_from_open(data)
# pipe_result.add_results(results)
# return pipe_result
def wf900(
pipe_result: PipelineResult,
) -> PipelineResult:
@ -1207,7 +1150,7 @@ wf_200_start_data
# %%
engine.dispose()
# %%
relevant_mnr: tuple[int, ...] = (17, 18)