supervisely 6.73.372__py3-none-any.whl → 6.73.373__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.
supervisely/_utils.py CHANGED
@@ -575,3 +575,14 @@ def removesuffix(string, suffix):
575
575
  if string.endswith(suffix):
576
576
  return string[: -len(suffix)]
577
577
  return string
578
+
579
+
580
+ def remove_non_printable(text: str) -> str:
581
+ """Remove non-printable characters from a string.
582
+
583
+ :param text: Input string
584
+ :type text: str
585
+ :return: String with non-printable characters removed
586
+ :rtype: str
587
+ """
588
+ return "".join(char for char in text if char.isprintable()).strip()
@@ -340,6 +340,7 @@ class LabelingJobApi(RemoveableBulkModuleApi, ModuleWithStatus):
340
340
  disable_confirm: Optional[bool] = None,
341
341
  disable_submit: Optional[bool] = None,
342
342
  toolbox_settings: Optional[Dict] = None,
343
+ enable_quality_check: Optional[bool] = None,
343
344
  ) -> List[LabelingJobInfo]:
344
345
  """
345
346
  Creates Labeling Job and assigns given Users to it.
@@ -382,6 +383,8 @@ class LabelingJobApi(RemoveableBulkModuleApi, ModuleWithStatus):
382
383
  :type disable_submit: bool, optional
383
384
  :param toolbox_settings: Settings for the labeling tool. Only video projects are supported.
384
385
  :type toolbox_settings: Dict, optional
386
+ :param enable_quality_check: If True, adds an intermediate step between "review" and completing the Labeling Job.
387
+ :type enable_quality_check: bool, optional
385
388
  :return: List of information about new Labeling Job. See :class:`info_sequence<info_sequence>`
386
389
  :rtype: :class:`List[LabelingJobInfo]`
387
390
  :Usage example:
@@ -499,6 +502,8 @@ class LabelingJobApi(RemoveableBulkModuleApi, ModuleWithStatus):
499
502
  meta.update({"disableConfirm": disable_confirm})
500
503
  if disable_submit is not None:
501
504
  meta.update({"disableSubmit": disable_submit})
505
+ if enable_quality_check is not None:
506
+ meta.update({"enableIntermediateReview": enable_quality_check})
502
507
 
503
508
  data = {
504
509
  ApiField.NAME: name,
@@ -198,6 +198,8 @@ class LabelingQueueApi(RemoveableBulkModuleApi, ModuleWithStatus):
198
198
  hide_figure_author: Optional[bool] = False,
199
199
  allow_review_own_annotations: Optional[bool] = False,
200
200
  skip_complete_job_on_empty: Optional[bool] = False,
201
+ enable_quality_check: Optional[bool] = None,
202
+ quality_check_user_ids: Optional[List[int]] = None,
201
203
  ) -> int:
202
204
  """
203
205
  Creates Labeling Queue and assigns given Users to it.
@@ -210,6 +212,8 @@ class LabelingQueueApi(RemoveableBulkModuleApi, ModuleWithStatus):
210
212
  :type collection_id: int, optional
211
213
  :param user_ids: User IDs in Supervisely to assign Users as labelers to Labeling Queue.
212
214
  :type user_ids: List[int]
215
+ :param reviewer_ids: User IDs in Supervisely to assign Users as reviewers to Labeling Queue.
216
+ :type reviewer_ids: List[int]
213
217
  :param readme: Additional information about Labeling Queue.
214
218
  :type readme: str, optional
215
219
  :param description: Description of Labeling Queue.
@@ -242,6 +246,16 @@ class LabelingQueueApi(RemoveableBulkModuleApi, ModuleWithStatus):
242
246
  :type disable_submit: bool, optional
243
247
  :param toolbox_settings: Settings for the labeling tool. Only video projects are supported.
244
248
  :type toolbox_settings: Dict, optional
