Repository: CS-SI/eodag
Pull request #1224 (2024-06-20 09:14:15)

fix(plugins): CopMarine dates check
fix issues with invalid dates and too large integers


github-actions[bot]: ## Test Results
    4 files  ±0      4 suites  ±0   5m 56s :stopwatch: +2s
  547 tests ±0    544 :white_check_mark: ±0    3 :zzz: ±0  0 :x: ±0 
2 188 runs  ±0  2 088 :white_check_mark: ±0  100 :zzz: ±0  0 :x: ±0 

Results for commit 863f8ff5. ± Comparison against base commit 9c0d7e7b.

[test-results]:data:application/gzip;base64,H4sIANzzc2YC/02Myw7CIBQFf6Vh7YLX5eHPGEJLQmyLobAy/rtQC7KcOTnzRs6vy4HuE79N6Mg+dZhzNMmHvSADUUSZUh2By0aPI1t7Kv5XT/+qny6c8WsRuIslxhAvE/Nem5QodVFrUjyoX5PgdhmjJ49NG7bNpwJICeaUc0CF5JQAno1WmEoMzBog2nGmQVsi0OcLqbX3pAkBAAA=

github-actions[bot]: ![badge](https://raw.githubusercontent.com/CS-SI/eodag/_xml_coverage_reports/data/cop_marine_fixes/./badge.svg)


## Code Coverage (Ubuntu)

<details>


```
Filename                                     Stmts    Miss  Cover    Missing
-----------------------------------------  -------  ------  -------  ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
__init__.py                                     10       0  100.00%
cli.py                                         305      51  83.28%   60, 654-700, 802-853, 857
config.py                                      351      27  92.31%   81-83, 92, 100, 104-106, 183, 195, 460-462, 526-529, 576-577, 586-587, 666, 735-740, 742
crunch.py                                        5       5  0.00%    20-24
api/__init__.py                                  0       0  100.00%
api/core.py                                    752      83  88.96%   89-98, 372, 597, 641-644, 682, 719, 792, 796-801, 827, 923, 1000, 1114, 1204-1216, 1256, 1258, 1286, 1290-1301, 1314-1320, 1410-1413, 1442-1462, 1518, 1535-1538, 1550-1553, 1571-1578, 1906, 1939-1945, 2212, 2216-2219, 2233-2235, 2270
api/search_result.py                            51       6  88.24%   33-35, 75, 84, 91, 105
api/product/__init__.py                          5       0  100.00%
api/product/_assets.py                          44       6  86.36%   27-29, 79, 119, 129
api/product/_product.py                        188      27  85.64%   56-63, 67-69, 239-240, 322, 351, 412, 426-429, 442, 466-469, 512-518
api/product/metadata_mapping.py                678      83  87.76%   67-69, 131-133, 234, 266-267, 313-314, 324-336, 338, 349, 355-367, 412-413, 450, 471-474, 497, 505-506, 582-583, 607-608, 614-617, 632-633, 782, 828, 1002-1007, 1138, 1152-1172, 1192, 1197, 1307, 1329, 1343, 1356-1375, 1414, 1466, 1504-1508, 1527
api/product/drivers/__init__.py                  5       0  100.00%
api/product/drivers/base.py                      8       2  75.00%   23, 41
plugins/__init__.py                              0       0  100.00%
plugins/base.py                                 23       3  86.96%   25, 48, 55
plugins/manager.py                             133      15  88.72%   49-51, 105-110, 156, 197, 219, 223, 248, 287-288
plugins/apis/__init__.py                         0       0  100.00%
plugins/apis/base.py                             4       0  100.00%
plugins/apis/ecmwf.py                           99      15  84.85%   46-54, 150-152, 199-200, 226-228
plugins/apis/usgs.py                           175      36  79.43%   60-65, 132, 205, 239, 274-276, 281, 307-308, 313, 343-350, 361-366, 388-394, 396-402, 425
plugins/authentication/__init__.py               6       1  83.33%   31
plugins/authentication/aws_auth.py              20       2  90.00%   25-27
plugins/authentication/base.py                  19       3  84.21%   26, 34, 47
plugins/authentication/generic.py               16       3  81.25%   28, 40, 50
plugins/authentication/header.py                21       1  95.24%   28
plugins/authentication/keycloak.py              49       6  87.76%   33-35, 132, 156-161
plugins/authentication/oauth.py                 15       8  46.67%   25, 32-34, 38-41
plugins/authentication/openid_connect.py       186      19  89.78%   41-43, 121, 135-160, 168, 322-325, 349
plugins/authentication/qsauth.py                36       2  94.44%   32, 83
plugins/authentication/sas_auth.py              49       2  95.92%   32, 76
plugins/authentication/token.py                 90      17  81.11%   35-37, 79, 107, 109, 131-143, 198-201
plugins/authentication/token_exchange.py        35      19  45.71%   74-80, 92-120
plugins/crunch/__init__.py                       0       0  100.00%
plugins/crunch/base.py                          10       2  80.00%   25, 38
plugins/crunch/filter_date.py                   62      15  75.81%   30, 53-58, 72, 81, 90, 93, 105-107, 116-118, 125
plugins/crunch/filter_latest_intersect.py       50      10  80.00%   32-34, 51-52, 71, 80-83, 85, 92-95
plugins/crunch/filter_latest_tpl_name.py        33       2  93.94%   28, 86
plugins/crunch/filter_overlap.py                68      19  72.06%   28-30, 33, 72-75, 82-85, 91, 99, 110-126
plugins/crunch/filter_property.py               33       8  75.76%   29, 60-65, 68-69, 85-89
plugins/download/__init__.py                     0       0  100.00%
plugins/download/aws.py                        492     165  66.46%   77-83, 272, 285, 352-355, 369-373, 419-421, 425, 459-460, 466-470, 503, 538, 542, 549, 579-587, 591, 629-637, 644-646, 687-761, 779-840, 851-856, 872-885, 914, 929-931, 934, 944-952, 960-973, 983-1002, 1009-1021, 1062, 1088, 1133-1135, 1355
plugins/download/base.py                       260      57  78.08%   58-64, 145, 180, 319-320, 340-346, 377-381, 387-388, 432, 435-449, 461, 465, 538-542, 572-573, 581-598, 605-613, 615-619, 666, 688, 710, 718
plugins/download/creodias_s3.py                 17       9  47.06%   44-58
plugins/download/http.py                       533     133  75.05%   85-91, 124, 203-213, 215-216, 251-254, 318-321, 323-324, 331-336, 354-369, 386-388, 400, 448, 455-461, 479, 493, 507, 515-517, 533-538, 549, 567, 609-613, 635, 675, 720, 734-740, 776-840, 858, 891-900, 926-927, 954-959, 965, 968, 984, 1001-1002, 1029-1030, 1037, 1099-1105, 1160-1161, 1167, 1177, 1211, 1247, 1265-1281
plugins/download/s3rest.py                     118      27  77.12%   55-58, 121, 162, 197, 227-234, 237-239, 243, 256-262, 270-271, 274-278, 301, 322-325
plugins/search/__init__.py                      26       3  88.46%   27-31
plugins/search/base.py                         133      13  90.23%   48-53, 104, 108, 121, 271, 291, 350-351, 371, 380
plugins/search/build_search_result.py          183      24  86.89%   62, 97, 141-142, 148, 159, 295-298, 327, 384-401, 463, 466, 476, 493, 521, 523
plugins/search/cop_marine.py                   201      51  74.63%   43-44, 55, 63-72, 78-79, 95, 97, 100, 135-137, 149-150, 190-199, 203, 207-208, 212, 230, 260, 264, 279, 283, 287, 291, 295-299, 305-308, 311-324, 341, 364, 368-369, 375
plugins/search/creodias_s3.py                   55       3  94.55%   56, 74, 108
plugins/search/csw.py                          108      83  23.15%   44-46, 58-59, 63-64, 72-120, 126-139, 147-179, 197-238
plugins/search/data_request_search.py          198      65  67.17%   53, 90-93, 109, 121, 125-126, 137, 142, 147, 154, 167-170, 224-225, 229, 239-245, 250, 276-279, 287-298, 315, 317, 324-325, 327-328, 346-350, 383, 390, 401, 414, 420-432, 437
plugins/search/qssearch.py                     648      69  89.35%   102, 386, 390-396, 404-405, 511-517, 567, 583, 593, 620, 622, 665-668, 742-743, 789, 808, 823, 881, 902, 905-906, 915, 926, 935, 958, 1029-1034, 1038-1039, 1072, 1146, 1195, 1269-1273, 1339-1340, 1361, 1388-1400, 1407, 1439-1441, 1451-1457, 1501, 1516, 1536, 1639-1649
plugins/search/static_stac_search.py            73      12  83.56%   37-38, 95-122, 138, 151
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                                  23       0  100.00%
rest/constants.py                                7       0  100.00%
rest/core.py                                   239      30  87.45%   83-87, 281, 365, 480, 707, 714-762
rest/server.py                                 286      55  80.77%   81-82, 108, 131-133, 246-248, 304-305, 317-333, 425-430, 458, 625-632, 661, 705-706, 729, 802-804, 821-826, 855, 857, 861-862, 866-867
rest/stac.py                                   465     123  73.55%   64-66, 319, 341, 389-392, 416-442, 447-453, 476-478, 501, 536-537, 565, 578, 623-663, 691-707, 786-799, 806, 859-860, 924, 992-994, 1213, 1223-1235, 1248-1270, 1284-1329, 1483-1484
rest/types/__init__.py                           0       0  100.00%
rest/types/collections_search.py                13      13  0.00%    18-44
rest/types/eodag_search.py                     184       9  95.11%   52-55, 235-239, 292, 295, 363
rest/types/queryables.py                        58       2  96.55%   38, 172
rest/types/stac_search.py                      127      11  91.34%   50-53, 132, 178, 193-195, 203, 207
rest/utils/__init__.py                          95      13  86.32%   51, 108-109, 128-130, 182, 192-206
rest/utils/cql_evaluate.py                      48       5  89.58%   69, 76, 90, 97, 105
rest/utils/rfc3339.py                           31       3  90.32%   78, 90, 92
types/__init__.py                              110      11  90.00%   53, 70, 129-132, 199, 214-218, 245, 258
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                             81       0  100.00%
types/search_args.py                            70      18  74.29%   60-64, 71-88, 104
types/whoosh.py                                 15       0  100.00%
utils/__init__.py                              501      39  92.22%   84, 89, 110-112, 193-194, 203-230, 233, 247, 329-333, 409-413, 434-436, 518, 533, 571-572, 968-971, 979-980, 1021-1022, 1204
utils/constraints.py                           119      37  68.91%   94-103, 144, 149, 153, 164, 190-192, 202, 216-232, 241-252
utils/exceptions.py                             37       2  94.59%   23, 93
utils/import_system.py                          30      20  33.33%   27, 67-81, 93-103
utils/logging.py                                29       1  96.55%   123
utils/notebook.py                               44      23  47.73%   25-29, 36-41, 58-62, 72-78, 83-87
utils/requests.py                               55      11  80.00%   69, 96, 98, 100, 102, 104, 123, 128-130, 138
utils/rest.py                                   27       1  96.30%   49
utils/stac_reader.py                           111      45  59.46%   56-57, 63-85, 95-97, 101, 143, 159-162, 215-224, 234-264
TOTAL                                         9573    1712  82.12%
```

</details>


### Diff against develop

```
Filename                        Stmts    Miss  Cover
----------------------------  -------  ------  -------
plugins/search/cop_marine.py      +22     +11  -3.02%
TOTAL                             +22     +11  -0.07%
```


Results for commit: 863f8ff526742150da98027053ca519f43959c16


_Minimum allowed coverage is `70%`_


:recycle: This comment has been updated with latest results


<!-- Sticky Pull Request Commentartifacts/unit-test-results-python3.12-ubuntu-latest/coverage.xml -->
github-actions[bot]: ![badge](https://raw.githubusercontent.com/CS-SI/eodag/_xml_coverage_reports_win/data/cop_marine_fixes/./badge.svg)


## Code Coverage (Windows)

<details>


```
Filename                                     Stmts    Miss  Cover    Missing
-----------------------------------------  -------  ------  -------  ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
__init__.py                                     10       0  100.00%
cli.py                                         305      51  83.28%   60, 654-700, 802-853, 857
config.py                                      351      28  92.02%   81-83, 92, 100, 104-106, 183, 195, 460-462, 526-529, 576-577, 586-587, 666, 700, 735-740, 742
crunch.py                                        5       5  0.00%    20-24
api/__init__.py                                  0       0  100.00%
api/core.py                                    752      83  88.96%   89-98, 372, 597, 641-644, 682, 719, 792, 796-801, 827, 923, 1000, 1114, 1204-1216, 1256, 1258, 1286, 1290-1301, 1314-1320, 1410-1413, 1442-1462, 1518, 1535-1538, 1550-1553, 1571-1578, 1906, 1939-1945, 2212, 2216-2219, 2233-2235, 2270
api/search_result.py                            51       6  88.24%   33-35, 75, 84, 91, 105
api/product/__init__.py                          5       0  100.00%
api/product/_assets.py                          44       6  86.36%   27-29, 79, 119, 129
api/product/_product.py                        188      27  85.64%   56-63, 67-69, 239-240, 322, 351, 412, 426-429, 442, 466-469, 512-518
api/product/metadata_mapping.py                678      83  87.76%   67-69, 131-133, 234, 266-267, 313-314, 324-336, 338, 349, 355-367, 412-413, 450, 471-474, 497, 505-506, 582-583, 607-608, 614-617, 632-633, 782, 828, 1002-1007, 1138, 1152-1172, 1192, 1197, 1307, 1329, 1343, 1356-1375, 1414, 1466, 1504-1508, 1527
api/product/drivers/__init__.py                  5       0  100.00%
api/product/drivers/base.py                      8       2  75.00%   23, 41
plugins/__init__.py                              0       0  100.00%
plugins/base.py                                 23       4  82.61%   25, 48, 55, 68
plugins/manager.py                             133      15  88.72%   49-51, 105-110, 156, 197, 219, 223, 248, 287-288
plugins/apis/__init__.py                         0       0  100.00%
plugins/apis/base.py                             4       0  100.00%
plugins/apis/ecmwf.py                           99      15  84.85%   46-54, 150-152, 199-200, 226-228
plugins/apis/usgs.py                           175      36  79.43%   60-65, 132, 205, 239, 274-276, 281, 307-308, 313, 343-350, 361-366, 388-394, 396-402, 425
plugins/authentication/__init__.py               6       1  83.33%   31
plugins/authentication/aws_auth.py              20       2  90.00%   25-27
plugins/authentication/base.py                  19       3  84.21%   26, 34, 47
plugins/authentication/generic.py               16       3  81.25%   28, 40, 50
plugins/authentication/header.py                21       1  95.24%   28
plugins/authentication/keycloak.py              49       6  87.76%   33-35, 132, 156-161
plugins/authentication/oauth.py                 15       8  46.67%   25, 32-34, 38-41
plugins/authentication/openid_connect.py       186      19  89.78%   41-43, 121, 135-160, 168, 322-325, 349
plugins/authentication/qsauth.py                36       2  94.44%   32, 83
plugins/authentication/sas_auth.py              49       2  95.92%   32, 76
plugins/authentication/token.py                 90      17  81.11%   35-37, 79, 107, 109, 131-143, 198-201
plugins/authentication/token_exchange.py        35      19  45.71%   74-80, 92-120
plugins/crunch/__init__.py                       0       0  100.00%
plugins/crunch/base.py                          10       2  80.00%   25, 38
plugins/crunch/filter_date.py                   62      15  75.81%   30, 53-58, 72, 81, 90, 93, 105-107, 116-118, 125
plugins/crunch/filter_latest_intersect.py       50      35  30.00%   32-34, 48-53, 69-114
plugins/crunch/filter_latest_tpl_name.py        33       2  93.94%   28, 86
plugins/crunch/filter_overlap.py                68      19  72.06%   28-30, 33, 72-75, 82-85, 91, 99, 110-126
plugins/crunch/filter_property.py               33       8  75.76%   29, 60-65, 68-69, 85-89
plugins/download/__init__.py                     0       0  100.00%
plugins/download/aws.py                        492     165  66.46%   77-83, 272, 285, 352-355, 369-373, 419-421, 425, 459-460, 466-470, 503, 538, 542, 549, 579-587, 591, 629-637, 644-646, 687-761, 779-840, 851-856, 872-885, 914, 929-931, 934, 944-952, 960-973, 983-1002, 1009-1021, 1062, 1088, 1133-1135, 1355
plugins/download/base.py                       260      59  77.31%   58-64, 145, 180, 250-252, 319-320, 340-346, 377-381, 387-388, 432, 435-449, 461, 465, 538-542, 572-573, 581-598, 605-613, 615-619, 666, 688, 710, 718
plugins/download/creodias_s3.py                 17       9  47.06%   44-58
plugins/download/http.py                       533     133  75.05%   85-91, 124, 203-213, 215-216, 251-254, 318-321, 323-324, 331-336, 354-369, 386-388, 400, 448, 455-461, 479, 493, 507, 515-517, 533-538, 549, 567, 609-613, 635, 675, 720, 734-740, 776-840, 858, 891-900, 926-927, 954-959, 965, 968, 984, 1001-1002, 1029-1030, 1037, 1099-1105, 1160-1161, 1167, 1177, 1211, 1247, 1265-1281
plugins/download/s3rest.py                     118      27  77.12%   55-58, 121, 162, 197, 227-234, 237-239, 243, 256-262, 270-271, 274-278, 301, 322-325
plugins/search/__init__.py                      26       3  88.46%   27-31
plugins/search/base.py                         133      18  86.47%   48-53, 104, 108, 121, 271, 291, 350-351, 371, 374-382, 384
plugins/search/build_search_result.py          183      31  83.06%   62, 97, 141-142, 148, 159, 295-298, 327, 384-401, 463, 466, 476, 493, 513-528
plugins/search/cop_marine.py                   201      51  74.63%   43-44, 55, 63-72, 78-79, 95, 97, 100, 135-137, 149-150, 190-199, 203, 207-208, 212, 230, 260, 264, 279, 283, 287, 291, 295-299, 305-308, 311-324, 341, 364, 368-369, 375
plugins/search/creodias_s3.py                   55       3  94.55%   56, 74, 108
plugins/search/csw.py                          108      83  23.15%   44-46, 58-59, 63-64, 72-120, 126-139, 147-179, 197-238
plugins/search/data_request_search.py          198      65  67.17%   53, 90-93, 109, 121, 125-126, 137, 142, 147, 154, 167-170, 224-225, 229, 239-245, 250, 276-279, 287-298, 315, 317, 324-325, 327-328, 346-350, 383, 390, 401, 414, 420-432, 437
plugins/search/qssearch.py                     648      97  85.03%   102, 386, 390-396, 404-405, 511-517, 567, 570, 583, 593, 612-627, 665-668, 742-743, 789, 808, 823, 881, 902, 905-906, 915, 926, 935, 958, 1029-1034, 1038-1039, 1072, 1146, 1195, 1269-1273, 1339-1340, 1361, 1388-1400, 1407, 1439-1441, 1451-1457, 1501, 1516, 1536, 1598-1669
plugins/search/static_stac_search.py            73      12  83.56%   37-38, 95-122, 138, 151
rest/__init__.py                                 4       2  50.00%   21-22
rest/cache.py                                   33      22  33.33%   35-37, 44-70
rest/config.py                                  23       4  82.61%   34-36, 64
rest/constants.py                                7       0  100.00%
rest/core.py                                   239     154  35.56%   83-87, 167-248, 272-326, 339-375, 411-449, 469-485, 508-519, 528-564, 583, 629-668, 707, 714-762
rest/server.py                                 286     286  0.00%    18-878
rest/stac.py                                   465     394  15.27%   64-66, 127-133, 141-164, 195-200, 232, 252-375, 385-454, 472-511, 527-580, 590-613, 623-663, 691-707, 717, 733-736, 755-825, 842-873, 902-927, 935-951, 959-964, 974-1001, 1011-1013, 1021-1023, 1036-1038, 1052-1069, 1079-1100, 1110-1132, 1140-1157, 1180-1203, 1213, 1223-1235, 1248-1270, 1284-1329, 1337-1354, 1365-1514
rest/types/__init__.py                           0       0  100.00%
rest/types/collections_search.py                13      13  0.00%    18-44
rest/types/eodag_search.py                     184      19  89.67%   52-55, 125, 235-239, 272-274, 292, 295, 301, 305, 363, 375-378
rest/types/queryables.py                        58      14  75.86%   38, 51-52, 58-59, 65-66, 95-100, 109-110, 172
rest/types/stac_search.py                      127      22  82.68%   50-53, 130-132, 156-157, 162-163, 178, 193-195, 203, 207, 250-255
rest/utils/__init__.py                          95      31  67.37%   51, 79-85, 105, 108-109, 128-130, 143, 150, 175-183, 190-211
rest/utils/cql_evaluate.py                      48       5  89.58%   69, 76, 90, 97, 105
rest/utils/rfc3339.py                           31       6  80.65%   70, 73-74, 78, 90, 92
types/__init__.py                              110      36  67.27%   53, 66-70, 81-93, 120-122, 129-132, 172, 199, 209-221, 226, 245, 250, 258, 268
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                             81       0  100.00%
types/search_args.py                            70      18  74.29%   60-64, 71-88, 104
types/whoosh.py                                 15       0  100.00%
utils/__init__.py                              501      41  91.82%   84, 89, 110-112, 193-194, 203-230, 233, 247, 329-333, 409-413, 434-436, 518, 533, 571-572, 968-971, 979-980, 1021-1022, 1055, 1204, 1380
utils/constraints.py                           119      37  68.91%   94-103, 144, 149, 153, 164, 190-192, 202, 216-232, 241-252
utils/exceptions.py                             37       2  94.59%   23, 93
utils/import_system.py                          30      20  33.33%   27, 67-81, 93-103
utils/logging.py                                29       1  96.55%   123
utils/notebook.py                               44      23  47.73%   25-29, 36-41, 58-62, 72-78, 83-87
utils/requests.py                               55      11  80.00%   69, 96, 98, 100, 102, 104, 123, 128-130, 138
utils/rest.py                                   27       1  96.30%   49
utils/stac_reader.py                           111      45  59.46%   56-57, 63-85, 95-97, 101, 143, 159-162, 215-224, 234-264
TOTAL                                         9573    2507  73.81%
```

</details>


### Diff against develop

```
Filename                        Stmts    Miss  Cover
----------------------------  -------  ------  -------
plugins/search/cop_marine.py      +22     +11  -3.02%
TOTAL                             +22     +11  -0.06%
```


Results for commit: 863f8ff526742150da98027053ca519f43959c16


_Minimum allowed coverage is `70%`_


:recycle: This comment has been updated with latest results


<!-- Sticky Pull Request Commentartifacts/unit-test-results-python3.12-windows-latest/coverage.xml -->

Patch:
diff --git a/eodag/plugins/search/cop_marine.py b/eodag/plugins/search/cop_marine.py
index 5335653d..cc531055 100644
--- a/eodag/plugins/search/cop_marine.py
+++ b/eodag/plugins/search/cop_marine.py
@@ -46,19 +46,25 @@ if TYPE_CHECKING:
 logger = logging.getLogger("eodag.search.cop_marine")
 
 
-def _get_date_from_yyyymmdd(date_str: str) -> datetime:
+def _get_date_from_yyyymmdd(date_str: str, item_key: str) -> Optional[datetime]:
     year = date_str[:4]
     month = date_str[4:6]
     if len(date_str) > 6:
         day = date_str[6:]
     else:
-        day = 1
-    return datetime(
-        int(year),
-        int(month),
-        int(day),
-        tzinfo=tzutc(),
-    )
+        day = "1"
+    try:
+        date = datetime(
+            int(year),
+            int(month),
+            int(day),
+            tzinfo=tzutc(),
+        )
+    except ValueError:
+        logger.error(f"{item_key}: {date_str} is not a valid date")
+        return None
+    else:
+        return date
 
 
 def _get_s3_client(endpoint_url: str) -> S3Client:
@@ -74,6 +80,19 @@ def _get_s3_client(endpoint_url: str) -> S3Client:
     )
 
 
+def _check_int_values_properties(properties: Dict[str, Any]):
+    # remove int values with a bit length of more than 64 from the properties
+    invalid = []
+    for prop, prop_value in properties.items():
+        if isinstance(prop_value, int) and prop_value.bit_length() > 64:
+            invalid.append(prop)
+        if isinstance(prop_value, dict):
+            _check_int_values_properties(prop_value)
+
+    for inv_key in invalid:
+        properties.pop(inv_key)
+
+
 class CopMarineSearch(StaticStacSearch):
     """class that implements search for the Copernicus Marine provider"""
 
@@ -149,7 +168,7 @@ class CopMarineSearch(StaticStacSearch):
         dataset_item: Dict[str, Any],
         collection_dict: Dict[str, Any],
         use_dataset_dates: bool = False,
-    ) -> EOProduct:
+    ) -> Optional[EOProduct]:
 
         item_id = item_key.split("/")[-1].split(".")[0]
         download_url = s3_url + "/" + item_key
