earthengine-api 1.7.2rc0__tar.gz → 1.7.3__tar.gz

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.

Files changed (115) hide show
  1. {earthengine_api-1.7.2rc0/earthengine_api.egg-info → earthengine_api-1.7.3}/PKG-INFO +1 -1
  2. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3/earthengine_api.egg-info}/PKG-INFO +1 -1
  3. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/__init__.py +1 -1
  4. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/batch.py +7 -0
  5. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/batch_test.py +56 -0
  6. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/pyproject.toml +1 -1
  7. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/LICENSE +0 -0
  8. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/MANIFEST.in +0 -0
  9. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/README.md +0 -0
  10. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/earthengine_api.egg-info/SOURCES.txt +0 -0
  11. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/earthengine_api.egg-info/dependency_links.txt +0 -0
  12. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/earthengine_api.egg-info/entry_points.txt +0 -0
  13. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/earthengine_api.egg-info/requires.txt +0 -0
  14. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/earthengine_api.egg-info/top_level.txt +0 -0
  15. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/_arg_types.py +0 -0
  16. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/_cloud_api_utils.py +0 -0
  17. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/_helpers.py +0 -0
  18. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/_state.py +0 -0
  19. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/_utils.py +0 -0
  20. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/apifunction.py +0 -0
  21. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/apitestcase.py +0 -0
  22. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/blob.py +0 -0
  23. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/classifier.py +0 -0
  24. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/cli/__init__.py +0 -0
  25. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/cli/commands.py +0 -0
  26. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/cli/eecli.py +0 -0
  27. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/cli/eecli_wrapper.py +0 -0
  28. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/cli/utils.py +0 -0
  29. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/clusterer.py +0 -0
  30. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/collection.py +0 -0
  31. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/computedobject.py +0 -0
  32. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/confusionmatrix.py +0 -0
  33. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/customfunction.py +0 -0
  34. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/data.py +0 -0
  35. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/daterange.py +0 -0
  36. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/deprecation.py +0 -0
  37. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/deserializer.py +0 -0
  38. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/dictionary.py +0 -0
  39. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/ee_array.py +0 -0
  40. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/ee_date.py +0 -0
  41. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/ee_exception.py +0 -0
  42. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/ee_list.py +0 -0
  43. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/ee_number.py +0 -0
  44. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/ee_string.py +0 -0
  45. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/ee_types.py +0 -0
  46. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/element.py +0 -0
  47. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/encodable.py +0 -0
  48. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/errormargin.py +0 -0
  49. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/feature.py +0 -0
  50. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/featurecollection.py +0 -0
  51. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/filter.py +0 -0
  52. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/function.py +0 -0
  53. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/geometry.py +0 -0
  54. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/image.py +0 -0
  55. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/image_converter.py +0 -0
  56. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/imagecollection.py +0 -0
  57. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/join.py +0 -0
  58. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/kernel.py +0 -0
  59. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/mapclient.py +0 -0
  60. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/model.py +0 -0
  61. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/oauth.py +0 -0
  62. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/pixeltype.py +0 -0
  63. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/projection.py +0 -0
  64. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/py.typed +0 -0
  65. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/reducer.py +0 -0
  66. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/serializer.py +0 -0
  67. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/table_converter.py +0 -0
  68. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/terrain.py +0 -0
  69. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/_cloud_api_utils_test.py +0 -0
  70. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/_helpers_test.py +0 -0
  71. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/_state_test.py +0 -0
  72. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/_utils_test.py +0 -0
  73. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/algorithms.json +0 -0
  74. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/apifunction_test.py +0 -0
  75. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/blob_test.py +0 -0
  76. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/classifier_test.py +0 -0
  77. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/cloud_api_discovery_document.json +0 -0
  78. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/clusterer_test.py +0 -0
  79. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/collection_test.py +0 -0
  80. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/computedobject_test.py +0 -0
  81. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/confusionmatrix_test.py +0 -0
  82. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/data_test.py +0 -0
  83. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/daterange_test.py +0 -0
  84. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/deprecation_test.py +0 -0
  85. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/deserializer_test.py +0 -0
  86. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/dictionary_test.py +0 -0
  87. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/ee_array_test.py +0 -0
  88. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/ee_date_test.py +0 -0
  89. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/ee_list_test.py +0 -0
  90. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/ee_number_test.py +0 -0
  91. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/ee_string_test.py +0 -0
  92. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/ee_test.py +0 -0
  93. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/ee_types_test.py +0 -0
  94. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/element_test.py +0 -0
  95. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/errormargin_test.py +0 -0
  96. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/feature_test.py +0 -0
  97. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/featurecollection_test.py +0 -0
  98. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/filter_test.py +0 -0
  99. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/function_test.py +0 -0
  100. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/geometry_point_test.py +0 -0
  101. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/geometry_test.py +0 -0
  102. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/image_converter_test.py +0 -0
  103. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/image_test.py +0 -0
  104. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/imagecollection_test.py +0 -0
  105. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/join_test.py +0 -0
  106. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/kernel_test.py +0 -0
  107. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/model_test.py +0 -0
  108. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/oauth_test.py +0 -0
  109. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/pixeltype_test.py +0 -0
  110. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/projection_test.py +0 -0
  111. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/reducer_test.py +0 -0
  112. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/serializer_test.py +0 -0
  113. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/table_converter_test.py +0 -0
  114. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/ee/tests/terrain_test.py +0 -0
  115. {earthengine_api-1.7.2rc0 → earthengine_api-1.7.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: earthengine-api
3
- Version: 1.7.2rc0
3
+ Version: 1.7.3
4
4
  Summary: Earth Engine Python API
5
5
  Author-email: Google LLC <noreply@google.com>
6
6
  License: Apache-2.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: earthengine-api
3
- Version: 1.7.2rc0
3
+ Version: 1.7.3
4
4
  Summary: Earth Engine Python API
5
5
  Author-email: Google LLC <noreply@google.com>
6
6
  License: Apache-2.0
@@ -1,6 +1,6 @@
1
1
  """The EE Python library."""
2
2
 
3
- __version__ = '1.7.2rc0'
3
+ __version__ = '1.7.3'
4
4
 
5
5
  # Using lowercase function naming to match the JavaScript names.
6
6
  # pylint: disable=g-bad-name
@@ -308,6 +308,7 @@ class Export:
308
308
  crsTransform=None,
309
309
  maxPixels=None,
310
310
  priority=None,
311
+ overwrite=False,
311
312
  **kwargs,
312
313
  ) -> Task:
