Skip to content

Commit 4a5949e

Browse files
chore: FIT-1100: sync SDK (#688)
Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com>
1 parent 5d16490 commit 4a5949e

9 files changed

Lines changed: 66 additions & 11 deletions

poetry.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "label-studio-sdk"
33

44
[tool.poetry]
55
name = "label-studio-sdk"
6-
version = "2.0.15"
6+
version = "2.0.16"
77
description = ""
88
readme = "README.md"
99
authors = []

reference.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1521,10 +1521,10 @@ client.annotations.list(
15211521
<dd>
15221522

15231523

1524-
Add annotations to a task like an annotator does. The content of the result field depends on your
1525-
labeling configuration. For example, send the following data as part of your POST
1524+
Add annotations to a task like an annotator does. The content of the result field depends on your
1525+
labeling configuration. For example, send the following data as part of your POST
15261526
request to send an empty annotation with the ID of the user who completed the task:
1527-
1527+
15281528
```json
15291529
{
15301530
"result": {},
@@ -1533,7 +1533,7 @@ client.annotations.list(
15331533
"lead_time": 0,
15341534
"task": 0
15351535
"completed_by": 123
1536-
}
1536+
}
15371537
```
15381538

15391539
</dd>
@@ -10784,6 +10784,14 @@ client.tasks.create(
1078410784
<dl>
1078510785
<dd>
1078610786

10787+
**allow_skip:** `typing.Optional[bool]` — Whether this task can be skipped. Set to False to make task unskippable.
10788+
10789+
</dd>
10790+
</dl>
10791+
10792+
<dl>
10793+
<dd>
10794+
1078710795
**cancelled_annotations:** `typing.Optional[int]` — Number of total cancelled annotations for the current task
1078810796

1078910797
</dd>
@@ -11114,6 +11122,14 @@ client.tasks.update(
1111411122
<dl>
1111511123
<dd>
1111611124

11125+
**allow_skip:** `typing.Optional[bool]` — Whether this task can be skipped. Set to False to make task unskippable.
11126+
11127+
</dd>
11128+
</dl>
11129+
11130+
<dl>
11131+
<dd>
11132+
1111711133
**avg_lead_time:** `typing.Optional[float]`
1111811134

1111911135
</dd>

src/label_studio_sdk/tasks/client.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ def list(
291291
def create(
292292
self,
293293
*,
294+
allow_skip: typing.Optional[bool] = OMIT,
294295
cancelled_annotations: typing.Optional[int] = OMIT,
295296
comment_authors: typing.Optional[typing.Sequence[int]] = OMIT,
296297
comment_count: typing.Optional[int] = OMIT,
@@ -313,6 +314,9 @@ def create(
313314
314315
Parameters
315316
----------
317+
allow_skip : typing.Optional[bool]
318+
Whether this task can be skipped. Set to False to make task unskippable.
319+
316320
cancelled_annotations : typing.Optional[int]
317321
Number of total cancelled annotations for the current task
318322
@@ -381,6 +385,7 @@ def create(
381385
"api/tasks/",
382386
method="POST",
383387
json={
388+
"allow_skip": allow_skip,
384389
"cancelled_annotations": cancelled_annotations,
385390
"comment_authors": comment_authors,
386391
"comment_count": comment_count,
@@ -508,6 +513,7 @@ def update(
508513
self,
509514
id: str,
510515
*,
516+
allow_skip: typing.Optional[bool] = OMIT,
511517
avg_lead_time: typing.Optional[float] = OMIT,
512518
cancelled_annotations: typing.Optional[int] = OMIT,
513519
comment_count: typing.Optional[int] = OMIT,
@@ -539,6 +545,9 @@ def update(
539545
id : str
540546
Task ID
541547
548+
allow_skip : typing.Optional[bool]
549+
Whether this task can be skipped. Set to False to make task unskippable.
550+
542551
avg_lead_time : typing.Optional[float]
543552
544553
cancelled_annotations : typing.Optional[int]
@@ -613,6 +622,7 @@ def update(
613622
f"api/tasks/{jsonable_encoder(id)}/",
614623
method="PATCH",
615624
json={
625+
"allow_skip": allow_skip,
616626
"avg_lead_time": avg_lead_time,
617627
"cancelled_annotations": cancelled_annotations,
618628
"comment_count": comment_count,
@@ -1127,6 +1137,7 @@ async def main() -> None:
11271137
async def create(
11281138
self,
11291139
*,
1140+
allow_skip: typing.Optional[bool] = OMIT,
11301141
cancelled_annotations: typing.Optional[int] = OMIT,
11311142
comment_authors: typing.Optional[typing.Sequence[int]] = OMIT,
11321143
comment_count: typing.Optional[int] = OMIT,
@@ -1149,6 +1160,9 @@ async def create(
11491160
11501161
Parameters
11511162
----------
1163+
allow_skip : typing.Optional[bool]
1164+
Whether this task can be skipped. Set to False to make task unskippable.
1165+
11521166
cancelled_annotations : typing.Optional[int]
11531167
Number of total cancelled annotations for the current task
11541168
@@ -1228,6 +1242,7 @@ async def main() -> None:
12281242
"api/tasks/",
12291243
method="POST",
12301244
json={
1245+
"allow_skip": allow_skip,
12311246
"cancelled_annotations": cancelled_annotations,
12321247
"comment_authors": comment_authors,
12331248
"comment_count": comment_count,
@@ -1371,6 +1386,7 @@ async def update(
13711386
self,
13721387
id: str,
13731388
*,
1389+
allow_skip: typing.Optional[bool] = OMIT,
13741390
avg_lead_time: typing.Optional[float] = OMIT,
13751391
cancelled_annotations: typing.Optional[int] = OMIT,
13761392
comment_count: typing.Optional[int] = OMIT,
@@ -1402,6 +1418,9 @@ async def update(
14021418
id : str
14031419
Task ID
14041420
1421+
allow_skip : typing.Optional[bool]
1422+
Whether this task can be skipped. Set to False to make task unskippable.
1423+
14051424
avg_lead_time : typing.Optional[float]
14061425
14071426
cancelled_annotations : typing.Optional[int]
@@ -1484,6 +1503,7 @@ async def main() -> None:
14841503
f"api/tasks/{jsonable_encoder(id)}/",
14851504
method="PATCH",
14861505
json={
1506+
"allow_skip": allow_skip,
14871507
"avg_lead_time": avg_lead_time,
14881508
"cancelled_annotations": cancelled_annotations,
14891509
"comment_count": comment_count,

src/label_studio_sdk/types/import_api_request.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
from ..core.unchecked_base_model import UncheckedBaseModel
44
import typing
5-
from .annotation_request import AnnotationRequest
65
import pydantic
6+
from .annotation_request import AnnotationRequest
77
import datetime as dt
88
from .prediction_request import PredictionRequest
99
from ..core.pydantic_utilities import IS_PYDANTIC_V2
@@ -14,6 +14,11 @@ class ImportApiRequest(UncheckedBaseModel):
1414
Tasks serializer for Import API (TaskBulkCreateAPI)
1515
"""
1616

17+
allow_skip: typing.Optional[bool] = pydantic.Field(default=None)
18+
"""
19+
Whether this task can be skipped. Set to False to make task unskippable.
20+
"""
21+
1722
annotations: typing.Optional[typing.List[AnnotationRequest]] = None
1823
cancelled_annotations: typing.Optional[int] = pydantic.Field(default=None)
1924
"""

src/label_studio_sdk/types/lse_organization_member_list.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class LseOrganizationMemberList(UncheckedBaseModel):
1313
which fields should be displayed.
1414
"""
1515

16+
concurrency: typing.Optional[str] = None
1617
id: typing.Optional[int] = None
1718
organization: int = pydantic.Field()
1819
"""

src/label_studio_sdk/types/lse_task.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ class LseTask(UncheckedBaseModel):
1616

1717
agreement: typing.Optional[str] = None
1818
agreement_selected: typing.Optional[str] = None
19+
allow_skip: typing.Optional[bool] = pydantic.Field(default=None)
20+
"""
21+
Whether this task can be skipped. Set to False to make task unskippable.
22+
"""
23+
1924
annotations: typing.Optional[str] = None
2025
annotations_ids: typing.Optional[str] = None
2126
annotations_results: typing.Optional[str] = None

src/label_studio_sdk/types/lse_task_serializer_for_reviewers.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ class LseTaskSerializerForReviewers(UncheckedBaseModel):
1616

1717
agreement: typing.Optional[str] = None
1818
agreement_selected: typing.Optional[str] = None
19+
allow_skip: typing.Optional[bool] = pydantic.Field(default=None)
20+
"""
21+
Whether this task can be skipped. Set to False to make task unskippable.
22+
"""
23+
1924
annotations: typing.Optional[str] = None
2025
annotations_ids: typing.Optional[str] = None
2126
annotations_results: typing.Optional[str] = None

src/label_studio_sdk/types/organization_billing.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@
77

88

99
class OrganizationBilling(UncheckedBaseModel):
10+
enforce_session_concurrency: typing.Optional[str] = None
1011
manual_role_management: typing.Optional[str] = None
1112
manual_workspace_management: typing.Optional[str] = None
13+
max_parallel_sessions: typing.Optional[str] = None
14+
session_concurrency_window_seconds: typing.Optional[str] = None
1215

1316
if IS_PYDANTIC_V2:
1417
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2

0 commit comments

Comments
 (0)