Skip to content

Conversation

@jlahovnik
Copy link
Collaborator

Instead of a single download or authentication plugin, now a list of plugins is defined for each provider:

  • search_auth and download_auth have been removed, both are now given in a list and the parameter required_for (list[str]) is used to define if an authentication plugin is used for search, download or both. This also replaces the attribute need_auth of the search plugin. The parameter required_credentials is used to define which credentials are used for which plugin in case of multiple plugins. If it is not given, it is assumed that all available credentials from eodag.yml are required.
  • matching_url and matching_conf have been replaced by a dictionary match. The parameter href in the dictionary corresponds to matching_url, the remaining parameters to matching_conf.
  • The configurations of the existing providers have been updated.

@jlahovnik jlahovnik self-assigned this Jun 25, 2025
@jlahovnik jlahovnik linked an issue Jun 25, 2025 that may be closed by this pull request
@github-actions
Copy link
Contributor

github-actions bot commented Jun 25, 2025

Test Results

    4 files  ±0      4 suites  ±0   5m 34s ⏱️ -14s
  644 tests ±0    641 ✅ ±0    3 💤 ±0  0 ❌ ±0 
2 576 runs  ±0  2 474 ✅ ±0  102 💤 ±0  0 ❌ ±0 

Results for commit 3d76b87. ± Comparison against base commit 920312e.

♻️ This comment has been updated with latest results.

@eodag-bot
Copy link
Collaborator

eodag-bot commented Jun 25, 2025

badge

Code Coverage (Ubuntu)

