fraymio / modis-tools

Tools for working with the MODIS API and MODIS data.
Apache License 2.0
23 stars 12 forks source link

Update modis session auth #21

Closed ShengpeiWang closed 2 years ago

ShengpeiWang commented 2 years ago

Description

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Checklist:

Next Steps

On behalf of the Modis Tools Dev Team, thank you for your hard work! ✨

ShengpeiWang commented 2 years ago

@jamie-sgro in your comment, the code got copied again to the stack trace section, do you mind showing me the trace again? I also tried your code locally, and it worked fine.

jamie-sgro commented 2 years ago

@ShengpeiWang I got a max retries failure but I've tested it now and it seems to be working fine. My thought is that it was just bad timing against the live API. Gotta love being dependent on live external services like that. I'll review your code proper now that I can greenlight

ShengpeiWang commented 2 years ago

@jamie-sgro, thanks for the explanation and resource pointers! I made the changes to pass around only modis_session in 9117876. Can confirm that the code still runs as expected.

Regarding the other point, yeah I did not want to over engineer things. Given requests is a standard library, I think it's OK to not obscure interactions with it.