What & Why
mdapi coverage is mostly present but has known gaps and two key-name mismatches that silently break data loading for stations with specific features. Closing these makes the mdapi surface complete and removes latent bugs. Part of #89.
Acceptance Criteria
Approach
- Start by reproducing the
harcon mismatch against a live mdapi response for a station with tidal constituents (e.g. 8454000 or a similar primary water-level station). Decide which side of the mismatch is wrong before editing — don't guess.
- Add a single helper (e.g.
_fetch_mdapi_subresource(station_id, name)) rather than one method per sub-resource, and expose thin wrappers on Station.
- Files in play:
noaa_coops/_metadata.py (all of it; key-name fixes at :37-38, :123, :137).
noaa_coops/_endpoints.py (base URL plumbing for sub-resource fetchers).
tests/test_station.py + new VCR cassettes.
Resources
What & Why
mdapi coverage is mostly present but has known gaps and two key-name mismatches that silently break data loading for stations with specific features. Closing these makes the mdapi surface complete and removes latent bugs. Part of #89.
Acceptance Criteria
supersededdatumsis reachable as aStationattribute (or equivalent method). Test cassette exercises a station that has superseded datums.expandparam is fixed fromharcon→harmonicConstituentsor the response-key read at_metadata.py:123is fixed to match what NOAA actually returns. Verified against a live API hit.tidepredoffetsvstidepredoffsetsmismatch correctly. Theexpandparam currently preserves NOAA's historical typo (_metadata.py:37-38) while the response-read uses the correctly spelled key (_metadata.py:137) — confirm which NOAA actually honors and fix whichever side is wrong./stations/{id}/supersededdatums.json,/details.json,/sensors.json,/datums.json,/harcon.json,/floodlevels.json. Callers should be able to refresh a single sub-resource without reconstructing a fullStation.Station()construction continues to pass all tests.Approach
harconmismatch against a live mdapi response for a station with tidal constituents (e.g. 8454000 or a similar primary water-level station). Decide which side of the mismatch is wrong before editing — don't guess._fetch_mdapi_subresource(station_id, name)) rather than one method per sub-resource, and expose thin wrappers onStation.noaa_coops/_metadata.py(all of it; key-name fixes at:37-38,:123,:137).noaa_coops/_endpoints.py(base URL plumbing for sub-resource fetchers).tests/test_station.py+ new VCR cassettes.Resources
noaa_coops/_metadata.py:37-38,:123,:137.https://api.tidesandcurrents.noaa.gov/mdapi/prod/webapi/stations/noaa_coops/_metadata.py:86-163.