sentinelhub 3.10.2__py3-none-any.whl → 3.10.3__py3-none-any.whl

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.
sentinelhub/_version.py CHANGED
@@ -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
 
sentinelhub/constants.py CHANGED
@@ -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.
@@ -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
@@ -1,11 +1,11 @@
1
1
  sentinelhub/.utmzones.geojson,sha256=2kBUChuQK-ffIAc-5c8zluUa1JGgkop1HTShmhwp80s,768447
2
2
  sentinelhub/__init__.py,sha256=sXLQjfrL_0hFpZkl4cIavVLpMgXYP6SGixBXLSVqh6c,2185
3
- sentinelhub/_version.py,sha256=jGtSnzPFNOsNMe0Rk7gYsIWc4mOpshHocEnUsFfiQcM,66
3
+ sentinelhub/_version.py,sha256=SlQWqEWVATLo8_CX5NqfuD8qzMIR2V5eyo17raN_HDY,66
4
4
  sentinelhub/areas.py,sha256=Wuu6WwOlGQkvK9P4C7FGxC42IEyfYqifobdMd0ty4Fw,31885
5
5
  sentinelhub/base.py,sha256=g3E2Nh6I0c3GrkTmJ2rVK_disN2spQUn-yCWc_4NqMk,12857
6
6
  sentinelhub/commands.py,sha256=KHDT0uJATP9vWxjNLpUpaboPfHoXC3nIlmFGqS8DL0E,3306
7
7
  sentinelhub/config.py,sha256=8ZJ8f4LKRwO6dDLHBtP_-T8yf8zUbQ_K5GafRhDaAXc,10365
8
- sentinelhub/constants.py,sha256=t8ivRGwBtXdCbqF1A7Zh_q5Zw599g1BdjVvb_n-ubAA,13528
8
+ sentinelhub/constants.py,sha256=wty-ZKo6c18qBwEvgvqwnhZ1H_7Oqmo4plLlVK4hhIw,13473
9
9
  sentinelhub/data_collections.py,sha256=MxlNztn487sb-yBwbi1-uiLGis__-lCDvPSew8td6js,24305
10
10
  sentinelhub/data_collections_bands.py,sha256=H-oQUyHjcROHfe063Rt0C9I-2csmPlAlmNmVyJfZ9iE,11308
11
11
  sentinelhub/data_utils.py,sha256=8RPF1mg79ZgavtrPVPbvBBCaIphqEWYezTezyRJZcEY,7572
@@ -35,7 +35,7 @@ sentinelhub/api/batch/__init__.py,sha256=q2uKqxC7_aBoVf_mmKhzVUrdA5kPDVO_TnChdEa
35
35
  sentinelhub/api/batch/base.py,sha256=uALuJnGKyp2Zx0-T9ku_1pxS3E9wOcXrwyHgPXXxdyk,4348
36
36
  sentinelhub/api/batch/process.py,sha256=bNvRfS5sQ2Bf9H0T3DPjAKVlK8QqTRv_haoAvMnl6xI,24311
37
37
  sentinelhub/api/batch/statistical.py,sha256=7RqmKqfS56IlCEMnRWo_aG8gsivjN39J5lLx8BxrFtE,8156
38
- sentinelhub/api/batch/utils.py,sha256=_c6vjatxeS0Krhm2Rs5jclBZwqV3P-VoZmkjGlExP40,10767
38
+ sentinelhub/api/batch/utils.py,sha256=rEvb6YNQUiTXWdbJXSjChLvpM6i2wF3rVObfS2VbiNs,11274
39
39
  sentinelhub/aws/__init__.py,sha256=AreOfOvDp6Sy6jfMGMCI44fDBMqgtWk-lUFXQ-8ehK8,503
40
40
  sentinelhub/aws/batch.py,sha256=eujQ2FTiKiGLw4RqERugFYTnc6SSE8_a17C3Ine91fA,4136
41
41
  sentinelhub/aws/client.py,sha256=7c0AF1M436s_eZx7XeRhpHYrygCXuOTQK7-jTmZIBzE,4698
@@ -55,8 +55,8 @@ sentinelhub/download/session.py,sha256=KMRUw6wVEb68g8FZknIMk3BkAQvmghiCpIQ1rhhIJ
55
55
  sentinelhub/geopedia/__init__.py,sha256=R1wvAx_41U_KkDQif3Dubngyv2nR1zOIedxCdvhP3MM,263
56
56
  sentinelhub/geopedia/core.py,sha256=gU7CWZe8q5ZlZX4j1Zub4kvg5Nd7YZvtLCHGcuQAkfY,16370
57
57
  sentinelhub/geopedia/request.py,sha256=nmrEHJzqG13npSF8co23d8gZGXqxT5pyAu2geZ_fnmY,6618
58
- sentinelhub-3.10.2.dist-info/METADATA,sha256=mLXlyJSS0H2lDdr64BTwM7cjJiIj27QT9TgBj37pkhY,10174
59
- sentinelhub-3.10.2.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
60
- sentinelhub-3.10.2.dist-info/entry_points.txt,sha256=nQiaLJk-L-7XCwyDiMozwfnJ7WI2Rc9FqnJDBt6K51g,212
61
- sentinelhub-3.10.2.dist-info/licenses/LICENSE.md,sha256=Gczr65g8pY0N0OO_5g-zI3RTidQTMBVlL0JxM7n8tGM,1071
62
- sentinelhub-3.10.2.dist-info/RECORD,,
58
+ sentinelhub-3.10.3.dist-info/METADATA,sha256=gusNvjIFa4dCm5VPMzbVBWxL6AX2dFufz6CHFxV3SpA,10174
59
+ sentinelhub-3.10.3.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
60
+ sentinelhub-3.10.3.dist-info/entry_points.txt,sha256=nQiaLJk-L-7XCwyDiMozwfnJ7WI2Rc9FqnJDBt6K51g,212
61
+ sentinelhub-3.10.3.dist-info/licenses/LICENSE.md,sha256=Gczr65g8pY0N0OO_5g-zI3RTidQTMBVlL0JxM7n8tGM,1071
62
+ sentinelhub-3.10.3.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.24.2
2
+ Generator: hatchling 1.25.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any