@@ -175,23 +194,28 @@ class CopMarineSearch(StaticStacSearch):
             item_dates = re.findall(r"\d{8}", item_key)
             if not item_dates:
                 item_dates = re.findall(r"\d{6}", item_key)
-            item_start = _get_date_from_yyyymmdd(item_dates[0])
+            item_start = _get_date_from_yyyymmdd(item_dates[0], item_key)
+            if not item_start:  # identified pattern was not a valid datetime
+                return None
             if len(item_dates) > 2:  # start, end and created_at timestamps
-                item_end = _get_date_from_yyyymmdd(item_dates[1])
+                item_end = _get_date_from_yyyymmdd(item_dates[1], item_key)
             else:  # only date and created_at timestamps
                 item_end = item_start
             properties["startTimeFromAscendingNode"] = item_start.strftime(
                 "%Y-%m-%dT%H:%M:%SZ"
             )
-            properties["completionTimeFromAscendingNode"] = item_end.strftime(
-                "%Y-%m-%dT%H:%M:%SZ"
-            )
+            properties["completionTimeFromAscendingNode"] = (
+                item_end or item_start
+            ).strftime("%Y-%m-%dT%H:%M:%SZ")
+
         for key, value in collection_dict["properties"].items():
             if key not in ["id", "title", "start_datetime", "end_datetime"]:
                 properties[key] = value
         for key, value in dataset_item["properties"].items():
             if key not in ["id", "title", "start_datetime", "end_datetime"]:
                 properties[key] = value
