Add channel measurement endpoint#218
Merged
thodson-usgs merged 2 commits intoDOI-USGS:mainfrom Mar 18, 2026
Merged
Conversation
thodson-usgs
approved these changes
Mar 18, 2026
Collaborator
thodson-usgs
left a comment
There was a problem hiding this comment.
The relevant test passes. Ignore the other CI failures.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Basically this is a learning experience for me on how to follow the waterdata patterns.
This PR adds a function
get_channelto access:https://api.waterdata.usgs.gov/ogcapi/v0/collections/channel-measurements/items
The corresponding R function is here:
https://doi-usgs.github.io/dataRetrieval/reference/read_waterdata_channel.html
https://github.com/DOI-USGS/dataRetrieval/blob/main/R/read_waterdata_channel.R
Things to note that I'll want to learn about from one of you eventually:
I'm trying to use Positron - I've more or less switched over to it for R development, and it feels like a good Python environment, but I know I'm 100% biased.
I switched my settings so that the ruff formatter would automatically format on save. When I did that I got HUNDREDS of tiny style updates (end of lines, moving number of spaces, trailing commas). I undid those changes so I'm not pushing those here. I did not edit the pyproject.toml. So, either there are lots of automatic formatting issues we could push up, or my setup is different and I should learn how to get it working the same as the rest of you.
The other thing is when I ran the tests I had 10 failed tests - non of which are in the "waterdata_test". So not sure if I've got some setting wrong or if we have some failing tests (but they aren't related to the channel measurement test I added).