249
+ :param hide_figure_author: If True, hides the author of the figure in the labeling tool.
250
+ :type hide_figure_author: bool, optional
251
+ :param allow_review_own_annotations: If True, allows labelers to review their own annotations.
252
+ :type allow_review_own_annotations: bool, optional
253
+ :param skip_complete_job_on_empty: If True, skips completing the Labeling Queue if there are no images to label.
254
+ :type skip_complete_job_on_empty: bool, optional
255
+ :param enable_quality_check: If True, adds an intermediate step between "review" and completing the Labeling Queue.
256
+ :type enable_quality_check: bool, optional
257
+ :param quality_check_user_ids: List of User IDs in Supervisely to assign Users as Quality Checkers to Labeling Queue.
258
+ :type quality_check_user_ids: List[int], optional
245
259
  :return: Labeling Queue ID in Supervisely.
246
260
  :rtype: int
247
261
  :Usage example:
@@ -348,6 +362,12 @@ class LabelingQueueApi(RemoveableBulkModuleApi, ModuleWithStatus):
348
362
  meta.update({"disableConfirm": disable_confirm})
349
363
  if disable_submit is not None:
350
364
  meta.update({"disableSubmit": disable_submit})
365
+ if enable_quality_check is not None:
366
+ if quality_check_user_ids is None:
367
+ raise RuntimeError(
368
+ "quality_check_user_ids must be provided if enable_quality_check is True"
369
+ )
370
+ meta.update({"enableIntermediateReview": enable_quality_check})
351
371
 
352
372
  queue_meta = {}
353
373
  if allow_review_own_annotations is True:
@@ -366,6 +386,12 @@ class LabelingQueueApi(RemoveableBulkModuleApi, ModuleWithStatus):
366
386
  data[ApiField.DATASET_ID] = dataset_id
367
387
  if collection_id is not None:
368
388
  data[ApiField.COLLECTION_ID] = collection_id
389
+ if quality_check_user_ids is not None:
390
+ if enable_quality_check is not True:
391
+ raise RuntimeError(
392
+ "quality_check_user_ids can be set only if enable_quality_check is True"
393
+ )
394
+ data[ApiField.QUALITY_CHECK_USER_IDS] = quality_check_user_ids
369
395
 
370
396
  if len(queue_meta) > 0:
371
397
  data[ApiField.QUEUE_META] = queue_meta
@@ -661,6 +661,8 @@ class ApiField:
661
661
  """"""
662
662
  COLLECTION_ID = "collectionId"
663
663
  """"""
664
+ QUALITY_CHECK_USER_IDS = "qualityCheckUserIds"
665
+ """"""
664
666
 
665
667
 
666
668
  def _get_single_item(items):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: supervisely
3
- Version: 6.73.372
3
+ Version: 6.73.373
4
4
  Summary: Supervisely Python SDK.
5
5
  Home-page: https://github.com/supervisely/supervisely
6
6
  Author: Supervisely
@@ -1,6 +1,6 @@
1
1
  supervisely/README.md,sha256=XM-DiMC6To3I9RjQZ0c61905EFRR_jnCUx2q3uNR-X8,3331
2
2
  supervisely/__init__.py,sha256=_qphKFT0_toEQmF5IjB1sWjztbF4lP1tLY29PBJhArY,10917
3
- supervisely/_utils.py,sha256=8R1XgIPwBG7pqwyk93nYExd7SkSyXx9VbQvseQNiT3M,18621
3
+ supervisely/_utils.py,sha256=J0-qYN8YAEGJO4mmE5ErNdRx9mSVEYf5oIgqM4efegU,18926
4
4
  supervisely/function_wrapper.py,sha256=R5YajTQ0GnRp2vtjwfC9hINkzQc0JiyGsu8TER373xY,1912
5
5
  supervisely/sly_logger.py,sha256=z92Vu5hmC0GgTIJO1n6kPDayRW9__8ix8hL6poDZj-Y,6274