+        _check_int_values_properties(properties)
+
         properties["thumbnail"] = collection_dict["assets"]["thumbnail"]["href"]
         if "omiFigure" in collection_dict["assets"]:
             properties["quicklook"] = collection_dict["assets"]["omiFigure"]["href"]
@@ -213,14 +237,8 @@ class CopMarineSearch(StaticStacSearch):
     ) -> Tuple[List[EOProduct], Optional[int]]:
         """
         Implementation of search for the Copernicus Marine provider
-        :param product_type: product type for the search
-        :type product_type: str
-        :param items_per_page: number of items per page
-        :type items_per_page: int
-        :param page: page number
-        :type page: int
-        :param count: if the total number of records should be returned
-        :type count: bool
+        :param prep: object containing search parameterds
+        :type prep: PreparedSearch
         :param kwargs: additional search arguments
         :returns: list of products and total number of products
         :rtype: Tuple[List[EOProduct], Optional[int]]
@@ -293,7 +311,8 @@ class CopMarineSearch(StaticStacSearch):
                         collection_dict,
                         True,
                     )
-                    products.append(product)
+                    if product:
+                        products.append(product)
                     continue
 
             s3_client = _get_s3_client(endpoint_url)
@@ -335,7 +354,9 @@ class CopMarineSearch(StaticStacSearch):
                     item_dates = re.findall(r"\d{8}", item_key)
                     if not item_dates:
                         item_dates = re.findall(r"\d{6}", item_key)
-                    item_start = _get_date_from_yyyymmdd(item_dates[0])
+                    item_start = _get_date_from_yyyymmdd(item_dates[0], item_key)
+                    if not item_start:  # identified pattern was not a valid datetime
+                        continue
                     if item_start > end_date:
                         stop_search = True
                     if not item_dates or (start_date <= item_start <= end_date):
@@ -350,7 +371,8 @@ class CopMarineSearch(StaticStacSearch):
                                 dataset_item,
                                 collection_dict,
                             )
-                            products.append(product)
+                            if product:
+                                products.append(product)
                     current_object = item_key
 
         return products, num_total
diff --git a/eodag/resources/stac.yml b/eodag/resources/stac.yml
index 18e9ad86..ab8f90f7 100644
--- a/eodag/resources/stac.yml
+++ b/eodag/resources/stac.yml
@@ -23,30 +23,37 @@ stac_api_version: 1.0.0
 
 # https://stacspec.org/STAC-api.html#operation/getLandingPage
 landing_page:
-  title: "EODAG"
   type: "Catalog"
-  description: "STAC API provided by EODAG"
   links:
     - rel: self
       type: "application/json"
       href: "{catalog[root]}/"
     - rel: service-desc
       type: "application/vnd.oai.openapi+json;version=3.0"
+      title: "OpenAPI service description"
       href: "{catalog[root]}/api"
     - rel: service-doc
       type: "text/html"
+      title: "OpenAPI service documentation"
       href: "{catalog[root]}/api.html"
     - rel: conformance
       type: "application/json"
+      title: "STAC/WFS3 conformance classes implemented by this server"
       href: "{catalog[root]}/conformance"
     - rel: data
       type: "application/json"
       href: "{catalog[root]}/collections"
     - rel: search
+      type: "application/geo+json"
+      title: "STAC search"
       href: "{catalog[root]}/search"
       method: GET
+    - rel: search
+      type: "application/geo+json"
+      title: "STAC search"
+      href: "{catalog[root]}/search"
+      method: POST
   stac_version: "{stac_version}"
-  id: eodag-stac-api
   conformsTo: "{conformance[conformsTo]}"
 
 # required by OGC API - Features
@@ -78,17 +85,18 @@ conformance:
 
 # https://stacspec.org/STAC-api.html#operation/getCollections
 collections:
+  collections:
+    - "{collection}"
   links:
-    - rel: self
-      title: collections
-      href: "{collections[url]}"
     - rel: root
+      type: "application/json"
       href: "{collections[root]}/"
     - rel: parent
+      type: "application/json"
       href: "{collections[root]}/"
-  collections:
-    - "{collection}"
-  stac_version: "{stac_version}"
+    - rel: self
+      type: "application/json"
+      href: "{collections[url]}"
 
 # https://stacspec.org/STAC-api.html#operation/describeCollection
 collection:
diff --git a/eodag/rest/config.py b/eodag/rest/config.py
index e191f815..f222f32d 100644
--- a/eodag/rest/config.py
+++ b/eodag/rest/config.py
@@ -45,6 +45,10 @@ class Settings(BaseSettings):
 
     debug: bool = False
 
+    stac_api_title: str = "eodag-stac-api"
+    stac_api_description: str = "STAC API provided by EODAG"
+    stac_api_landing_id: str = "eodag-stac-api"
+
     origin_url_blacklist: Annotated[
         Union[str, List[str]],
         BeforeValidator(str2liststr),
diff --git a/eodag/rest/core.py b/eodag/rest/core.py
index 8da246da..17e243f2 100644
--- a/eodag/rest/core.py
+++ b/eodag/rest/core.py
@@ -431,16 +431,6 @@ async def all_collections(
             format_dict_items(link, **format_args) for link in collections["links"]
         ]
 
-        collections["links"] += [
-            {
-                "rel": "child",
-                "title": collec["id"],
-                "href": [
-                    link["href"] for link in collec["links"] if link["rel"] == "self"
-                ][0],
-            }
-            for collec in collections["collections"]
-        ]
         collections = format_dict_items(collections, **format_args)
         return collections
 
diff --git a/eodag/rest/stac.py b/eodag/rest/stac.py
index fa4e96b5..ad7d12c5 100644
--- a/eodag/rest/stac.py
+++ b/eodag/rest/stac.py
@@ -1361,21 +1361,29 @@ class StacCatalog(StacCommon):
         :returns: This catalog obj
         :rtype: :class:`eodag.stac.StacCatalog`
         """
