-
Notifications
You must be signed in to change notification settings - Fork 71
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 us-west-2 check to API and improve auth repr #424
base: main
Are you sure you want to change the base?
Conversation
We can probably change the print statement to raise a ValueError with the same message. That way, it is a formal error message that will interrupt the library from opening the bucket out-of-region with a long, cryptic error message. |
Thanks to @battistowx during today's earthaccess cowork session for moving this forward with me! @andypbarrett @betolink Any thoughts on what info we want to be in the auth repr? I'm happy to move that to a separate PR if we want to move forward with the s3check portion of this one. |
Per #231, we've added API access to
store._running_in_us_west_2()
in the form of a printed statement that the user is (or is not) running in AWS region us-west-2. In the process of implementing this, it became clear thatget_edl_token()
had not been added to__init__.py
, so that was added as well. It also adds a repr for theauth
object via aauth.auth_info()
property.I'm seeking input on:
earthaccess.region()
function instead.auth.__repr__
? Currently it's not much better than the object ID:store._running_in_us_west_2()
isn't tested. Shouldauth.auth_info()
have a dictionary typing/keyword matching test?