6
6
  supervisely/tiny_timer.py,sha256=hkpe_7FE6bsKL79blSs7WBaktuPavEVu67IpEPrfmjE,183
@@ -33,9 +33,9 @@ supervisely/api/image_annotation_tool_api.py,sha256=YcUo78jRDBJYvIjrd-Y6FJAasLta
33
33
  supervisely/api/image_api.py,sha256=zwyHsphaclKFU2a5gpHy6Cas_kpitViSCMV6vcPqR0s,224592
34
34
  supervisely/api/import_storage_api.py,sha256=BDCgmR0Hv6OoiRHLCVPKt3iDxSVlQp1WrnKhAK_Zl84,460
35
35
  supervisely/api/issues_api.py,sha256=BqDJXmNoTzwc3xe6_-mA7FDFC5QQ-ahGbXk_HmpkSeQ,17925
36
- supervisely/api/labeling_job_api.py,sha256=qvfbU8lme_fhTDgTP5UmyL8v3K7otTB6Obt8T2mAFmI,55190
37
- supervisely/api/labeling_queue_api.py,sha256=j56oq5z916pSz85bzuUzuwZYxJR0pRT2KbyxiuCClgk,28427
38
- supervisely/api/module_api.py,sha256=Uly6l7KkB3rS9BHfRyulvNxYUsQ3g_EG-LoS0Ji6sJ8,45301
36
+ supervisely/api/labeling_job_api.py,sha256=G2_BV_WtA2lAhfw_nAQmWmv1P-pwimD0ba9GVKoGjiA,55537
37
+ supervisely/api/labeling_queue_api.py,sha256=ilNjAL1d9NSa9yabQn6E-W26YdtooT3ZGXIFZtGnAvY,30158
38
+ supervisely/api/module_api.py,sha256=u-xm7DEkmIGJjhJKehCAs3w0GiC3xxNeLvQ_hTyGAF4,45363
39
39
  supervisely/api/object_class_api.py,sha256=7-npNFMYjWNtSXYZg6syc6bX56_oCzDU2kFRPGQWCwA,10399
40
40
  supervisely/api/plugin_api.py,sha256=SFm0IlTTOjuHBLUMgG4d4k6U3cWJocE-SVb-f08fwMQ,5286
41
41
  supervisely/api/project_api.py,sha256=WNTMqAa0ZedYesfiZEkZtaFr5huxIpJ8TFYygTnlAWQ,80309
@@ -1097,9 +1097,9 @@ supervisely/worker_proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
1097
1097
  supervisely/worker_proto/worker_api_pb2.py,sha256=VQfi5JRBHs2pFCK1snec3JECgGnua3Xjqw_-b3aFxuM,59142
1098
1098
  supervisely/worker_proto/worker_api_pb2_grpc.py,sha256=3BwQXOaP9qpdi0Dt9EKG--Lm8KGN0C5AgmUfRv77_Jk,28940
1099
1099
  supervisely_lib/__init__.py,sha256=7-3QnN8Zf0wj8NCr2oJmqoQWMKKPKTECvjH9pd2S5vY,159
1100
- supervisely-6.73.372.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
1101
- supervisely-6.73.372.dist-info/METADATA,sha256=XPL2_lh1M9AS2npHgR0X2gs4DTWhMwvycMQuLo3wZws,35154
1102
- supervisely-6.73.372.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
1103
- supervisely-6.73.372.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
1104
- supervisely-6.73.372.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
1105
- supervisely-6.73.372.dist-info/RECORD,,
1100
+ supervisely-6.73.373.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
1101
+ supervisely-6.73.373.dist-info/METADATA,sha256=9QccODidDNZTM4MfriUbOZMtOFQ7d8SzadddcA2TMZU,35154
1102
+ supervisely-6.73.373.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
1103
+ supervisely-6.73.373.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
1104
+ supervisely-6.73.373.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
1105
+ supervisely-6.73.373.dist-info/RECORD,,