Filename                                     Stmts    Miss  Cover    Missing
-----------------------------------------  -------  ------  -------  ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
__init__.py                                      8       0  100.00%
cli.py                                         323      64  80.19%   62-63, 87, 674-737, 839-890, 894
config.py                                      487      33  93.22%   79-81, 90, 98, 102-104, 177, 188, 216-218, 737-739, 879-882, 926-927, 939-940, 947-948, 982, 1062, 1121-1126, 1128
crunch.py                                        5       5  0.00%    20-24
api/__init__.py                                  0       0  100.00%
api/core.py                                    807      81  89.96%   379-380, 430, 688, 719, 763-766, 804, 848, 882, 925-930, 956, 1047, 1115, 1338-1350, 1390, 1392, 1422, 1426-1437, 1450-1456, 1541-1544, 1581-1601, 1670-1675, 1687-1690, 1708-1720, 2004, 2028-2034, 2285, 2289-2293, 2302-2304, 2348-2349, 2375-2378
api/search_result.py                            56       4  92.86%   80, 89, 96, 110
api/product/__init__.py                          6       0  100.00%
api/product/_assets.py                          52       5  90.38%   97, 183, 191, 194-198
api/product/_product.py                        208      21  89.90%   71-73, 237-238, 254-255, 329, 356, 457, 475, 499-502, 511-514, 569-572
api/product/metadata_mapping.py                708      63  91.10%   122-124, 222, 254-255, 312-324, 326, 337, 362, 402-403, 440, 461-464, 487, 495-496, 589-590, 614-615, 621-624, 639-640, 789, 840, 993, 1002-1006, 1023-1028, 1155, 1169-1189, 1209, 1214, 1366, 1380, 1405, 1451, 1512, 1535-1536, 1556-1560, 1576, 1584
api/product/drivers/__init__.py                 20       2  90.00%   33-36
api/product/drivers/base.py                     29       1  96.55%   98
api/product/drivers/generic.py                   7       0  100.00%
api/product/drivers/sentinel1.py                15       0  100.00%
api/product/drivers/sentinel2.py                15       0  100.00%
plugins/__init__.py                              0       0  100.00%
plugins/base.py                                 21       2  90.48%   48, 55
plugins/manager.py                             191      19  90.05%   151-156, 191-196, 200, 238, 260, 264, 290, 295, 333, 443-446, 458-459
plugins/apis/__init__.py                         0       0  100.00%
plugins/apis/base.py                             4       0  100.00%
plugins/apis/ecmwf.py                           97      10  89.69%   165-167, 214-215, 241-243, 296-297
plugins/apis/usgs.py                           180      26  85.56%   156, 258, 292, 327-329, 334, 360-361, 366, 396-403, 414-419, 441-447, 478
plugins/authentication/__init__.py               6       1  83.33%   31
plugins/authentication/aws_auth.py              20       0  100.00%
plugins/authentication/base.py                  25       2  92.00%   44, 70
plugins/authentication/generic.py               16       3  81.25%   50, 55, 65
plugins/authentication/header.py                20       0  100.00%
plugins/authentication/keycloak.py              46       7  84.78%   153-156, 177-182
plugins/authentication/oauth.py                 13       7  46.15%   43-45, 49-52
plugins/authentication/openid_connect.py       232      28  87.93%   92-93, 105-123, 170, 176-204, 212, 351-354, 380, 421
plugins/authentication/qsauth.py                35       1  97.14%   92
plugins/authentication/sas_auth.py              47       1  97.87%   76
plugins/authentication/token.py                129       9  93.02%   179, 216, 290-291, 341-345
plugins/authentication/token_exchange.py        36      14  61.11%   75, 93-121
plugins/crunch/__init__.py                       0       0  100.00%
plugins/crunch/base.py                          10       1  90.00%   43
plugins/crunch/filter_date.py                   59      14  76.27%   52-57, 69, 78, 87, 90, 100-102, 109-111, 118
plugins/crunch/filter_latest_intersect.py       47       8  82.98%   52-53, 69, 78-81, 83, 90-93
plugins/crunch/filter_latest_tpl_name.py        31       1  96.77%   83
plugins/crunch/filter_overlap.py                66      18  72.73%   28-30, 66-69, 76-79, 85, 93, 104-120
plugins/crunch/filter_property.py               30       5  83.33%   55-60, 63-64
plugins/download/__init__.py                     0       0  100.00%
plugins/download/aws.py                        528     158  70.08%   272, 285, 365-368, 382-386, 476-478, 482, 515-516, 522-526, 556, 589, 593, 600, 630-638, 642, 677-685, 696-698, 729-810, 828-886, 897-902, 955, 970-972, 975, 985-993, 1001-1015, 1025-1048, 1055-1068, 1106, 1132, 1177-1179, 1399
plugins/download/base.py                       256      42  83.59%   128, 156, 236-239, 292-293, 341-345, 351-352, 394, 397-411, 423, 427, 491-495, 525-526, 551-559, 561-565, 615, 636, 658, 666
plugins/download/creodias_s3.py                 25       9  64.00%   55-69
plugins/download/http.py                       545      95  82.57%   229, 271-274, 335-338, 341, 348-353, 384-386, 403, 418, 472, 507, 521, 535, 543-547, 563-568, 579, 597, 633-636, 657, 667, 674, 694, 771, 790-801, 809-814, 824-841, 859, 889-898, 934, 959-960, 979-984, 993, 1008-1010, 1014, 1017, 1032-1033, 1068, 1110-1113, 1128, 1144, 1203-1204, 1210, 1220, 1256, 1292, 1312, 1347-1349
plugins/download/s3rest.py                     120      26  78.33%   119, 153, 160, 195, 222-229, 232-234, 238, 249-255, 263-264, 267-271, 286-289, 298, 319-322
plugins/search/__init__.py                      22       0  100.00%
plugins/search/base.py                         151      11  92.72%   101, 105, 129-135, 276, 297, 436
plugins/search/build_search_result.py          477      56  88.26%   245-246, 282, 285, 310, 313, 344-346, 554, 556, 560, 563, 690, 692, 753, 760, 784, 821, 872, 922-937, 985, 1010, 1013, 1017, 1138-1139, 1148-1157, 1220, 1241, 1260-1269, 1386-1387, 1432, 1441-1443, 1503, 1549
plugins/search/cop_marine.py                   252      47  81.35%   56, 64-66, 76-77, 82, 87-88, 104, 106, 109, 175-176, 232, 238, 242, 246, 259, 270-271, 279, 310, 314, 335, 339, 343, 347, 351-355, 361-364, 367-381, 398, 447-451, 456, 468
plugins/search/creodias_s3.py                   25       1  96.00%   51
plugins/search/csw.py                          105      81  22.86%   98-99, 103-104, 112-160, 166-179, 187-219, 237-278
plugins/search/data_request_search.py          207      72  65.22%   190-193, 209, 220, 224-225, 236, 241, 246, 253, 266-269, 323-324, 328, 338-344, 349, 367-371, 387-390, 398-409, 426, 428, 435-438, 440-441, 459-463, 496, 506, 517, 530, 536-551, 556
plugins/search/qssearch.py                     711      89  87.48%   446, 504, 518, 522-528, 543-547, 559-563, 676-688, 733-736, 807-808, 859, 878, 885, 897, 954, 975, 978-979, 988-989, 998-999, 1008-1009, 1036, 1120-1125, 1129-1138, 1172, 1192, 1261-1262, 1268, 1358, 1519, 1522, 1528-1529, 1550, 1578-1590, 1597, 1629-1631, 1641-1647, 1677, 1696, 1701-1702, 1717, 1733, 1820, 1827, 1838, 1861-1866, 1875, 1884
plugins/search/stac_list_assets.py              25      10  60.00%   44-51, 75-85
plugins/search/static_stac_search.py            79      13  83.54%   100-126, 170, 183
rest/__init__.py                                 4       2  50.00%   21-22
rest/cache.py                                   33       7  78.79%   35-37, 53-55, 59, 68
rest/config.py                                  25       0  100.00%
rest/constants.py                                6       0  100.00%
rest/core.py                                   260      62  76.15%   258, 301, 316-352, 448, 485-524, 601, 631-634, 707, 714-767
rest/errors.py                                  72       5  93.06%   117, 127, 138, 163-164
rest/server.py                                 192      24  87.50%   86, 109-111, 285-290, 318, 516-518, 535-540, 569, 571, 575-576, 580-581
rest/stac.py                                   333      72  78.38%   312, 334, 386-389, 416-443, 474-476, 499, 531-532, 614-654, 676-692, 784-788, 795, 850-851, 861-866, 876-880, 929, 1019-1021
rest/types/__init__.py                           0       0  100.00%
rest/types/collections_search.py                13      13  0.00%    18-44
rest/types/eodag_search.py                     180       6  96.67%   225-229, 282, 285, 353, 375
rest/types/queryables.py                        64      12  81.25%   61, 71-79, 105-110, 174
rest/types/stac_search.py                      125       7  94.40%   128, 174, 189-191, 199, 203
rest/utils/__init__.py                          94      12  87.23%   101-102, 121-123, 175, 185-199
rest/utils/cql_evaluate.py                      48       5  89.58%   69, 76, 90, 97, 105
rest/utils/rfc3339.py                           23       3  86.96%   48, 60, 62
types/__init__.py                              161      40  75.16%   67, 80-84, 95-107, 135-137, 144-149, 252, 262-278, 283, 285, 307, 312, 320, 330
types/bbox.py                                   43      19  55.81%   46-61, 72-74, 85-87, 99-101, 113-115, 123
types/download_args.py                           9       0  100.00%
types/queryables.py                            111       0  100.00%
types/search_args.py                            70      18  74.29%   60-64, 71-88, 103
types/whoosh.py                                 81      16  80.25%   129-132, 136-143, 155-161, 174-176
utils/__init__.py                              571      58  89.84%   81, 201-202, 211-238, 241, 256, 336-340, 363-370, 372-379, 382-386, 440-444, 463-465, 479, 571, 586, 626-627, 656, 1031-1034, 1042-1043, 1081-1082, 1129-1130, 1270
utils/cache.py                                  22       0  100.00%
utils/env.py                                     3       0  100.00%
utils/exceptions.py                             46       0  100.00%
utils/import_system.py                          28      19  32.14%   64-78, 89-99
utils/logging.py                                28       1  96.43%   41
utils/notebook.py                               44      23  47.73%   25-29, 36-41, 58-62, 72-78, 83-87
utils/repr.py                                   38       8  78.95%   51, 53, 57, 98, 122-129
utils/requests.py                               55      29  47.27%   51-52, 64, 85-96, 107-124, 128
utils/rest.py                                   36       1  97.22%   55
utils/s3.py                                     69       3  95.65%   162-163, 226
utils/stac_reader.py                           113      44  61.06%   63-85, 95-97, 101, 138, 154-159, 206-216, 226-256
TOTAL                                        10635    1675  84.25%

