Add POI feature and imporve the overall backend implementation
This commit is contained in:
@@ -200,8 +200,19 @@ async def trigger_rules_generation(
|
||||
sales_df['date'] = pd.to_datetime(sales_df['date'])
|
||||
sales_df['quantity'] = sales_df['quantity'].astype(float)
|
||||
sales_df['day_of_week'] = sales_df['date'].dt.dayofweek
|
||||
sales_df['is_holiday'] = False # TODO: Add holiday detection
|
||||
sales_df['weather'] = 'unknown' # TODO: Add weather data
|
||||
|
||||
# NOTE: Holiday detection for historical data requires:
|
||||
# 1. Tenant location context (calendar_id)
|
||||
# 2. Bulk holiday check API (currently single-date only)
|
||||
# 3. Historical calendar data
|
||||
# For real-time forecasts, holiday detection IS implemented via data_client.py
|
||||
sales_df['is_holiday'] = False
|
||||
|
||||
# NOTE: Weather data for historical analysis requires:
|
||||
# 1. Historical weather API integration
|
||||
# 2. Tenant location coordinates
|
||||
# For real-time forecasts, weather data IS fetched via external service
|
||||
sales_df['weather'] = 'unknown'
|
||||
|
||||
# Run rules learning
|
||||
results = await orchestrator.learn_and_post_rules(
|
||||
|
||||
Reference in New Issue
Block a user