Homogenize inconsistent paths returned by the download methods #244
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.
Fixes #232
EODataAccessGataway.download
,EODataAccessGataway.download_all
orEOProduct.download
are all system file paths (e.g. "/tmp/product.zip").location
attribute of anEOProduct
once downloaded is updated to the file URI representation of its location (e.g. "file:///tmp/product.zip")I was tempted to implement the logic above directly into
EOProduct.download
and ask/update each plugin to call that method to download a product. I saw however that the sentinelsat plugin was using adownload_all
method provided by the sentinelsat package, it wouldn't have been able to callEOProduct.download
. So the contract is that each plugin is responsible for implementing the logic above, and more generally the logic we use when a file is downloaded (save a record file, etc.), which I tried to describe in more details in the base class.I've also added a complete end-to-end test (PEPS, S2_MSI_L1C) that checks some of that logic. With a decent connection it runs quite quickly since it downloads products rather small in size.