Skip to content

feat(asset): move download from product to asset #1619#2156

Draft
pdavid-cssopra wants to merge 1 commit into
developfrom
feat-update-plugin-downloads-methods-to-use-an-asset-as-input-instead-of-a-product
Draft

feat(asset): move download from product to asset #1619#2156
pdavid-cssopra wants to merge 1 commit into
developfrom
feat-update-plugin-downloads-methods-to-use-an-asset-as-input-instead-of-a-product

Conversation

@pdavid-cssopra

@pdavid-cssopra pdavid-cssopra commented Apr 23, 2026

Copy link
Copy Markdown
Collaborator

from #1619

  • move download_link property to an asset #2069
  • per asset download cache #2070
  • update plugin download methods to use an asset as input instead of a product #2071
  • move quicklook and thumbnail to assets #2072
  • move order mechanism to dowload_link asset #2073

What's to do

  • migration download feature from product to asset
  • convert metadata configuration to expose files, including downloadkin into asset
  • convert order and download behaviour to map it to asset
  • move quicklook and thumbnail into assets
  • convert product.download ti mapping to asset "download_link" or else, all expect "download_link"
  • update specific provider with new behaviour
  • update cache management
  • update tests and tests samples
  • rework patchs depending of product

What's missing ? details here

  • Processor signal handler to interrupt queue
    (The class is only a draft, probably to be replaced eventually by a singleflight library; the interfaces are standard.)
  • AWS providers tests
  • Merge product metadata interpreter and asset metadata interpreter
  • Uncomplete provider implementation / tests
    • usgs_satapi_aws (need aws account to download)
    • earth_search_gcs (need aws account to download)
    • geodes_s3 (bug)
    • wekeo_cmems (bug)
    • meteoblue (bug)
  • test end_to_end have to be updated

Last implementation details

@pdavid-cssopra
pdavid-cssopra force-pushed the feat-update-plugin-downloads-methods-to-use-an-asset-as-input-instead-of-a-product branch 3 times, most recently from 5af1c19 to 0982160 Compare April 24, 2026 12:50
@github-actions

github-actions Bot commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Test Results

    4 files  ±  0      4 suites  ±0   4m 24s ⏱️ +6s
  702 tests  -  71    701 ✅  -  72  1 💤 +1  0 ❌ ±0 
2 850 runs   - 284  2 842 ✅  - 290  8 💤 +6  0 ❌ ±0 

Results for commit ea664a7. ± Comparison against base commit 0d0a152.

This pull request removes 535 and adds 464 tests. Note that renamed tests count towards both.
eodag.api.product._assets ‑ eodag.api.product._assets.Asset
eodag.api.product._assets ‑ eodag.api.product._assets.AssetsDict
eodag.utils.__init__ ‑ eodag.utils.guess_extension
eodag.utils.__init__ ‑ eodag.utils.guess_file_type
tests.integration.test_core_search.TestCoreSearch ‑ test_core_search_auths_matching
tests.integration.test_core_search.TestCoreSearch ‑ test_core_search_dedtlumi_search_by_id
tests.integration.test_core_search.TestCoreSearch ‑ test_core_search_ecwmfsearch_by_id
tests.integration.test_core_search.TestCoreSearch ‑ test_core_search_errors_buildpost
tests.integration.test_core_search.TestCoreSearch ‑ test_core_search_errors_odata
tests.integration.test_core_search.TestCoreSearch ‑ test_core_search_errors_postjson
…
eodag.utils.mime ‑ eodag.utils.mime.Mime.guess_extension
eodag.utils.mime ‑ eodag.utils.mime.Mime.guess_file_type
tests.units.apis.test_asset.TestAsset ‑ test_eoproduct_asset_stream_download
tests.units.apis.test_eoproduct.TestEOProduct ‑ test_eoproduct_as_pystac_object
tests.units.apis.test_eoproduct.TestEOProduct ‑ test_eoproduct_assets_get_values
tests.units.apis.test_eoproduct.TestEOProduct ‑ test_eoproduct_default_driver_unsupported_collection
tests.units.apis.test_eoproduct.TestEOProduct ‑ test_eoproduct_default_geom
tests.units.apis.test_eoproduct.TestEOProduct ‑ test_eoproduct_download_http_default
tests.units.apis.test_eoproduct.TestEOProduct ‑ test_eoproduct_download_http_delete_archive
tests.units.apis.test_eoproduct.TestEOProduct ‑ test_eoproduct_download_http_dynamic_options
…

♻️ This comment has been updated with latest results.

@eodag-bot

eodag-bot commented Apr 24, 2026

Copy link
Copy Markdown
Collaborator

badge

Code Coverage (Ubuntu)