313
314
  """Creates a task to export an EE Image to an EE Asset.
@@ -344,6 +345,7 @@ class Export:
344
345
  priority: The priority of the task within the project. Higher priority
345
346
  tasks are scheduled sooner. Must be an integer between 0 and 9999.
346
347
  Defaults to 100.
348
+ overwrite: If an existing asset can be overwritten by this export.
347
349
  **kwargs: Holds other keyword arguments that may have been deprecated
348
350
  such as 'crs_transform'.
349
351
 
@@ -739,6 +741,7 @@ class Export:
739
741
  assetId=None,
740
742
  maxVertices=None,
741
743
  priority=None,
744
+ overwrite=False,
742
745
  **kwargs,
743
746
  ) -> Task:
744
747
  """Creates a task to export a FeatureCollection to an EE table asset.
@@ -753,6 +756,7 @@ class Export:
753
756
  priority: The priority of the task within the project. Higher priority
754
757
  tasks are scheduled sooner. Must be an integer between 0 and 9999.
755
758
  Defaults to 100.
759
+ overwrite: If an existing asset can be overwritten by this export.
756
760
  **kwargs: Holds other keyword arguments that may have been deprecated.
757
761
 
758
762
  Returns:
@@ -763,6 +767,7 @@ class Export:
763
767
  'assetId': assetId,
764
768
  'maxVertices': maxVertices,
765
769
  'priority': priority,
770
+ 'overwrite': overwrite,
766
771
  }
767
772
  config = {k: v for k, v, in config.items() if v is not None}
768
773
  config = _prepare_table_export_config(collection, config,
@@ -1738,6 +1743,8 @@ def _build_earth_engine_destination(config: dict[str, Any]) -> dict[str, Any]:
1738
1743
  'name':
1739
1744
  _cloud_api_utils.convert_asset_id_to_asset_name(
1740
1745
  config.pop('assetId')),
1746
+ 'overwrite':
1747
+ config.pop('overwrite', False)
1741
1748
  }
1742
1749
 
1743
1750
 
@@ -274,6 +274,7 @@ class BatchTestCase(apitestcase.ApiTestCase):
274
274
  'name': (
275
275
  'projects/earthengine-legacy/assets/users/foo/bar'
276
276
  ),
277
+ 'overwrite': False,
277
278
  }
278
279
  },
