-
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
Handle opening multi-file granules #394
Conversation
) | ||
) | ||
|
||
url_mapping = _get_url_granule_mapping(granules, access) |
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.
The basic idea here is we now construct this mapping from filename to granule that contains the file. Currently we just have a list of files and list of granules, which isn't quite what we need
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.
I just tested #394 and worked as expected, thanks @jrbourbeau !!
return EarthAccessFile(fs.open(urls), granule) | ||
|
||
fileset = pqdm(zip(data_links, granules), multi_thread_open, n_jobs=threads) | ||
fileset = pqdm(url_mapping.items(), multi_thread_open, n_jobs=threads) |
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.
awesome, this is it!
Marking as WIP as this doesn't handle all the open + download code paths yet and I think
mypy
isn't happy right now either. Just wanted to get a quick +1 for this general direction before finishing up.Closes #393