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

feat: download assets subset #932

Merged
merged 17 commits into from
Dec 1, 2023
Merged

feat: download assets subset #932

merged 17 commits into from
Dec 1, 2023

Conversation

jlahovnik
Copy link
Collaborator

@jlahovnik jlahovnik commented Nov 21, 2023

If a regex expression is passed in the parameter asset in the download(), only the assets matching this expression are downloaded (only working if the provider API returns individual assets and not a zip file); implemented for the HTTPDownload and AwsDownload plugins (s3rest plugin not used anymore after removal of mundi).

Client mode usage:

path = dag.download(eo_product, asset=asset_key, **optional_download_kwargs)
# or
path = eo_product.assets[asset_key].download(**optional_download_kwargs)

Server mode usage:
http://127.0.0.1:5000/path/to/some/item/download/asset_key

Please note that EOProduct.assets is now initialized as an AssetsDict(UserDict).

@jlahovnik jlahovnik self-assigned this Nov 21, 2023
Copy link
Contributor

github-actions bot commented Nov 21, 2023

Test Results

       4 files  ±0         4 suites  ±0   3m 25s ⏱️ -1s
   433 tests +1     430 ✔️ +1    3 💤 ±0  0 ±0 
1 732 runs  +4  1 656 ✔️ +4  76 💤 ±0  0 ±0 

Results for commit 271d638. ± Comparison against base commit 9c1a67c.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Nov 21, 2023

Code Coverage (Ubuntu)

File Coverage
All files 82%

Minimum allowed coverage is 70%

Generated by 🐒 cobertura-action against 271d638

Copy link
Contributor

github-actions bot commented Nov 21, 2023

Code Coverage (Windows)

File Coverage
All files 76%

Minimum allowed coverage is 70%

Generated by 🐒 cobertura-action against 271d638

@alambare alambare requested a review from sbrunato November 21, 2023 13:44
@sbrunato sbrunato linked an issue Nov 22, 2023 that may be closed by this pull request
Copy link
Collaborator

@sbrunato sbrunato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please filter assets keys instead of title or href

@jlahovnik
Copy link
Collaborator Author

Please filter assets keys instead of title or href

done

@alambare alambare requested a review from sbrunato November 23, 2023 11:25
@sbrunato sbrunato marked this pull request as draft November 24, 2023 07:58
@jlahovnik jlahovnik marked this pull request as ready for review November 24, 2023 10:00
@sbrunato sbrunato self-assigned this Nov 30, 2023
@sbrunato sbrunato marked this pull request as draft November 30, 2023 13:19
@sbrunato sbrunato force-pushed the 721-download-assets-subset branch from a5456c3 to 2b83e51 Compare December 1, 2023 07:50
@sbrunato sbrunato marked this pull request as ready for review December 1, 2023 07:51
@sbrunato sbrunato changed the title 721 download assets subset feat: download assets subset Dec 1, 2023
@sbrunato sbrunato merged commit 4f74c83 into develop Dec 1, 2023
11 checks passed
@sbrunato sbrunato deleted the 721-download-assets-subset branch December 1, 2023 10:42
@sbrunato sbrunato added this to the 2.12.0 milestone Feb 12, 2024
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.

download assets subset
2 participants