+        settings = Settings.from_environment()
+
         # update conf with user shp locations
         locations_config = self.build_locations_config()
 
-        self.stac_config["catalogs"] = dict(
-            deepcopy(self.stac_config["catalogs"]), **locations_config
-        )
+        self.stac_config["catalogs"] = {
+            **deepcopy(self.stac_config["catalogs"]),
+            **locations_config,
+        }
 
         if not catalogs:
             # Build root catalog combined with landing page
             self.__update_data_from_catalog_config(
                 {
-                    "model": dict(
-                        deepcopy(self.stac_config["landing_page"]),
-                        **{"provider": self.provider},
-                    )
+                    "model": {
+                        **deepcopy(self.stac_config["landing_page"]),
+                        **{
+                            "provider": self.provider,
+                            "id": settings.stac_api_landing_id,
+                            "title": settings.stac_api_title,
+                            "description": settings.stac_api_description,
+                        },
+                    }
                 }
             )
 
@@ -1393,7 +1401,7 @@ class StacCatalog(StacCommon):
                         "href": urljoin(
                             self.url, f"{STAC_CATALOGS_PREFIX}/{product_type['ID']}"
                         ),
-                        "title": product_type["ID"],
+                        "title": product_type["title"],
                     }
                     for product_type in product_types_list
                 ]