Details
Filename                                                                  Stmts    Miss  Cover    Missing
----------------------------------------------------------------------  -------  ------  -------  ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
__init__.py                                                                   8       0  100.00%
cli.py                                                                      249      11  95.58%   103-114, 376, 640
config.py                                                                   306      24  92.16%   70-72, 75, 78, 81, 85, 89, 93-95, 592-594, 716-718, 737, 745, 775-780, 782
crunch.py                                                                     2       0  100.00%
api/__init__.py                                                               0       0  100.00%
api/collection.py                                                           151       8  94.70%   177, 213, 216, 323, 362, 365, 383, 386
api/core.py                                                                 764      58  92.41%   259, 546, 594, 637, 677, 697, 738-743, 768, 852-871, 885, 891, 1044, 1049, 1148, 1166, 1187-1188, 1284-1285, 1311, 1342-1343, 1369, 1382, 1443-1444, 1475-1476, 1533, 1550-1555, 1567-1570, 1682, 1907, 2058, 2242-2243
api/provider.py                                                             383      40  89.56%   186, 190-191, 316-337, 405, 521, 525-526, 531-534, 545, 621-631, 821-822, 870, 877, 891, 914-917, 951-958, 962-963
api/search_result.py                                                        137      12  91.24%   113, 125, 135, 156, 209, 267, 279, 414, 469-472
api/product/__init__.py                                                       7       0  100.00%
api/product/_assets.py                                                      204       9  95.59%   136-137, 159-160, 162, 209, 418, 491-495
api/product/_product.py                                                     262      51  80.53%   178, 332, 365-368, 405, 424-425, 468, 492-522, 553-585, 648-655, 670, 736, 748, 811
api/product/metadata_mapping.py                                             890      78  91.24%   127-129, 225-230, 254, 312-313, 359-360, 401, 422, 474-475, 512, 533-536, 559, 571-572, 613, 636, 661-664, 666-671, 736-741, 750, 756, 772, 780, 811, 816-829, 1036, 1189, 1191, 1211, 1220-1224, 1241-1246, 1379, 1402, 1411, 1433, 1438, 1490, 1562, 1590, 1616, 1630, 1655, 1701, 1770, 1845, 1874, 1905
api/product/drivers/__init__.py                                              11       0  100.00%
api/product/drivers/base.py                                                  32       0  100.00%
api/product/drivers/generic.py                                               11       0  100.00%
api/product/drivers/sentinel1.py                                             33       0  100.00%
api/product/drivers/sentinel2.py                                             33       0  100.00%
plugins/__init__.py                                                           0       0  100.00%
plugins/manager.py                                                          176      15  91.48%   103-108, 180, 202, 220-221, 233, 261, 371-374, 386-387
plugins/apis/__init__.py                                                      4       0  100.00%
plugins/apis/base.py                                                          5       0  100.00%
plugins/apis/ecmwf.py                                                       134      35  73.88%   158, 162, 166, 176-178, 197-198, 227-228, 240, 255-295, 312-313, 331-338
plugins/apis/usgs.py                                                        391     221  43.48%   125, 130, 136, 140, 150-158, 163-183, 188, 215-216, 223, 227-228, 232, 235, 262-277, 287-543, 563, 582-583, 611-612, 618-623, 643, 646-654, 657, 660-661, 669, 671, 673, 696-698, 713-784, 807-818
plugins/authentication/__init__.py                                           13       0  100.00%
plugins/authentication/aws_auth.py                                           77       9  88.31%   51-53, 68-69, 177, 201, 217-218
plugins/authentication/base.py                                               21       4  80.95%   46, 59, 82, 96
plugins/authentication/dummy.py                                               7       1  85.71%   31
plugins/authentication/generic.py                                            17       9  47.06%   48-66
plugins/authentication/keycloak.py                                           47       4  91.49%   152, 175-180
plugins/authentication/token_exchange.py                                     37      20  45.95%   70-76, 89-119
plugins/authentication/eoiam/__init__.py                                      3       0  100.00%
plugins/authentication/eoiam/eoiamauth.py                                    88       1  98.86%   172
plugins/authentication/eoiam/eoiamsessionauth.py                             17       0  100.00%
plugins/authentication/header/__init__.py                                     3       0  100.00%
plugins/authentication/header/headerauth.py                                  10       0  100.00%
plugins/authentication/header/httpheaderauth.py                              13       0  100.00%
plugins/authentication/openid_connect/__init__.py                             4       0  100.00%
plugins/authentication/openid_connect/codeauthorizedauth.py                  25       0  100.00%
plugins/authentication/openid_connect/oidcauthorizationcodeflowauth.py      147       6  95.92%   181-184, 210, 251
plugins/authentication/openid_connect/oidcrefreshtokenbase.py                81      13  83.95%   80-81, 89-107, 154, 162, 176, 196
plugins/authentication/qsauth/__init__.py                                     3       0  100.00%
plugins/authentication/qsauth/httpquerystringauth.py                         24       1  95.83%   87
plugins/authentication/qsauth/querystringauth.py                             15       0  100.00%
plugins/authentication/sas_auth/__init__.py                                   3       0  100.00%
plugins/authentication/sas_auth/requestssasauth.py                           38       2  94.74%   64, 85
plugins/authentication/sas_auth/sasauth.py                                   27       1  96.30%   72
plugins/authentication/token/__init__.py                                      3       0  100.00%
plugins/authentication/token/requeststokenauth.py                            24       5  79.17%   46-50
plugins/authentication/token/tokenauth.py                                   123       4  96.75%   190, 227, 307-308
plugins/base/__init__.py                                                      3       0  100.00%
plugins/base/eodagpluginmount.py                                             16       2  87.50%   45, 52
plugins/base/plugintopic.py                                                  14       0  100.00%
plugins/crunch/__init__.py                                                    7       0  100.00%
plugins/crunch/base.py                                                       12       0  100.00%
plugins/crunch/filter_date.py                                                59       0  100.00%
plugins/crunch/filter_latest_intersect.py                                    54       6  88.89%   93-94, 101-102, 104-108
plugins/crunch/filter_latest_tpl_name.py                                     35       0  100.00%
plugins/crunch/filter_overlap.py                                             66      10  84.85%   119-122, 138-164
plugins/crunch/filter_property.py                                            30       0  100.00%
plugins/download/__init__.py                                                  5       0  100.00%
plugins/download/httputils.py                                                18       0  100.00%
plugins/download/streamresponse.py                                           56       9  83.93%   49, 108-115, 124, 136
plugins/download/contentiterator/__init__.py                                  4       0  100.00%
plugins/download/contentiterator/basecontentiterator.py                      27       3  88.89%   40-41, 58
plugins/download/contentiterator/filecontentiterator.py                      28       0  100.00%
plugins/download/contentiterator/responsecontentiterator.py                  62      10  83.87%   56, 61-62, 104-112
plugins/download/contentiterator/s3objectcontentiterator.py                  36       4  88.89%   44, 49-50, 66
plugins/download/protocol/__init__.py                                         4       0  100.00%
plugins/download/protocol/_aws_consts.py                                     25       0  100.00%
plugins/download/protocol/aws.py                                            421     148  64.85%   136, 148-149, 166, 173, 188-189, 202, 204, 215, 226-230, 250-316, 362-378, 394, 415, 430-446, 476-514, 544, 550-552, 645-650, 660, 664-665, 676-677, 683-684, 691-692, 699-700, 705-706, 715-716, 721-722, 724-725, 730-731, 737-738, 744-745, 753-754, 769-820, 838, 853, 880, 893-895, 908, 936
plugins/download/protocol/base.py                                           376      71  81.12%   142, 152-153, 187, 197-198, 245-246, 289-292, 360-361, 396-420, 450, 452, 463, 472-473, 476, 546-548, 562, 565-575, 579, 595-614, 681, 729-733
plugins/download/protocol/http.py                                           481     118  75.47%   203-206, 220, 224, 242-244, 258-262, 298-300, 323-324, 374, 378-380, 412, 423, 448, 466-467, 497, 509, 516, 526-527, 543, 546, 573, 587-588, 612, 618, 627, 634, 684-687, 690, 699-704, 707, 723-745, 761, 768, 772, 780, 789-792, 805, 833, 839, 854, 869-898, 908-912, 928-933, 943-950, 967-969, 983-988, 991, 994, 1051, 1054, 1056, 1068, 1079, 1097
plugins/search/__init__.py                                                   11       0  100.00%
plugins/search/cop_ghsl.py                                                  416      91  78.12%   74-75, 110-111, 175, 177, 219, 250-253, 299, 315, 318, 352, 356-361, 381, 402, 423, 454, 465-478, 484, 519, 534, 548-549, 563-565, 572, 576-578, 581-584, 602-662, 673-688
plugins/search/cop_marine.py                                                274      59  78.47%   57, 65-67, 77-78, 83, 88-89, 105, 107, 110, 176-177, 220, 247, 253, 257, 261, 272, 283-284, 297, 328-331, 337, 347, 360, 364, 368, 372, 376-380, 386-389, 392-409, 426-429, 482-486, 491, 503, 517-518
plugins/search/creodias_s3.py                                                34      14  58.82%   57, 67-91
plugins/search/csw.py                                                       113      87  23.01%   100-101, 105-106, 114-171, 177-190, 198-235, 249-290
plugins/search/preparesearch.py                                              26       0  100.00%
plugins/search/stac_list_assets.py                                           29      14  51.72%   54-62, 65-76
plugins/search/static_stac_search.py                                         83      18  78.31%   98-126, 165-168, 181, 223
plugins/search/base/__init__.py                                               3       0  100.00%
plugins/search/base/mappinginterpretor.py                                    87       4  95.40%   100-101, 127-128
plugins/search/base/search.py                                               253      27  89.33%   112, 116, 140-146, 185, 221-224, 255, 289, 352, 373, 499, 549, 630-638
plugins/search/build_search_result/__init__.py                                5       0  100.00%
plugins/search/build_search_result/_utils.py                                 47       6  87.23%   77-78, 114, 118, 138, 197
plugins/search/build_search_result/ecmwfsearch.py                           391      81  79.28%   212, 252-263, 273-275, 355-356, 405, 429, 431, 496, 504-508, 529, 539, 565, 610, 635, 663, 681-697, 747, 772, 775, 779, 788, 794, 832-853, 894, 921-922, 931-940, 997, 1020-1071, 1082
plugins/search/build_search_result/meteobluesearch.py                        68       6  91.18%   128-129, 173, 182-184
plugins/search/build_search_result/wekeoecmwfsearch.py                       39       6  84.62%   74, 122-132
plugins/search/qssearch/__init__.py                                           7       0  100.00%
plugins/search/qssearch/geodessearch.py                                      47       0  100.00%
plugins/search/qssearch/odatav4search.py                                     65      22  66.15%   103-148, 154
plugins/search/qssearch/postjsonsearch.py                                   194      31  84.02%   107-111, 182, 185, 197, 211-214, 226, 248-262, 270, 330-336, 343, 397, 420, 425-426, 442, 448, 462
plugins/search/qssearch/querystringsearch.py                                530      61  88.49%   357, 517-518, 537-538, 541-542, 554-558, 790-796, 855, 921, 951, 958, 1029, 1050, 1053-1054, 1072, 1081-1082, 1109, 1120-1121, 1181, 1190, 1195-1212, 1221, 1236, 1245-1248, 1258, 1281, 1364, 1384-1394, 1402, 1475-1476, 1478-1480, 1482-1483, 1486-1487
plugins/search/qssearch/stacsearch.py                                       101      13  87.13%   143, 147, 158, 181-186, 195, 203-213
plugins/search/qssearch/wekeosearch.py                                       12       0  100.00%
resources/__init__.py                                                         0       0  100.00%
resources/shp/__init__.py                                                     0       0  100.00%
types/__init__.py                                                           180      43  76.11%   58, 71-75, 86-98, 126-128, 135-140, 155, 165, 247, 285, 295-311, 316, 318, 340, 345, 353, 363
types/bbox.py                                                                39      19  51.28%   46-61, 72-74, 85-87, 99-101, 113-115, 123
types/download_args.py                                                        9       0  100.00%
types/queryables.py                                                         112       0  100.00%
types/search_args.py                                                         70      18  74.29%   60-64, 71-88, 103
types/stac_extensions.py                                                    148       4  97.30%   432-438, 619
types/stac_metadata.py                                                      154      22  85.71%   95, 117, 150, 183-185, 199-213, 222-229, 256-259
utils/__init__.py                                                           568      45  92.08%   60, 198, 229-230, 239-265, 268, 283, 363-367, 442-446, 526, 566-567, 596, 974-977, 1018-1020, 1028, 1047-1048, 1077, 1095-1096, 1208, 1267, 1270, 1273, 1296, 1460, 1666, 1684
utils/cache.py                                                               22       0  100.00%
utils/dates.py                                                              182       4  97.80%   172, 516, 523-524
utils/deserialize.py                                                         74      10  86.49%   53, 55, 103, 108-109, 145, 159, 181-182, 188
utils/env.py                                                                  3       0  100.00%
utils/eventable.py                                                           26       0  100.00%
utils/exceptions.py                                                          59       1  98.31%   166
utils/free_text_search.py                                                    65       2  96.92%   83, 91
utils/import_system.py                                                       28      19  32.14%   64-78, 89-99
utils/logging.py                                                             31       1  96.77%   41
utils/mime.py                                                                35       4  88.57%   34, 55, 61, 71
utils/notebook.py                                                            44      32  27.27%   25-29, 34-43, 55-64, 69-78, 83-87
utils/processor.py                                                          168      18  89.29%   50-53, 64, 86, 160-161, 254-262, 284
utils/repr.py                                                                38       0  100.00%
utils/requests.py                                                            55      29  47.27%   51-52, 64, 85-96, 107-124, 128
utils/s3.py                                                                 249      18  92.77%   200-203, 245, 258, 263, 489, 532, 534, 539-540, 581-588, 660, 686
utils/stac_reader.py                                                        113      44  61.06%   63-85, 95-97, 101, 138, 154-159, 206-216, 226-256
utils/streamresponse.py                                                      82      45  45.12%   24-26, 32-37, 40, 43-44, 49-65, 93-100, 109, 117-124, 133, 141-145
TOTAL                                                                     12291    1941  84.21%

