terrakio-core 0.5.1__tar.gz → 0.5.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 terrakio-core might be problematic. Click here for more details.
- {terrakio_core-0.5.1 → terrakio_core-0.5.3}/PKG-INFO +1 -1
- {terrakio_core-0.5.1 → terrakio_core-0.5.3}/pyproject.toml +1 -1
- {terrakio_core-0.5.1 → terrakio_core-0.5.3}/terrakio_core/__init__.py +1 -1
- {terrakio_core-0.5.1 → terrakio_core-0.5.3}/terrakio_core/async_client.py +5 -3
- {terrakio_core-0.5.1 → terrakio_core-0.5.3}/terrakio_core/exceptions.py +6 -0
- {terrakio_core-0.5.1 → terrakio_core-0.5.3}/.gitignore +0 -0
- {terrakio_core-0.5.1 → terrakio_core-0.5.3}/README.md +0 -0
- {terrakio_core-0.5.1 → terrakio_core-0.5.3}/terrakio_core/accessors.py +0 -0
- {terrakio_core-0.5.1 → terrakio_core-0.5.3}/terrakio_core/client.py +0 -0
- {terrakio_core-0.5.1 → terrakio_core-0.5.3}/terrakio_core/config.py +0 -0
- {terrakio_core-0.5.1 → terrakio_core-0.5.3}/terrakio_core/convenience_functions/create_dataset_file.py +0 -0
- {terrakio_core-0.5.1 → terrakio_core-0.5.3}/terrakio_core/convenience_functions/geoquries.py +0 -0
- {terrakio_core-0.5.1 → terrakio_core-0.5.3}/terrakio_core/convenience_functions/zonal_stats.py +0 -0
- {terrakio_core-0.5.1 → terrakio_core-0.5.3}/terrakio_core/endpoints/auth.py +0 -0
- {terrakio_core-0.5.1 → terrakio_core-0.5.3}/terrakio_core/endpoints/dataset_management.py +0 -0
- {terrakio_core-0.5.1 → terrakio_core-0.5.3}/terrakio_core/endpoints/group_management.py +0 -0
- {terrakio_core-0.5.1 → terrakio_core-0.5.3}/terrakio_core/endpoints/mass_stats.py +0 -0
- {terrakio_core-0.5.1 → terrakio_core-0.5.3}/terrakio_core/endpoints/model_management.py +0 -0
- {terrakio_core-0.5.1 → terrakio_core-0.5.3}/terrakio_core/endpoints/space_management.py +0 -0
- {terrakio_core-0.5.1 → terrakio_core-0.5.3}/terrakio_core/endpoints/user_management.py +0 -0
- {terrakio_core-0.5.1 → terrakio_core-0.5.3}/terrakio_core/helper/bounded_taskgroup.py +0 -0
- {terrakio_core-0.5.1 → terrakio_core-0.5.3}/terrakio_core/helper/decorators.py +0 -0
- {terrakio_core-0.5.1 → terrakio_core-0.5.3}/terrakio_core/helper/tiles.py +0 -0
- {terrakio_core-0.5.1 → terrakio_core-0.5.3}/terrakio_core/sync_client.py +0 -0
|
@@ -8,7 +8,7 @@ Core components for Terrakio API clients.
|
|
|
8
8
|
# Suppress ONNX Runtime GPU device discovery warnings - MUST BE FIRST!
|
|
9
9
|
import os
|
|
10
10
|
os.environ['ORT_LOGGING_LEVEL'] = '3'
|
|
11
|
-
__version__ = "0.5.
|
|
11
|
+
__version__ = "0.5.3"
|
|
12
12
|
|
|
13
13
|
from .async_client import AsyncClient
|
|
14
14
|
from .sync_client import SyncClient as Client
|
|
@@ -9,7 +9,7 @@ from geopandas import GeoDataFrame
|
|
|
9
9
|
from shapely.geometry.base import BaseGeometry as ShapelyGeometry
|
|
10
10
|
from shapely.geometry import mapping
|
|
11
11
|
from .client import BaseClient
|
|
12
|
-
from .exceptions import APIError, NetworkError
|
|
12
|
+
from .exceptions import APIError, NetworkError, GeoQueryError
|
|
13
13
|
from .endpoints.dataset_management import DatasetManagement
|
|
14
14
|
from .endpoints.user_management import UserManagement
|
|
15
15
|
from .endpoints.mass_stats import MassStats
|
|
@@ -54,7 +54,6 @@ class AsyncClient(BaseClient):
|
|
|
54
54
|
for attempt in range(self.retry + 1):
|
|
55
55
|
try:
|
|
56
56
|
async with session.request(method, url, **kwargs) as response:
|
|
57
|
-
content = await response.text()
|
|
58
57
|
|
|
59
58
|
if not response.ok and self._should_retry(response.status, attempt):
|
|
60
59
|
self.logger.info(f"Request failed (attempt {attempt+1}/{self.retry+1}): {response.status}. Retrying...")
|
|
@@ -183,7 +182,10 @@ class AsyncClient(BaseClient):
|
|
|
183
182
|
"validated": validated,
|
|
184
183
|
**kwargs
|
|
185
184
|
}
|
|
186
|
-
result = await self._terrakio_request("POST", "geoquery", json=payload)
|
|
185
|
+
result, status_code = await self._terrakio_request("POST", "geoquery", json=payload)
|
|
186
|
+
|
|
187
|
+
if status_code != 200:
|
|
188
|
+
raise GeoQueryError("Something went wrong with the geoquery request. Please try again later.", status_code=status_code)
|
|
187
189
|
|
|
188
190
|
return result
|
|
189
191
|
|
|
@@ -385,6 +385,12 @@ class CancelCollectionTasksError(Exception):
|
|
|
385
385
|
|
|
386
386
|
class CancelAllTasksError(Exception):
|
|
387
387
|
"""Exception raised for cancel all tasks errors."""
|
|
388
|
+
def __init__(self, message: str, status_code: int = None):
|
|
389
|
+
super().__init__(message)
|
|
390
|
+
self.status_code = status_code
|
|
391
|
+
|
|
392
|
+
class GeoQueryError(Exception):
|
|
393
|
+
"""Exception raised for geo query errors."""
|
|
388
394
|
def __init__(self, message: str, status_code: int = None):
|
|
389
395
|
super().__init__(message)
|
|
390
396
|
self.status_code = status_code
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{terrakio_core-0.5.1 → terrakio_core-0.5.3}/terrakio_core/convenience_functions/geoquries.py
RENAMED
|
File without changes
|
{terrakio_core-0.5.1 → terrakio_core-0.5.3}/terrakio_core/convenience_functions/zonal_stats.py
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
|