File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
tests/unit/services/export Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 22from pathlib import Path
33from typing import Dict , List , Optional , Union
44
5- from kili_formats .types import Job
5+ from kili_formats .types import Job , JobTool
66
77
88def get_asset (
@@ -127,7 +127,7 @@ def angle_to_horizontal(point1: Dict, point2: Dict):
127127 },
128128 instruction = "dessert" ,
129129 isChild = False ,
130- tools = ["rectangle" ],
130+ tools = [JobTool . RECTANGLE ],
131131 mlTask = "OBJECT_DETECTION" ,
132132 models = None ,
133133 isVisible = True ,
@@ -141,7 +141,7 @@ def angle_to_horizontal(point1: Dict, point2: Dict):
141141 },
142142 instruction = "main course" ,
143143 isChild = False ,
144- tools = ["rectangle" ],
144+ tools = [JobTool . RECTANGLE ],
145145 mlTask = "OBJECT_DETECTION" ,
146146 models = None ,
147147 isVisible = True ,
Original file line number Diff line number Diff line change 33from pathlib import Path
44
55from kili_formats import convert_from_kili_to_coco_format
6+ from kili_formats .types import JobTool
67from PIL import Image
78
8- from kili .services .types import JobName
99from kili .utils .tempfile import TemporaryDirectory
1010
1111from .helpers import coco as helpers
@@ -21,7 +21,7 @@ def test__get_coco_image_annotations():
2121 Image .new ("RGB" , (image_width , image_height )).save (local_file_path )
2222 _ , paths = convert_from_kili_to_coco_format (
2323 jobs = {
24- JobName ( job_name ) : {
24+ job_name : {
2525 "mlTask" : "OBJECT_DETECTION" ,
2626 "content" : {
2727 "categories" : {
@@ -35,7 +35,7 @@ def test__get_coco_image_annotations():
3535 "isVisible" : True ,
3636 "models" : {},
3737 "required" : True ,
38- "tools" : ["semantic" ],
38+ "tools" : [JobTool . SEMANTIC ],
3939 }
4040 },
4141 assets = [
Original file line number Diff line number Diff line change @@ -513,6 +513,8 @@ def test_save_assets_export_with_external_id_containing_slash(
513513 exporter .project = {
514514 "id" : "fake_proj_id" ,
515515 "title" : "fake_proj_title" ,
516+ "description" : "fake_proj_description" ,
517+ "organizationId" : "fake_organization_id" ,
516518 "inputType" : "IMAGE" ,
517519 "jsonInterface" : {
518520 "jobs" : {
You can’t perform that action at this time.
0 commit comments