Diff against develop

Filename                                                                  Stmts    Miss  Cover
----------------------------------------------------------------------  -------  ------  --------
cli.py                                                                       -2       0  -0.04%
api/core.py                                                                 -10      +1  -0.23%
api/provider.py                                                              +1       0  +0.03%
api/search_result.py                                                         -1       0  -0.06%
api/product/_assets.py                                                     +148      +5  +2.73%
api/product/_product.py                                                     -49     +27  -11.75%
api/product/metadata_mapping.py                                             +18     +16  -1.65%
plugins/manager.py                                                           +3      -1  +0.73%
plugins/apis/__init__.py                                                     +4       0  +100.00%
plugins/apis/base.py                                                         +1       0  +100.00%
plugins/apis/ecmwf.py                                                       +39     +27  -17.70%
plugins/apis/usgs.py                                                       +209    +196  -42.78%
plugins/authentication/__init__.py                                           +7      -1  +16.67%
plugins/authentication/aws_auth.py                                          -47     -26  +16.54%
plugins/authentication/base.py                                               -1       0  -0.87%
plugins/authentication/dummy.py                                              +7      +1  +85.71%
plugins/authentication/generic.py                                            +1      +6  -34.19%
plugins/authentication/keycloak.py                                           +1       0  +0.19%
plugins/authentication/token_exchange.py                                     +1      +6  -15.16%
plugins/authentication/eoiam/__init__.py                                     +3       0  +100.00%
plugins/authentication/eoiam/eoiamauth.py                                   +88      +1  +98.86%
plugins/authentication/eoiam/eoiamsessionauth.py                            +17       0  +100.00%
plugins/authentication/header/__init__.py                                    +3       0  +100.00%
plugins/authentication/header/headerauth.py                                 +10       0  +100.00%
plugins/authentication/header/httpheaderauth.py                             +13       0  +100.00%
plugins/authentication/openid_connect/__init__.py                            +4       0  +100.00%
plugins/authentication/openid_connect/codeauthorizedauth.py                 +25       0  +100.00%
plugins/authentication/openid_connect/oidcauthorizationcodeflowauth.py     +147      +6  +95.92%
plugins/authentication/openid_connect/oidcrefreshtokenbase.py               +81     +13  +83.95%
plugins/authentication/qsauth/__init__.py                                    +3       0  +100.00%
plugins/authentication/qsauth/httpquerystringauth.py                        +24      +1  +95.83%
plugins/authentication/qsauth/querystringauth.py                            +15       0  +100.00%
plugins/authentication/sas_auth/__init__.py                                  +3       0  +100.00%
plugins/authentication/sas_auth/requestssasauth.py                          +38      +2  +94.74%
plugins/authentication/sas_auth/sasauth.py                                  +27      +1  +96.30%
plugins/authentication/token/__init__.py                                     +3       0  +100.00%
plugins/authentication/token/requeststokenauth.py                           +24      +5  +79.17%
plugins/authentication/token/tokenauth.py                                  +123      +4  +96.75%
plugins/base/__init__.py                                                     +3       0  +100.00%
plugins/base/eodagpluginmount.py                                            +16      +2  +87.50%
plugins/base/plugintopic.py                                                 +14       0  +100.00%
plugins/crunch/__init__.py                                                   +1       0  +100.00%
plugins/download/__init__.py                                                 +1       0  +100.00%
plugins/download/httputils.py                                               +18       0  +100.00%
plugins/download/streamresponse.py                                          +56      +9  +83.93%
plugins/download/contentiterator/__init__.py                                 +4       0  +100.00%
plugins/download/contentiterator/basecontentiterator.py                     +27      +3  +88.89%
plugins/download/contentiterator/filecontentiterator.py                     +28       0  +100.00%
plugins/download/contentiterator/responsecontentiterator.py                 +62     +10  +83.87%
plugins/download/contentiterator/s3objectcontentiterator.py                 +36      +4  +88.89%
plugins/download/protocol/__init__.py                                        +4       0  +100.00%
plugins/download/protocol/_aws_consts.py                                    +25       0  +100.00%
plugins/download/protocol/aws.py                                           +421    +148  +64.85%
plugins/download/protocol/base.py                                          +376     +71  +81.12%
plugins/download/protocol/http.py                                          +481    +118  +75.47%
plugins/search/__init__.py                                                  -14       0  +100.00%
plugins/search/cop_ghsl.py                                                   +9      +6  -1.00%
plugins/search/creodias_s3.py                                                +5     +13  -37.73%
plugins/search/csw.py                                                        +1       0  +0.69%
plugins/search/preparesearch.py                                             +26       0  +100.00%
plugins/search/stac_list_assets.py                                           +4      +4  -8.28%
plugins/search/static_stac_search.py                                         -1       0  -0.26%
plugins/search/base/__init__.py                                              +3       0  +100.00%
plugins/search/base/mappinginterpretor.py                                   +87      +4  +95.40%
plugins/search/base/search.py                                              +253     +27  +89.33%
plugins/search/build_search_result/__init__.py                               +5       0  +100.00%
plugins/search/build_search_result/_utils.py                                +47      +6  +87.23%
plugins/search/build_search_result/ecmwfsearch.py                          +391     +81  +79.28%
plugins/search/build_search_result/meteobluesearch.py                       +68      +6  +91.18%
plugins/search/build_search_result/wekeoecmwfsearch.py                      +39      +6  +84.62%
plugins/search/qssearch/__init__.py                                          +7       0  +100.00%
plugins/search/qssearch/geodessearch.py                                     +47       0  +100.00%
plugins/search/qssearch/odatav4search.py                                    +65     +22  +66.15%
plugins/search/qssearch/postjsonsearch.py                                  +194     +31  +84.02%
plugins/search/qssearch/querystringsearch.py                               +530     +61  +88.49%
plugins/search/qssearch/stacsearch.py                                      +101     +13  +87.13%
plugins/search/qssearch/wekeosearch.py                                      +12       0  +100.00%
types/download_args.py                                                       -1       0  +100.00%
utils/__init__.py                                                            -4      +6  -1.10%
utils/deserialize.py                                                         +1       0  +0.19%
utils/eventable.py                                                          +26       0  +100.00%
utils/exceptions.py                                                          +1      +1  -1.69%
utils/mime.py                                                               +35      +4  +88.57%
utils/notebook.py                                                             0      +9  -20.46%
utils/processor.py                                                         +168     +18  +89.29%
utils/s3.py                                                                  +7      +6  -2.27%
utils/streamresponse.py                                                       0     +38  -46.34%
TOTAL                                                                     +4666   +1017  -3.79%

