add generator version of mast.Observations.download_products #3475
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The main purpose of this PR is to add
download_products_itermethod tomast.Observations. My motivation here is to allow something like the following:which then allows downloading a large number of files with both a progress bar and some custom progress reporting. Of course,
verbose=Truedoes something akin to this, but I find sometimes for large downloads I want more control of the progress reporting.This is a draft at this stage, with no tests or doc updates because I figured it was better to do that before doing all the rest of the work in case this has been considered and rejected in the past. There might also be cleaner ways to split up the generator and the non-generator version, but this seemed the most low-impact way in case the private method is used in the wild elsewhere.
cc @snbianco I think is the right person?