Skip to content

Commit

Permalink
add unit test for MIG label config export formats
Browse files Browse the repository at this point in the history
  • Loading branch information
jombooth committed Nov 16, 2024
1 parent 66999b1 commit a566db3
Showing 1 changed file with 105 additions and 0 deletions.
105 changes: 105 additions & 0 deletions label_studio/tests/export.tavern.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ stages:
response:
status_code: 200


---
test_name: YOLO_export_option_polygons
strict: true
Expand Down Expand Up @@ -173,3 +174,107 @@ stages:
name: 'ASR_MANIFEST'
disabled: true
status_code: 200


---
test_name: mig_export
strict: false
marks:
- usefixtures:
- django_live_url
stages:
- id: signup
type: ref
- name: stage
request:
headers:
content-type: application/json
json:
label_config:
<View>
<Image name="image" valueList="$images"/>
<RectangleLabels name="labels" toName="image">
<Label value="Cat"/>
<Label value="Dog"/>
</RectangleLabels>
</View>
method: POST
url: '{django_live_url}/api/projects'
response:
save:
json:
pk: id
status_code: 201
- name: stage_export
request:
method: GET
url: '{django_live_url}/api/projects/{pk}/export/formats'
response:
strict:
- json:list_any_order
json:
- title: 'JSON'
description: !anystr
link: 'https://labelstud.io/guide/export.html#JSON'
name: 'JSON'
- title: 'JSON-MIN'
description: !anystr
link: 'https://labelstud.io/guide/export.html#JSON-MIN'
name: 'JSON_MIN'
- title: 'CSV'
description: !anystr
link: 'https://labelstud.io/guide/export.html#CSV'
name: 'CSV'
- title: 'TSV'
description: !anystr
link: 'https://labelstud.io/guide/export.html#TSV'
name: 'TSV'
- title: 'COCO'
description: !anystr
link: 'https://labelstud.io/guide/export.html#COCO'
tags: ['image segmentation', 'object detection']
name: 'COCO'
disabled: true
- title: 'YOLO'
description: !anystr
link: 'https://labelstud.io/guide/export.html#YOLO'
tags: ['image segmentation', 'object detection']
name: 'YOLO'
disabled: true
- title: 'YOLOv8 OBB'
description: !anystr
link: 'https://labelstud.io/guide/export.html#YOLO'
tags: ['image segmentation', 'object detection']
name: 'YOLO_OBB'
disabled: true
- title: 'CONLL2003'
description: !anystr
link: 'https://labelstud.io/guide/export.html#CONLL2003'
tags: ['sequence labeling', 'text tagging', 'named entity recognition']
name: 'CONLL2003'
disabled: true
- title: 'Pascal VOC XML'
description: !anystr
link: 'https://labelstud.io/guide/export.html#Pascal-VOC-XML'
tags: ['image segmentation', 'object detection']
name: 'VOC'
disabled: true
- title: 'Brush labels to NumPy'
description: !anystr
link: 'https://labelstud.io/guide/export.html#Brush-labels-to-NumPy-amp-PNG'
tags: ['image segmentation']
name: 'BRUSH_TO_NUMPY'
disabled: true
- title: 'Brush labels to PNG'
description: !anystr
link: 'https://labelstud.io/guide/export.html#Brush-labels-to-NumPy-amp-PNG'
tags: ['image segmentation']
name: 'BRUSH_TO_PNG'
disabled: true
- title: 'ASR Manifest'
description: !anystr
link: 'https://labelstud.io/guide/export.html#ASR-MANIFEST'
tags: ['speech recognition']
name: 'ASR_MANIFEST'
disabled: true
status_code: 200

0 comments on commit a566db3

Please sign in to comment.