earthengine-api 1.6.11rc0__py3-none-any.whl → 1.6.12__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. {earthengine_api-1.6.11rc0.dist-info → earthengine_api-1.6.12.dist-info}/METADATA +1 -1
  2. {earthengine_api-1.6.11rc0.dist-info → earthengine_api-1.6.12.dist-info}/RECORD +48 -46
  3. ee/__init__.py +5 -5
  4. ee/_cloud_api_utils.py +33 -10
  5. ee/_state.py +105 -0
  6. ee/apifunction.py +1 -1
  7. ee/apitestcase.py +15 -21
  8. ee/batch.py +1 -1
  9. ee/cli/commands.py +153 -63
  10. ee/cli/eecli.py +1 -1
  11. ee/cli/utils.py +25 -15
  12. ee/collection.py +27 -18
  13. ee/computedobject.py +5 -5
  14. ee/customfunction.py +3 -3
  15. ee/data.py +104 -210
  16. ee/ee_array.py +4 -2
  17. ee/ee_number.py +1 -1
  18. ee/ee_string.py +18 -26
  19. ee/ee_types.py +2 -2
  20. ee/element.py +1 -1
  21. ee/featurecollection.py +10 -7
  22. ee/filter.py +2 -2
  23. ee/geometry.py +20 -21
  24. ee/image.py +7 -12
  25. ee/imagecollection.py +3 -3
  26. ee/mapclient.py +9 -9
  27. ee/oauth.py +13 -6
  28. ee/tests/_cloud_api_utils_test.py +16 -0
  29. ee/tests/_helpers_test.py +9 -9
  30. ee/tests/_state_test.py +49 -0
  31. ee/tests/apifunction_test.py +5 -5
  32. ee/tests/batch_test.py +61 -50
  33. ee/tests/collection_test.py +13 -13
  34. ee/tests/data_test.py +65 -60
  35. ee/tests/dictionary_test.py +9 -9
  36. ee/tests/ee_number_test.py +32 -26
  37. ee/tests/ee_string_test.py +8 -0
  38. ee/tests/ee_test.py +37 -19
  39. ee/tests/element_test.py +2 -2
  40. ee/tests/feature_test.py +6 -6
  41. ee/tests/function_test.py +5 -5
  42. ee/tests/geometry_test.py +73 -51
  43. ee/tests/oauth_test.py +21 -2
  44. ee/tests/serializer_test.py +8 -8
  45. {earthengine_api-1.6.11rc0.dist-info → earthengine_api-1.6.12.dist-info}/WHEEL +0 -0
  46. {earthengine_api-1.6.11rc0.dist-info → earthengine_api-1.6.12.dist-info}/entry_points.txt +0 -0
  47. {earthengine_api-1.6.11rc0.dist-info → earthengine_api-1.6.12.dist-info}/licenses/LICENSE +0 -0
  48. {earthengine_api-1.6.11rc0.dist-info → earthengine_api-1.6.12.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: earthengine-api
3
- Version: 1.6.11rc0
3
+ Version: 1.6.12
4
4
  Summary: Earth Engine Python API
5
5
  Author-email: Google LLC <noreply@google.com>
6
6
  License: Apache-2.0
@@ -1,47 +1,48 @@
1
- earthengine_api-1.6.11rc0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
2
- ee/__init__.py,sha256=XAO2w927IcX3ubm3IW7Rw04qW0fEzd-6J43CGU_b5tU,16811
1
+ earthengine_api-1.6.12.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
2
+ ee/__init__.py,sha256=L2apEDNlsV3UxIikUyUzdClLNt6hVoms8B6oj3VMsMs,16804
3
3
  ee/_arg_types.py,sha256=nrJrnPFnAS8fzMxAGmG3TbUOi_yFVrnSGW5IP8ATzDQ,2662
4
- ee/_cloud_api_utils.py,sha256=sG1WtO9zy_xNSSGWiG1Y9ltrvkl5dExqIoWMw5O6llE,32192
4
+ ee/_cloud_api_utils.py,sha256=06xr56VvGeQHl6DTeoC9_YE0hKVtE11tMnDCv98TKSA,32998
5
5
  ee/_helpers.py,sha256=71xYDbCO_1usY3SnedoA9zi7j6dnPBijru1eUh4o25g,4859
6
+ ee/_state.py,sha256=y2hdq_ZEgFkO9a-DbWFSthehlAyTbp--cz4C04XS058,2754
6
7
  ee/_utils.py,sha256=SAXQ_ZefZUaOtyV6Lp3pdYqEFqblMEA6Bvxz0ltLjzA,1329
7
- ee/apifunction.py,sha256=5oatxvJH1KAFYz5Ae8T58wi40fK33-8y9ajEQz0wpW4,8733
8
- ee/apitestcase.py,sha256=K3zHLYFCJ_QhwdhoImIeD-DJjSgd_nAGQpftKYvjF-Q,14959
9
- ee/batch.py,sha256=opkPNZ8V1tGQiMnVKVtSn1XA19AJhxrlTW5u77o8EmY,82401
8
+ ee/apifunction.py,sha256=mCCsLhBs_MofvMW49OFjT5psQGMbXWQSpAlhiqMEc4k,8732
9
+ ee/apitestcase.py,sha256=fomryH6kQnYEUwQ5lWaVOdRQzsUX2fjLb0PPC5JdjBg,14029
10
+ ee/batch.py,sha256=dETwEgh2E9bsoKcmo7MrqIKrU9OEOymDHtbifl_hMS4,82400
10
11
  ee/blob.py,sha256=cnnqmrHl998U2zEmfKcxQglaGk14Ip6pjObk_Ody6Uk,3221
11
12
  ee/classifier.py,sha256=3STLrLT6Ddwzjs2324E02wRWM8VEpeifgOO81geTHJQ,23410
12
13
  ee/clusterer.py,sha256=986D68b2eJ4xiiOiIOTNZ1psF8Ro-MFNQFKed058FS4,12256
13
- ee/collection.py,sha256=20g_Y_UnkhABGFOSybyE_IGmKvod5kR9xm5eKLjzNcE,32277
14
- ee/computedobject.py,sha256=o5F4y00PK-fye2pduA5QmMd6XIERA1lhC3yLs88zRpY,9082
14
+ ee/collection.py,sha256=ViBWCb-k79BHxEOyrN4WN5f7wDjowCQqOvI-rAbD90I,32560
15
+ ee/computedobject.py,sha256=cuhgfJ3bnM2Wm5KfxjqA6jh4SLwWvXO-8UhVD3Cqb2Q,9080
15
16
  ee/confusionmatrix.py,sha256=e6vz-FcT6acWxk5pDEK0vLIN1pUjYMh5Gyn1QSGJT3I,4233
16
- ee/customfunction.py,sha256=k57sl03_vhOuEwAmgFpg0z3Ze9J3gy_W6n4u3uMaryA,7384
17
- ee/data.py,sha256=-vgLRmxLmCunjxbK7D0riSNYreD5jqPjv3WLUbuZmGs,88549
17
+ ee/customfunction.py,sha256=ONDKyd5dldQLMX7diYZJK5wc8ty_-cI8K421Jumo9SM,7381
18
+ ee/data.py,sha256=eI6-JLKqw4RNsa_zOWAb2j8NgXCrVSKm9SjniGiZRPQ,85497
18
19
  ee/daterange.py,sha256=nrRYkR2M2aVU0ZJyG7yiZStFt-W2TvYVuazoZK_WZqM,4948
19
20
  ee/deprecation.py,sha256=dkTRDZcdT90_j41z_mMlhtX8u5eD5N2BuKL90Q0oWYc,6085
20
21
  ee/deserializer.py,sha256=Xz9Dis85JgZeLvpF-4yw3ZRv39rjvCTBYHjio8DE1kM,8424
21
22
  ee/dictionary.py,sha256=b0t46vaeVMsFGI2icdGNspmedRtVVxfiIcFLWcmL2v8,10508
22
- ee/ee_array.py,sha256=oqVm1jiLNUep5RvCO0ONVFLIYTV-WoZdyK-xfUTQc40,36311
23
+ ee/ee_array.py,sha256=EJmQ-zku1x0e6z44SlVD-F7mafmvRS0DoByKFyeDCuc,36368
23
24
  ee/ee_date.py,sha256=ixmLMrrGjq30DX9QY92HTeUgFZhWdn485cyaJkksh6U,10757
24
25
  ee/ee_exception.py,sha256=uN3X76HuhicU0LTxqRKQu1ZU6L7zw0GuABgsBTT-Ycw,164
25
26
  ee/ee_list.py,sha256=-jf0-zcqiiNexX_6GLZaRKotfmLabJ2o071Bv3MF6kI,19819
26
- ee/ee_number.py,sha256=5HNEu1cKhaHbosPp1-1AA99SuLd1z3D8N8xGt7Sy_j8,22593
27
- ee/ee_string.py,sha256=dHShM_ZTwYWEJe7kO_vjx3f2VDOcZBFFQtvhPqEzi08,7729
28
- ee/ee_types.py,sha256=QMVJePMTpVfyrJgaZyQ0K5LKOAlzrEMqYa8d3WH3wgQ,3083
29
- ee/element.py,sha256=DDcAeUxP9iZUeArjPl6DcjOJHxI8ND80VwLyxj7aYoY,6262
27
+ ee/ee_number.py,sha256=uLUI3AbsI9HhnR8bAVlkCogVjNhodp9OV7yXd-x0R30,22592
28
+ ee/ee_string.py,sha256=eg-dR1JAuazNFyOJsbCULQn3BvBpQd5LER8oDfWtXcU,7875
29
+ ee/ee_types.py,sha256=wQCE74pDRxz_IAYc6hjSSqJwp5ozOIoZF0cHijTd8Sg,3081
30
+ ee/element.py,sha256=SdIVljB0Sbut02a61XgsPLiJpA66n34fsYZGMwsS8jQ,6261
30
31
  ee/encodable.py,sha256=ZzZBOVOEwc8a8Dby3oHwIhW-5za-4tvLDE0Q2oVaNwQ,1884
31
32
  ee/errormargin.py,sha256=x8kAgFeUdXmpc_kv8Vx5qv-fHeJvFU9EBFbSOxhNl8Y,3039
32
33
  ee/feature.py,sha256=WItnwlQp8U3D0E0YkgJNXIAk2JviwloS9c8j2XqbKEM,30292
33
- ee/featurecollection.py,sha256=kJFLYx4fFTzO5pzTo-6g-oVhDutvbXRRoIS8IcZsPec,14386
34
- ee/filter.py,sha256=W_qZ21kr83Ca_3ZzP3mGxvEXN0bf5xsesqFyV4dNsGc,35323
34
+ ee/featurecollection.py,sha256=XbDgzYEEyhim0_y2AOD5Wi-TRIl90OnB1DHtAJXgvg8,14424
35
+ ee/filter.py,sha256=GKz3IqeZSrK4X26TjWaw_uOE8KjZgSx1pS1zM07PXfI,35321
35
36
  ee/function.py,sha256=X-Mz0AvF_l809NZXK8RM6fa2h-nP7YU2sUFp6hvIbdU,7049
36
- ee/geometry.py,sha256=maZDpV7Kd_eiazgREnlRX6Dmk8DIvVGUAhGE23gjWzA,59360
37
- ee/image.py,sha256=XT2tzNV2CiCWlbwQqgFl22sESHV1uWUH2DW92fmnBIo,171056
37
+ ee/geometry.py,sha256=6r2Y2E6H_adrBaWq9zzZZRFgq0KIe543rOSHaDHeNzY,59264
38
+ ee/image.py,sha256=LDidnOBIQaZ1Rv9X8H6DcNUzClRYxXcy2lHGoe5L6pA,170921
38
39
  ee/image_converter.py,sha256=CdeM5zMy0T_HylcFeoIcfZxjczWwOA2SklDLg6p9le8,1494
39
- ee/imagecollection.py,sha256=kC1jdt7Mu3sv5COqRaHBwV7P_FUXv1FZGNhAKDcmq8w,27091
40
+ ee/imagecollection.py,sha256=RcOd5j11x7324MYmvZG62ehyjzaGAnKqakhhXkYlOCc,27102
40
41
  ee/join.py,sha256=idnuzRNFvKHRLHV5m9unp_xTsZb-E2kfgUCEYSg64ts,7578
41
42
  ee/kernel.py,sha256=eTzJFvW4nbyiFl2dDZ0_cA_o3KqCbBewY-BDp7tCB_M,15002
42
- ee/mapclient.py,sha256=QpUpKreEgOkjSXQBnfyViCwLQGiumHbKr-EA076XLYk,17500
43
+ ee/mapclient.py,sha256=feCFwL76juFFZPI4uycVxUoFMeEFbPFfIVETkmpvmcY,17491
43
44
  ee/model.py,sha256=nXn0qhwKgiTA6xOUQ7aFe0o6Mis68hiywLoY9twLOj0,12185
44
- ee/oauth.py,sha256=hTDY5m4wacRA6mIXl_0oea7g94O5BBbdFR_awBfwFZc,21922
45
+ ee/oauth.py,sha256=7rqMxdYHPuNcoHv_SswuiJa2taEBjyh2sX1iszjLnO0,22247
45
46
  ee/pixeltype.py,sha256=ucUwJ5SvcOT849Ap4mlJL9z11IAbcT1w9ii8-zOoqdI,5196
46
47
  ee/projection.py,sha256=n7WvMeYEG9zksGN1tIX7RGweC4IyCrXAKsvPY0e2b8k,5868
47
48
  ee/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -50,58 +51,59 @@ ee/serializer.py,sha256=OldyytHpwmUVt28TEjlSS7J-3CE7GBZhyyXhvyMQIGs,22806
50
51
  ee/table_converter.py,sha256=6ARbOLq1VPU1_wXY2pyv0PuzY4XyEBwM3npMt6Hp__U,2088
51
52
  ee/terrain.py,sha256=VBa0VPfAkNuAruEIEu12XarwwlzQSwE09rQghmk62k0,4863
52
53
  ee/cli/__init__.py,sha256=YjzBDuYi6fiOv77Xfl-Qib2O6gRZj9z7Sx2Zz6teTXU,33
53
- ee/cli/commands.py,sha256=P2KPuSx0wKcp1lfo7hwkTqwnjxORnxTKqJ0RwrX3O8c,70534
54
- ee/cli/eecli.py,sha256=iws34w24UJI6H7Wl9WsEUwy-uN57Pw-bgHtr2f92olY,3044
54
+ ee/cli/commands.py,sha256=8OeaoMIjseD7Eah9HoaeYzQFN6i6T9rUPYPh-9S9rZc,73544
55
+ ee/cli/eecli.py,sha256=1yDyingkwurai13F_PF91RYsBev6jGJ9WEoZaT2Dgy8,3043
55
56
  ee/cli/eecli_wrapper.py,sha256=Z7R3IJcht2uG1h57oY7BSrkPiwQzNmmYlyCSX1_7L7c,1089
56
- ee/cli/utils.py,sha256=YWrgN_5k8GRWndST20KkGljn4Ee8F8935ID91qiLRtY,13796
57
- ee/tests/_cloud_api_utils_test.py,sha256=YpTG4wBTuSIyb7XolAre41VuQCiH9di_7olCE_71S1U,18754
58
- ee/tests/_helpers_test.py,sha256=p_GJaXr9xcQbBFkMp7f9H_h2OBqI1YPH1pRHGNE8cA4,3964
57
+ ee/cli/utils.py,sha256=Y6z2Qd7qyFwe_Qc-OVlbOw-BSWxLr7ytuhxEgcYAKwI,14116
58
+ ee/tests/_cloud_api_utils_test.py,sha256=p8kwehArlj_j4HWsx6vNEk2Dw17MlxYw0XtzupsDWdY,19493
59
+ ee/tests/_helpers_test.py,sha256=vyhbY9hE_zcSI692eAdjtM36P2vVXScDj_ENA-0tces,3991
60
+ ee/tests/_state_test.py,sha256=AKe5Vopzt24FJPiPcEce_oOT861gOkd6mUOAWZr6C0g,1175
59
61
  ee/tests/_utils_test.py,sha256=bOarVj3U-VFo9Prog8WQN_hAOMwJOiWKJxevUbdFPBQ,2753
60
62
  ee/tests/algorithms.json,sha256=Vx1Kx_MhHv0z0B3WTeVAvchM8xVd3zYE7L-qT3gDGzA,729368
61
- ee/tests/apifunction_test.py,sha256=62El-6jcgQmD7qt9eEDdM7IeIQmpV8M5xQ439g-zfN4,3767
62
- ee/tests/batch_test.py,sha256=Vo-0_LoH2Ccutta6SAfgbk4VcptfeW2DA5yXJPWJj_Y,62399
63
+ ee/tests/apifunction_test.py,sha256=_6xpkJOd7hScYYQxzFR-8flraTQ6xfkm7gyER6JoBog,3779
64
+ ee/tests/batch_test.py,sha256=KsgGXI1mqAz9RPbuv9H07ShvVXVwnt8lLvmMFz2y_6o,62912
63
65
  ee/tests/blob_test.py,sha256=uCrM-ubRfAmNgHwhmUhWn7MiXqbNQutybcXIKdVsD_Q,3587
64
66
  ee/tests/classifier_test.py,sha256=K6-wNZ2uh9oPYo7BV0vtfU73SBFpeNcFRMRmvEFc6Pg,19087
65
67
  ee/tests/cloud_api_discovery_document.json,sha256=SnOeL8One57YdeHa7XxGZM-ptDPCeDSymBc7-Bo_hkA,41154
66
68
  ee/tests/clusterer_test.py,sha256=B4m06wAtBeqvnIhRD2lnNy1UHDB_caleK_CqcrAU8dk,11620
67
- ee/tests/collection_test.py,sha256=dnZwFADWQ8oShJHRTcYSzuP-waAxetTdM_CtVckWbMM,7563
69
+ ee/tests/collection_test.py,sha256=rQ6WT5su53b14P5Wix3-SkKXDW99W1BXdB4uk0NmDck,7594
68
70
  ee/tests/computedobject_test.py,sha256=B27rDq9Urpvy0WqpdbKRYbt6AcT1i93HX-es7hrhWVY,4840
69
71
  ee/tests/confusionmatrix_test.py,sha256=46JJh1-91AiYISXWZ6-2lvY5_Njvc8ompO9kmwqlFdg,7437
70
- ee/tests/data_test.py,sha256=9zDGICUCeJFi4Q6lX2mB0Qca9C-eUMEn4vzpTZI5Imk,40222
72
+ ee/tests/data_test.py,sha256=-_TcPdCdqqfeCNA_hGU9mpjKHl1GxBnb9tCWDWsFrrc,40394
71
73
  ee/tests/daterange_test.py,sha256=a5fpg2lko3kCJzxQPCoAc_vjXkKy2zYcXbeSZKAFovI,8583
72
74
  ee/tests/deprecation_test.py,sha256=_sCs59l6c-ijeyt5yPO-IRJsh8GGPp7ArSg3Y12u4mQ,8352
73
75
  ee/tests/deserializer_test.py,sha256=-tbrL0cjrXdSLF7M3wl-QQuj6TjXJdkjp7RZvVErUy4,3427
74
- ee/tests/dictionary_test.py,sha256=_OCE4i-NWECPnnrT4C54nUZ_2V8PyZvpTqAdKHAkvq8,11809
76
+ ee/tests/dictionary_test.py,sha256=IRaXMr3GzZFQ5BiHdB35Iio2TckIK67Cnp6KH0h8Aa8,11818
75
77
  ee/tests/ee_array_test.py,sha256=JVXShdbOVOjlfSpNgYc_NVrknQatuPOZ19fG0Ii5yVU,50268
76
78
  ee/tests/ee_date_test.py,sha256=8rLUXfjyiW3LiBOCSneA7ZGgmoFgN5oZr58x5THtKGY,11106
77
79
  ee/tests/ee_list_test.py,sha256=yd2EWZGdg7pLJhsHSR5AbK58ZhT31GY-n2o1dDT3p9A,21797
78
- ee/tests/ee_number_test.py,sha256=3MxX8Awie_L3FfwyltrL2UXNdqTyvtYJB9qIi73wlPM,33442
79
- ee/tests/ee_string_test.py,sha256=9QuseILwZtbcczCyNyJ751kva96_9gPKXLRdgkgWMPs,9389
80
- ee/tests/ee_test.py,sha256=_HELrvUb7Wpmeji4Jd_rlZfCcXWQ4mPxRTG7d88u0zI,17082
80
+ ee/tests/ee_number_test.py,sha256=1W7xI73KC-tl6q-bgJBalUseoabG7PPEOzps4g1FGco,33679
81
+ ee/tests/ee_string_test.py,sha256=X6XJwa09yJXhg0rIpRb4QFA3eeGIrh2XClwhVByMRBY,9664
82
+ ee/tests/ee_test.py,sha256=CY5XUfh_5Bx6yIUrHDI1SbVfztIgejB-LGdgCMgT0IA,17835
81
83
  ee/tests/ee_types_test.py,sha256=oRnqplaTWg47zuYfAYTTVwembCnw8XT20HPNMdAvgNE,921
82
- ee/tests/element_test.py,sha256=Kqu_Z65FQcYHX4LebKm3LD0mWkRTRZccs-qAGz3bLsE,1964
84
+ ee/tests/element_test.py,sha256=Gft1vmSeuhSelRHsdGKHd3S1xucnUQJh8ZlGSZ2JxRw,1968
83
85
  ee/tests/errormargin_test.py,sha256=YEBzvBFsD756nicZBcjnPFAXy06jZNKiSSAa2hAzN-M,5061
84
- ee/tests/feature_test.py,sha256=9SotWgRsQ48xZ9N-grlEWZjeamsWweXPS4sMSZCGX-s,22505
86
+ ee/tests/feature_test.py,sha256=-iq-p9xidPV0WE398j1nWL6Gn4Yvi_CQRetHbHhDooM,22514
85
87
  ee/tests/featurecollection_test.py,sha256=b3SwieXb8nyRzAlwKK_nSa4xGcy5AynIDZ1A3sV02Es,38440
86
88
  ee/tests/filter_test.py,sha256=d-KQ_zI-r7BAMazKqqHMMzNUZdeC46BZiciMfthKEO8,35033
87
- ee/tests/function_test.py,sha256=NbluwBCuWUZSzbMLAa04OP_qd95ibMjJWWNuM2P3Izo,3121
89
+ ee/tests/function_test.py,sha256=0hv7H-Q21vdDvqHNH_3NvFj_nPEWM2Fh7CD0wgjXE2M,3131
88
90
  ee/tests/geometry_point_test.py,sha256=w9MYTwvw2Co9rIjffFB0ezQ_jZz8nxbdgOcyhqTTmjk,15093
89
- ee/tests/geometry_test.py,sha256=z010i7CgwX8taJGk0NaMh6ArUDTIZllFgyZrMSpNFlI,30732
91
+ ee/tests/geometry_test.py,sha256=8KAevJgLpw38BzelpENiSOn0t0tGuHatxDiN1aKLUBk,31653
90
92
  ee/tests/image_converter_test.py,sha256=uRXYOCU3a0ZaRTHw-ovVP8FJC2mVE9wbHd3JzoExkPs,1885
91
93
  ee/tests/image_test.py,sha256=_SJmee7orPot26vbxKEZcNZ6OsrNrxv3ToInWYLNZLM,150917
92
94
  ee/tests/imagecollection_test.py,sha256=qosRZXCbhwFuy8qR7DbA-FMl4ktW7Y2cUJHeXLcszpg,38444
93
95
  ee/tests/join_test.py,sha256=pFILq3qM27rO64WYbBC1A_Gs8_pabRv68X7MU_EM_cw,7630
94
96
  ee/tests/kernel_test.py,sha256=ZblWHqgleJ-7C4lnL7awxfR1mcYtcxpXkkKUziKG2cA,19249
95
97
  ee/tests/model_test.py,sha256=f2oLaDaAEr23QjkIAhBKY1Mt8CSRmo5N1-fyYRGd5j8,12053
96
- ee/tests/oauth_test.py,sha256=hAGvot2xj1MFW6IdD1QAmSNIiuu4z4gCs3beRhp3U_k,2277
98
+ ee/tests/oauth_test.py,sha256=jYFw8GWPFmLR0jh2NvbcrMizQo_qR_bRDBVRdIZ44g0,3067
97
99
  ee/tests/pixeltype_test.py,sha256=00IWKnZ7xxkVwSSCuWOlCwlTsHAb3XPyKp1Arc4S12U,10024
98
100
  ee/tests/projection_test.py,sha256=fKXXxQPBvWdlMNtNsJze2pbsT0yHHlL7ON8Pdjm1Z7E,6871
99
101
  ee/tests/reducer_test.py,sha256=NYJTmX6AmBZyXGjOkgUh4t3tB6E8_vGlPYQIxJQbV9Q,31518
100
- ee/tests/serializer_test.py,sha256=xZQBQMDK8dlGYLS-6s1JHhR1L5FKoaIwEkxdKlcpQTE,8802
102
+ ee/tests/serializer_test.py,sha256=9t2jaDqrdxAAi3QOXZ0QbWnjExWdLODHdMVJSrtTBvU,8824
101
103
  ee/tests/table_converter_test.py,sha256=2F7DyEj-iHVbt9-W1iwAHDl-K1GA_2QHalTXzac2ot8,3373
102
104
  ee/tests/terrain_test.py,sha256=8TmvGconOR-GkGrll4joXhpU9zi0b_8GFxvX_JlcCos,4328
103
- earthengine_api-1.6.11rc0.dist-info/METADATA,sha256=_Kq57-3jjgcxF4o8peqU7Mf8SFWzQpDUL71Z9CpgIPI,2197
104
- earthengine_api-1.6.11rc0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
105
- earthengine_api-1.6.11rc0.dist-info/entry_points.txt,sha256=-Ax4SCU-S474r8OD2LIxata6PRmkZoDrppQ4fP_exNc,50
106
- earthengine_api-1.6.11rc0.dist-info/top_level.txt,sha256=go5zOwCgm5lIS3yTR-Vsxp1gNI4qdS-MP5eY-7zMxVY,3
107
- earthengine_api-1.6.11rc0.dist-info/RECORD,,
105
+ earthengine_api-1.6.12.dist-info/METADATA,sha256=3UsVlBbhtRVYz55WRRZFItcyFazYmwc3h3SmUyOUYLY,2194
106
+ earthengine_api-1.6.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
107
+ earthengine_api-1.6.12.dist-info/entry_points.txt,sha256=-Ax4SCU-S474r8OD2LIxata6PRmkZoDrppQ4fP_exNc,50
108
+ earthengine_api-1.6.12.dist-info/top_level.txt,sha256=go5zOwCgm5lIS3yTR-Vsxp1gNI4qdS-MP5eY-7zMxVY,3
109
+ earthengine_api-1.6.12.dist-info/RECORD,,
ee/__init__.py CHANGED
@@ -1,6 +1,6 @@
1
1
  """The EE Python library."""
2
2
 
3
- __version__ = '1.6.11rc0'
3
+ __version__ = '1.6.12'
4
4
 
5
5
  # Using lowercase function naming to match the JavaScript names.
6
6
  # pylint: disable=g-bad-name
@@ -171,12 +171,12 @@ def Initialize(
171
171
  """Initialize the EE library.
172
172
 
173
173
  If this hasn't been called by the time any object constructor is used,
174
- it will be called then. If this is called a second time with a different
174
+ it will be called then. If this is called a second time with a different
175
175
  URL, this doesn't do an un-initialization of, e.g., the previously loaded
176
176
  Algorithms, but will overwrite them and let point at alternate servers.
177
177
 
178
178
  Args:
179
- credentials: OAuth2 credentials. 'persistent' (default) means use
179
+ credentials: OAuth2 credentials. 'persistent' (default) means use
180
180
  credentials already stored in the filesystem, or raise an explanatory
181
181
  exception guiding the user to create those credentials.
182
182
  url: The base url for the EarthEngine REST API to connect to.
@@ -443,7 +443,7 @@ def _MakeClass(name: str) -> type[Any]:
443
443
  """Initializer for dynamically created classes.
444
444
 
445
445
  Args:
446
- self: The instance of this class. Listed to make the linter hush.
446
+ self: The instance of this class. Listed to make the linter hush.
447
447
  *args: Either a ComputedObject to be promoted to this type, or
448
448
  arguments to an algorithm with the same name as this class.
449
449
  **kwargs: Any kwargs passed to this class constructor.
@@ -485,7 +485,7 @@ def _MakeClass(name: str) -> type[Any]:
485
485
  elif firstArgIsPrimitive:
486
486
  # Can't cast a primitive.
487
487
  raise EEException(
488
- 'Invalid argument for ee.{}(): {}. '
488
+ 'Invalid argument for ee.{}(): {}. '
489
489
  'Must be a ComputedObject.'.format(name, args))
490
490
 
491
491
  result = args[0]
ee/_cloud_api_utils.py CHANGED
@@ -35,6 +35,16 @@ ASSET_NAME_PATTERN = (r'^projects/((?:\w+(?:[\w\-]+\.[\w\-]+)*?\.\w+\:)?'
35
35
  ASSET_ROOT_PATTERN = (r'^projects/((?:\w+(?:[\w\-]+\.[\w\-]+)*?\.\w+\:)?'
36
36
  r'[a-z][a-z0-9\-]{4,28}[a-z0-9])/assets/?$')
37
37
 
38
+ # Conversion from task state to operation state.
39
+ TASK_TO_OPERATION_STATE = {
40
+ 'READY': 'PENDING',
41
+ 'RUNNING': 'RUNNING',
42
+ 'CANCEL_REQUESTED': 'CANCELLING',
43
+ 'COMPLETED': 'SUCCEEDED',
44
+ 'CANCELLED': 'CANCELLED',
45
+ 'FAILED': 'FAILED',
46
+ }
47
+
38
48
 
39
49
  class _Http:
40
50
  """A httplib2.Http-like object based on requests."""
@@ -280,7 +290,7 @@ def _convert_dict(
280
290
  not contain these keys.
281
291
  key_warnings: Whether to print warnings for input keys that are not mapped
282
292
  to anything in the output.
283
- retain_keys: Whether or not to retain the state of dict. If false, any keys
293
+ retain_keys: Whether or not to retain the state of dict. If false, any keys
284
294
  that don't show up in the conversions dict will be dropped from result.
285
295
 
286
296
  Returns:
@@ -853,16 +863,29 @@ def convert_operation_to_task(operation: dict[str, Any]) -> dict[str, Any]:
853
863
 
854
864
 
855
865
  def _convert_operation_state_to_task_state(state: str) -> str:
856
- """Converts a state string from an Operation to the Task equivalent."""
866
+ """Converts an Operation state to a Task state."""
857
867
  return _convert_value(
858
- state, {
859
- 'PENDING': 'READY',
860
- 'RUNNING': 'RUNNING',
861
- 'CANCELLING': 'CANCEL_REQUESTED',
862
- 'SUCCEEDED': 'COMPLETED',
863
- 'CANCELLED': 'CANCELLED',
864
- 'FAILED': 'FAILED'
865
- }, 'UNKNOWN')
868
+ state,
869
+ {value: key for key, value in TASK_TO_OPERATION_STATE.items()},
870
+ 'UNKNOWN',
871
+ )
872
+
873
+
874
+ def _convert_task_state_to_operation_state(state: str) -> str:
875
+ """Converts a Task state to an Operation state."""
876
+ return _convert_value(state, TASK_TO_OPERATION_STATE, 'UNKNOWN')
877
+
878
+
879
+ def convert_to_operation_state(state: str) -> str:
880
+ """Converts a Task state or an Operation state to an Operation state."""
881
+ # First, try converting the state assuming it's a task state.
882
+ operation_state = _convert_task_state_to_operation_state(state)
883
+ if operation_state != 'UNKNOWN':
884
+ return operation_state
885
+
886
+ # If it wasn't a task state, check if the input is a valid operation state.
887
+ valid_operation_states = set(TASK_TO_OPERATION_STATE.values())
888
+ return state if state in valid_operation_states else 'UNKNOWN'
866
889
 
867
890
 
868
891
  def convert_iam_policy_to_acl(policy: dict[str, Any]) -> dict[str, Any]:
ee/_state.py ADDED
@@ -0,0 +1,105 @@
1
+ """Stores the current state of the EE library."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import dataclasses
6
+ import re
7
+ from typing import Any
8
+
9
+ # Rename to avoid redefined-outer-name warning.
10
+ from google.oauth2 import credentials as credentials_lib
11
+ import requests
12
+
13
+
14
+ # The default project to use for Cloud API calls.
15
+ DEFAULT_CLOUD_API_USER_PROJECT = 'earthengine-legacy'
16
+
17
+
18
+ @dataclasses.dataclass()
19
+ class _WorkloadTag:
20
+ """A helper class to manage the workload tag."""
21
+
22
+ _tag: str
23
+ _default: str
24
+
25
+ def __init__(self):
26
+ self._tag = ''
27
+ self._default = ''
28
+
29
+ def get(self) -> str:
30
+ return self._tag
31
+
32
+ def set(self, tag: int | str | None) -> None:
33
+ self._tag = self.validate(tag)
34
+
35
+ def set_default(self, new_default: int | str | None) -> None:
36
+ self._default = self.validate(new_default)
37
+
38
+ def reset(self) -> None:
39
+ self._tag = self._default
40
+
41
+ def validate(self, tag: int | str | None) -> str:
42
+ """Returns the validated tag or raises a ValueError.
43
+
44
+ Args:
45
+ tag: the tag to validate.
46
+
47
+ Raises:
48
+ ValueError if the tag does not match the expected format.
49
+ """
50
+ if not tag and tag != 0:
51
+ return ''
52
+ tag = str(tag)
53
+ if not re.fullmatch(r'([a-z0-9]|[a-z0-9][-_a-z0-9]{0,61}[a-z0-9])', tag):
54
+ validation_message = (
55
+ 'Tags must be 1-63 characters, '
56
+ 'beginning and ending with a lowercase alphanumeric character '
57
+ '([a-z0-9]) with dashes (-), underscores (_), '
58
+ 'and lowercase alphanumerics between.'
59
+ )
60
+ raise ValueError(f'Invalid tag, "{tag}". {validation_message}')
61
+ return tag
62
+
63
+
64
+ @dataclasses.dataclass()
65
+ class EEState:
66
+ """Holds the configuration and initialized resources for an EE session."""
67
+
68
+ initialized: bool = False
69
+ credentials: credentials_lib.Credentials | None = None
70
+ api_base_url: str | None = None
71
+ tile_base_url: str | None = None
72
+ cloud_api_base_url: str | None = None
73
+ cloud_api_key: str | None = None
74
+ requests_session: requests.Session | None = None
75
+ cloud_api_resource: Any | None = None
76
+ cloud_api_resource_raw: Any | None = None
77
+ cloud_api_user_project: str | None = DEFAULT_CLOUD_API_USER_PROJECT
78
+ cloud_api_client_version: str | None = None
79
+ http_transport: Any | None = None
80
+ deadline_ms: int = 0
81
+ max_retries: int = 5
82
+ user_agent: str | None = None
83
+ workload_tag: _WorkloadTag = dataclasses.field(default_factory=_WorkloadTag)
84
+
85
+
86
+ _state: EEState | None = None
87
+
88
+
89
+ def get_state() -> EEState:
90
+ """Retrieves the EEState for the current execution context.
91
+
92
+ Returns:
93
+ The EEState for the current execution context.
94
+ """
95
+
96
+ global _state
97
+ if not _state:
98
+ _state = EEState()
99
+ return _state
100
+
101
+
102
+ def reset_state() -> None:
103
+ """Resets the EEState to the default state."""
104
+ global _state
105
+ _state = None
ee/apifunction.py CHANGED
@@ -1,7 +1,7 @@
1
1
  """A class for representing built-in EE API Function.
2
2
 
3
3
  Earth Engine can dynamically produce a JSON array listing the
4
- algorithms available to the user. Each item in the dictionary identifies
4
+ algorithms available to the user. Each item in the dictionary identifies
5
5
  the name and return type of the algorithm, the name and type of its
6
6
  arguments, whether they're required or optional, default values and docs
7
7
  for each argument and the algorithms as a whole.
ee/apitestcase.py CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  from collections.abc import Iterable
4
4
  import contextlib
5
+ import copy
5
6
  import json
6
7
  import os
7
8
  from typing import Any, Optional
@@ -11,6 +12,7 @@ from googleapiclient import discovery
11
12
  import unittest
12
13
  import ee
13
14
  from ee import _cloud_api_utils
15
+ from ee import _state
14
16
 
15
17
 
16
18
  # Cached algorithms list
@@ -53,13 +55,8 @@ class ApiTestCase(unittest.TestCase):
53
55
  self.old_get_download_id = ee.data.getDownloadId
54
56
  self.old_get_thumb_id = ee.data.getThumbId
55
57
  self.old_get_table_download_id = ee.data.getTableDownloadId
56
- # pylint: disable=protected-access
57
- self.old_install_cloud_api_resource = ee.data._install_cloud_api_resource
58
- self.old_cloud_api_resource = ee.data._cloud_api_resource
59
- self.old_cloud_api_resource_raw = ee.data._cloud_api_resource_raw
60
- self.old_initialized = ee.data._initialized
58
+ # pylint: disable-next=protected-access
61
59
  self.old_fetch_data_catalog_stac = ee.deprecation._FetchDataCatalogStac
62
- # pylint: enable=protected-access
63
60
  self.InitializeApi()
64
61
 
65
62
  def tearDown(self):
@@ -70,13 +67,9 @@ class ApiTestCase(unittest.TestCase):
70
67
  ee.data.getDownloadId = self.old_get_download_id
71
68
  ee.data.getThumbId = self.old_get_thumb_id
72
69
  ee.data.getTableDownloadId = self.old_get_table_download_id
73
- # pylint: disable=protected-access
74
- ee.data._install_cloud_api_resource = self.old_install_cloud_api_resource
75
- ee.data._cloud_api_resource = self.old_cloud_api_resource
76
- ee.data._cloud_api_resource_raw = self.old_cloud_api_resource_raw
77
- ee.data._initialized = self.old_initialized
70
+ _state.reset_state()
71
+ # pylint: disable-next=protected-access
78
72
  ee.deprecation._FetchDataCatalogStac = self.old_fetch_data_catalog_stac
79
- # pylint: enable=protected-access
80
73
 
81
74
  def InitializeApi(self):
82
75
  """Initializes the library with standard API methods.
@@ -153,22 +146,23 @@ def UsingCloudApi(
153
146
  mock_http: Optional[Any] = None,
154
147
  ) -> Iterable[Any]: # pytype: disable=wrong-arg-types
155
148
  """Returns a context manager under which the Cloud API is enabled."""
156
- old_cloud_api_resource = ee.data._cloud_api_resource # pylint: disable=protected-access
157
- old_cloud_api_resource_raw = ee.data._cloud_api_resource_raw # pylint: disable=protected-access
158
- old_initialized = ee.data._initialized # pylint: disable=protected-access
149
+ # pylint: disable=protected-access
150
+ old_state = copy.copy(_state._state)
151
+ # pylint: enable=protected-access
159
152
  try:
160
153
  if cloud_api_resource is None:
161
154
  cloud_api_resource = _GenerateCloudApiResource(mock_http, False)
162
155
  if cloud_api_resource_raw is None:
163
156
  cloud_api_resource_raw = _GenerateCloudApiResource(mock_http, True)
164
- ee.data._cloud_api_resource = cloud_api_resource # pylint: disable=protected-access
165
- ee.data._cloud_api_resource_raw = cloud_api_resource_raw # pylint: disable=protected-access
166
- ee.data._initialized = True # pylint: disable=protected-access
157
+ state = _state.get_state()
158
+ state.cloud_api_resource = cloud_api_resource
159
+ state.cloud_api_resource_raw = cloud_api_resource_raw
160
+ state.initialized = True
167
161
  yield
168
162
  finally:
169
- ee.data._cloud_api_resource = old_cloud_api_resource # pylint: disable=protected-access
170
- ee.data._cloud_api_resource_raw = old_cloud_api_resource_raw # pylint: disable=protected-access
171
- ee.data._initialized = old_initialized # pylint: disable=protected-access
163
+ # pylint: disable=protected-access
164
+ _state._state = old_state
165
+ # pylint: enable=protected-access
172
166
 
173
167
 
174
168
  # A sample of encoded EE API JSON, used by SerializerTest and DeserializerTest.
ee/batch.py CHANGED
@@ -100,7 +100,7 @@ class Task:
100
100
  - Unpickling a previously pickled Task object.
101
101
 
102
102
  If you're looking for a task's status but don't need a full task object,
103
- ee.data.getTaskStatus() may be appropriate.
103
+ ee.data.getOperation() may be appropriate.
104
104
 
105
105
  Args:
106
106
  task_id: The task ID, originally obtained through ee.data.newTaskId().