Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add main COOPS API for metadata #123

Merged

Conversation

SorooshMani-NOAA
Copy link
Contributor

@SorooshMani-NOAA SorooshMani-NOAA commented Dec 21, 2023

Fixes #110

Currently the COOPS module uses COOPS's NWS product to get the station metadata:
https://access.co-ops.nos.noaa.gov/nwsproducts.html?type=current

This url doesn't have information about some of the stations. We need to use the main metadata URL:
https://api.tidesandcurrents.noaa.gov/mdapi/prod/webapi/stations.json
see documentation at https://api.tidesandcurrents.noaa.gov/mdapi/prod/

@SorooshMani-NOAA SorooshMani-NOAA self-assigned this Dec 21, 2023
Copy link

codecov bot commented Dec 21, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (1f79507) 90.04% compared to head (43d5699) 90.18%.

Files Patch % Lines
searvey/coops.py 94.44% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #123      +/-   ##
==========================================
+ Coverage   90.04%   90.18%   +0.13%     
==========================================
  Files          13       13              
  Lines        1015     1049      +34     
  Branches      151      155       +4     
==========================================
+ Hits          914      946      +32     
- Misses         55       56       +1     
- Partials       46       47       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@SorooshMani-NOAA SorooshMani-NOAA marked this pull request as ready for review December 23, 2023 00:33
@pmav99
Copy link
Member

pmav99 commented Dec 23, 2023

Looks good. I would just rename the tests from old/new to nws/main.

@SorooshMani-NOAA
Copy link
Contributor Author

Thanks for your feedback. I also realized I haven't updated stations API call to the main API, I'll update that as well and when everything passes I'll merge.

@SorooshMani-NOAA SorooshMani-NOAA merged commit 13ba6be into oceanmodeling:master Dec 26, 2023
10 checks passed
@SorooshMani-NOAA SorooshMani-NOAA deleted the enhance/coops_url branch December 26, 2023 14:50
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.

Cannot get all COOPS stations (e.g. some in Hawaii)
2 participants