Results for commit: ea664a7

Minimum allowed coverage is 70%

♻️ This comment has been updated with latest results

@eodag-bot

eodag-bot commented Apr 24, 2026

Copy link
Copy Markdown
Collaborator

badge

Code Coverage (Windows)

Details
Filename                                                                  Stmts    Miss  Cover    Missing
----------------------------------------------------------------------  -------  ------  -------  ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
__init__.py                                                                   8       0  100.00%
cli.py                                                                      249      11  95.58%   103-114, 376, 640
config.py                                                                   306      24  92.16%   70-72, 75, 78, 81, 85, 89, 93-95, 592-594, 716-718, 737, 745, 775-780, 782
crunch.py                                                                     2       0  100.00%
api/__init__.py                                                               0       0  100.00%
api/collection.py                                                           151       8  94.70%   177, 213, 216, 323, 362, 365, 383, 386
api/core.py                                                                 764      58  92.41%   259, 546, 594, 637, 677, 697, 738-743, 768, 852-871, 885, 891, 1044, 1049, 1148, 1166, 1187-1188, 1284-1285, 1311, 1342-1343, 1369, 1382, 1443-1444, 1475-1476, 1533, 1550-1555, 1567-1570, 1682, 1907, 2058, 2242-2243
api/provider.py                                                             383      40  89.56%   186, 190-191, 316-337, 405, 521, 525-526, 531-534, 545, 621-631, 821-822, 870, 877, 891, 914-917, 951-958, 962-963
api/search_result.py                                                        137      12  91.24%   113, 125, 135, 156, 209, 267, 279, 414, 469-472
api/product/__init__.py                                                       7       0  100.00%
api/product/_assets.py                                                      204       9  95.59%   136-137, 159-160, 162, 209, 418, 491-495
api/product/_product.py                                                     262      51  80.53%   178, 332, 365-368, 405, 424-425, 468, 492-522, 553-585, 648-655, 670, 736, 748, 811
api/product/metadata_mapping.py                                             890      78  91.24%   127-129, 225-230, 254, 312-313, 359-360, 401, 422, 474-475, 512, 533-536, 559, 571-572, 613, 636, 661-664, 666-671, 736-741, 750, 756, 772, 780, 811, 816-829, 1036, 1189, 1191, 1211, 1220-1224, 1241-1246, 1379, 1402, 1411, 1433, 1438, 1490, 1562, 1590, 1616, 1630, 1655, 1701, 1770, 1845, 1874, 1905
api/product/drivers/__init__.py                                              11       0  100.00%
api/product/drivers/base.py                                                  32       0  100.00%
api/product/drivers/generic.py                                               11       0  100.00%
api/product/drivers/sentinel1.py                                             33       0  100.00%
api/product/drivers/sentinel2.py                                             33       0  100.00%
plugins/__init__.py                                                           0       0  100.00%
plugins/manager.py                                                          176      15  91.48%   103-108, 180, 202, 220-221, 233, 261, 371-374, 386-387
plugins/apis/__init__.py                                                      4       0  100.00%
plugins/apis/base.py                                                          5       0  100.00%
plugins/apis/ecmwf.py                                                       134      35  73.88%   158, 162, 166, 176-178, 197-198, 227-228, 240, 255-295, 312-313, 331-338
plugins/apis/usgs.py                                                        391     221  43.48%   125, 130, 136, 140, 150-158, 163-183, 188, 215-216, 223, 227-228, 232, 235, 262-277, 287-543, 563, 582-583, 611-612, 618-623, 643, 646-654, 657, 660-661, 669, 671, 673, 696-698, 713-784, 807-818
plugins/authentication/__init__.py                                           13       0  100.00%
plugins/authentication/aws_auth.py                                           77       9  88.31%   51-53, 68-69, 177, 201, 217-218
plugins/authentication/base.py                                               21       4  80.95%   46, 59, 82, 96
plugins/authentication/dummy.py                                               7       1  85.71%   31
plugins/authentication/generic.py                                            17       9  47.06%   48-66
plugins/authentication/keycloak.py                                           47       4  91.49%   152, 175-180
plugins/authentication/token_exchange.py                                     37      20  45.95%   70-76, 89-119
plugins/authentication/eoiam/__init__.py                                      3       0  100.00%
plugins/authentication/eoiam/eoiamauth.py                                    88       1  98.86%   172
plugins/authentication/eoiam/eoiamsessionauth.py                             17       0  100.00%
plugins/authentication/header/__init__.py                                     3       0  100.00%
plugins/authentication/header/headerauth.py                                  10       0  100.00%
plugins/authentication/header/httpheaderauth.py                              13       0  100.00%
plugins/authentication/openid_connect/__init__.py                             4       0  100.00%
plugins/authentication/openid_connect/codeauthorizedauth.py                  25       0  100.00%
plugins/authentication/openid_connect/oidcauthorizationcodeflowauth.py      147       6  95.92%   181-184, 210, 251
plugins/authentication/openid_connect/oidcrefreshtokenbase.py                81      13  83.95%   80-81, 89-107, 154, 162, 176, 196
plugins/authentication/qsauth/__init__.py                                     3       0  100.00%
plugins/authentication/qsauth/httpquerystringauth.py                         24       1  95.83%   87
plugins/authentication/qsauth/querystringauth.py                             15       0  100.00%
plugins/authentication/sas_auth/__init__.py                                   3       0  100.00%
plugins/authentication/sas_auth/requestssasauth.py                           38       2  94.74%   64, 85
plugins/authentication/sas_auth/sasauth.py                                   27       1  96.30%   72
plugins/authentication/token/__init__.py                                      3       0  100.00%
plugins/authentication/token/requeststokenauth.py                            24       5  79.17%   46-50
plugins/authentication/token/tokenauth.py                                   123       4  96.75%   190, 227, 307-308
plugins/base/__init__.py                                                      3       0  100.00%
plugins/base/eodagpluginmount.py                                             16       2  87.50%   45, 52
plugins/base/plugintopic.py                                                  14       0  100.00%
plugins/crunch/__init__.py                                                    7       0  100.00%
plugins/crunch/base.py                                                       12       0  100.00%
plugins/crunch/filter_date.py                                                59       0  100.00%
plugins/crunch/filter_latest_intersect.py                                    54       6  88.89%   93-94, 101-102, 104-108
plugins/crunch/filter_latest_tpl_name.py                                     35       0  100.00%
plugins/crunch/filter_overlap.py                                             66      10  84.85%   119-122, 138-164
plugins/crunch/filter_property.py                                            30       0  100.00%
plugins/download/__init__.py                                                  5       0  100.00%
plugins/download/httputils.py                                                18       0  100.00%
plugins/download/streamresponse.py                                           56       9  83.93%   49, 108-115, 124, 136
plugins/download/contentiterator/__init__.py                                  4       0  100.00%
plugins/download/contentiterator/basecontentiterator.py                      27       3  88.89%   40-41, 58
plugins/download/contentiterator/filecontentiterator.py                      28       0  100.00%
plugins/download/contentiterator/responsecontentiterator.py                  62      10  83.87%   56, 61-62, 104-112
plugins/download/contentiterator/s3objectcontentiterator.py                  36       4  88.89%   44, 49-50, 66
plugins/download/protocol/__init__.py                                         4       0  100.00%
plugins/download/protocol/_aws_consts.py                                     25       0  100.00%
plugins/download/protocol/aws.py                                            421     139  66.98%   136, 148-149, 166, 173, 188-189, 202, 204, 215, 226-230, 250-316, 369, 371-373, 394, 430-446, 476-514, 544, 550-552, 645-650, 660, 664-665, 676-677, 683-684, 691-692, 699-700, 705-706, 715-716, 721-722, 724-725, 730-731, 737-738, 744-745, 753-754, 769-820, 838, 853, 880, 893-895, 908, 936
plugins/download/protocol/base.py                                           376      69  81.65%   142, 152-153, 187, 197-198, 245-246, 289-292, 360-361, 396-420, 450, 452, 463, 472-473, 476, 544, 562, 565-575, 579, 595-614, 681, 729-733
plugins/download/protocol/http.py                                           481     118  75.47%   203-206, 220, 224, 242-244, 258-262, 298-300, 323-324, 374, 378-380, 412, 423, 448, 466-467, 497, 509, 516, 526-527, 543, 546, 573, 587-588, 612, 618, 627, 634, 684-687, 690, 699-704, 707, 723-745, 761, 768, 772, 780, 789-792, 805, 833, 839, 854, 869-898, 908-912, 928-933, 943-950, 967-969, 983-988, 991, 994, 1051, 1054, 1056, 1068, 1079, 1097
plugins/search/__init__.py                                                   11       0  100.00%
plugins/search/cop_ghsl.py                                                  416      91  78.12%   74-75, 110-111, 175, 177, 219, 250-253, 299, 315, 318, 352, 356-361, 381, 402, 423, 454, 465-478, 484, 519, 534, 548-549, 563-565, 572, 576-578, 581-584, 602-662, 673-688
plugins/search/cop_marine.py                                                274      59  78.47%   57, 65-67, 77-78, 83, 88-89, 105, 107, 110, 176-177, 220, 247, 253, 257, 261, 272, 283-284, 297, 328-331, 337, 347, 360, 364, 368, 372, 376-380, 386-389, 392-409, 426-429, 482-486, 491, 503, 517-518
plugins/search/creodias_s3.py                                                34      14  58.82%   57, 67-91
plugins/search/csw.py                                                       113      87  23.01%   100-101, 105-106, 114-171, 177-190, 198-235, 249-290
plugins/search/preparesearch.py                                              26       0  100.00%
plugins/search/stac_list_assets.py                                           29      14  51.72%   54-62, 65-76
plugins/search/static_stac_search.py                                         83      18  78.31%   98-126, 165-168, 181, 223
plugins/search/base/__init__.py                                               3       0  100.00%
plugins/search/base/mappinginterpretor.py                                    87       4  95.40%   100-101, 127-128
plugins/search/base/search.py                                               253      27  89.33%   112, 116, 140-146, 185, 221-224, 255, 289, 352, 373, 499, 549, 630-638
plugins/search/build_search_result/__init__.py                                5       0  100.00%
plugins/search/build_search_result/_utils.py                                 47       6  87.23%   77-78, 114, 118, 138, 197
plugins/search/build_search_result/ecmwfsearch.py                           391      81  79.28%   212, 252-263, 273-275, 355-356, 405, 429, 431, 496, 504-508, 529, 539, 565, 610, 635, 663, 681-697, 747, 772, 775, 779, 788, 794, 832-853, 894, 921-922, 931-940, 997, 1020-1071, 1082
plugins/search/build_search_result/meteobluesearch.py                        68       6  91.18%   128-129, 173, 182-184
plugins/search/build_search_result/wekeoecmwfsearch.py                       39       6  84.62%   74, 122-132
plugins/search/qssearch/__init__.py                                           7       0  100.00%
plugins/search/qssearch/geodessearch.py                                      47       0  100.00%
plugins/search/qssearch/odatav4search.py                                     65      22  66.15%   103-148, 154
plugins/search/qssearch/postjsonsearch.py                                   194      31  84.02%   107-111, 182, 185, 197, 211-214, 226, 248-262, 270, 330-336, 343, 397, 420, 425-426, 442, 448, 462
plugins/search/qssearch/querystringsearch.py                                530      61  88.49%   357, 517-518, 537-538, 541-542, 554-558, 790-796, 855, 921, 951, 958, 1029, 1050, 1053-1054, 1072, 1081-1082, 1109, 1120-1121, 1181, 1190, 1195-1212, 1221, 1236, 1245-1248, 1258, 1281, 1364, 1384-1394, 1402, 1475-1476, 1478-1480, 1482-1483, 1486-1487
plugins/search/qssearch/stacsearch.py                                       101      13  87.13%   143, 147, 158, 181-186, 195, 203-213
plugins/search/qssearch/wekeosearch.py                                       12       0  100.00%
resources/__init__.py                                                         0       0  100.00%
resources/shp/__init__.py                                                     0       0  100.00%
types/__init__.py                                                           180      43  76.11%   58, 71-75, 86-98, 126-128, 135-140, 155, 165, 247, 285, 295-311, 316, 318, 340, 345, 353, 363
types/bbox.py                                                                39      19  51.28%   46-61, 72-74, 85-87, 99-101, 113-115, 123
types/download_args.py                                                        9       0  100.00%
types/queryables.py                                                         112       0  100.00%
types/search_args.py                                                         70      18  74.29%   60-64, 71-88, 103
types/stac_extensions.py                                                    148       4  97.30%   432-438, 619
types/stac_metadata.py                                                      154      22  85.71%   95, 117, 150, 183-185, 199-213, 222-229, 256-259
utils/__init__.py                                                           568      45  92.08%   60, 198, 229-230, 239-265, 268, 283, 363-367, 442-446, 526, 566-567, 596, 974-977, 1018-1020, 1028, 1047-1048, 1077, 1095-1096, 1208, 1267, 1270, 1273, 1296, 1460, 1666, 1684
utils/cache.py                                                               22       0  100.00%
utils/dates.py                                                              182       4  97.80%   172, 516, 523-524
utils/deserialize.py                                                         74      10  86.49%   53, 55, 103, 108-109, 145, 159, 181-182, 188
utils/env.py                                                                  3       0  100.00%
utils/eventable.py                                                           26       0  100.00%
utils/exceptions.py                                                          59       1  98.31%   166
utils/free_text_search.py                                                    65       2  96.92%   83, 91
utils/import_system.py                                                       28      19  32.14%   64-78, 89-99
utils/logging.py                                                             31       1  96.77%   41
utils/mime.py                                                                35       3  91.43%   55, 61, 71
utils/notebook.py                                                            44      32  27.27%   25-29, 34-43, 55-64, 69-78, 83-87
utils/processor.py                                                          168      18  89.29%   50-53, 64, 86, 160-161, 254-262, 284
utils/repr.py                                                                38       0  100.00%
utils/requests.py                                                            55      29  47.27%   51-52, 64, 85-96, 107-124, 128
utils/s3.py                                                                 249      18  92.77%   200-203, 245, 258, 263, 489, 532, 534, 539-540, 581-588, 660, 686
utils/stac_reader.py                                                        113      44  61.06%   63-85, 95-97, 101, 138, 154-159, 206-216, 226-256
utils/streamresponse.py                                                      82      45  45.12%   24-26, 32-37, 40, 43-44, 49-65, 93-100, 109, 117-124, 133, 141-145
TOTAL                                                                     12291    1929  84.31%

