Skip to content

Commit c4e1595

Browse files
authored
Hotfix (#3)
* require up-to-date requests lib * annotation min_width, min_height params * update version
1 parent 35ef51b commit c4e1595

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

scaleapi/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
'comparison': {'attachments', 'attachment_type',
1414
'fields', 'choices'},
1515
'annotation': {'attachment', 'attachment_type', 'instruction',
16-
'objects_to_annotate', 'with_labels', 'examples'},
16+
'objects_to_annotate', 'with_labels', 'examples',
17+
'min_width', 'min_height'},
1718
'polygonannotation': {'attachment', 'attachment_type', 'instruction',
1819
'objects_to_annotate', 'with_labels', 'examples'},
1920
'lineannotation': {'attachment', 'attachment_type', 'instruction',

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[metadata]
2-
description-file = README.md
2+
description-file = README.rst

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
setup(
33
name = 'scaleapi',
44
packages = ['scaleapi'],
5-
version = '0.1.6',
5+
version = '0.1.7',
66
description = 'The official Python client library for the Scale API, the API for human labor.',
77
author = 'Calvin Huang',
88
author_email = 'c@lvin.me',
99
url = 'https://github.com/scaleapi/scaleapi-python-client',
1010
download_url = 'https://github.com/scaleapi/scaleapi-python-client/tarball/0.1.2',
1111
keywords = ['scale', 'scaleapi', 'humans', 'tasks', 'categorization', 'transcription', 'annotation', 'comparison', 'data collection', 'phone call', 'audio transcription'],
12-
install_requires = ['requests', 'enum34'],
12+
install_requires = ['requests>=2.4.2', 'enum34'],
1313
classifiers = ['Programming Language :: Python :: 2.7',
1414
'Programming Language :: Python :: 3.5',
1515
'License :: OSI Approved :: MIT License',

tests/test_client.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,19 @@ def test_annotation_ok():
106106
instruction='Draw a box around each **baby cow** and **big cow**',
107107
attachment_type='image',
108108
attachment='http://i.imgur.com/v4cBreD.jpg',
109+
min_width='30',
110+
min_height='30',
109111
objects_to_annotate=['baby cow', 'big cow'],
110112
with_labels=True)
113+
# min_width and min_height should be optional
114+
task2 = client.create_annotation_task(
115+
callback_url='http://www.example.com/callback',
116+
instruction='Draw a box around each **baby cow** and **big cow**',
117+
attachment_type='image',
118+
attachment='http://i.imgur.com/v4cBreD.jpg',
119+
objects_to_annotate=['baby cow', 'big cow'],
120+
with_labels=True)
121+
111122

112123

113124
def test_annotation_fail():

0 commit comments

Comments
 (0)