Skip to content

feat(weather): weather impact summaries (outdoor/driving/allergy)#544

Open
Orinks wants to merge 1 commit intodevfrom
fix/AccessiWeather-issue-324
Open

feat(weather): weather impact summaries (outdoor/driving/allergy)#544
Orinks wants to merge 1 commit intodevfrom
fix/AccessiWeather-issue-324

Conversation

@Orinks
Copy link
Copy Markdown
Owner

@Orinks Orinks commented Mar 25, 2026

Summary

Closes #324

Adds rule-based weather impact summaries derived from existing data — no new API dependencies required.

  • Outdoor: comfort bands from feels-like (or actual) temperature, UV index protection note, active-precipitation warning
  • Driving: visibility thresholds (near-zero / very low / reduced), precipitation-type detection (ice > snow > thunderstorm > rain), near-freezing black-ice warning, wind severity bands
  • Allergy: pollen category/index bands with primary allergen name, wind dispersion note when wind ≥ 15 mph with moderate+ pollen, air quality modifier for Unhealthy and worse AQI

Impact summaries appear as labelled metrics in current conditions and forecast sections. Screen readers get concise, consistently-structured lines like Impact: Outdoor: Comfortable - good conditions for outdoor activities.

What changed

File Change
src/accessiweather/impact_summary.py New module — pure rule-based logic, fully documented
src/accessiweather/display/weather_presenter.py Added impact_summary field to CurrentConditionsPresentation and ForecastPresentation
src/accessiweather/display/presentation/current_conditions.py Calls build_impact_summary, appends three Metric rows, attaches ImpactSummary to presentation
src/accessiweather/display/presentation/forecast.py Calls build_forecast_impact_summary from first daily period, attaches to ForecastPresentation
tests/test_impact_summary.py 76 unit tests covering all rule branches and integration with presentation builders
CHANGELOG.md User-facing entry under Unreleased > Added

Test plan

  • pytest tests/test_impact_summary.py — 76 tests, all passing
  • Full suite pytest tests/ — 3110 passed, 4 skipped, 0 failures
  • Pre-commit hooks (ruff lint + format) pass

🤖 Generated with Claude Code

Add rule-based impact summaries derived from existing forecast and
environmental data. Three areas are covered:

- Outdoor: comfort bands from feels-like temperature, UV index modifier,
  active-precipitation modifier.
- Driving: visibility thresholds, precipitation-type detection (ice > snow >
  thunder > rain), near-freezing black-ice warning, wind severity bands.
- Allergy: pollen category/index bands with primary allergen label, wind
  dispersion note, and air quality modifier.

Impact lines appear as labelled metrics in current conditions
("Impact: Outdoor / Driving / Allergy") and are included in the
fallback text read by screen readers. ForecastPresentation gains an
impact_summary derived from the first daily period.

No new API dependencies. Rule set is fully documented and covered by
76 new unit tests.

Closes #324

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant