Skip to content
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

Homogenize inconsistent paths returned by the download methods #244

Merged
merged 4 commits into from
Apr 23, 2021

Conversation

maximlt
Copy link
Collaborator

@maximlt maximlt commented Apr 20, 2021

Fixes #232

  • The paths returned by either EODataAccessGataway.download, EODataAccessGataway.download_all or EOProduct.download are all system file paths (e.g. "/tmp/product.zip").
  • The location attribute of an EOProduct 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 a download_all method provided by the sentinelsat package, it wouldn't have been able to call EOProduct.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.

@sbrunato sbrunato merged commit 6ab4262 into develop Apr 23, 2021
@sbrunato sbrunato deleted the fix-inconsistent-output-paths branch April 23, 2021 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent filepaths returned by the download methods
2 participants