Skip to content

feat(api): close VC/NWS API data gaps with new elements, AQ fallback, and performance features#451

Merged
Orinks merged 5 commits intodevfrom
feature/api-gaps-vc-nws-enhancements
Mar 14, 2026
Merged

feat(api): close VC/NWS API data gaps with new elements, AQ fallback, and performance features#451
Orinks merged 5 commits intodevfrom
feature/api-gaps-vc-nws-enhancements

Conversation

@Orinks
Copy link
Owner

@Orinks Orinks commented Mar 14, 2026

Summary

  • New weather elements: Add cloud cover, wind gusts, and precipitation amount to Visual Crossing API requests, data models, and display layer (current conditions, daily/hourly forecasts)
  • NWS endpoint verification: Verify all NWS API endpoints are compatible post-May 2025 (SCN 25-44), add 11 endpoint pattern tests
  • VC air quality fallback: Add get_air_quality() to VC client and wire it as automatic fallback in the enrichment pipeline when Open-Meteo AQ data is unavailable
  • Low-latency endpoint: Automatically try VC's faster timelinellx endpoint first, with sticky fallback to standard timeline on failure - no user config needed
  • Batch location queries: Add get_forecast_batch() for multi-location VC forecasts in a single API call, wired into cache pre-warming for faster location switching
  • Display integration: Cloud cover, wind gusts, and precipitation amount now shown in current conditions (always) and forecasts (standard/detailed verbosity), with screen-reader-accessible fallback text

Test plan

  • 38 VC client tests pass (25 existing + 13 new)
  • 11 NWS endpoint compatibility tests pass
  • 5 environmental VC fallback tests pass
  • Full suite: 1915 passed (pre-existing failures only, none in changed files)
  • Ruff lint + format pass
  • Pre-commit hooks pass
  • Verified live data accuracy (wind gusts, cloud cover for Lumberton NJ)

🤖 Generated with Claude Code

Orinks and others added 4 commits March 13, 2026 22:35
…, batch queries

- Add cloudcover, windgust, precip elements to VC API requests and models
- Verify NWS May 2025 endpoint compatibility (all current, added tests)
- Wire VC air quality (aqius, pollutants) as fallback for Open-Meteo
- Add optional timelinellx low-latency endpoint support
- Add batch location query support for VC forecast

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…rm into production

- Wire VC air quality as fallback in enrichment pipeline when Open-Meteo
  has no AQ data
- Add vc_use_low_latency setting and pass through to VC client instantiation
- Add pre_warm_batch() and use it in UI cache pre-warming for multiple
  locations via VC batch endpoint

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…ting

Replace vc_use_low_latency setting with automatic behavior: always try
the low-latency timelinellx endpoint first and sticky-fallback to the
standard timeline endpoint on 404/5xx. No user configuration needed.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Wire new VC weather elements into the presentation layer:
- Current conditions: cloud cover %, wind gusts, precipitation amount
- Daily forecast: cloud cover, wind gusts, precip amount (detailed mode)
- Hourly forecast: cloud cover, wind gusts, precip amount (detailed mode)
- Fallback text includes all new fields for screen reader accessibility

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@Orinks Orinks changed the title feat(api): add missing VC elements, AQ fallback, low-latency endpoint, batch queries feat(api): close VC/NWS API data gaps with new elements, AQ fallback, and performance features Mar 14, 2026
…allback

- Add tests for cloud cover, wind gust, precipitation display metrics
  across all unit preferences (F, C, both)
- Add tests for pre_warm_batch: empty list, VC batch + individual,
  no VC fallback, batch failure, single location skip
- Add tests for enrichment VC AQ fallback: called when AQ null,
  failure handling, skip when AQ present
- Add tests for VC batch query error paths and single-location fallback
- Move tests from test_coverage_gaps.py to properly named files

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@Orinks Orinks merged commit 1003126 into dev Mar 14, 2026
6 checks passed
@Orinks Orinks deleted the feature/api-gaps-vc-nws-enhancements branch March 14, 2026 03:17
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