Diff against develop

Filename                                                                  Stmts    Miss  Cover
----------------------------------------------------------------------  -------  ------  --------
cli.py                                                                       -2       0  -0.04%
api/core.py                                                                 -10      +1  -0.23%
api/provider.py                                                              +1       0  +0.03%
api/search_result.py                                                         -1       0  -0.06%
api/product/_assets.py                                                     +148      +5  +2.73%
api/product/_product.py                                                     -49     +27  -11.75%
api/product/metadata_mapping.py                                             +18     +16  -1.65%
plugins/manager.py                                                           +3      -1  +0.73%
plugins/apis/__init__.py                                                     +4       0  +100.00%
plugins/apis/base.py                                                         +1       0  +100.00%
plugins/apis/ecmwf.py                                                       +39     +27  -17.70%
plugins/apis/usgs.py                                                       +209    +196  -42.78%
plugins/authentication/__init__.py                                           +7      -1  +16.67%
plugins/authentication/aws_auth.py                                          -47     -26  +16.54%
plugins/authentication/base.py                                               -1       0  -0.87%
plugins/authentication/dummy.py                                              +7      +1  +85.71%
plugins/authentication/generic.py                                            +1      +6  -34.19%
plugins/authentication/keycloak.py                                           +1       0  +0.19%
plugins/authentication/token_exchange.py                                     +1      +6  -15.16%
plugins/authentication/eoiam/__init__.py                                     +3       0  +100.00%
plugins/authentication/eoiam/eoiamauth.py                                   +88      +1  +98.86%
plugins/authentication/eoiam/eoiamsessionauth.py                            +17       0  +100.00%
plugins/authentication/header/__init__.py                                    +3       0  +100.00%
plugins/authentication/header/headerauth.py                                 +10       0  +100.00%
plugins/authentication/header/httpheaderauth.py                             +13       0  +100.00%
plugins/authentication/openid_connect/__init__.py                            +4       0  +100.00%
plugins/authentication/openid_connect/codeauthorizedauth.py                 +25       0  +100.00%
plugins/authentication/openid_connect/oidcauthorizationcodeflowauth.py     +147      +6  +95.92%
plugins/authentication/openid_connect/oidcrefreshtokenbase.py               +81     +13  +83.95%
plugins/authentication/qsauth/__init__.py                                    +3       0  +100.00%
plugins/authentication/qsauth/httpquerystringauth.py                        +24      +1  +95.83%
plugins/authentication/qsauth/querystringauth.py                            +15       0  +100.00%
plugins/authentication/sas_auth/__init__.py                                  +3       0  +100.00%
plugins/authentication/sas_auth/requestssasauth.py                          +38      +2  +94.74%
plugins/authentication/sas_auth/sasauth.py                                  +27      +1  +96.30%
plugins/authentication/token/__init__.py                                     +3       0  +100.00%
plugins/authentication/token/requeststokenauth.py                           +24      +5  +79.17%
plugins/authentication/token/tokenauth.py                                  +123      +4  +96.75%
plugins/base/__init__.py                                                     +3       0  +100.00%
plugins/base/eodagpluginmount.py                                            +16      +2  +87.50%
plugins/base/plugintopic.py                                                 +14       0  +100.00%
plugins/crunch/__init__.py                                                   +1       0  +100.00%
plugins/download/__init__.py                                                 +1       0  +100.00%
plugins/download/httputils.py                                               +18       0  +100.00%
plugins/download/streamresponse.py                                          +56      +9  +83.93%
plugins/download/contentiterator/__init__.py                                 +4       0  +100.00%
plugins/download/contentiterator/basecontentiterator.py                     +27      +3  +88.89%
plugins/download/contentiterator/filecontentiterator.py                     +28       0  +100.00%
plugins/download/contentiterator/responsecontentiterator.py                 +62     +10  +83.87%
plugins/download/contentiterator/s3objectcontentiterator.py                 +36      +4  +88.89%
plugins/download/protocol/__init__.py                                        +4       0  +100.00%
plugins/download/protocol/_aws_consts.py                                    +25       0  +100.00%
plugins/download/protocol/aws.py                                           +421    +139  +66.98%
plugins/download/protocol/base.py                                          +376     +69  +81.65%
plugins/download/protocol/http.py                                          +481    +118  +75.47%
plugins/search/__init__.py                                                  -14       0  +100.00%
plugins/search/cop_ghsl.py                                                   +9      +6  -1.00%
plugins/search/creodias_s3.py                                                +5     +13  -37.73%
plugins/search/csw.py                                                        +1       0  +0.69%
plugins/search/preparesearch.py                                             +26       0  +100.00%
plugins/search/stac_list_assets.py                                           +4      +4  -8.28%
plugins/search/static_stac_search.py                                         -1       0  -0.26%
plugins/search/base/__init__.py                                              +3       0  +100.00%
plugins/search/base/mappinginterpretor.py                                   +87      +4  +95.40%
plugins/search/base/search.py                                              +253     +27  +89.33%
plugins/search/build_search_result/__init__.py                               +5       0  +100.00%
plugins/search/build_search_result/_utils.py                                +47      +6  +87.23%
plugins/search/build_search_result/ecmwfsearch.py                          +391     +81  +79.28%
plugins/search/build_search_result/meteobluesearch.py                       +68      +6  +91.18%
plugins/search/build_search_result/wekeoecmwfsearch.py                      +39      +6  +84.62%
plugins/search/qssearch/__init__.py                                          +7       0  +100.00%
plugins/search/qssearch/geodessearch.py                                     +47       0  +100.00%
plugins/search/qssearch/odatav4search.py                                    +65     +22  +66.15%
plugins/search/qssearch/postjsonsearch.py                                  +194     +31  +84.02%
plugins/search/qssearch/querystringsearch.py                               +530     +61  +88.49%
plugins/search/qssearch/stacsearch.py                                      +101     +13  +87.13%
plugins/search/qssearch/wekeosearch.py                                      +12       0  +100.00%
types/download_args.py                                                       -1       0  +100.00%
utils/__init__.py                                                            -4      +6  -1.10%
utils/deserialize.py                                                         +1       0  +0.19%
utils/eventable.py                                                          +26       0  +100.00%
utils/exceptions.py                                                          +1      +1  -1.69%
utils/mime.py                                                               +35      +3  +91.43%
utils/notebook.py                                                             0      +9  -20.46%
utils/processor.py                                                         +168     +18  +89.29%
utils/s3.py                                                                  +7      +6  -2.27%
utils/streamresponse.py                                                       0     +38  -46.34%
TOTAL                                                                     +4666   +1005  -3.67%

