From 80aea577d8e3b4584a2f1271bc456b286af40fa4 Mon Sep 17 00:00:00 2001 From: foefl Date: Thu, 29 Jan 2026 14:08:16 +0100 Subject: [PATCH] code cleansing --- data_analysis/02-3_oracle_workflow_test.py | 59 +--------------------- 1 file changed, 1 insertion(+), 58 deletions(-) diff --git a/data_analysis/02-3_oracle_workflow_test.py b/data_analysis/02-3_oracle_workflow_test.py index c29e68c..cc4c4a4 100644 --- a/data_analysis/02-3_oracle_workflow_test.py +++ b/data_analysis/02-3_oracle_workflow_test.py @@ -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)