-
Notifications
You must be signed in to change notification settings - Fork 85
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
Create dest dir for direct S3 access before download #570
Conversation
5ecd07f
to
d034e10
Compare
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.
Looks good so far! For testing, I'm thinking we could extract a download_s3_granules(path: Path, data_links: list[str]) -> list[Path]
function and give it the input required to reproduce the bug in a test?
Really we should be testing that any time we write granules we will correctly create an output directory, but if nobody has time to do that refactoring right now, the above approach would at least add coverage to this change 🤷 No strong feelings.
@@ -6,6 +6,9 @@ | |||
* Bug fixes: | |||
* fixed 483 by extracting a common CMR query method for collections and granules using SearchAfter header | |||
* Added VCR support for verifying the API call to CMR and the parsing of returned results without relying on CMR availability post development | |||
* [#562](https://github.com/nsidc/earthaccess/issues/562): The destination |
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.
Indentation is off by 2 spaces with the items above
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.
Oops! I'll sort that out with my other PR, where I've reformatted the section. I didn't want to create much of a merge conflict for myself here.
I think the problem with testing this is that we cannot guarantee that tests will run in an AWS environment that's "in region." If that's not possible, then manually setting |
Hm. I don't have any great ideas here. @betolink ? I'd be fine with merging without adding a test and recording a bug to add a test later. Better to get the fix in the hands of users sooner IMO. We can flail around figuring out unit tests on our time 🤣 |
I didn't add a unit or integration test for this, as I wasn't sure about how best to test this, so I'm open to suggestion.
Fixes #562
📚 Documentation preview 📚: https://earthaccess--570.org.readthedocs.build/en/570/