Test patch:
diff --git a/tests/units/test_http_server.py b/tests/units/test_http_server.py
index db2e69fc..311799ff 100644
--- a/tests/units/test_http_server.py
+++ b/tests/units/test_http_server.py
@@ -1110,7 +1110,7 @@ class RequestTestCase(unittest.TestCase):
         "eodag.rest.core.eodag_api.list_product_types",
         autospec=True,
         return_value=[
-            {"_id": "S2_MSI_L1C", "ID": "S2_MSI_L1C"},
+            {"_id": "S2_MSI_L1C", "ID": "S2_MSI_L1C", "title": "SENTINEL2 Level-1C"},
             {"_id": "S2_MSI_L2A", "ID": "S2_MSI_L2A"},
         ],
     )
@@ -1123,9 +1123,10 @@ class RequestTestCase(unittest.TestCase):
             self.assertListEqual(
                 ["S2_MSI_L1C", "S2_MSI_L2A"],
                 [
-                    it["title"]
-                    for it in json.loads(r.content.decode("utf-8")).get("links", [])
-                    if it["rel"] == "child"
+                    col["id"]
+                    for col in json.loads(r.content.decode("utf-8")).get(
+                        "collections", []
+                    )
                 ],
             )
 
@@ -1135,14 +1136,12 @@ class RequestTestCase(unittest.TestCase):
         self.assertTrue(guess_pt.called)
         self.assertTrue(list_pt.called)
         self.assertEqual(200, r.status_code)
