Files

37 lines
2.3 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
from dataclasses import asdict, dataclass
from datetime import datetime
@dataclass(frozen=True)
class Conditions:
air_temperature_f: int
wind_mph: int
wind_direction: str
pressure_inhg: float
pressure_trend: str
cloud_cover_percent: int
water_temperature_f: int
sunrise: str
def demo_conditions(starts_at: datetime) -> Conditions:
"""Stable demo conditions until a live provider adapter is connected."""
seasonal_water = {12: 52, 1: 49, 2: 53, 3: 61, 4: 69, 5: 76}.get(starts_at.month, 78)
return Conditions(64 if starts_at.month in (2, 3, 11) else 72, 9, "SW", 29.91, "falling", 58, seasonal_water, "6:42 AM")
def build_bass_plan(starts_at: datetime) -> dict:
conditions = demo_conditions(starts_at)
score = min(82 + (4 if conditions.pressure_trend == "falling" else 0) + (3 if 6 <= conditions.wind_mph <= 14 else 0) + (2 if conditions.cloud_cover_percent >= 50 else 0), 95)
return {
"bite_score": score,
"confidence": 0.86,
"summary": "Start on wind-blown secondary points at first light, then move to shaded wood and dock cover as the sun rises.",
"conditions": asdict(conditions),
"primary_pattern": {"name": "Wind-blown points", "depth": "612 ft", "structure": "Secondary points with rock, brush, or nearby creek-channel access", "presentation": "Slow-roll across the wind, then pause beside cover"},
"tackle": {"lure": "3/8 oz chartreuse-white double willow spinnerbait", "rod": "7' medium-heavy, fast action", "reel": "7.1:1 baitcaster", "line": "15 lb fluorocarbon", "backup": "Green-pumpkin Texas-rigged creature bait for protected cover"},
"evidence": ["A falling pressure trend favors active, roaming bass.", "A 9 mph southwest wind concentrates bait on exposed banks and points.", "Cloud cover extends the moving-bait window after sunrise.", f"Water near {conditions.water_temperature_f}°F supports a moderate retrieve."],
"professor_finn": "Id begin on the southwest-facing secondary points and let the wind choose the first three stops. Keep the spinnerbait moving until you contact fish. If the wind fades or the sun becomes direct, slow down with the Texas rig around shaded wood and the darkest dock edges.",
"data_status": "Demo conditions — live weather provider not connected yet",
}