Diff against develop

Filename                                    Stmts    Miss  Cover
----------------------------------------  -------  ------  --------
config.py                                     +37      +3  -0.11%
api/core.py                                    -1      +1  -0.14%
api/product/_product.py                        -5      +2  -1.18%
plugins/manager.py                            +18       0  +1.03%
plugins/authentication/base.py                 +8       0  +3.76%
plugins/authentication/header.py               +1       0  +100.00%
plugins/authentication/openid_connect.py       +1       0  +0.05%
plugins/authentication/qsauth.py               +1       0  +0.08%
plugins/authentication/token.py                +1       0  +0.05%
plugins/download/http.py                       +3      +2  -0.27%
plugins/search/qssearch.py                     +1      +1  -0.13%
utils/__init__.py                             +22     +18  -2.87%
TOTAL                                         +87     +27  -0.13%

Results for commit: 3d76b87

Minimum allowed coverage is 70%

♻️ This comment has been updated with latest results

@eodag-bot
Copy link
Collaborator

eodag-bot commented Jun 25, 2025

badge

Code Coverage (Windows)

Filename                                     Stmts    Miss  Cover    Missing
-----------------------------------------  -------  ------  -------  ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
__init__.py                                      8       0  100.00%
cli.py                                         323      64  80.19%   62-63, 87, 674-737, 839-890, 894
config.py                                      487      34  93.02%   79-81, 90, 98, 102-104, 177, 188, 216-218, 737-739, 879-882, 926-927, 939-940, 947-948, 982, 1062, 1091, 1121-1126, 1128
crunch.py                                        5       5  0.00%    20-24
api/__init__.py                                  0       0  100.00%
api/core.py                                    807      81  89.96%   379-380, 430, 688, 719, 763-766, 804, 848, 882, 925-930, 956, 1047, 1115, 1338-1350, 1390, 1392, 1422, 1426-1437, 1450-1456, 1541-1544, 1581-1601, 1670-1675, 1687-1690, 1708-1720, 2004, 2028-2034, 2285, 2289-2293, 2302-2304, 2348-2349, 2375-2378
api/search_result.py                            56       4  92.86%   80, 89, 96, 110
api/product/__init__.py                          6       0  100.00%
api/product/_assets.py                          52       5  90.38%   97, 183, 191, 194-198
api/product/_product.py                        208      21  89.90%   71-73, 237-238, 254-255, 329, 356, 457, 475, 499-502, 511-514, 569-572
api/product/metadata_mapping.py                708      63  91.10%   122-124, 222, 254-255, 312-324, 326, 337, 362, 402-403, 440, 461-464, 487, 495-496, 589-590, 614-615, 621-624, 639-640, 789, 840, 993, 1002-1006, 1023-1028, 1155, 1169-1189, 1209, 1214, 1366, 1380, 1405, 1451, 1512, 1535-1536, 1556-1560, 1576, 1584
api/product/drivers/__init__.py                 20       2  90.00%   33-36
api/product/drivers/base.py                     29       1  96.55%   98
api/product/drivers/generic.py                   7       0  100.00%
api/product/drivers/sentinel1.py                15       0  100.00%
api/product/drivers/sentinel2.py                15       0  100.00%
plugins/__init__.py                              0       0  100.00%
plugins/base.py                                 21       3  85.71%   48, 55, 68
plugins/manager.py                             191      19  90.05%   151-156, 191-196, 200, 238, 260, 264, 290, 295, 333, 443-446, 458-459
plugins/apis/__init__.py                         0       0  100.00%
plugins/apis/base.py                             4       0  100.00%
plugins/apis/ecmwf.py                           97      10  89.69%   165-167, 214-215, 241-243, 296-297
plugins/apis/usgs.py                           180      26  85.56%   156, 258, 292, 327-329, 334, 360-361, 366, 396-403, 414-419, 441-447, 478
plugins/authentication/__init__.py               6       1  83.33%   31
plugins/authentication/aws_auth.py              20       0  100.00%
plugins/authentication/base.py                  25       2  92.00%   44, 70
plugins/authentication/generic.py               16       3  81.25%   50, 55, 65
plugins/authentication/header.py                20       0  100.00%
plugins/authentication/keycloak.py              46       7  84.78%   153-156, 177-182
plugins/authentication/oauth.py                 13       7  46.15%   43-45, 49-52
plugins/authentication/openid_connect.py       232      28  87.93%   92-93, 105-123, 170, 176-204, 212, 351-354, 380, 421
plugins/authentication/qsauth.py                35       1  97.14%   92
plugins/authentication/sas_auth.py              47       1  97.87%   76
plugins/authentication/token.py                129       9  93.02%   179, 216, 290-291, 341-345
plugins/authentication/token_exchange.py        36      14  61.11%   75, 93-121
plugins/crunch/__init__.py                       0       0  100.00%
plugins/crunch/base.py                          10       1  90.00%   43
plugins/crunch/filter_date.py                   59      14  76.27%   52-57, 69, 78, 87, 90, 100-102, 109-111, 118
plugins/crunch/filter_latest_intersect.py       47      33  29.79%   49-54, 67-112
plugins/crunch/filter_latest_tpl_name.py        31       1  96.77%   83
plugins/crunch/filter_overlap.py                66      18  72.73%   28-30, 66-69, 76-79, 85, 93, 104-120
plugins/crunch/filter_property.py               30       5  83.33%   55-60, 63-64
plugins/download/__init__.py                     0       0  100.00%
plugins/download/aws.py                        528     158  70.08%   272, 285, 365-368, 382-386, 476-478, 482, 515-516, 522-526, 556, 589, 593, 600, 630-638, 642, 677-685, 696-698, 729-810, 828-886, 897-902, 955, 970-972, 975, 985-993, 1001-1015, 1025-1048, 1055-1068, 1106, 1132, 1177-1179, 1399
plugins/download/base.py                       256      44  82.81%   128, 156, 223-225, 236-239, 292-293, 341-345, 351-352, 394, 397-411, 423, 427, 491-495, 525-526, 551-559, 561-565, 615, 636, 658, 666
plugins/download/creodias_s3.py                 25       9  64.00%   55-69
plugins/download/http.py                       545      95  82.57%   229, 271-274, 335-338, 341, 348-353, 384-386, 403, 418, 472, 507, 521, 535, 543-547, 563-568, 579, 597, 633-636, 657, 667, 674, 694, 771, 790-801, 809-814, 824-841, 859, 889-898, 934, 959-960, 979-984, 993, 1008-1010, 1014, 1017, 1032-1033, 1068, 1110-1113, 1128, 1144, 1203-1204, 1210, 1220, 1256, 1292, 1312, 1347-1349
plugins/download/s3rest.py                     120      26  78.33%   119, 153, 160, 195, 222-229, 232-234, 238, 249-255, 263-264, 267-271, 286-289, 298, 319-322
plugins/search/__init__.py                      22       0  100.00%
plugins/search/base.py                         151      11  92.72%   101, 105, 129-135, 276, 297, 436
plugins/search/build_search_result.py          477      63  86.79%   245-246, 282, 285, 310, 313, 344-346, 552-563, 690, 692, 753, 760, 784, 821, 872, 888, 922-937, 985, 1010, 1013, 1017, 1138-1139, 1148-1157, 1220, 1235, 1241, 1260-1269, 1386-1387, 1432, 1441-1443, 1503, 1549
plugins/search/cop_marine.py                   252      47  81.35%   56, 64-66, 76-77, 82, 87-88, 104, 106, 109, 175-176, 232, 238, 242, 246, 259, 270-271, 279, 310, 314, 335, 339, 343, 347, 351-355, 361-364, 367-381, 398, 447-451, 456, 468
plugins/search/creodias_s3.py                   25       1  96.00%   51
plugins/search/csw.py                          105      81  22.86%   98-99, 103-104, 112-160, 166-179, 187-219, 237-278
plugins/search/data_request_search.py          207      72  65.22%   190-193, 209, 220, 224-225, 236, 241, 246, 253, 266-269, 323-324, 328, 338-344, 349, 367-371, 387-390, 398-409, 426, 428, 435-438, 440-441, 459-463, 496, 506, 517, 530, 536-551, 556
plugins/search/qssearch.py                     711     101  85.79%   446, 504, 518, 522-528, 543-547, 559-563, 676-688, 733-736, 807-808, 859, 878, 885, 897, 954, 975, 978-979, 988-989, 998-999, 1008-1009, 1036, 1120-1125, 1129-1138, 1172, 1192, 1261-1262, 1268, 1358, 1455-1459, 1519, 1522, 1528-1529, 1550, 1578-1590, 1597, 1629-1631, 1641-1647, 1677, 1696, 1701-1702, 1717, 1733, 1808, 1820, 1827, 1838, 1861-1866, 1875, 1883-1893, 1911, 1927-1931
plugins/search/stac_list_assets.py              25      10  60.00%   44-51, 75-85
plugins/search/static_stac_search.py            79      13  83.54%   100-126, 170, 183
rest/__init__.py                                 4       2  50.00%   21-22
rest/cache.py                                   33      22  33.33%   35-37, 44-70
rest/config.py                                  25       1  96.00%   35
rest/constants.py                                6       0  100.00%
rest/core.py                                   260     153  41.15%   157, 159, 161, 164-165, 179-189, 198-199, 205, 208, 249-303, 316-352, 384-422, 437-453, 469-478, 485-524, 541, 583-668, 707, 714-767
rest/errors.py                                  72      51  29.17%   63, 68-111, 116-119, 126-129, 137-167, 175-180, 195-201
rest/server.py                                 192     192  0.00%    18-594
rest/stac.py                                   333      77  76.88%   246, 312, 334, 386-389, 416-443, 474-476, 499, 531-532, 614-654, 676-692, 719, 784-788, 795, 850-851, 857, 861-866, 876-880, 929, 967, 1000, 1019-1021
rest/types/__init__.py                           0       0  100.00%
rest/types/collections_search.py                13      13  0.00%    18-44
rest/types/eodag_search.py                     180      20  88.89%   225-229, 262-264, 282, 285, 291, 295, 353, 371-386
rest/types/queryables.py                        64      20  68.75%   54-55, 60-63, 68-79, 105-110, 119-120, 174
rest/types/stac_search.py                      125      11  91.20%   126-128, 174, 189-191, 199, 203, 251, 254
rest/utils/__init__.py                          94      30  68.09%   72-78, 98, 101-102, 121-123, 136, 143, 168-176, 183-204
rest/utils/cql_evaluate.py                      48       5  89.58%   69, 76, 90, 97, 105
rest/utils/rfc3339.py                           23       5  78.26%   43-44, 48, 60, 62
types/__init__.py                              161      41  74.53%   67, 80-84, 95-107, 135-137, 144-149, 214, 252, 262-278, 283, 285, 307, 312, 320, 330
types/bbox.py                                   43      19  55.81%   46-61, 72-74, 85-87, 99-101, 113-115, 123
types/download_args.py                           9       0  100.00%
types/queryables.py                            111       0  100.00%
types/search_args.py                            70      18  74.29%   60-64, 71-88, 103
types/whoosh.py                                 81      16  80.25%   129-132, 136-143, 155-161, 174-176
utils/__init__.py                              571      58  89.84%   81, 201-202, 211-238, 241, 256, 336-340, 363-370, 372-379, 382-386, 440-444, 463-465, 479, 571, 586, 626-627, 656, 1031-1034, 1042-1043, 1081-1082, 1129-1130, 1270
utils/cache.py                                  22       0  100.00%
utils/env.py                                     3       0  100.00%
utils/exceptions.py                             46       0  100.00%
utils/import_system.py                          28      19  32.14%   64-78, 89-99
utils/logging.py                                28       1  96.43%   41
utils/notebook.py                               44      23  47.73%   25-29, 36-41, 58-62, 72-78, 83-87
utils/repr.py                                   38       8  78.95%   51, 53, 57, 98, 122-129
utils/requests.py                               55      29  47.27%   51-52, 64, 85-96, 107-124, 128
utils/rest.py                                   36       1  97.22%   55
utils/s3.py                                     69       3  95.65%   162-163, 226
utils/stac_reader.py                           113      44  61.06%   63-85, 95-97, 101, 138, 154-159, 206-216, 226-256
TOTAL                                        10635    2096  80.29%

