earthengine-api 1.7.10__py3-none-any.whl → 1.7.10rc0__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.
Potentially problematic release.
This version of earthengine-api might be problematic. Click here for more details.
- {earthengine_api-1.7.10.dist-info → earthengine_api-1.7.10rc0.dist-info}/METADATA +1 -1
- {earthengine_api-1.7.10.dist-info → earthengine_api-1.7.10rc0.dist-info}/RECORD +9 -9
- ee/__init__.py +1 -1
- ee/data.py +1 -1
- ee/tests/data_test.py +12 -38
- {earthengine_api-1.7.10.dist-info → earthengine_api-1.7.10rc0.dist-info}/WHEEL +0 -0
- {earthengine_api-1.7.10.dist-info → earthengine_api-1.7.10rc0.dist-info}/entry_points.txt +0 -0
- {earthengine_api-1.7.10.dist-info → earthengine_api-1.7.10rc0.dist-info}/licenses/LICENSE +0 -0
- {earthengine_api-1.7.10.dist-info → earthengine_api-1.7.10rc0.dist-info}/top_level.txt +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
earthengine_api-1.7.
|
|
2
|
-
ee/__init__.py,sha256=
|
|
1
|
+
earthengine_api-1.7.10rc0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
2
|
+
ee/__init__.py,sha256=VQd47xDwRNdo7ygHuIypAiPnEJUbNJrT6RgNP2O706A,16763
|
|
3
3
|
ee/_arg_types.py,sha256=nrJrnPFnAS8fzMxAGmG3TbUOi_yFVrnSGW5IP8ATzDQ,2662
|
|
4
4
|
ee/_cloud_api_utils.py,sha256=5WPzP5bcBIbjA7yYN-Cwmht_HU-XobbTrZvRiOEn0e0,32890
|
|
5
5
|
ee/_helpers.py,sha256=afDDqoz1WESKE-lzqLtrCbvoQ1yVpfvJIgFcmUjO4L8,4821
|
|
@@ -15,7 +15,7 @@ ee/collection.py,sha256=c8OFIX9OVLxTbu8HGYiHOS3Yg6QjnxaO_FAhDhDQpic,32588
|
|
|
15
15
|
ee/computedobject.py,sha256=Cdlccd4vw2neeRQlo5Jn3Q5R-VpQcQufNuxOHfpd1FU,9186
|
|
16
16
|
ee/confusionmatrix.py,sha256=e6vz-FcT6acWxk5pDEK0vLIN1pUjYMh5Gyn1QSGJT3I,4233
|
|
17
17
|
ee/customfunction.py,sha256=Me_iHDnjkYR33JMttGA7pKJlPCjUk8rO_kgaIhDm27M,7408
|
|
18
|
-
ee/data.py,sha256=
|
|
18
|
+
ee/data.py,sha256=GdskXveIWk4hFMqd0T0P6qoOUEEP8MO1XE4LX2hc8lU,85503
|
|
19
19
|
ee/daterange.py,sha256=nrRYkR2M2aVU0ZJyG7yiZStFt-W2TvYVuazoZK_WZqM,4948
|
|
20
20
|
ee/deprecation.py,sha256=mAFdO7fBjOu9TJd8CJB_M_NsZ6VNSxtSe820QKJx8fE,6243
|
|
21
21
|
ee/deserializer.py,sha256=TjhQjcBnFpz8Kodoj74eSbvkJ2zLjpTTfUpcNEoQR2o,8357
|
|
@@ -69,7 +69,7 @@ ee/tests/clusterer_test.py,sha256=B4m06wAtBeqvnIhRD2lnNy1UHDB_caleK_CqcrAU8dk,11
|
|
|
69
69
|
ee/tests/collection_test.py,sha256=zsBerYrFr390awe-wD8uN9VME_qEsuaEN197hom4Xps,8815
|
|
70
70
|
ee/tests/computedobject_test.py,sha256=B27rDq9Urpvy0WqpdbKRYbt6AcT1i93HX-es7hrhWVY,4840
|
|
71
71
|
ee/tests/confusionmatrix_test.py,sha256=46JJh1-91AiYISXWZ6-2lvY5_Njvc8ompO9kmwqlFdg,7437
|
|
72
|
-
ee/tests/data_test.py,sha256=
|
|
72
|
+
ee/tests/data_test.py,sha256=SBxHQqgZ4kEaWR13MWa-XPBuUr06keImvbp0t308wuY,57306
|
|
73
73
|
ee/tests/daterange_test.py,sha256=7gEhFCWEa2KJW_ZaQMBavuJ0wLtUcVgsD8COF7NOd98,9389
|
|
74
74
|
ee/tests/deprecation_test.py,sha256=CoVug7J9YdB2utZ-BikyJcjitYPQLz49JL_z89xuQSQ,8484
|
|
75
75
|
ee/tests/deserializer_test.py,sha256=i_tlyzKgCo1-VpWPAQnTWNcr2klourcMcBbFZJN6Ivw,5050
|
|
@@ -103,8 +103,8 @@ ee/tests/reducer_test.py,sha256=vqXpgLZ7fPyfZ12srpREgMpfrKYLcFQod3Qn1Niv7VM,3197
|
|
|
103
103
|
ee/tests/serializer_test.py,sha256=d6IEW_dt-G900IRfQnZftrwjpc1wJ-ouaQQwaLO0FxI,9834
|
|
104
104
|
ee/tests/table_converter_test.py,sha256=t4yIfy40R3U17I_2nVtKm_Q2Tae-UifwZLz8qOmoC9A,5091
|
|
105
105
|
ee/tests/terrain_test.py,sha256=inZ2sy807nDG_HMutzGHaqcTUaLnZQOMdWyf0NrQzV0,4561
|
|
106
|
-
earthengine_api-1.7.
|
|
107
|
-
earthengine_api-1.7.
|
|
108
|
-
earthengine_api-1.7.
|
|
109
|
-
earthengine_api-1.7.
|
|
110
|
-
earthengine_api-1.7.
|
|
106
|
+
earthengine_api-1.7.10rc0.dist-info/METADATA,sha256=J-f7WEECoA-LUQ5C8ZtGvmrksKq9OwnzLwyqkelDnxo,2199
|
|
107
|
+
earthengine_api-1.7.10rc0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
108
|
+
earthengine_api-1.7.10rc0.dist-info/entry_points.txt,sha256=-Ax4SCU-S474r8OD2LIxata6PRmkZoDrppQ4fP_exNc,50
|
|
109
|
+
earthengine_api-1.7.10rc0.dist-info/top_level.txt,sha256=go5zOwCgm5lIS3yTR-Vsxp1gNI4qdS-MP5eY-7zMxVY,3
|
|
110
|
+
earthengine_api-1.7.10rc0.dist-info/RECORD,,
|
ee/__init__.py
CHANGED
ee/data.py
CHANGED
|
@@ -691,7 +691,7 @@ def getMapId(params: dict[str, Any]) -> dict[str, Any]:
|
|
|
691
691
|
map_name = result['name']
|
|
692
692
|
version = _cloud_api_utils.VERSION
|
|
693
693
|
url_format = (
|
|
694
|
-
|
|
694
|
+
'{state.tile_base_url}/{version}/{map_name)}/tiles/{{z}}/{{x}}/{{y}}'
|
|
695
695
|
)
|
|
696
696
|
if state.cloud_api_key:
|
|
697
697
|
url_format += f'?key={state.cloud_api_key}'
|
ee/tests/data_test.py
CHANGED
|
@@ -565,22 +565,23 @@ class DataTest(unittest.TestCase):
|
|
|
565
565
|
def test_set_asset_properties(self):
|
|
566
566
|
mock_http = mock.MagicMock(httplib2.Http)
|
|
567
567
|
with apitestcase.UsingCloudApi(mock_http=mock_http), mock.patch.object(
|
|
568
|
-
ee.data, 'updateAsset', autospec=True
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
'
|
|
572
|
-
)
|
|
568
|
+
ee.data, 'updateAsset', autospec=True) as mock_update_asset:
|
|
569
|
+
ee.data.setAssetProperties('foo', {
|
|
570
|
+
'mYPropErTy': 'Value',
|
|
571
|
+
'system:time_start': 1
|
|
572
|
+
})
|
|
573
573
|
asset_id = mock_update_asset.call_args[0][0]
|
|
574
574
|
self.assertEqual(asset_id, 'foo')
|
|
575
575
|
asset = mock_update_asset.call_args[0][1]
|
|
576
|
-
self.assertEqual(
|
|
577
|
-
|
|
578
|
-
|
|
576
|
+
self.assertEqual(asset['properties'], {
|
|
577
|
+
'mYPropErTy': 'Value',
|
|
578
|
+
'system:time_start': 1
|
|
579
|
+
})
|
|
579
580
|
update_mask = mock_update_asset.call_args[0][2]
|
|
580
581
|
self.assertSetEqual(
|
|
581
582
|
set(update_mask),
|
|
582
|
-
{'properties
|
|
583
|
-
|
|
583
|
+
{'properties.\"mYPropErTy\"',
|
|
584
|
+
'properties.\"system:time_start\"'})
|
|
584
585
|
|
|
585
586
|
def test_update_asset(self):
|
|
586
587
|
cloud_api_resource = mock.MagicMock()
|
|
@@ -894,10 +895,7 @@ class DataTest(unittest.TestCase):
|
|
|
894
895
|
def test_get_map_id_with_cloud_api_key(self):
|
|
895
896
|
cloud_api_resource = mock.MagicMock()
|
|
896
897
|
with apitestcase.UsingCloudApi(cloud_api_resource=cloud_api_resource):
|
|
897
|
-
custom_url = 'https://example.test'
|
|
898
898
|
ee.data._get_state().cloud_api_key = 'my-api-key'
|
|
899
|
-
ee.data._get_state().tile_base_url = custom_url
|
|
900
|
-
|
|
901
899
|
mock_result = {
|
|
902
900
|
'name': 'projects/earthengine-legacy/maps/DOCID',
|
|
903
901
|
}
|
|
@@ -907,31 +905,7 @@ class DataTest(unittest.TestCase):
|
|
|
907
905
|
actual_result = ee.data.getMapId({
|
|
908
906
|
'image': image.Image('my-image'),
|
|
909
907
|
})
|
|
910
|
-
|
|
911
|
-
custom_url
|
|
912
|
-
+ '/v1/projects/earthengine-legacy/maps/DOCID/tiles/{z}/{x}/{y}'
|
|
913
|
-
'?key=my-api-key'
|
|
914
|
-
)
|
|
915
|
-
self.assertEqual(expected_url, actual_result['tile_fetcher'].url_format)
|
|
916
|
-
|
|
917
|
-
def test_get_map_id_no_cloud_api_key(self):
|
|
918
|
-
cloud_api_resource = mock.MagicMock()
|
|
919
|
-
with apitestcase.UsingCloudApi(cloud_api_resource=cloud_api_resource):
|
|
920
|
-
custom_url = 'https://example.test'
|
|
921
|
-
ee.data._get_state().cloud_api_key = None
|
|
922
|
-
ee.data._get_state().tile_base_url = custom_url
|
|
923
|
-
mock_result = {
|
|
924
|
-
'name': 'projects/earthengine-legacy/maps/DOCID',
|
|
925
|
-
}
|
|
926
|
-
cloud_api_resource.projects().maps().create().execute.return_value = (
|
|
927
|
-
mock_result
|
|
928
|
-
)
|
|
929
|
-
actual_result = ee.data.getMapId({'image': image.Image('my-image')})
|
|
930
|
-
expected_url = (
|
|
931
|
-
custom_url
|
|
932
|
-
+ '/v1/projects/earthengine-legacy/maps/DOCID/tiles/{z}/{x}/{y}'
|
|
933
|
-
)
|
|
934
|
-
self.assertEqual(expected_url, actual_result['tile_fetcher'].url_format)
|
|
908
|
+
self.assertIn('?key=my-api-key', actual_result['tile_fetcher'].url_format)
|
|
935
909
|
|
|
936
910
|
def test_get_thumbnail_default(self):
|
|
937
911
|
cloud_api_resource_raw = mock.MagicMock()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|