chore: e2e is done with new pipeline

This commit is contained in:
2025-11-28 18:52:05 +01:00
parent c8a69f0e3b
commit d0d18927cf
3 changed files with 91 additions and 10 deletions

View File

@@ -26,8 +26,12 @@ class ElasticityBasedPricer(PricingFunction):
raise ValueError("historical_data must contain 'elasticity' column")
self.elasticity = historical_data['elasticity'].values
self.base_prices = historical_data.get('base_price', np.ones(len(historical_data)) * 100).values
self.mean_demand = historical_data.get('mean_demand', np.ones(len(historical_data)) * 10).values
self.base_prices = (historical_data['base_price'].values
if 'base_price' in historical_data.columns
else np.ones(len(historical_data)) * 100)
self.mean_demand = (historical_data['mean_demand'].values
if 'mean_demand' in historical_data.columns
else np.ones(len(historical_data)) * 10)
return self
def predict(self, state_space) -> np.ndarray:

View File

@@ -4,6 +4,7 @@ import requests
from typing import List
from supabase import create_client, Client
from procesing.providers.base import DataProvider
from dotenv import load_dotenv
class SupabaseProvider(DataProvider):
"""Concrete Supabase + backend API implementation"""
@@ -11,6 +12,7 @@ class SupabaseProvider(DataProvider):
def __init__(self,
supabase_url: str = None,
supabase_key: str = None,):
load_dotenv()
self.supabase_url = supabase_url or os.getenv("NEXT_PUBLIC_SUPABASE_URL")
self.supabase_key = supabase_key or os.getenv("NEXT_PUBLIC_SUPABASE_ANON_KEY")
self.supabase: Client = create_client(self.supabase_url, self.supabase_key)