sentinelhub 3.10.2__tar.gz → 3.10.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.
Files changed (62) hide show
  1. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/PKG-INFO +1 -1
  2. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/pyproject.toml +5 -5
  3. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/_version.py +1 -1
  4. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/api/batch/utils.py +11 -1
  5. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/constants.py +4 -4
  6. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/.gitignore +0 -0
  7. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/LICENSE.md +0 -0
  8. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/README.md +0 -0
  9. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/.utmzones.geojson +0 -0
  10. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/__init__.py +0 -0
  11. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/api/__init__.py +0 -0
  12. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/api/base.py +0 -0
  13. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/api/base_request.py +0 -0
  14. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/api/batch/__init__.py +0 -0
  15. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/api/batch/base.py +0 -0
  16. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/api/batch/process.py +0 -0
  17. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/api/batch/statistical.py +0 -0
  18. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/api/byoc.py +0 -0
  19. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/api/catalog.py +0 -0
  20. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/api/fis.py +0 -0
  21. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/api/ogc.py +0 -0
  22. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/api/opensearch.py +0 -0
  23. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/api/process.py +0 -0
  24. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/api/statistical.py +0 -0
  25. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/api/utils.py +0 -0
  26. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/api/wfs.py +0 -0
  27. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/areas.py +0 -0
  28. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/aws/__init__.py +0 -0
  29. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/aws/batch.py +0 -0
  30. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/aws/client.py +0 -0
  31. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/aws/commands.py +0 -0
  32. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/aws/constants.py +0 -0
  33. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/aws/data.py +0 -0
  34. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/aws/data_safe.py +0 -0
  35. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/aws/request.py +0 -0
  36. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/base.py +0 -0
  37. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/commands.py +0 -0
  38. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/config.py +0 -0
  39. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/data_collections.py +0 -0
  40. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/data_collections_bands.py +0 -0
  41. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/data_utils.py +0 -0
  42. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/decoding.py +0 -0
  43. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/download/__init__.py +0 -0
  44. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/download/client.py +0 -0
  45. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/download/handlers.py +0 -0
  46. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/download/models.py +0 -0
  47. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/download/rate_limit.py +0 -0
  48. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/download/sentinelhub_client.py +0 -0
  49. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/download/sentinelhub_statistical_client.py +0 -0
  50. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/download/session.py +0 -0
  51. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/evalscript.py +0 -0
  52. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/exceptions.py +0 -0
  53. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/geo_utils.py +0 -0
  54. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/geometry.py +0 -0
  55. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/geopedia/__init__.py +0 -0
  56. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/geopedia/core.py +0 -0
  57. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/geopedia/request.py +0 -0
  58. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/io_utils.py +0 -0
  59. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/py.typed +0 -0
  60. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/testing_utils.py +0 -0
  61. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/time_utils.py +0 -0
  62. {sentinelhub-3.10.2 → sentinelhub-3.10.3}/sentinelhub/types.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: sentinelhub
3
- Version: 3.10.2
3
+ Version: 3.10.3
4
4
  Summary: Python API for Sentinel Hub
5
5
  Project-URL: Homepage, https://github.com/sentinel-hub/sentinelhub-py
6
6
  Project-URL: Documentation, https://sentinelhub-py.readthedocs.io
@@ -110,7 +110,7 @@ preview = true
110
110
  [tool.ruff]
111
111
  line-length = 120
112
112
  target-version = "py38"
