Skip to content

Commit fca61bb

Browse files
committed
Update large annotaiton treshold
1 parent f70481e commit fca61bb

File tree

4 files changed

+19
-9
lines changed

4 files changed

+19
-9
lines changed

CHANGELOG.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ ______________________
1111

1212
**Added**
1313

14-
- ``SAClient.get_integrations`` Added integration_id in integration metadata.
15-
- ``SAClient.list_workflows`` Retrieves team workflows.
14+
- ``SAClient.get_integrations`` Added id, createdAt, updatedAt, and creator_id in integration metadata.
15+
- ``SAClient.list_workflows`` Retrieves all workflows for your team along with their metadata.
16+
17+
**Updated**
18+
- ``SAClient.get_project_metadata``
1619

1720
**Removed**
1821
- ``SAClient.get_project_workflow``

src/superannotate/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import sys
44

55

6-
__version__ = "4.4.34dev2"
6+
__version__ = "4.4.34dev3"
77

88

99
os.environ.update({"sa_version": __version__})

src/superannotate/lib/app/interface/sdk_interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def __exit__(self, exc_type, exc_val, exc_tb):
213213
return True
214214

215215
def save(self):
216-
if len(json.dumps(self.annotation).encode("utf-8")) > 16 * 1024 * 1024:
216+
if len(json.dumps(self.annotation).encode("utf-8")) > 15 * 1024 * 1024:
217217
self._set_large_annotation_adapter(self.annotation)
218218
else:
219219
self._set_small_annotation_adapter(self.annotation)

src/superannotate/lib/infrastructure/annotation_adapter.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,18 @@ def get_component_value(self, component_id: str):
4545
elif isinstance(component_data, list):
4646
# Find the dict with the smallest element_path
4747
annotation = min(
48-
(elem for elem in component_data if isinstance(elem, dict) and "element_path" in elem),
48+
(
49+
elem
50+
for elem in component_data
51+
if isinstance(elem, dict) and "element_path" in elem
52+
),
4953
key=lambda x: x["element_path"],
50-
default=None
54+
default=None,
5155
)
5256
if annotation is not None:
5357
return annotation.get("value")
5458
return None
5559

56-
5760
def set_component_value(self, component_id: str, value: Any):
5861
data = self.annotation.setdefault("data", {})
5962
component_data = data.get(component_id)
@@ -65,9 +68,13 @@ def set_component_value(self, component_id: str, value: Any):
6568
elif isinstance(component_data, list):
6669
# Find the dict with the smallest element_path
6770
annotation = min(
68-
(elem for elem in component_data if isinstance(elem, dict) and "element_path" in elem),
71+
(
72+
elem
73+
for elem in component_data
74+
if isinstance(elem, dict) and "element_path" in elem
75+
),
6976
key=lambda x: x["element_path"],
70-
default=None
77+
default=None,
7178
)
7279
if annotation is not None:
7380
annotation["value"] = value

0 commit comments

Comments
 (0)