Skip to content

Commit 06c7c1e

Browse files
authored
Merge branch 'develop' into FRIDAY_3726
2 parents 71592f3 + 2615291 commit 06c7c1e

File tree

9 files changed

+36
-17
lines changed

9 files changed

+36
-17
lines changed

CHANGELOG.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,19 @@ History
66

77
All release highlights of this project will be documented in this file.
88

9+
10+
4.4.35 - May 2, 2025
11+
____________________
12+
13+
**Added**
14+
15+
- ``SAClient.generate_items`` Generates multiple items in a specified project and folder.
16+
17+
**Updated**
18+
19+
- ``SAClient.get_team_metadata`` Added a new include parameter. When set to "scores", the response includes score names associated with the team user.
20+
21+
922
4.4.34 - April 11, 2025
1023
_______________________
1124

@@ -15,6 +28,7 @@ _______________________
1528
- ``SAClient.list_workflows`` Retrieves all workflows for your team along with their metadata.
1629

1730
**Updated**
31+
1832
- ``SAClient.get_project_metadata``
1933

2034
**Removed**

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.35dev1"
6+
__version__ = "4.4.36dev1"
77

88

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

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,15 @@ def get_item_by_id(self, project_id: int, item_id: int):
355355

356356
def get_team_metadata(self, include: List[Literal["scores"]] = None):
357357
"""
358-
Returns team metadata, including optionally, scores
358+
Returns team metadata, including optionally, scores.
359+
360+
:param include: Specifies additional fields to include in the response.
361+
362+
Possible values are
363+
364+
- "scores": If provided, the response will include score names associated with the team user.
365+
366+
:type include: list of str, optional
359367
360368
:return: team metadata
361369
:rtype: dict
@@ -4095,7 +4103,7 @@ def generate_items(
40954103
name: str,
40964104
):
40974105
"""
4098-
Generate multiple items in a specific project and folder.`
4106+
Generate multiple items in a specific project and folder.
40994107
If there are no items in the folder, it will generate a blank item otherwise, it will generate items based on the Custom Form.
41004108
41014109
:param project: Project and folder as a tuple, folder is optional.

src/superannotate/lib/infrastructure/services/annotation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ async def _sync_large_annotation(
8080
"desired_source": "secondary",
8181
}
8282
if transform_version:
83-
sync_params["transform_version"] = transform_version
83+
sync_params["desired_transform_version"] = transform_version
8484
sync_url = urljoin(
8585
self.get_assets_provider_url(),
8686
self.URL_START_FILE_SYNC.format(item_id=item_id),
@@ -124,14 +124,14 @@ async def get_big_annotation(
124124
"annotation_type": "MAIN",
125125
"version": "V1.00",
126126
}
127-
127+
if transform_version:
128+
query_params["transform_version"] = transform_version
128129
await self._sync_large_annotation(
129130
team_id=project.team_id,
130131
project_id=project.id,
131132
item_id=item.id,
132133
transform_version=transform_version,
133134
)
134-
135135
async with AIOHttpSession(
136136
connector=aiohttp.TCPConnector(ssl=False),
137137
headers=self.client.default_headers,

tests/integration/annotations/test_upload_annotations.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ def setUp(self, *args, **kwargs):
160160
],
161161
)
162162
project = sa.controller.get_project(self.PROJECT_NAME)
163-
time.sleep(4)
163+
# todo check
164+
# time.sleep(4)
164165
with open(self.EDITOR_TEMPLATE_PATH) as f:
165166
res = sa.controller.service_provider.projects.attach_editor_template(
166167
sa.controller.team, project, template=json.load(f)

tests/integration/items/test_attach_items.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,6 @@ def test_long_names_limitation_pass(self):
106106
}
107107
)
108108
sa.attach_items(self.PROJECT_NAME, csv_json)
109-
import time
110-
111-
time.sleep(4)
112109
items = sa.list_items(self.PROJECT_NAME, name__in=[i["name"] for i in csv_json])
113110

114111
assert {i["name"] for i in items} == {i["name"] for i in csv_json}

tests/integration/items/test_item_context.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ def setUp(self, *args, **kwargs):
3232
)
3333
team = sa.controller.team
3434
project = sa.controller.get_project(self.PROJECT_NAME)
35-
time.sleep(10)
35+
# todo check
36+
# time.sleep(10)
3637
with open(self.EDITOR_TEMPLATE_PATH) as f:
3738
res = sa.controller.service_provider.projects.attach_editor_template(
3839
team, project, template=json.load(f)
@@ -53,7 +54,7 @@ def _base_test(self, path, item):
5354
assert ic.get_component_value("component_id_1") is None
5455
ic.set_component_value("component_id_1", "value")
5556
with self.assertRaisesRegexp(
56-
FileChangedError, "The file has changed and overwrite is set to False."
57+
FileChangedError, "The file has changed and overwrite is set to False."
5758
):
5859
with sa.item_context(path, item, overwrite=False) as ic:
5960
assert ic.get_component_value("component_id_1") == "value"
@@ -65,12 +66,12 @@ def _base_test(self, path, item):
6566
def test_overwrite_false(self):
6667
# test root by folder name
6768
self._attach_item(self.PROJECT_NAME, "dummy")
68-
time.sleep(2)
69+
# time.sleep(2)
6970
self._base_test(self.PROJECT_NAME, "dummy")
7071

7172
folder = sa.create_folder(self.PROJECT_NAME, folder_name="folder")
7273
# test from folder by project and folder names
73-
time.sleep(2)
74+
# time.sleep(2)
7475
path = f"{self.PROJECT_NAME}/folder"
7576
self._attach_item(path, "dummy")
7677
self._base_test(path, "dummy")
@@ -107,7 +108,7 @@ def setUp(self, *args, **kwargs):
107108
)
108109
team = sa.controller.team
109110
project = sa.controller.get_project(self.PROJECT_NAME)
110-
time.sleep(10)
111+
# time.sleep(10)
111112
with open(self.EDITOR_TEMPLATE_PATH) as f:
112113
res = sa.controller.service_provider.projects.attach_editor_template(
113114
team, project, template=json.load(f)

tests/integration/items/test_list_items.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ def setUp(self, *args, **kwargs):
9292
],
9393
)
9494
project = sa.controller.get_project(self.PROJECT_NAME)
95-
time.sleep(10)
9695
with open(self.EDITOR_TEMPLATE_PATH) as f:
9796
res = sa.controller.service_provider.projects.attach_editor_template(
9897
sa.controller.team, project, template=json.load(f)

tests/integration/work_management/test_user_custom_fields.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ def test_list_users(self):
142142
custom_field_name="SDK_test_date_picker",
143143
value=value,
144144
)
145-
time.sleep(1)
146145
scapegoat = sa.list_users(
147146
include=["custom_fields"],
148147
email=scapegoat["email"],

0 commit comments

Comments
 (0)