Skip to content

Commit 87814b8

Browse files
committed
SDK regeneration
1 parent bed0f17 commit 87814b8

File tree

5 files changed

+17
-16
lines changed

5 files changed

+17
-16
lines changed

.mock/definition/__package__.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4986,8 +4986,8 @@ types:
49864986
openapi: openapi/openapi.yaml
49874987
MetricParam:
49884988
properties:
4989-
agreement_threshold: string
4990-
allowed: string
4989+
agreement_threshold: optional<integer>
4990+
allowed: boolean
49914991
max_additional_annotators_assignable:
49924992
type: optional<integer>
49934993
docs: >-

.mock/definition/projects/metrics.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ service:
2222
id: 1
2323
response:
2424
body:
25-
agreement_threshold: agreement_threshold
26-
allowed: allowed
25+
agreement_threshold: 1
26+
allowed: true
2727
max_additional_annotators_assignable: 1
2828
metric_name: metric_name
2929
metric_params:
@@ -68,8 +68,8 @@ service:
6868
request: {}
6969
response:
7070
body:
71-
agreement_threshold: agreement_threshold
72-
allowed: allowed
71+
agreement_threshold: 1
72+
allowed: true
7373
max_additional_annotators_assignable: 1
7474
metric_name: metric_name
7575
metric_params:

.mock/openapi/openapi.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22527,11 +22527,12 @@ components:
2252722527
MetricParam:
2252822528
properties:
2252922529
agreement_threshold:
22530+
nullable: true
2253022531
readOnly: true
22531-
type: string
22532+
type: integer
2253222533
allowed:
2253322534
readOnly: true
22534-
type: string
22535+
type: boolean
2253522536
max_additional_annotators_assignable:
2253622537
description: Maximum number of additional annotators that can be assigned to a low agreement task
2253722538
maximum: 2147483647

src/label_studio_sdk/types/metric_param.py

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

88

99
class MetricParam(UncheckedBaseModel):
10-
agreement_threshold: str
11-
allowed: str
10+
agreement_threshold: typing.Optional[int] = None
11+
allowed: bool
1212
max_additional_annotators_assignable: typing.Optional[int] = pydantic.Field(default=None)
1313
"""
1414
Maximum number of additional annotators that can be assigned to a low agreement task

tests/projects/test_metrics.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88

99
async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None:
1010
expected_response: typing.Any = {
11-
"agreement_threshold": "agreement_threshold",
12-
"allowed": "allowed",
11+
"agreement_threshold": 1,
12+
"allowed": True,
1313
"max_additional_annotators_assignable": 1,
1414
"metric_name": "metric_name",
1515
"metric_params": {"key": "value"},
1616
}
1717
expected_types: typing.Any = {
18-
"agreement_threshold": None,
18+
"agreement_threshold": "integer",
1919
"allowed": None,
2020
"max_additional_annotators_assignable": "integer",
2121
"metric_name": None,
@@ -30,14 +30,14 @@ async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None:
3030

3131
async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> None:
3232
expected_response: typing.Any = {
33-
"agreement_threshold": "agreement_threshold",
34-
"allowed": "allowed",
33+
"agreement_threshold": 1,
34+
"allowed": True,
3535
"max_additional_annotators_assignable": 1,
3636
"metric_name": "metric_name",
3737
"metric_params": {"key": "value"},
3838
}
3939
expected_types: typing.Any = {
40-
"agreement_threshold": None,
40+
"agreement_threshold": "integer",
4141
"allowed": None,
4242
"max_additional_annotators_assignable": "integer",
4343
"metric_name": None,

0 commit comments

Comments
 (0)