Skip to content

Wire USGS earthquake query and recent ops#1

Merged
tamnd merged 1 commit into
mainfrom
feat/earthquake-ops
Jun 14, 2026
Merged

Wire USGS earthquake query and recent ops#1
tamnd merged 1 commit into
mainfrom
feat/earthquake-ops

Conversation

@tamnd

@tamnd tamnd commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace scaffold stubs with a real USGS FDSNWS client (earthquake.usgs.gov/fdsnws/event/1)
  • Two operations: query (magnitude/date/order filters) and recent (last 30 days, mag >= 6)
  • Output fields pre-formatted as strings (magnitude, depth_km, latitude, longitude in consistent decimal notation)
  • 4 httptest-backed unit tests covering query parsing, recent params, retry on 503, and time formatting

Test plan

  • go test ./... passes (all offline)
  • ./bin/usgs query --min_mag 5 --limit 5 returns live earthquake data
  • ./bin/usgs query --start 2026-06-01 --min_mag 5 --limit 10 returns filtered results
  • ./bin/usgs recent returns significant earthquakes from the last 30 days

Replace scaffold stubs with a real USGS FDSNWS client: two operations
(query with magnitude/date/order filters, recent for the last 30 days
at mag >= 6), httptest-backed tests, and string-formatted output fields
so magnitude, depth, and coordinates pipe cleanly as text.
@tamnd tamnd merged commit 34ae808 into main Jun 14, 2026
7 checks passed
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