File tree Expand file tree Collapse file tree 4 files changed +199
-1
lines changed
src/superannotate/lib/core Expand file tree Collapse file tree 4 files changed +199
-1
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ class ProjectType(BaseTitledEnum):
9393 TILED = "Tiled" , 5
9494 OTHER = "Other" , 6
9595 POINT_CLOUD = "PointCloud" , 7
96+ CUSTOM_EDITOR = "CustomEditor" , 8
9697
9798 @classproperty
9899 def images (self ):
Original file line number Diff line number Diff line change @@ -306,6 +306,8 @@ def validate_project_type(self):
306306 raise ValidationError ("Unsupported project type." )
307307
308308 def _validate_json (self , json_data : dict ) -> list :
309+ if self ._project .type >= constants .ProjectType .PIXEL .value :
310+ return []
309311 use_case = ValidateAnnotationUseCase (
310312 reporter = self .reporter ,
311313 team_id = self ._project .team_id ,
@@ -571,7 +573,7 @@ def get_annotation_from_s3(bucket, path: str):
571573
572574 def prepare_annotation (self , annotation : dict , size ) -> dict :
573575 errors = None
574- if size < BIG_FILE_THRESHOLD :
576+ if size < BIG_FILE_THRESHOLD and self . _project . type < constants . ProjectType . PIXEL . value :
575577 use_case = ValidateAnnotationUseCase (
576578 reporter = self .reporter ,
577579 team_id = self ._project .team_id ,
Original file line number Diff line number Diff line change 1+ import os
2+ from src .superannotate import SAClient
3+
4+ os .environ .update (
5+ {
6+ "SA_URL" : "https://api.devsuperannotate.com" ,
7+ "SA_TOKEN" : '200069c36c5e3cc4ed13015796ad36a61db1e9692626d5650af96ca61d0c8ad04bccf4d4320520det=37808'
8+ }
9+ )
10+
11+ sa = SAClient ()
12+
13+
14+ def test_ ():
15+ sa .upload_annotations_from_folder_to_project ('CSV testing' , '/Users/vaghinak.basentsyan/www/superannotate-python-sdk/tests/integration/tmp' )
Original file line number Diff line number Diff line change 1+ {
2+ "metadata" : {
3+ "lastAction" : {
4+ "email" : " davit@superannotate.com" ,
5+ "timestamp" : 1681279853516
6+ },
7+ "name" : " item_002" ,
8+ "projectId" : 536528
9+ },
10+ "instances" : [
11+ {
12+ "id" : " 17530de5-1e0b-466b-8404-1e873ae39671" ,
13+ "type" : " paragraph" ,
14+ "classId" : 4994993 ,
15+ "attributes" : [],
16+ "element_path" : [
17+ " title"
18+ ]
19+ },
20+ {
21+ "id" : " 5a0c3c9f-57b6-4b51-953e-d8dc6a910db3" ,
22+ "type" : " paragraph" ,
23+ "classId" : 4994994 ,
24+ "attributes" : [],
25+ "element_path" : [
26+ " col_1"
27+ ]
28+ },
29+ {
30+ "id" : " 52a4d0dd-d2bf-4133-8be0-b84108a6f25e" ,
31+ "type" : " paragraph" ,
32+ "classId" : 4994995 ,
33+ "attributes" : [],
34+ "element_path" : [
35+ " col_2"
36+ ]
37+ },
38+ {
39+ "id" : " ea600778-0ee9-4da9-9b48-655e63ae2d21" ,
40+ "type" : " paragraph" ,
41+ "classId" : 4994996 ,
42+ "attributes" : [],
43+ "element_path" : [
44+ " col_3"
45+ ]
46+ },
47+ {
48+ "id" : " 16bd5f66-b483-4422-b385-23ffc8dfb2bf" ,
49+ "type" : " paragraph" ,
50+ "classId" : 4994997 ,
51+ "attributes" : [],
52+ "element_path" : [
53+ " col_class"
54+ ]
55+ },
56+ {
57+ "id" : " bf2e0984-456c-4355-b334-4efb330355ca" ,
58+ "type" : " textarea" ,
59+ "classId" : 4994998 ,
60+ "attributes" : [
61+ {
62+ "groupId" : 4719160 ,
63+ "name" : " Value 1"
64+ }
65+ ],
66+ "element_path" : [
67+ " csv_row" ,
68+ 0 ,
69+ " col_1_val"
70+ ]
71+ },
72+ {
73+ "id" : " b6d7d53f-5325-4947-a537-0084461f020e" ,
74+ "type" : " textarea" ,
75+ "classId" : 4994999 ,
76+ "attributes" : [
77+ {
78+ "groupId" : 4719161 ,
79+ "name" : " Value 2"
80+ }
81+ ],
82+ "element_path" : [
83+ " csv_row" ,
84+ 0 ,
85+ " col_2_val"
86+ ]
87+ },
88+ {
89+ "id" : " 8cc9f1f2-9e4c-4610-9102-655f7307bf9c" ,
90+ "type" : " textarea" ,
91+ "classId" : 4995000 ,
92+ "attributes" : [
93+ {
94+ "groupId" : 4719162 ,
95+ "name" : " Value 3"
96+ }
97+ ],
98+ "element_path" : [
99+ " csv_row" ,
100+ 0 ,
101+ " col_3_val"
102+ ]
103+ },
104+ {
105+ "id" : " a1f6e2cd-6d6c-4196-b21a-99cc3506a9fd" ,
106+ "type" : " select" ,
107+ "classId" : 4995001 ,
108+ "attributes" : [
109+ {
110+ "groupId" : 4719163 ,
111+ "id" : 9846744
112+ }
113+ ],
114+ "element_path" : [
115+ " csv_row" ,
116+ 0 ,
117+ " row_class"
118+ ]
119+ },
120+ {
121+ "id" : " bf2e0984-456c-4355-b334-4efb330355ca" ,
122+ "type" : " textarea" ,
123+ "classId" : 4994998 ,
124+ "attributes" : [
125+ {
126+ "groupId" : 4719160 ,
127+ "name" : " Row 1 Value 1"
128+ }
129+ ],
130+ "element_path" : [
131+ " csv_row" ,
132+ 1 ,
133+ " col_1_val"
134+ ]
135+ },
136+ {
137+ "id" : " b6d7d53f-5325-4947-a537-0084461f020e" ,
138+ "type" : " textarea" ,
139+ "classId" : 4994999 ,
140+ "attributes" : [
141+ {
142+ "groupId" : 4719161 ,
143+ "name" : " Row 1 Value 2"
144+ }
145+ ],
146+ "element_path" : [
147+ " csv_row" ,
148+ 1 ,
149+ " col_2_val"
150+ ]
151+ },
152+ {
153+ "id" : " 8cc9f1f2-9e4c-4610-9102-655f7307bf9c" ,
154+ "type" : " textarea" ,
155+ "classId" : 4995000 ,
156+ "attributes" : [
157+ {
158+ "groupId" : 4719162 ,
159+ "name" : " Row 1 Value 3"
160+ }
161+ ],
162+ "element_path" : [
163+ " csv_row" ,
164+ 1 ,
165+ " col_3_val"
166+ ]
167+ },
168+ {
169+ "id" : " a1f6e2cd-6d6c-4196-b21a-99cc3506a9fd" ,
170+ "type" : " select" ,
171+ "classId" : 4995001 ,
172+ "attributes" : [],
173+ "element_path" : [
174+ " csv_row" ,
175+ 1 ,
176+ " row_class"
177+ ]
178+ }
179+ ]
180+ }
You can’t perform that action at this time.
0 commit comments