-
Notifications
You must be signed in to change notification settings - Fork 30
Refactor url methods #264
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
Refactor url methods #264
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
d82a553 to
972da74
Compare
- Rename from '_search_url' to 'get_search_url' - Refactor imports - Add docstring
- Move functions to erddapy.core.url - Use functions in ERDDAP class - Refactor docstrings to use gold standard servers
972da74 to
da9ceb1
Compare
|
Added |
- Refactor method as a function in erddap.core.url
- Use standalone function in ERDDAP class
- Refactor imports accordingly (in tests as well)
- Add '__all__' variable to erddapy
0484fbe to
04310c7
Compare
- Use Gold Standard ERDDAP server for netCDF tests - Use small 'allDatasets' file
|
Added |
| from netCDF4 import Dataset | ||
|
|
||
| url = "https://podaac-opendap.jpl.nasa.gov/opendap/allData/modis/L3/aqua/11um/v2019.0/4km/daily/2017/365/AQUA_MODIS.20171231.L3m.DAY.NSST.sst.4km.nc" # noqa | ||
| url = "http://erddap.ioos.us/erddap/tabledap/allDatasets.nc" # noqa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is probably better than a specific dataset_id. Thanks!
| will return a sorted list of "stationIDs" associated with each "stationType". | ||
| See https://coastwatch.pfeg.noaa.gov/erddap/tabledap/documentation.html#distinct | ||
| See http://erddap.ioos.us/erddap/tabledap/documentation.html#distinct |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MathewBiddle we should probably move this to https at some point.
Hi,
this is a downstream branch of #263, so it will be easier to review after merging that and #259. It includes two additional commits that move
get_search_url,get_info_urlandget_categorize_urlfrom theerddapy.erddapymodule to theerddapy.core.urlmodule.For
get_download_url, it's a bit more tricky: it would incur in a circular import betweenerddapy.core.urland the newly-addederddapy.core.griddapmodule, because of theurlopenand_urlopenfunctions. So, I'm thinking whether I should move those functions to a new module (maybeerddapy.core.helpersorerddapy.core.__init__?). Please let me know what you think is best.Thank you,
Vini
Summary of changes (in relation to #263):
get_search_url,get_info_url, andget_categorize_urlto the URL module_search_urlfunction as public