supervisely 6.73.203__py3-none-any.whl → 6.73.205__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.

Potentially problematic release.


This version of supervisely might be problematic. Click here for more details.

@@ -1811,7 +1811,7 @@ class ImageApi(RemoveableBulkModuleApi):
1811
1811
  results.append(self._convert_json_info(info_json_copy))
1812
1812
  break
1813
1813
  except HTTPError as e:
1814
- error_details = e.response.json().get("details")
1814
+ error_details = e.response.json().get("details", {})
1815
1815
  if (
1816
1816
  conflict_resolution is not None
1817
1817
  and e.response.status_code == 400
@@ -168,6 +168,11 @@ class FastTable(Widget):
168
168
  search_value = StateJson()[self.widget_id]["search"]
169
169
  self._filtered_data = self.search(search_value)
170
170
  self._rows_total = len(self._filtered_data)
171
+
172
+ if self._rows_total > 0 and self._active_page == 0: # if previous filtered data was empty
173
+ self._active_page = 1
174
+ StateJson()[self.widget_id]["page"] = self._active_page
175
+
171
176
  self._sorted_data = self._sort_table_data(self._filtered_data)
172
177
  self._sliced_data = self._slice_table_data(
173
178
  self._sorted_data, actual_page=self._active_page
@@ -176,6 +181,7 @@ class FastTable(Widget):
176
181
  DataJson()[self.widget_id]["data"] = self._parsed_active_data["data"]
177
182
  DataJson()[self.widget_id]["total"] = self._rows_total
178
183
  DataJson().send_changes()
184
+ StateJson().send_changes()
179
185
 
180
186
  def get_json_data(self) -> Dict[str, Any]:
181
187
  """Returns dictionary with widget data, which defines the appearance and behavior of the widget.
@@ -322,10 +328,14 @@ class FastTable(Widget):
322
328
  self._sorted_data = self._sort_table_data(self._source_data)
323
329
  self._sliced_data = self._slice_table_data(self._sorted_data)
324
330
  self._parsed_active_data = self._unpack_pandas_table_data(self._sliced_data)
331
+ self._parsed_source_data = self._unpack_pandas_table_data(self._source_data)
325
332
  DataJson()[self.widget_id]["data"] = self._parsed_active_data["data"]
326
333
  DataJson()[self.widget_id]["columns"] = self._parsed_active_data["columns"]
327
334
  DataJson()[self.widget_id]["total"] = len(self._source_data)
328
335
  DataJson().send_changes()
336
+ self._active_page = 1
337
+ StateJson()[self.widget_id]["page"] = self._active_page
338
+ StateJson().send_changes()
329
339
  self.clear_selection()
330
340
 
331
341
  def to_json(self, active_page: Optional[bool] = False) -> Dict[str, Any]:
@@ -814,3 +824,36 @@ class FastTable(Widget):
814
824
  raise TypeError(
815
825
  f"Row contains values of types that do not match the data types in the columns: {failed_column_idxs}"
816
826
  )
827
+
828
+ def update_cell_value(self, row: int, column: int, value: Any) -> None:
829
+ """Updates the value of the cell in the table.
830
+
831
+ :param row: Index of the row
832
+ :type row: int
833
+ :param column: Index of the column
834
+ :type column: int
835
+ :param value: New value
836
+ :type value: Any
837
+ """
838
+
839
+ self._source_data.iat[row, column] = value
840
+ self._parsed_source_data = self._unpack_pandas_table_data(self._source_data)
841
+ self._sort_column_idx = StateJson()[self.widget_id]["sort"]["column"]
842
+ self._sort_order = StateJson()[self.widget_id]["sort"]["order"]
843
+ self._validate_sort_attrs()
844
+ self._filtered_data = self.search(self._search_str)
845
+ self._rows_total = len(self._filtered_data)
846
+ self._sorted_data = self._sort_table_data(self._filtered_data)
847
+
848
+ increment = 0 if self._rows_total % self._page_size == 0 else 1
849
+ max_page = self._rows_total // self._page_size + increment
850
+ if self._active_page > max_page: # active page is out of range (in case of the filtered data)
851
+ self._active_page = max_page
852
+ StateJson()[self.widget_id]["page"] = self._active_page
853
+
854
+ self._sliced_data = self._slice_table_data(self._sorted_data, actual_page=self._active_page)
855
+ self._parsed_active_data = self._unpack_pandas_table_data(self._sliced_data)
856
+ DataJson()[self.widget_id]["data"] = self._parsed_active_data["data"]
857
+ DataJson()[self.widget_id]["total"] = self._rows_total
858
+ DataJson().send_changes()
859
+ StateJson().send_changes()
@@ -1442,9 +1442,9 @@ class Dataset(KeyObject):
1442
1442
  ds_items_link = Dataset.get_url(project_id, dataset_id)
1443
1443
 
1444
1444
  print(ds_items_link)
1445
- # Output: "/projects/10093/datasets/45330/entities"
1445
+ # Output: "/projects/10093/datasets/45330"
1446
1446
  """
1447
- res = f"/projects/{project_id}/datasets/{dataset_id}/entities"
1447
+ res = f"/projects/{project_id}/datasets/{dataset_id}"
1448
1448
  if is_development():
1449
1449
  res = abs_url(res)
1450
1450
  return res
@@ -692,7 +692,7 @@ class VideoDataset(Dataset):
692
692
  ds_items_link = VideoDataset.get_url(project_id, dataset_id)
693
693
 
694
694
  print(ds_items_link)
695
- # Output: "/projects/10093/datasets/45330/entities"
695
+ # Output: "/projects/10093/datasets/45330"
696
696
  """
697
697
  return super().get_url(project_id, dataset_id)
698
698
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: supervisely
3
- Version: 6.73.203
3
+ Version: 6.73.205
4
4
  Summary: Supervisely Python SDK.
5
5
  Home-page: https://github.com/supervisely/supervisely
6
6
  Author: Supervisely
@@ -28,7 +28,7 @@ supervisely/api/dataset_api.py,sha256=7iwAyz3pmzFG2i072gLdXjczfBGbyj-V_rRl7Tx-V3
28
28
  supervisely/api/file_api.py,sha256=y8FkE-vx1382cbhNo_rTZs7SobrkxmYQAe79CpvStO4,54279
29
29
  supervisely/api/github_api.py,sha256=NIexNjEer9H5rf5sw2LEZd7C1WR-tK4t6IZzsgeAAwQ,623
30
30
  supervisely/api/image_annotation_tool_api.py,sha256=YcUo78jRDBJYvIjrd-Y6FJAasLta54nnxhyaGyanovA,5237
31
- supervisely/api/image_api.py,sha256=1AgY6Tk-0rJf1miR5kN1YSkQ7EVihgBnPWbP-Ic55NI,135790
31
+ supervisely/api/image_api.py,sha256=TALfxJoBf6xYJs_UKuX7nNt6WNADsAHso2r8cffSm3o,135794
32
32
  supervisely/api/import_storage_api.py,sha256=BDCgmR0Hv6OoiRHLCVPKt3iDxSVlQp1WrnKhAK_Zl84,460
33
33
  supervisely/api/issues_api.py,sha256=BqDJXmNoTzwc3xe6_-mA7FDFC5QQ-ahGbXk_HmpkSeQ,17925
34
34
  supervisely/api/labeling_job_api.py,sha256=odnzZjp29yM16Gq-FYkv-OA4WFMNJCLFo4qSikW2A7c,56280
@@ -247,7 +247,7 @@ supervisely/app/widgets/empty/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5N
247
247
  supervisely/app/widgets/empty/empty.py,sha256=fCr8I7CQ2XLo59bl2txjDrblOGiu0TzUcM-Pq6s7gKY,1285
248
248
  supervisely/app/widgets/empty/template.html,sha256=aDBKkin5aLuqByzNN517-rTYCGIg5SPKgnysYMPYjv8,40
249
249
  supervisely/app/widgets/fast_table/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
250
- supervisely/app/widgets/fast_table/fast_table.py,sha256=Sc0tpUEMkfRlwnhPVO91-QqiY18wnzmsUwr6gb0N6YU,33269
250
+ supervisely/app/widgets/fast_table/fast_table.py,sha256=hLdb-9Vj18RbOWYGFcm3hGIXzBzTuvNDDTP7bQRGtFs,35321
251
251
  supervisely/app/widgets/fast_table/script.js,sha256=U3lmOucE_IJBuW0n6he1y3um6Ge3vFyhC6gKdmfKxOo,8782
252
252
  supervisely/app/widgets/fast_table/style.css,sha256=nr3wUB_n9sjQy_A8D85OIxhC6qX9LcEFaCNljzP6DGQ,15409
253
253
  supervisely/app/widgets/fast_table/template.html,sha256=P4mkLysZywc5F_jWuRMzYi89juudGm-6Dh7mo5SsDLo,1060
@@ -891,13 +891,13 @@ supervisely/project/data_version.py,sha256=a2eKJsPLjPYFnO7hFyQMNGsFERoCwA-yJ5I2p
891
891
  supervisely/project/download.py,sha256=HtprYsqdzx0AgBmMlvigerFjhMQDtTGuCE1aQ9LBqN0,19704
892
892
  supervisely/project/pointcloud_episode_project.py,sha256=fcaFAaHVn_VvdiIfHl4IyEFE5-Q3VFGfo7_YoxEma0I,41341
893
893
  supervisely/project/pointcloud_project.py,sha256=Y8Xhi6Hg-KyztwFncezuDfKTt2FILss96EU_LdXzmrA,49172
894
- supervisely/project/project.py,sha256=AyCKQ88jtOfbhdnMVaiHjti82WfDdIBf9x8T9D2ageQ,153094
894
+ supervisely/project/project.py,sha256=r1-yVGOKFW2IPnArBCfrXR26GnopqpoqlXozZwFGDfQ,153076
895
895
  supervisely/project/project_meta.py,sha256=26s8IiHC5Pg8B1AQi6_CrsWteioJP2in00cRNe8QlW0,51423
896
896
  supervisely/project/project_settings.py,sha256=NLThzU_DCynOK6hkHhVdFyezwprn9UqlnrLDe_3qhkY,9347
897
897
  supervisely/project/project_type.py,sha256=XRcZG5zI4RR8-JSlG-n0VVjGA4gJSfLIU-hbqiaNOcc,384
898
898
  supervisely/project/readme_template.md,sha256=rGmSLRVUSGjvorjpzl0sZ7YA4sKfDexl95NFtMISj3I,9128
899
899
  supervisely/project/upload.py,sha256=AjgHYgVZwUE25ygC5pqvFjdAladbyB8T78mlet5Qpho,3750
900
- supervisely/project/video_project.py,sha256=x5MPpFV4ivPBxnyTCTA5TIuVMDzJY8AqfbJgtMT4jiQ,53537
900
+ supervisely/project/video_project.py,sha256=fA-Q-WRTLR4ZFDGnWKDDwoP9MxDCyKP2AP-6vs2Ekg0,53528
901
901
  supervisely/project/volume_project.py,sha256=LL4IxQyx0DU4acj2imz6diWO3kHHaWnf7QiycTJUTMU,22367
902
902
  supervisely/pyscripts_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
903
903
  supervisely/pyscripts_utils/utils.py,sha256=scEwHJvHRQa8NHIOn2eTwH6-Zc8CGdLoxM-WzH9jcRo,314
@@ -953,9 +953,9 @@ supervisely/worker_proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
953
953
  supervisely/worker_proto/worker_api_pb2.py,sha256=VQfi5JRBHs2pFCK1snec3JECgGnua3Xjqw_-b3aFxuM,59142
954
954
  supervisely/worker_proto/worker_api_pb2_grpc.py,sha256=3BwQXOaP9qpdi0Dt9EKG--Lm8KGN0C5AgmUfRv77_Jk,28940
955
955
  supervisely_lib/__init__.py,sha256=7-3QnN8Zf0wj8NCr2oJmqoQWMKKPKTECvjH9pd2S5vY,159
956
- supervisely-6.73.203.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
957
- supervisely-6.73.203.dist-info/METADATA,sha256=lOggtsA5D8nqp79vKNIXej9VBsZ3dev-ofMyXv33JNg,33077
958
- supervisely-6.73.203.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
959
- supervisely-6.73.203.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
960
- supervisely-6.73.203.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
961
- supervisely-6.73.203.dist-info/RECORD,,
956
+ supervisely-6.73.205.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
957
+ supervisely-6.73.205.dist-info/METADATA,sha256=Ie1M5PxEQCoDhgiXb2RL1NiA8tkVmDO5h0QRzbOJ140,33077
958
+ supervisely-6.73.205.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
959
+ supervisely-6.73.205.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
960
+ supervisely-6.73.205.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
961
+ supervisely-6.73.205.dist-info/RECORD,,