Skip to content

fix: current_conditions SFI/Kp/Bz unavailable (SWPC JSON format drift)#4

Open
KI7MT wants to merge 1 commit into
mainfrom
fix/ionis-current-conditions-parsing
Open

fix: current_conditions SFI/Kp/Bz unavailable (SWPC JSON format drift)#4
KI7MT wants to merge 1 commit into
mainfrom
fix/ionis-current-conditions-parsing

Conversation

@KI7MT

@KI7MT KI7MT commented Jun 15, 2026

Copy link
Copy Markdown
Member

Summary

Fixes ionis__current_conditions (and derived band outlooks in propagation reports) returning "unavailable" for SFI, Kp, Bz due to NOAA SWPC changing the JSON response formats on the endpoints used by fetch_current_conditions in noaa.py.

This is the same root cause as the solar-mcp issue (see qso-graph/solar-mcp#3 and #4).

Changes

  • Robust parsing in src/ionis_mcp/noaa.py for current list-of-dicts (and legacy) for:
    • 10cm-flux.json
    • noaa-planetary-k-index.json
    • solar-wind-mag-field.json
  • Updated CHANGELOG.

Verification

  • Direct import test: sfi=128, kp=0.67, bz=-1.0, errors=[], wind data good.
  • Matches live NOAA data.

Impact

  • Restores useful current_conditions reports for IONIS users (propagation, training, etc.).
  • Note: there is duplicated SWPC fetching logic between ionis-mcp and solar-mcp; future refactor could have ionis delegate to solar-mcp for live conditions (as hinted in some ionis tool docs).

Closes #3

Co-Authored-By: Grok (xAI)

… format changes

- Same root cause as solar-mcp #3: noaa.py parsing assumed old dict/list-of-lists shapes for /10cm-flux.json, /noaa-planetary-k-index.json, /solar-wind-mag-field.json.
- Updated to handle current list-of-dicts + legacy.
- Now SFI/Kp/Bz populate correctly in propagation reports.
- Added to Unreleased in CHANGELOG.

Verified via direct client call: sfi=128, kp=0.67, no errors.

Closes: related to solar-mcp issue.

Co-Authored-By: Grok (xAI)
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.

ionis__current_conditions returns SFI/Kp unavailable (SWPC JSON format drift, same as solar-mcp)

1 participant