Skip to content

Commit 722627f

Browse files
authored
Merge pull request #631 from superannotateai/friday
Friday
2 parents dd83913 + cf98291 commit 722627f

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

src/superannotate/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
import os
33
import sys
44

5-
__version__ = "4.4.14dev3"
5+
__version__ = "4.4.14b1"
6+
67

78
sys.path.append(os.path.split(os.path.realpath(__file__))[0])
89

src/superannotate/lib/core/enums.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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):

src/superannotate/lib/core/service_types.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,18 @@ class Limit(BaseModel):
1515
max_image_count: Optional[int]
1616
remaining_image_count: int
1717

18+
class Config:
19+
extra = Extra.ignore
20+
1821

1922
class UserLimits(BaseModel):
2023
user_limit: Optional[Limit]
2124
project_limit: Limit
2225
folder_limit: Limit
2326

27+
class Config:
28+
extra = Extra.ignore
29+
2430

2531
class UploadAnnotationAuthData(BaseModel):
2632
access_key: str
@@ -80,12 +86,18 @@ class Resource(BaseModel):
8086
failed_items: List[str] = Field([], alias="failedItems")
8187
missing_resources: Resource = Field({}, alias="missingResources")
8288

89+
class Config:
90+
extra = Extra.ignore
91+
8392

8493
class UploadCustomFieldValues(BaseModel):
8594
succeeded_items: Optional[List[Any]]
8695
failed_items: Optional[List[str]]
8796
error: Optional[Any]
8897

98+
class Config:
99+
extra = Extra.ignore
100+
89101

90102
class ServiceResponse(BaseModel):
91103
status: Optional[int]

src/superannotate/lib/core/usecases/annotations.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
 (0)