Skip to content

Commit 9ffc5c6

Browse files
authored
Merge pull request #120 from Labelbox/develop
2.5.0 Release
2 parents 144c624 + 95672b7 commit 9ffc5c6

24 files changed

+2041
-353
lines changed

CHANGELOG.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
# Changelog
22

3-
## In progress
3+
## Version 2.5.0 (2021-03-15)
44
### Fix
5-
* Custom queries with bad syntax now raise adequate exceptions (InvalidQuery)
6-
* Comparing a Labelbox object (e.g. Project) to None doesn't raise an exception
7-
* Adding `order_by` to `Project.labels` doesn't raise an exception
5+
* `Dataset.data_row_for_external_id` No longer throws `ResourceNotFoundError` when there are duplicates
6+
* Improved doc strings
7+
8+
### Added
9+
* OntologyBuilder for making project setup easier
10+
* Now supports `IMAGE_OVERLAY` metadata
11+
* Webhooks for review topics added
12+
* Upload project instructions with `Project.upsert_instructions`
13+
* User input validation
14+
* MAL validity is now checked client side for faster feedback
15+
* type and value checks added in a few places
816

917
## Version 2.4.11 (2021-03-07)
1018
### Fix

Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
FROM python:3.7
22

3-
RUN pip install pytest
3+
RUN pip install pytest pytest-cases
44

5-
COPY . /usr/src/labelbox
65
WORKDIR /usr/src/labelbox
6+
COPY requirements.txt /usr/src/labelbox
7+
RUN pip install -r requirements.txt
8+
COPY . /usr/src/labelbox
9+
710

811
RUN python setup.py install

labelbox/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name = "labelbox"
2-
__version__ = "2.4.11"
2+
__version__ = "2.5.0"
33

44
from labelbox.client import Client
55
from labelbox.schema.bulk_import_request import BulkImportRequest

labelbox/exceptions.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,12 @@ class MalformedQueryException(Exception):
104104
class UuidError(LabelboxError):
105105
""" Raised when there are repeat Uuid's in bulk import request."""
106106
pass
107+
108+
109+
class InconsistentOntologyException(Exception):
110+
pass
111+
112+
113+
class MALValidationError(LabelboxError):
114+
"""Raised when user input is invalid for MAL imports."""
115+
...

labelbox/schema/asset_metadata.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from enum import Enum
2+
13
from labelbox.orm.db_object import DbObject
24
from labelbox.orm.model import Field
35

@@ -9,9 +11,16 @@ class AssetMetadata(DbObject):
911
meta_type (str): IMAGE, VIDEO, TEXT, or IMAGE_OVERLAY
1012
meta_value (str): URL to an external file or a string of text
1113
"""
12-
VIDEO = "VIDEO"
13-
IMAGE = "IMAGE"
14-
TEXT = "TEXT"
14+
15+
class MetaType(Enum):
16+
VIDEO = "VIDEO"
17+
IMAGE = "IMAGE"
18+
TEXT = "TEXT"
19+
IMAGE_OVERLAY = "IMAGE_OVERLAY"
20+
21+
# For backwards compatibility
22+
for topic in MetaType:
23+
vars()[topic.name] = topic.value
1524

1625
meta_type = Field.String("meta_type")
1726
meta_value = Field.String("meta_value")

0 commit comments

Comments
 (0)