113
- select = [
113
+ lint.select = [
114
114
  "F", # pyflakes
115
115
  "E", # pycodestyle
116
116
  "W", # pycodestyle
@@ -143,7 +143,7 @@ select = [
143
143
  "RUF", # ruff rules
144
144
  ]
145
145
  fix = true
146
- fixable = [
146
+ lint.fixable = [
147
147
  "I", # sort imports
148
148
  "F401", # remove redundant imports
149
149
  "UP007", # use new-style union type annotations
@@ -151,7 +151,7 @@ fixable = [
151
151
  "UP037", # remove quotes around types when not necessary
152
152
  "FA100", # import future annotations where necessary (not autofixable ATM)
153
153
  ]
154
- ignore = [
154
+ lint.ignore = [
155
155
  "C408", # complains about `dict()` calls, we use them to avoid too many " in the code
156
156
  "SIM108", # tries to aggresively inline `if`, not always readable
157
157
  "COM812", # trailing comma missing, fights with black
@@ -162,11 +162,11 @@ ignore = [
162
162
  "B028", # always demands a stacklevel argument when warning
163
163
  "PT011", # complains for `pytest.raises(ValueError)` but we use it a lot
164
164
  ]
165
- per-file-ignores = { "__init__.py" = ["F401"], "conf.py" = ["FA100"] }
165
+ lint.per-file-ignores = { "__init__.py" = ["F401"], "conf.py" = ["FA100"] }
166
166
  exclude = [".git", "__pycache__", "build", "dist", "sentinelhub/aws/*"]
167
167
 
168
168
 
169
- [tool.ruff.isort]
169
+ [tool.ruff.lint.isort]
170
170
  section-order = [
171
171
  "future",
172
172
  "standard-library",
@@ -1,3 +1,3 @@
1
1
  """Version of the sentinelhub package."""
2
2
 
3
- __version__ = "3.10.2"
3
+ __version__ = "3.10.3"
@@ -73,9 +73,12 @@ def monitor_batch_job(
73
73
 
74
74
  progress_bar = tqdm(total=batch_request.tile_count, initial=finished_count, desc="Progress rate")
75
75
  success_bar = tqdm(total=finished_count, initial=success_count, desc="Success rate")
76
+
77
+ monitoring_status = [BatchRequestStatus.ANALYSIS_DONE, BatchRequestStatus.PROCESSING]
76
78
  with progress_bar, success_bar:
77
- while finished_count < batch_request.tile_count:
79
+ while finished_count < batch_request.tile_count and batch_request.status in monitoring_status:
78
80
  time.sleep(sleep_time)
81
+ batch_request = batch_client.get_request(batch_request)
79
82
 
80
83
  tiles_per_status = _get_batch_tiles_per_status(batch_request, batch_client)
81
84
  new_success_count = len(tiles_per_status[BatchTileStatus.PROCESSED])
@@ -93,6 +96,13 @@ def monitor_batch_job(
93
96
  failed_tiles_num = finished_count - success_count
94
97
  if failed_tiles_num:
95
98
  LOGGER.info("Batch job failed for %d tiles", failed_tiles_num)
99
+
100
+ while batch_request.status is BatchRequestStatus.PROCESSING:
101
+ LOGGER.info("Waiting on batch job status update.")
102
+ time.sleep(sleep_time)
103
+ batch_request = batch_client.get_request(batch_request)
104
+
105
+ LOGGER.info("Batch job finished with status %s", batch_request.status.value)
96
106
  return tiles_per_status
97
107
 
98
108
 
@@ -81,7 +81,7 @@ class CRSMeta(EnumMeta):
81
81
 
82
82
  return super().__new__(mcs, cls, bases, classdict)
83
83
 
84
- def __call__(cls, crs_value, *args, **kwargs): # type: ignore[no-untyped-def] # noqa: N805
84
+ def __call__(cls, crs_value, *args, **kwargs): # type: ignore[no-untyped-def]
85
85
  """This is executed whenever CRS('something') is called"""
86
86
  # pylint: disable=signature-differs
87
87
  crs_value = cls._parse_crs(crs_value)
@@ -201,7 +201,7 @@ class CRS(Enum, metaclass=CRSMeta):
201
201
  """
202
202
  return self.name.startswith("UTM")
203
203
 
204
- @functools.lru_cache(maxsize=128) # noqa: B019
204
+ @functools.lru_cache(maxsize=128)
205
205
  def projection(self) -> pyproj.Proj:
206
206
  """Returns a projection in form of pyproj class.
207
207
 
@@ -212,7 +212,7 @@ class CRS(Enum, metaclass=CRSMeta):
212
212
  """
213
213
  return pyproj.Proj(self._get_pyproj_projection_def(), preserve_units=True)
214
214
 
215
- @functools.lru_cache(maxsize=128) # noqa: B019
215
+ @functools.lru_cache(maxsize=128)
216
216
  def pyproj_crs(self) -> pyproj.CRS:
217
217
  """Returns a pyproj CRS class.
218
218
 
@@ -223,7 +223,7 @@ class CRS(Enum, metaclass=CRSMeta):
223
223
  """
224
224
  return pyproj.CRS(self._get_pyproj_projection_def())
225
225
 
226
- @functools.lru_cache(maxsize=512) # noqa: B019
226
+ @functools.lru_cache(maxsize=512)
227
227
  def get_transform_function(self, other: CRS, always_xy: bool = True) -> Callable[..., tuple]:
228
228
  """Returns a function for transforming geometrical objects from one CRS to another. The function will support
229
229
  transformations between any objects that pyproj supports.
File without changes
File without changes
File without changes