Skip to content

Add channel measurement endpoint#218

Merged
thodson-usgs merged 2 commits intoDOI-USGS:mainfrom
ldecicco-USGS:get_channel
Mar 18, 2026
Merged

Add channel measurement endpoint#218
thodson-usgs merged 2 commits intoDOI-USGS:mainfrom
ldecicco-USGS:get_channel

Conversation

@ldecicco-USGS
Copy link
Collaborator

Basically this is a learning experience for me on how to follow the waterdata patterns.

This PR adds a function get_channel to 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).

image

@thodson-usgs thodson-usgs self-requested a review March 18, 2026 18:45
Copy link
Collaborator

@thodson-usgs thodson-usgs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The relevant test passes. Ignore the other CI failures.

@thodson-usgs thodson-usgs merged commit 28d7c68 into DOI-USGS:main Mar 18, 2026
4 of 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.

2 participants