Skip to content

Commit 54fa398

Browse files
[SDK-513] Update tests to include value attribute in exports v2 (#1372)
2 parents c13c007 + 30bc3be commit 54fa398

File tree

1 file changed

+71
-9
lines changed

1 file changed

+71
-9
lines changed

tests/integration/annotation_import/fixtures/export_v2.py

Lines changed: 71 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ def expected_export_v2_image():
77
'objects': [{
88
'name':
99
'polygon',
10+
'value':
11+
'polygon',
1012
'annotation_kind':
1113
'ImagePolygon',
1214
'classifications': [],
@@ -28,11 +30,14 @@ def expected_export_v2_image():
2830
}]
2931
}, {
3032
'name': 'bbox',
33+
'value': 'bbox',
3134
'annotation_kind': 'ImageBoundingBox',
3235
'classifications': [{
3336
'name': 'nested',
37+
'value': 'nested',
3438
'radio_answer': {
3539
'name': 'radio_option_1',
40+
'value': 'radio_value_1',
3641
'classifications': []
3742
}
3843
}],
@@ -44,6 +49,7 @@ def expected_export_v2_image():
4449
}
4550
}, {
4651
'name': 'polyline',
52+
'value': 'polyline',
4753
'annotation_kind': 'ImagePolyline',
4854
'classifications': [],
4955
'line': [{
@@ -55,13 +61,18 @@ def expected_export_v2_image():
5561
}]
5662
}],
5763
'classifications': [{
58-
'name': 'checklist',
64+
'name':
65+
'checklist',
66+
'value':
67+
'checklist',
5968
'checklist_answers': [{
6069
'name': 'option1',
70+
'value': 'option1',
6171
'classifications': []
6272
}]
6373
}, {
6474
'name': 'text',
75+
'value': 'text',
6576
'text_answer': {
6677
'content': 'free form text...'
6778
}
@@ -77,13 +88,18 @@ def expected_export_v2_audio():
7788
expected_annotations = {
7889
'objects': [],
7990
'classifications': [{
80-
'name': 'checklist',
91+
'name':
92+
'checklist',
93+
'value':
94+
'checklist',
8195
'checklist_answers': [{
8296
'name': 'option1',
97+
'value': 'option1',
8398
'classifications': []
8499
}]
85100
}, {
86101
'name': 'text',
102+
'value': 'text',
87103
'text_answer': {
88104
'content': 'free form text...'
89105
}
@@ -99,13 +115,18 @@ def expected_export_v2_html():
99115
'objects': [],
100116
'classifications': [{
101117
'name': 'text',
118+
'value': 'text',
102119
'text_answer': {
103120
'content': 'free form text...'
104121
}
105122
}, {
106-
'name': 'checklist',
123+
'name':
124+
'checklist',
125+
'value':
126+
'checklist',
107127
'checklist_answers': [{
108128
'name': 'option1',
129+
'value': 'option1',
109130
'classifications': []
110131
}]
111132
}],
@@ -119,6 +140,7 @@ def expected_export_v2_text():
119140
expected_annotations = {
120141
'objects': [{
121142
'name': 'named-entity',
143+
'value': 'named_entity',
122144
'annotation_kind': 'TextEntity',
123145
'classifications': [],
124146
'location': {
@@ -127,13 +149,18 @@ def expected_export_v2_text():
127149
}
128150
}],
129151
'classifications': [{
130-
'name': 'checklist',
152+
'name':
153+
'checklist',
154+
'value':
155+
'checklist',
131156
'checklist_answers': [{
132157
'name': 'option1',
158+
'value': 'option1',
133159
'classifications': []
134160
}]
135161
}, {
136162
'name': 'text',
163+
'value': 'text',
137164
'text_answer': {
138165
'content': 'free form text...'
139166
}
@@ -152,9 +179,13 @@ def expected_export_v2_video():
152179
},
153180
'key_frame_feature_map': {},
154181
'classifications': [{
155-
'name': 'checklist',
182+
'name':
183+
'checklist',
184+
'value':
185+
'checklist',
156186
'checklist_answers': [{
157187
'name': 'option1',
188+
'value': 'option1',
158189
'classifications': []
159190
}]
160191
}]
@@ -167,6 +198,7 @@ def expected_export_v2_conversation():
167198
expected_annotations = {
168199
'objects': [{
169200
'name': 'named-entity',
201+
'value': 'named_entity',
170202
'annotation_kind': 'ConversationalTextEntity',
171203
'classifications': [],
172204
'conversational_location': {
@@ -180,14 +212,18 @@ def expected_export_v2_conversation():
180212
'classifications': [{
181213
'name':
182214
'checklist_index',
215+
'value':
216+
'checklist_index',
183217
'message_id':
184218
'0',
185219
'conversational_checklist_answers': [{
186220
'name': 'option1_index',
221+
'value': 'option1_index',
187222
'classifications': []
188223
}]
189224
}, {
190225
'name': 'text_index',
226+
'value': 'text_index',
191227
'message_id': '0',
192228
'conversational_text_answer': {
193229
'content': 'free form text...'
@@ -211,6 +247,8 @@ def expected_export_v2_dicom():
211247
'<cuid>': {
212248
'name':
213249
'polyline',
250+
'value':
251+
'polyline',
214252
'annotation_kind':
215253
'DICOMPolyline',
216254
'classifications': [],
@@ -264,6 +302,7 @@ def expected_export_v2_document():
264302
expected_annotations = {
265303
'objects': [{
266304
'name': 'named-entity',
305+
'value': 'named_entity',
267306
'annotation_kind': 'DocumentEntityToken',
268307
'classifications': [],
269308
'location': {
@@ -288,11 +327,14 @@ def expected_export_v2_document():
288327
}
289328
}, {
290329
'name': 'bbox',
330+
'value': 'bbox',
291331
'annotation_kind': 'DocumentBoundingBox',
292332
'classifications': [{
293333
'name': 'nested',
334+
'value': 'nested',
294335
'radio_answer': {
295336
'name': 'radio_option_1',
337+
'value': 'radio_value_1',
296338
'classifications': []
297339
}
298340
}],
@@ -305,13 +347,18 @@ def expected_export_v2_document():
305347
}
306348
}],
307349
'classifications': [{
308-
'name': 'checklist',
350+
'name':
351+
'checklist',
352+
'value':
353+
'checklist',
309354
'checklist_answers': [{
310355
'name': 'option1',
356+
'value': 'option1',
311357
'classifications': []
312358
}]
313359
}, {
314360
'name': 'text',
361+
'value': 'text',
315362
'text_answer': {
316363
'content': 'free form text...'
317364
}
@@ -326,13 +373,18 @@ def expected_export_v2_llm_prompt_creation():
326373
expected_annotations = {
327374
'objects': [],
328375
'classifications': [{
329-
'name': 'checklist',
376+
'name':
377+
'checklist',
378+
'value':
379+
'checklist',
330380
'checklist_answers': [{
331381
'name': 'option1',
382+
'value': 'option1',
332383
'classifications': []
333384
}]
334385
}, {
335386
'name': 'text',
387+
'value': 'text',
336388
'text_answer': {
337389
'content': 'free form text...'
338390
}
@@ -347,13 +399,18 @@ def expected_export_v2_llm_prompt_response_creation():
347399
expected_annotations = {
348400
'objects': [],
349401
'classifications': [{
350-
'name': 'checklist',
402+
'name':
403+
'checklist',
404+
'value':
405+
'checklist',
351406
'checklist_answers': [{
352407
'name': 'option1',
408+
'value': 'option1',
353409
'classifications': []
354410
}]
355411
}, {
356412
'name': 'text',
413+
'value': 'text',
357414
'text_answer': {
358415
'content': 'free form text...'
359416
}
@@ -368,13 +425,18 @@ def expected_export_v2_llm_response_creation():
368425
expected_annotations = {
369426
'objects': [],
370427
'classifications': [{
371-
'name': 'checklist',
428+
'name':
429+
'checklist',
430+
'value':
431+
'checklist',
372432
'checklist_answers': [{
373433
'name': 'option1',
434+
'value': 'option1',
374435
'classifications': []
375436
}]
376437
}, {
377438
'name': 'text',
439+
'value': 'text',
378440
'text_answer': {
379441
'content': 'free form text...'
380442
}

0 commit comments

Comments
 (0)