From 3011ca46cdcca35d5d16689b278033c1a80023e5 Mon Sep 17 00:00:00 2001 From: foefl Date: Wed, 7 May 2025 09:16:11 +0200 Subject: [PATCH] hint for insertion of date plausibility check, related to #31 --- pyproject.toml | 4 ++-- src/delta_barth/analysis/forecast.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1b86ef6..6cf6130 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "delta-barth" -version = "0.5.9" +version = "0.5.10dev1" description = "workflows and pipelines for the Python-based Plugin of Delta Barth's ERP system" authors = [ {name = "Florian Förster", email = "f.foerster@d-opt.com"}, @@ -74,7 +74,7 @@ directory = "reports/coverage" [tool.bumpversion] -current_version = "0.5.9" +current_version = "0.5.10dev1" parse = """(?x) (?P0|[1-9]\\d*)\\. (?P0|[1-9]\\d*)\\. diff --git a/src/delta_barth/analysis/forecast.py b/src/delta_barth/analysis/forecast.py index 000a07b..5262261 100644 --- a/src/delta_barth/analysis/forecast.py +++ b/src/delta_barth/analysis/forecast.py @@ -192,6 +192,9 @@ def _process_sales( DATE_FEAT: Final[str] = "buchungs_datum" SALES_FEAT: Final[str] = "betrag" + + # TODO: add pre-filter to filter out non-relevant dates, see issue #31 + df_filter = data[(data["betrag"] > 0)] df_cust = df_filter.copy() df_cust = df_cust.sort_values(by=DATE_FEAT).reset_index()