Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/superannotate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
import os
import sys

__version__ = "4.4.14dev3"
__version__ = "4.4.14b1"


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

Expand Down
1 change: 1 addition & 0 deletions src/superannotate/lib/core/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class ProjectType(BaseTitledEnum):
TILED = "Tiled", 5
OTHER = "Other", 6
POINT_CLOUD = "PointCloud", 7
CUSTOM_EDITOR = "CustomEditor", 8

@classproperty
def images(self):
Expand Down
12 changes: 12 additions & 0 deletions src/superannotate/lib/core/service_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,18 @@ class Limit(BaseModel):
max_image_count: Optional[int]
remaining_image_count: int

class Config:
extra = Extra.ignore


class UserLimits(BaseModel):
user_limit: Optional[Limit]
project_limit: Limit
folder_limit: Limit

class Config:
extra = Extra.ignore


class UploadAnnotationAuthData(BaseModel):
access_key: str
Expand Down Expand Up @@ -80,12 +86,18 @@ class Resource(BaseModel):
failed_items: List[str] = Field([], alias="failedItems")
missing_resources: Resource = Field({}, alias="missingResources")

class Config:
extra = Extra.ignore


class UploadCustomFieldValues(BaseModel):
succeeded_items: Optional[List[Any]]
failed_items: Optional[List[str]]
error: Optional[Any]

class Config:
extra = Extra.ignore


class ServiceResponse(BaseModel):
status: Optional[int]
Expand Down
4 changes: 3 additions & 1 deletion src/superannotate/lib/core/usecases/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,8 @@ def validate_project_type(self):
raise ValidationError("Unsupported project type.")

def _validate_json(self, json_data: dict) -> list:
if self._project.type >= constants.ProjectType.PIXEL.value:
return []
use_case = ValidateAnnotationUseCase(
reporter=self.reporter,
team_id=self._project.team_id,
Expand Down Expand Up @@ -571,7 +573,7 @@ def get_annotation_from_s3(bucket, path: str):

def prepare_annotation(self, annotation: dict, size) -> dict:
errors = None
if size < BIG_FILE_THRESHOLD:
if size < BIG_FILE_THRESHOLD and self._project.type < constants.ProjectType.PIXEL.value:
use_case = ValidateAnnotationUseCase(
reporter=self.reporter,
team_id=self._project.team_id,
Expand Down