279
280
  'description': 'myExportImageTask',
@@ -425,6 +426,7 @@ class BatchTestCase(apitestcase.ApiTestCase):
425
426
  'name': (
426
427
  'projects/earthengine-legacy/assets/users/foo/bar'
427
428
  ),
429
+ 'overwrite': False,
428
430
  },
429
431
  'pyramidingPolicyOverrides': {'B1': 'MIN'},
430
432
  },
@@ -451,6 +453,7 @@ class BatchTestCase(apitestcase.ApiTestCase):
451
453
  'name': (
452
454
  'projects/earthengine-legacy/assets/users/foo/bar'
453
455
  ),
456
+ 'overwrite': False,
454
457
  },
455
458
  'tileSize': {'value': 4},
456
459
  },
@@ -460,6 +463,43 @@ class BatchTestCase(apitestcase.ApiTestCase):
460
463
  task_ordered.config,
461
464
  )
462
465
 
466
+ task_with_overwrite = ee.batch.Export.image.toAsset(
467
+ image=config['image'],
468
+ assetId=config['assetId'],
469
+ overwrite=True,
470
+ )
471
+ self.assertTrue(
472
+ task_with_overwrite.config['assetExportOptions'][
473
+ 'earthEngineDestination'
474
+ ]['overwrite']
475
+ )
476
+
477
+ task_with_priority = ee.batch.Export.image.toAsset(
478
+ image=config['image'],
479
+ assetId=config['assetId'],
480
+ priority=999,
481
+ )
482
+ self.assertIsNone(task_with_priority.id)
483
+ self.assertIsNone(task_with_priority.name)
484
+ self.assertEqual('EXPORT_IMAGE', task_with_priority.task_type)
485
+ self.assertEqual('UNSUBMITTED', task_with_priority.state)
486
+ self.assertEqual(
487
+ {
488
+ 'expression': expected_expression,
489
+ 'description': 'myExportImageTask',
490
+ 'assetExportOptions': {
491
+ 'earthEngineDestination': {
492
+ 'name': (
493
+ 'projects/earthengine-legacy/assets/users/foo/bar'
494
+ ),
495
+ 'overwrite': False,
496
+ }
497
+ },
498
+ 'priority': {'value': 999},
499
+ },
500
+ task_with_priority.config,
501
+ )
502
+
463
503
  def test_export_image_to_asset_cloud_api_with_tile_size(self):
464
504
  """Verifies the Asset export task created by Export.image.toAsset()."""
465
505
  with apitestcase.UsingCloudApi():
@@ -489,6 +529,7 @@ class BatchTestCase(apitestcase.ApiTestCase):
489
529
  'name': (
490
530
  'projects/earthengine-legacy/assets/users/foo/bar'
491
531
  ),
532
+ 'overwrite': False,
492
533
  },
493
534
  'tileSize': {'value': 4},
494
535
  },
@@ -1133,11 +1174,25 @@ class BatchTestCase(apitestcase.ApiTestCase):
1133
1174
  'name': (
1134
1175
  'projects/earthengine-legacy/assets/users/foo/bar'
1135
1176
  ),
1177
+ 'overwrite': False,
1136
1178
  }
1137
1179
  },
1138
1180
  },
1139
1181
  task.config,
1140
1182
  )
1183
+
1184
+ task_with_overwrite = ee.batch.Export.table.toAsset(
1185
+ collection=ee.FeatureCollection('foo'),
1186
+ description='foo',
1187
+ assetId='users/foo/bar',
1188
+ overwrite=True,
1189
+ )
1190
+ self.assertTrue(
1191
+ task_with_overwrite.config['assetExportOptions'][
1192
+ 'earthEngineDestination'
1193
+ ]['overwrite']
1194
+ )
1195
+
1141
1196
  task_with_priority = ee.batch.Export.table.toAsset(
1142
1197
  collection=ee.FeatureCollection('foo'),
1143
1198
  description='foo',
@@ -1153,6 +1208,7 @@ class BatchTestCase(apitestcase.ApiTestCase):
1153
1208
  'name': (
1154
1209
  'projects/earthengine-legacy/assets/users/foo/bar'
1155
1210
  ),
1211
+ 'overwrite': False,
1156
1212
  }
1157
1213
  },
1158
1214
  'priority': {'value': 999},
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "earthengine-api"
3
- version = "1.7.2rc0"
3
+ version = "1.7.3"
4
4
  description = "Earth Engine Python API"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"