Results for commit: ea664a7

Minimum allowed coverage is 70%

♻️ This comment has been updated with latest results

@pdavid-cssopra
pdavid-cssopra force-pushed the feat-update-plugin-downloads-methods-to-use-an-asset-as-input-instead-of-a-product branch from c196fac to f3082cb Compare April 24, 2026 13:10
@pdavid-cssopra
pdavid-cssopra marked this pull request as draft April 24, 2026 13:11
@pdavid-cssopra pdavid-cssopra self-assigned this Apr 24, 2026
@pdavid-cssopra
pdavid-cssopra force-pushed the feat-update-plugin-downloads-methods-to-use-an-asset-as-input-instead-of-a-product branch 10 times, most recently from 1431d6f to 30b9cd6 Compare April 27, 2026 07:26
@pdavid-cssopra pdavid-cssopra changed the title feat(asset): move downloam from product to asset #1619 feat(asset): move download from product to asset #1619 Apr 27, 2026
@pdavid-cssopra
pdavid-cssopra force-pushed the feat-update-plugin-downloads-methods-to-use-an-asset-as-input-instead-of-a-product branch 5 times, most recently from f2810ca to 2ffa657 Compare April 28, 2026 13:13
+ update/complete asset mapping behaviour #2069
+ update provider configuration #2069
+ update specific providers #2069
+ centralize/deduplicate source #2069
+ rework register download #2071
+ rework downloader patching #2071
+ rework http download + stream #2071
+ rework cache management as statement #2071
+ sanitize dependencies expression #2071
+ rework aws download + stream #2071
+ makes all download request pass through processor to manage download paralellize restrict #2071
+ update tests and tests samples #2071
@pdavid-cssopra
pdavid-cssopra force-pushed the feat-update-plugin-downloads-methods-to-use-an-asset-as-input-instead-of-a-product branch from 2ffa657 to ea664a7 Compare April 28, 2026 14:31
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.

2 participants