From ac0d22a9b2608f82a6e050607868dff2234e1d9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20F=C3=B6rster?= Date: Wed, 12 Mar 2025 17:57:51 +0100 Subject: [PATCH] interface pipeline forecast for C# calls --- src/delta_barth/pipelines.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/delta_barth/pipelines.py b/src/delta_barth/pipelines.py index e69de29..4dafe38 100644 --- a/src/delta_barth/pipelines.py +++ b/src/delta_barth/pipelines.py @@ -0,0 +1,15 @@ +"""collection of configured data pipelines, intended to be invoked from C#""" + +from datetime import datetime as Datetime + +from delta_barth.analysis import forecast +from delta_barth.management import SESSION + + +def pipeline_sales_forecast( + company_id: int | None, + start_date: Datetime | None, +) -> str: + result = forecast.pipeline(SESSION, company_id=company_id, start_date=start_date) + + return result.model_dump_json()