Skip to content

Conversation

@rsignell-usgs
Copy link
Member

This a workaround to access authenticated ERDDAP servers.
Since the pull requests for pandas to support authentication on read_csv requests (pandas-dev/pandas#17087) has not yet been merged, we can read the URL using requests and then pass to pandas using StringIO.

@rsignell-usgs
Copy link
Member Author

rsignell-usgs commented Dec 5, 2017

@@ -1,5 +1,7 @@
from __future__ import (absolute_import, division, print_function)

import requests
Copy link
Member

Choose a reason for hiding this comment

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

@rsignell-usgs if we leave this inside the function it would be to make it optional only when using get_var_by_attr.
In my next version requests will be mandatory , so instead of adding a try/except here I just moved it to the top already.

Copy link
Member

@ocefpaf ocefpaf left a comment

Choose a reason for hiding this comment

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

Fixed a lint and moved requests to the top.

Once the CI finishes we can merge this one.

@ocefpaf
Copy link
Member

ocefpaf commented Dec 5, 2017

We can fix the other lints in another PR and I'll add a test for this feature too.

Thanks @rsignell-usgs!

@ocefpaf ocefpaf merged commit 4c89573 into ioos:master Dec 5, 2017
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