+        resp_json = json.loads(r.content.decode("utf-8"))
         self.assertListEqual(
             ["S2_MSI_L1C"],
-            [
-                it["title"]
-                for it in json.loads(r.content.decode("utf-8")).get("links", [])
-                if it["rel"] == "child"
-            ],
+            [col["id"] for col in resp_json.get("collections", [])],
         )
+        self.assertEqual(resp_json["collections"][0]["title"], "SENTINEL2 Level-1C")
 
     @mock.patch(
         "eodag.rest.core.eodag_api.list_product_types",
@@ -1161,9 +1160,8 @@ class RequestTestCase(unittest.TestCase):
         self.assertListEqual(
             ["S2_MSI_L1C", "S2_MSI_L2A"],
             [
-                it["title"]
-                for it in json.loads(r.content.decode("utf-8")).get("links", [])
-                if it["rel"] == "child"
+                col["id"]
+                for col in json.loads(r.content.decode("utf-8")).get("collections", [])
             ],
         )
 
@@ -1307,6 +1305,28 @@ class RequestTestCase(unittest.TestCase):
         product.downloader.order_response_process.reset_mock()
         product.downloader._stream_download_dict.assert_not_called()
 
+    def test_root(self):
+        """Request to / should return a valid response"""
+        resp_json = self._request_valid("", check_links=False)
+        self.assertEqual(resp_json["id"], "eodag-stac-api")
+        self.assertEqual(resp_json["title"], "eodag-stac-api")
+        self.assertEqual(resp_json["description"], "STAC API provided by EODAG")
+
+        # customize root info
+        try:
+            Settings.from_environment.cache_clear()
+            with temporary_environment(
+                EODAG_STAC_API_LANDING_ID="foo-id",
+                EODAG_STAC_API_TITLE="foo title",
+                EODAG_STAC_API_DESCRIPTION="foo description",
+            ):
+                resp_json = self._request_valid("", check_links=False)
+                self.assertEqual(resp_json["id"], "foo-id")
+                self.assertEqual(resp_json["title"], "foo title")
+                self.assertEqual(resp_json["description"], "foo description")
+        finally:
+            Settings.from_environment.cache_clear()
+
     def test_conformance(self):
         """Request to /conformance should return a valid response"""
         self._request_valid("conformance", check_links=False)