earthengine-api 1.7.8rc0__tar.gz → 1.7.9rc0__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.
- {earthengine_api-1.7.8rc0/earthengine_api.egg-info → earthengine_api-1.7.9rc0}/PKG-INFO +1 -1
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0/earthengine_api.egg-info}/PKG-INFO +1 -1
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/__init__.py +1 -1
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/function_test.py +12 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/image_test.py +41 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/imagecollection_test.py +69 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/join_test.py +5 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/pyproject.toml +1 -1
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/LICENSE +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/MANIFEST.in +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/README.md +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/earthengine_api.egg-info/SOURCES.txt +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/earthengine_api.egg-info/dependency_links.txt +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/earthengine_api.egg-info/entry_points.txt +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/earthengine_api.egg-info/requires.txt +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/earthengine_api.egg-info/top_level.txt +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/_arg_types.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/_cloud_api_utils.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/_helpers.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/_state.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/_utils.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/apifunction.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/apitestcase.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/batch.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/blob.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/classifier.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/cli/__init__.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/cli/commands.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/cli/eecli.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/cli/eecli_wrapper.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/cli/utils.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/clusterer.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/collection.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/computedobject.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/confusionmatrix.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/customfunction.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/data.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/daterange.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/deprecation.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/deserializer.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/dictionary.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/ee_array.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/ee_date.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/ee_exception.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/ee_list.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/ee_number.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/ee_string.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/ee_types.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/element.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/encodable.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/errormargin.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/feature.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/featurecollection.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/filter.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/function.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/geometry.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/image.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/image_converter.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/imagecollection.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/join.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/kernel.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/mapclient.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/model.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/oauth.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/pixeltype.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/projection.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/py.typed +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/reducer.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/serializer.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/table_converter.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/terrain.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/_cloud_api_utils_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/_helpers_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/_state_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/_utils_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/algorithms.json +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/apifunction_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/batch_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/blob_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/classifier_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/cloud_api_discovery_document.json +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/clusterer_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/collection_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/computedobject_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/confusionmatrix_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/data_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/daterange_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/deprecation_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/deserializer_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/dictionary_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/ee_array_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/ee_date_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/ee_list_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/ee_number_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/ee_string_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/ee_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/ee_types_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/element_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/encodable_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/errormargin_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/feature_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/featurecollection_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/filter_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/geometry_point_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/geometry_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/image_converter_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/kernel_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/model_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/oauth_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/pixeltype_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/projection_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/reducer_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/serializer_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/table_converter_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/terrain_test.py +0 -0
- {earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/setup.cfg +0 -0
|
@@ -34,6 +34,11 @@ Args:
|
|
|
34
34
|
|
|
35
35
|
class FunctionTest(unittest.TestCase):
|
|
36
36
|
|
|
37
|
+
def test_get_signature_not_implemented(self):
|
|
38
|
+
message = 'Function subclasses must implement getSignature()'
|
|
39
|
+
with self.assertRaisesRegex(NotImplementedError, message):
|
|
40
|
+
ee.Function().getSignature()
|
|
41
|
+
|
|
37
42
|
def test_name_args(self):
|
|
38
43
|
"""Verifies that Functions can convert positional to named arguments."""
|
|
39
44
|
self.assertEqual({}, TEST_FUNC.nameArgs([]))
|
|
@@ -43,6 +48,13 @@ class FunctionTest(unittest.TestCase):
|
|
|
43
48
|
|
|
44
49
|
self.assertRaisesRegex(ee.EEException, 'Too many', TEST_FUNC.nameArgs,
|
|
45
50
|
[1, 2, 3])
|
|
51
|
+
self.assertRaisesRegex(
|
|
52
|
+
ee.EEException,
|
|
53
|
+
'Argument a specified as both positional and keyword',
|
|
54
|
+
TEST_FUNC.nameArgs,
|
|
55
|
+
[1],
|
|
56
|
+
{'a': 2},
|
|
57
|
+
)
|
|
46
58
|
|
|
47
59
|
def test_promote_args(self):
|
|
48
60
|
"""Verifies that Functions can promote and verify their arguments."""
|
|
@@ -97,6 +97,20 @@ class ImageTest(apitestcase.ApiTestCase):
|
|
|
97
97
|
'value': 'foo'
|
|
98
98
|
}, from_variable.encode(None))
|
|
99
99
|
|
|
100
|
+
def test_constructor_invalid_version(self):
|
|
101
|
+
with self.assertRaisesRegex(
|
|
102
|
+
ee_exception.EEException,
|
|
103
|
+
r'If version is specified, the arg to Image\(\) must be a string',
|
|
104
|
+
):
|
|
105
|
+
ee.Image(123, version=456)
|
|
106
|
+
|
|
107
|
+
def test_constructor_unrecognized_type(self):
|
|
108
|
+
with self.assertRaisesRegex(
|
|
109
|
+
ee_exception.EEException,
|
|
110
|
+
'Unrecognized argument type to convert to an Image:',
|
|
111
|
+
):
|
|
112
|
+
ee.Image({'some': 'dict'})
|
|
113
|
+
|
|
100
114
|
def test_image_signatures(self):
|
|
101
115
|
"""Verifies that the API functions are added to ee.Image."""
|
|
102
116
|
self.assertTrue(hasattr(ee.Image(1), 'addBands'))
|
|
@@ -629,6 +643,19 @@ class CloudThumbnailAndExportImageTest(apitestcase.ApiTestCase):
|
|
|
629
643
|
)
|
|
630
644
|
self.assertEqual({}, params)
|
|
631
645
|
|
|
646
|
+
def test_prepare_for_export_with_crs_and_crsTransform(self):
|
|
647
|
+
with apitestcase.UsingCloudApi():
|
|
648
|
+
image, params = self._base_image.prepare_for_export(
|
|
649
|
+
{'crs': 'ABCD', 'crsTransform': '1,2,3,4,5,6'}
|
|
650
|
+
)
|
|
651
|
+
self.assertImageEqual(
|
|
652
|
+
self._base_image.reproject(
|
|
653
|
+
crs='ABCD', crsTransform=[1, 2, 3, 4, 5, 6]
|
|
654
|
+
),
|
|
655
|
+
image,
|
|
656
|
+
)
|
|
657
|
+
self.assertEqual({}, params)
|
|
658
|
+
|
|
632
659
|
def test_prepare_for_export_invalid_crs_and_transform(self):
|
|
633
660
|
with apitestcase.UsingCloudApi():
|
|
634
661
|
with self.assertRaises(ee_exception.EEException):
|
|
@@ -637,6 +664,20 @@ class CloudThumbnailAndExportImageTest(apitestcase.ApiTestCase):
|
|
|
637
664
|
self._base_image.prepare_for_export(
|
|
638
665
|
{'crs': 'ABCD', 'crs_transform': 'x'}
|
|
639
666
|
)
|
|
667
|
+
with self.assertRaisesRegex(
|
|
668
|
+
ee_exception.EEException,
|
|
669
|
+
'Both "crs_transform" and "crsTransform" are specified.',
|
|
670
|
+
):
|
|
671
|
+
self._base_image.prepare_for_export({
|
|
672
|
+
'crs': 'EPSG:4326',
|
|
673
|
+
'crs_transform': [1, 2, 3, 4, 5, 6],
|
|
674
|
+
'crsTransform': [1, 2, 3, 4, 5, 6],
|
|
675
|
+
})
|
|
676
|
+
|
|
677
|
+
def test_prepare_for_export_invalid_dimensions(self):
|
|
678
|
+
with apitestcase.UsingCloudApi():
|
|
679
|
+
with self.assertRaisesRegex(ee_exception.EEException, 'Invalid dimensions'):
|
|
680
|
+
self._base_image.prepare_for_export({'dimensions': [1, 2, 3]})
|
|
640
681
|
|
|
641
682
|
def test_prepare_for_export_with_polygon(self):
|
|
642
683
|
with apitestcase.UsingCloudApi():
|
|
@@ -84,6 +84,13 @@ class ImageCollectionTest(apitestcase.ApiTestCase):
|
|
|
84
84
|
ee.ComputedObject(None, {'x': 'y'}))
|
|
85
85
|
self.assertEqual({'x': 'y'}, from_computed_object.args)
|
|
86
86
|
|
|
87
|
+
def test_unrecognized_type(self):
|
|
88
|
+
with self.assertRaisesRegex(
|
|
89
|
+
ee.EEException,
|
|
90
|
+
'Unrecognized argument type to convert to an ImageCollection: 123',
|
|
91
|
+
):
|
|
92
|
+
ee.ImageCollection(123)
|
|
93
|
+
|
|
87
94
|
def test_imperative_functions(self):
|
|
88
95
|
"""Verifies that imperative functions return ready values."""
|
|
89
96
|
image_collection = ee.ImageCollection(ee.Image(1))
|
|
@@ -135,6 +142,18 @@ class ImageCollectionTest(apitestcase.ApiTestCase):
|
|
|
135
142
|
collection.serialize(for_cloud_api=True))
|
|
136
143
|
self.assertEqual({}, params)
|
|
137
144
|
|
|
145
|
+
def test_filmstrip_thumb_url_invalid_format(self):
|
|
146
|
+
"""Verifies correct thumbnailing behavior."""
|
|
147
|
+
message = r'Invalid format specified for thumbnail\. gif'
|
|
148
|
+
with self.assertRaisesRegex(ee.EEException, message):
|
|
149
|
+
ee.ImageCollection(ee.Image(1)).getFilmstripThumbURL({'format': 'gif'})
|
|
150
|
+
|
|
151
|
+
def test_video_thumb_url_invalid_format(self):
|
|
152
|
+
"""Verifies correct thumbnailing behavior."""
|
|
153
|
+
message = r'Invalid format specified for thumbnail\. png'
|
|
154
|
+
with self.assertRaisesRegex(ee.EEException, message):
|
|
155
|
+
ee.ImageCollection(ee.Image(1)).getVideoThumbURL({'format': 'png'})
|
|
156
|
+
|
|
138
157
|
def test_select_opt_params(self):
|
|
139
158
|
result = (
|
|
140
159
|
ee.ImageCollection([])
|
|
@@ -143,6 +162,56 @@ class ImageCollectionTest(apitestcase.ApiTestCase):
|
|
|
143
162
|
)
|
|
144
163
|
self.assertIn('"newNames": {"constantValue": ["name_a", "name_b"]}', result)
|
|
145
164
|
|
|
165
|
+
def test_link_collection_all_args(self):
|
|
166
|
+
image_collection_1 = ee.ImageCollection('a')
|
|
167
|
+
image_collection_2 = ee.ImageCollection('b')
|
|
168
|
+
linked_bands = ['b1', 'b2']
|
|
169
|
+
linked_properties = ['p1', 'p2']
|
|
170
|
+
match_property_name = 'p3'
|
|
171
|
+
result = image_collection_1.linkCollection(
|
|
172
|
+
image_collection_2,
|
|
173
|
+
linked_bands,
|
|
174
|
+
linked_properties,
|
|
175
|
+
match_property_name,
|
|
176
|
+
)
|
|
177
|
+
self.assertIsInstance(result, ee.ImageCollection)
|
|
178
|
+
self.assertEqual(ee.ApiFunction.lookup('Collection.map'), result.func)
|
|
179
|
+
self.assertEqual(image_collection_1, result.args['collection'])
|
|
180
|
+
self.assertIsInstance(result.args['baseAlgorithm'], ee.Function)
|
|
181
|
+
|
|
182
|
+
serialized = result.serialize()
|
|
183
|
+
self.assertIn('"functionName": "ImageCollection.load"', serialized)
|
|
184
|
+
self.assertIn('"id": {"constantValue": "a"}', serialized)
|
|
185
|
+
self.assertIn('"functionName": "Image.linkCollection"', serialized)
|
|
186
|
+
self.assertIn('"id": {"constantValue": "b"}', serialized)
|
|
187
|
+
self.assertIn('"linkedBands": {"constantValue": ["b1", "b2"]}', serialized)
|
|
188
|
+
self.assertIn(
|
|
189
|
+
'"linkedProperties": {"constantValue": ["p1", "p2"]}', serialized
|
|
190
|
+
)
|
|
191
|
+
self.assertIn('"matchPropertyName": {"constantValue": "p3"}', serialized)
|
|
192
|
+
|
|
193
|
+
def test_link_collection_necessary_args(self):
|
|
194
|
+
image_collection_1 = ee.ImageCollection('a')
|
|
195
|
+
image_collection_2 = ee.ImageCollection('b')
|
|
196
|
+
linked_bands = ['b1', 'b2']
|
|
197
|
+
result = image_collection_1.linkCollection(
|
|
198
|
+
image_collection_2,
|
|
199
|
+
linkedBands=linked_bands,
|
|
200
|
+
)
|
|
201
|
+
self.assertIsInstance(result, ee.ImageCollection)
|
|
202
|
+
self.assertEqual(ee.ApiFunction.lookup('Collection.map'), result.func)
|
|
203
|
+
self.assertEqual(image_collection_1, result.args['collection'])
|
|
204
|
+
self.assertIsInstance(result.args['baseAlgorithm'], ee.Function)
|
|
205
|
+
|
|
206
|
+
serialized = result.serialize()
|
|
207
|
+
self.assertIn('"functionName": "ImageCollection.load"', serialized)
|
|
208
|
+
self.assertIn('"id": {"constantValue": "a"}', serialized)
|
|
209
|
+
self.assertIn('"functionName": "Image.linkCollection"', serialized)
|
|
210
|
+
self.assertIn('"id": {"constantValue": "b"}', serialized)
|
|
211
|
+
self.assertIn('"linkedBands": {"constantValue": ["b1", "b2"]}', serialized)
|
|
212
|
+
self.assertNotIn('"linkedProperties"', serialized)
|
|
213
|
+
self.assertNotIn('"matchPropertyName"', serialized)
|
|
214
|
+
|
|
146
215
|
def test_aggregate_array(self):
|
|
147
216
|
property_name = 'property name'
|
|
148
217
|
expect = make_expression_graph({
|
|
@@ -28,6 +28,11 @@ class JoinTest(apitestcase.ApiTestCase):
|
|
|
28
28
|
with self.assertRaisesRegex(TypeError, message):
|
|
29
29
|
ee.Join() # pytype:disable=missing-parameter
|
|
30
30
|
|
|
31
|
+
def test_join_type_error(self):
|
|
32
|
+
message = r"Join can only be used as a cast to Join\. Found <class 'str'>"
|
|
33
|
+
with self.assertRaisesRegex(TypeError, message):
|
|
34
|
+
ee.Join('some string') # pytype:disable=wrong-arg-types
|
|
35
|
+
|
|
31
36
|
def test_apply(self):
|
|
32
37
|
expect = make_expression_graph({
|
|
33
38
|
'arguments': {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/earthengine_api.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/earthengine_api.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
{earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/earthengine_api.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{earthengine_api-1.7.8rc0 → earthengine_api-1.7.9rc0}/ee/tests/cloud_api_discovery_document.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|