ee-client 2.6.1__tar.gz → 2.6.2__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.
- {ee_client-2.6.1 → ee_client-2.6.2}/PKG-INFO +1 -1
- {ee_client-2.6.1 → ee_client-2.6.2}/ee_client.egg-info/PKG-INFO +1 -1
- {ee_client-2.6.1 → ee_client-2.6.2}/ee_client.egg-info/SOURCES.txt +2 -1
- {ee_client-2.6.1 → ee_client-2.6.2}/eeclient/__init__.py +1 -1
- {ee_client-2.6.1 → ee_client-2.6.2}/eeclient/tasks.py +6 -3
- {ee_client-2.6.1 → ee_client-2.6.2}/pyproject.toml +2 -2
- ee_client-2.6.2/tests/test_tasks.py +60 -0
- {ee_client-2.6.1 → ee_client-2.6.2}/LICENSE +0 -0
- {ee_client-2.6.1 → ee_client-2.6.2}/README.rst +0 -0
- {ee_client-2.6.1 → ee_client-2.6.2}/ee_client.egg-info/dependency_links.txt +0 -0
- {ee_client-2.6.1 → ee_client-2.6.2}/ee_client.egg-info/requires.txt +0 -0
- {ee_client-2.6.1 → ee_client-2.6.2}/ee_client.egg-info/top_level.txt +0 -0
- {ee_client-2.6.1 → ee_client-2.6.2}/eeclient/cache.py +0 -0
- {ee_client-2.6.1 → ee_client-2.6.2}/eeclient/client.py +0 -0
- {ee_client-2.6.1 → ee_client-2.6.2}/eeclient/data.py +0 -0
- {ee_client-2.6.1 → ee_client-2.6.2}/eeclient/exceptions.py +0 -0
- {ee_client-2.6.1 → ee_client-2.6.2}/eeclient/export/__init__.py +0 -0
- {ee_client-2.6.1 → ee_client-2.6.2}/eeclient/export/image.py +0 -0
- {ee_client-2.6.1 → ee_client-2.6.2}/eeclient/export/table.py +0 -0
- {ee_client-2.6.1 → ee_client-2.6.2}/eeclient/helpers.py +0 -0
- {ee_client-2.6.1 → ee_client-2.6.2}/eeclient/interfaces/__init__.py +0 -0
- {ee_client-2.6.1 → ee_client-2.6.2}/eeclient/interfaces/export.py +0 -0
- {ee_client-2.6.1 → ee_client-2.6.2}/eeclient/interfaces/operations.py +0 -0
- {ee_client-2.6.1 → ee_client-2.6.2}/eeclient/interfaces/tasks.py +0 -0
- {ee_client-2.6.1 → ee_client-2.6.2}/eeclient/models.py +0 -0
- {ee_client-2.6.1 → ee_client-2.6.2}/eeclient/oauth_app.py +0 -0
- {ee_client-2.6.1 → ee_client-2.6.2}/eeclient/sepal_credential_mixin.py +0 -0
- {ee_client-2.6.1 → ee_client-2.6.2}/setup.cfg +0 -0
- {ee_client-2.6.1 → ee_client-2.6.2}/tests/test_cache.py +0 -0
- {ee_client-2.6.1 → ee_client-2.6.2}/tests/test_client.py +0 -0
- {ee_client-2.6.1 → ee_client-2.6.2}/tests/test_data.py +0 -0
- {ee_client-2.6.1 → ee_client-2.6.2}/tests/test_export_image.py +0 -0
- {ee_client-2.6.1 → ee_client-2.6.2}/tests/test_export_table.py +0 -0
- {ee_client-2.6.1 → ee_client-2.6.2}/tests/test_integration_get_assets.py +0 -0
- {ee_client-2.6.1 → ee_client-2.6.2}/tests/test_models.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ee-client
|
|
3
|
-
Version: 2.6.
|
|
3
|
+
Version: 2.6.2
|
|
4
4
|
Summary: extends the capabilities of the earthengine-api by providing custom session management and client interactions
|
|
5
5
|
Author-email: Daniel Guerrero <dfgm2006@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/dfguerrerom/ee-client
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ee-client
|
|
3
|
-
Version: 2.6.
|
|
3
|
+
Version: 2.6.2
|
|
4
4
|
Summary: extends the capabilities of the earthengine-api by providing custom session management and client interactions
|
|
5
5
|
Author-email: Daniel Guerrero <dfgm2006@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/dfguerrerom/ee-client
|
|
@@ -24,9 +24,12 @@ class CamelCaseModel(BaseModel):
|
|
|
24
24
|
|
|
25
25
|
class Stage(CamelCaseModel):
|
|
26
26
|
display_name: str
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
# The Cloud API omits these fields on a stage until that stage has
|
|
28
|
+
# reported progress, so they must be optional to avoid breaking polling
|
|
29
|
+
# of a freshly-RUNNING task.
|
|
30
|
+
complete_work_units: Optional[int] = None
|
|
31
|
+
total_work_units: Optional[str] = None
|
|
32
|
+
description: Optional[str] = None
|
|
30
33
|
|
|
31
34
|
|
|
32
35
|
class TaskMetadata(CamelCaseModel):
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "ee-client"
|
|
7
|
-
version = "2.6.
|
|
7
|
+
version = "2.6.2"
|
|
8
8
|
description = "extends the capabilities of the earthengine-api by providing custom session management and client interactions"
|
|
9
9
|
readme = { file = "README.rst", content-type = "text/x-rst" }
|
|
10
10
|
authors = [
|
|
@@ -66,7 +66,7 @@ branch = true
|
|
|
66
66
|
[tool.commitizen]
|
|
67
67
|
tag_format = "v$major.$minor.$patch$prerelease"
|
|
68
68
|
update_changelog_on_bump = false
|
|
69
|
-
version = "2.6.
|
|
69
|
+
version = "2.6.2"
|
|
70
70
|
version_files = [
|
|
71
71
|
"pyproject.toml:version",
|
|
72
72
|
"eeclient/__init__.py:__version__",
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"""Tests for the Task / Stage models in eeclient.tasks."""
|
|
2
|
+
|
|
3
|
+
from eeclient.tasks import Stage, Task
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def test_stage_allows_missing_work_units():
|
|
7
|
+
"""The Cloud API omits completeWorkUnits/totalWorkUnits on a stage until
|
|
8
|
+
that stage reports progress; the model must accept this."""
|
|
9
|
+
stage = Stage.model_validate(
|
|
10
|
+
{
|
|
11
|
+
"displayName": "Create List of Assets",
|
|
12
|
+
"description": "Listing of temporary files.",
|
|
13
|
+
}
|
|
14
|
+
)
|
|
15
|
+
assert stage.display_name == "Create List of Assets"
|
|
16
|
+
assert stage.complete_work_units is None
|
|
17
|
+
assert stage.total_work_units is None
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def test_stage_allows_missing_description():
|
|
21
|
+
"""Some stages omit `description` entirely before reporting progress."""
|
|
22
|
+
stage = Stage.model_validate({"displayName": "Write Files"})
|
|
23
|
+
assert stage.display_name == "Write Files"
|
|
24
|
+
assert stage.description is None
|
|
25
|
+
assert stage.complete_work_units is None
|
|
26
|
+
assert stage.total_work_units is None
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def test_task_validates_with_incomplete_stages():
|
|
30
|
+
"""Regression for issue #22: polling a freshly-RUNNING export returns
|
|
31
|
+
stages without completeWorkUnits / totalWorkUnits and must not raise."""
|
|
32
|
+
payload = {
|
|
33
|
+
"name": "projects/ee-project/operations/ABC123",
|
|
34
|
+
"metadata": {
|
|
35
|
+
"@type": "type.googleapis.com/google.earthengine.v1.OperationMetadata",
|
|
36
|
+
"state": "RUNNING",
|
|
37
|
+
"description": "my-export",
|
|
38
|
+
"priority": 100,
|
|
39
|
+
"createTime": "2026-05-13T12:00:00Z",
|
|
40
|
+
"type": "EXPORT_IMAGE",
|
|
41
|
+
"stages": [
|
|
42
|
+
{
|
|
43
|
+
"displayName": "Create List of Assets",
|
|
44
|
+
"description": "Listing of temporary files.",
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"displayName": "Write Files",
|
|
48
|
+
"description": "Writing files to the export destination.",
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
"done": False,
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
task = Task.model_validate(payload)
|
|
56
|
+
assert task.id == "ABC123"
|
|
57
|
+
assert task.metadata.stages is not None
|
|
58
|
+
assert len(task.metadata.stages) == 2
|
|
59
|
+
assert task.metadata.stages[0].complete_work_units is None
|
|
60
|
+
assert task.metadata.stages[0].total_work_units is None
|
|
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
|