Diff against develop

Filename                                    Stmts    Miss  Cover
----------------------------------------  -------  ------  --------
config.py                                     +37      +3  -0.09%
api/core.py                                    -1      +1  -0.14%
api/product/_product.py                        -5      +2  -1.18%
plugins/manager.py                            +18       0  +1.03%
plugins/authentication/base.py                 +8       0  +3.76%
plugins/authentication/header.py               +1       0  +100.00%
plugins/authentication/openid_connect.py       +1       0  +0.05%
plugins/authentication/qsauth.py               +1       0  +0.08%
plugins/authentication/token.py                +1       0  +0.05%
plugins/download/http.py                       +3      +2  -0.27%
plugins/search/qssearch.py                     +1      +1  -0.13%
utils/__init__.py                             +22     +18  -2.87%
TOTAL                                         +87     +27  -0.09%

Results for commit: 3d76b87

Minimum allowed coverage is 70%

♻️ This comment has been updated with latest results

@jlahovnik jlahovnik force-pushed the 1617-allow-multiple-download-or-auth-plugins-for-a-single-provider branch from e266451 to 3d76b87 Compare June 25, 2025 09:44
@jlahovnik jlahovnik requested a review from sbrunato June 25, 2025 09:49
@sbrunato sbrunato added this to the 4.0.0.dev milestone Jul 2, 2025
:param auth_conf: Authentication plugin configuration
:returns: True if credentials are set, else False
"""
return any(
Copy link
Collaborator

Choose a reason for hiding this comment

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

move credentials_in_auth to PluginConfig.has_credentials ?

"""Authenticate"""
raise NotImplementedError

def get_required_credentials(self) -> dict[str, str]:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
def get_required_credentials(self) -> dict[str, str]:
def get_credentials(self) -> dict[str, str]:

Comment on lines +47 to +49
"""checks if only a subset of the credentials is required for the plugin object
and returns this subset; returns all credentials if not required credentials are given
:returns: dict of credentials
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
"""checks if only a subset of the credentials is required for the plugin object
and returns this subset; returns all credentials if not required credentials are given
:returns: dict of credentials
"""Get plugin configuration credentials.
Checks if only a subset of the credentials is required for the plugin object
and returns this subset.
Returns all credentials if no required credentials are given.
:returns: dict of credentials

