File tree Expand file tree Collapse file tree 4 files changed +29
-6
lines changed
Expand file tree Collapse file tree 4 files changed +29
-6
lines changed Original file line number Diff line number Diff line change 11# Changelog
22All release highlights of this project will be documented in this file.
3+ ## 4.4.1 - July 24, 2022
4+ ### Added
5+ - ` SAClient.create_custom_fields() ` _ method_ to create/add new custom fields to a project’s custom field schema.
6+ - ` SAClient.get_custom_fields() ` _ method_ to get a project’s custom field schema.
7+ - ` SAClient.delete_custom_fields() ` _ method_ to remove existing custom fields from a project’s custom field schema.
8+ - ` SAClient.upload_custom_values() ` _ method_ to attach custom field-value pairs to items.
9+ - ` SAClient.delete_custom_values() ` _ method_ to remove custom field-value pairs from items.
10+ ### Updated
11+ - the ** schema** of ` classes JSON ` to support the new ` "default_value" ` key to set a default attribute(s) for a given attribute group.
12+ - ` SAClient.get_item_metadata() ` _ method_ to add a new input argument ` include_custom_metadata ` to return custom metadata in the result items.
13+ - ` SAClient.search_items() ` _ method_ to add a new input argument ` include_custom_metadata ` to return custom metadata in the result items.
14+ - ` SAClient.query() ` _ method_ to return custom metadata in the result items.
15+ ### Fixed
16+ - ` SAClient ` _ class_ to address the system crash that occurs on instantiation via ` config.json ` file.
17+ - ` SAClient.query() ` _ method_ to address the issue of not returning more than 50 items.
18+ - ` SAClient.upload_annotations_from_folder_to_project() ` to address the issue of some fields not being auto populated after the upload is finished.
19+ - ` SAClient.get_folder_metadata() ` , ` SAClient.search_folders() ` to address the issue of transforming the ‘+’ sign in a folder to a whitespace.
20+ ### Removed
21+ - ` superannotate.assign_images() ` _ function_ . Please use the ` SAClient.assign_items() ` _ method_ instead.
22+ - ` superannotate.unassign_images() ` _ function_ . Please use the ` SAClient.unassign_items() ` _ method_ instead.
23+ - ` superannotate.delete_images() ` _ function_ . Please use the ` SAClient.delete_items() ` _ method_ instead.
24+ ###
325## 4.4.0 - July 03, 2022
426### Added
527- ` superannotate.SAClient() ` _ class_ to instantiate team-level authentication and inheriting methods to access the back-end.
Original file line number Diff line number Diff line change 11import os
22import sys
33
4- __version__ = "4.4.1b5 "
4+ __version__ = "4.4.1 "
55
66sys .path .append (os .path .split (os .path .realpath (__file__ ))[0 ])
77
Original file line number Diff line number Diff line change @@ -543,16 +543,17 @@ def list_images(self, query_string):
543543 return self ._get_all_pages (url )
544544
545545 def list_items (self , query_string ) -> ServiceResponse :
546+ chunk_size = 2000
546547 url = urljoin (self .api_url , self .URL_GET_ITEMS )
547548 if query_string :
548549 url = f"{ url } ?{ query_string } "
549550 offset = 0
550551 total = []
552+ splitter = "&" if "?" in url else "?"
551553 while True :
552- splitter = "&" if "?" in url else "?"
553- url = f"{ url } { splitter } offset={ offset } "
554+ _url = f"{ url } { splitter } offset={ offset } "
554555 _response = self ._request (
555- url ,
556+ _url ,
556557 method = "get" ,
557558 content_type = List [BaseItemEntity ],
558559 dispatcher = lambda x : x .pop ("data" ),
@@ -563,7 +564,7 @@ def list_items(self, query_string) -> ServiceResponse:
563564 return _response
564565 data_len = len (_response .data )
565566 offset += data_len
566- if _response .count < self . LIMIT or _response .count - offset <= 0 :
567+ if _response .count < chunk_size or _response .count - offset <= 0 :
567568 break
568569 response = ServiceResponse (_response )
569570 response .data = total
Original file line number Diff line number Diff line change @@ -173,7 +173,7 @@ def test_attach_video_urls(self):
173173 def test_upload_videos (self ):
174174 self ._create_project ()
175175 self .safe_run (self ._cli .upload_videos , self .PROJECT_NAME , str (self .video_folder_path ))
176- self .assertEqual (242 , len (sa .search_items (self .PROJECT_NAME )))
176+ self .assertEqual (121 , len (sa .search_items (self .PROJECT_NAME )))
177177
178178 def test_attach_document_urls (self ):
179179 self ._create_project ("Document" )
You can’t perform that action at this time.
0 commit comments