Skip to content

Commit 805dedf

Browse files
Merge pull request #1963 from kili-technology/lab-3898-label
chore(LAB-3898): remove reviewedLabel deprecated field
2 parents 9c7c155 + 21b55ef commit 805dedf

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

src/kili/services/plugins/model.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,10 @@ def on_review(
8080
Args:
8181
label: Label submitted to Kili: a dictionary containing the following fields:
8282
`id`, `labelType`, `numberOfAnnotations`, `authorId`, `modelName`, `jsonResponse`,
83-
`secondsToLabel`, `isSentBackToQueue`, `search` and `reviewedLabel` (dictionary
84-
that has a field `id` representing the id of the original label that was reviewed).
85-
It also contains some technical fields: `createdAt`, `updatedAt`, `version`,
86-
`isLatestReviewLabelForUser`, `isLatestLabelForUser`, `isLatestDefaultLabelForUser`,
87-
`readPermissionsFromProject`.
83+
`secondsToLabel`, `isSentBackToQueue` and `search` (dictionary that has a field `id`
84+
representing the id of the original label that was reviewed). It also contains some
85+
technical fields: `createdAt`, `updatedAt`, `version`, `isLatestReviewLabelForUser`,
86+
`isLatestLabelForUser`, `isLatestDefaultLabelForUser`, `readPermissionsFromProject`.
8887
asset_id: Id of the asset on which the label was submitted
8988
9089
!!! example

tests/integration/adapters/kili_api_gateway/test_label.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,11 @@ def test_given_kili_gateway_when_adding_labels_then_it_calls_proper_resolver(
140140
"labelsData": [
141141
{
142142
"assetId": "fake_asset_id",
143-
"jsonResponse": r'{"CLASSIF_JOB": {}}',
144-
"secondsToLabel": 42,
145-
"modelName": "fake_model_name",
146-
"reviewedLabel": None,
147143
"authorId": "some_author_id",
148144
"clientVersion": None,
145+
"jsonResponse": r'{"CLASSIF_JOB": {}}',
146+
"modelName": "fake_model_name",
147+
"secondsToLabel": 42,
149148
}
150149
],
151150
},
@@ -168,11 +167,11 @@ def test_given_kili_gateway_when_adding_labels_by_batch_then_it_calls_proper_res
168167
labels_data=[
169168
AppendLabelData(
170169
asset_id=AssetId(f"fake_asset_id_{i}"),
171-
json_response={"CLASSIF_JOB": {}},
172170
author_id=UserId("some_author_id"),
173171
client_version=None,
174-
seconds_to_label=42,
172+
json_response={"CLASSIF_JOB": {}},
175173
model_name="fake_model_name",
174+
seconds_to_label=42,
176175
)
177176
for i in range(101)
178177
],
@@ -196,7 +195,6 @@ def test_given_kili_gateway_when_adding_labels_by_batch_then_it_calls_proper_res
196195
"jsonResponse": r'{"CLASSIF_JOB": {}}',
197196
"secondsToLabel": 42,
198197
"modelName": "fake_model_name",
199-
"reviewedLabel": None,
200198
"authorId": "some_author_id",
201199
"clientVersion": None,
202200
}

0 commit comments

Comments
 (0)