matching_conf: Optional[PluginConfig],
) -> bool:
"""
checks if the given plugin config is matching the matching config or url
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
checks if the given plugin config is matching the matching config or url
Checks if the given plugin config is matching the matching config or url

logger = logging.getLogger("eodag.plugins.manager")


def _is_plugin_matching(
Copy link
Collaborator

Choose a reason for hiding this comment

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

move to PluginConfig.is_matching ?

},
download: dict[str, Any] = {"type": "HTTPDownload", "auth_error_code": 401},
download: list[dict[str, Any]] = [],
**kwargs: dict[str, Any],
Copy link
Collaborator

Choose a reason for hiding this comment

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

please replace **kwargs with auth: Optional[list[dict[str, Any]]] = None and api: Optional[dict[str, Any]] = None

Comment on lines +564 to +571
logger.info(
"%s: provider needing auth for search has been pruned because "
"no credentials could be found",
provider,
)
self._pruned_providers_config[
provider
] = self.providers_config.pop(provider)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
logger.info(
"%s: provider needing auth for search has been pruned because "
"no credentials could be found",
provider,
)
self._pruned_providers_config[
provider
] = self.providers_config.pop(provider)
self._pruned_providers_config[
provider
] = self.providers_config.pop(provider)
logger.info(
"%s: provider needing auth for search has been pruned because "
"no credentials could be found",
provider,
)

kwargs["auth"] = auth
else:
logger.debug(
f"No authentication plugin for {provider} for product types discovery found"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
f"No authentication plugin for {provider} for product types discovery found"
"No authentication plugin for %s for product types discovery found", provider

def get_auth(
self,
provider: str,
required_for: str,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
required_for: str,
required_for: Literal["search", "download"],

Comment on lines +87 to +90
returns the url used to find the download and auth plugin for a product
(currently there is only one matching_url per product, where per asset
downloaders are implmented, this will change)
:param eo_product: product for with the matching url shall be found
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
returns the url used to find the download and auth plugin for a product
(currently there is only one matching_url per product, where per asset
downloaders are implmented, this will change)
:param eo_product: product for with the matching url shall be found
returns the url used to find the download and auth plugin for a product
(currently there is only one matching_url per product, where per asset
downloaders are implmented, this will change)
TODO: adapt method to asset once downloadLink is handled through an asset
:param eo_product: product for with the matching url shall be found

@sbrunato sbrunato marked this pull request as draft July 7, 2025 15:56
@sbrunato sbrunato modified the milestones: 4.0.0a1, 4.0.0a2.dev Oct 20, 2025
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.

Allow multiple download or auth plugins for a single provider

4 participants