Skip to content

Commit 85eff0f

Browse files
Merge branch 'master' of https://github.com/watson-developer-cloud/python-sdk into unittest
2 parents 7b965f6 + 6149667 commit 85eff0f

25 files changed

+109
-176
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.16.1
2+
current_version = 0.18.0
33
commit = True
44
tag = True
55

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,26 @@
11
Change Log
22
==========
33

4+
## Version 0.18.0
5+
6+
_2016-07-22_
7+
8+
* Added: Retraining for Visual Recognition classifiers
9+
* Added: Using custom models for Alchemy Language entities
10+
11+
## Version 0.17.1
12+
13+
_2016-07-17_
14+
15+
* Fixed: `x_watson_learning_opt_out` value
16+
17+
## Version 0.17.0
18+
19+
_2016-07-14_
20+
21+
* Fixed: Conversation default url
22+
* Added: `x_watson_learning_opt_out` option on the WatsonDeveloperCloud service
23+
424
## Version 0.16.0
525

626
_2016-07-12_

examples/concept_insights_v2.py

Lines changed: 0 additions & 120 deletions
This file was deleted.

examples/conversation_v1.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import json
22
from watson_developer_cloud import ConversationV1
33

4-
54
conversation = ConversationV1(
65
username='YOUR SERVICE USERNAME',
76
password='YOUR SERVICE PASSWORD',

examples/retrieve_and_rank_v1.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@
3838
collections = retrieve_and_rank.list_collections(solr_cluster_id=solr_cluster_id)
3939
print(json.dumps(collections, indent=2))
4040

41-
pysolr_client = retrieve_and_rank.get_pysolr_client(solr_cluster_id, 'test-collection')
41+
pysolr_client = retrieve_and_rank.get_pysolr_client(solr_cluster_id, collections['collections'][0])
42+
# Can also refer to config by name
43+
4244
results = pysolr_client.search('bananas')
4345
print('{0} documents found'.format(len(results.docs)))
4446

examples/speech_to_text_v1.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55

66
speech_to_text = SpeechToTextV1(
77
username='YOUR SERVICE USERNAME',
8-
password='YOUR SERVICE PASSWORD')
8+
password='YOUR SERVICE PASSWORD',
9+
x_watson_learning_opt_out=False
10+
)
911

1012
print(json.dumps(speech_to_text.models(), indent=2))
1113

1214
with open(join(dirname(__file__), '../resources/speech.wav'), 'rb') as audio_file:
1315
print(json.dumps(speech_to_text.recognize(
14-
audio_file, content_type='audio/wav'), indent=2))
16+
audio_file, content_type='audio/wav', timestamps=True), indent=2))

examples/text_to_speech_v1.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66

77
text_to_speech = TextToSpeechV1(
88
username='YOUR SERVICE USERNAME',
9-
password='YOUR SERVICE PASSWORD')
9+
password='YOUR SERVICE PASSWORD',
10+
x_watson_learning_opt_out=True) # Optional flag
1011

1112
print(json.dumps(text_to_speech.voices(), indent=2))
1213

examples/visual_recognition_v3.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@
1212
# print(json.dumps(visual_recognition.create_classifier('Cars vs Trucks', cars_positive_examples=cars,
1313
# negative_examples=trucks), indent=2))
1414

15-
# with open(join(dirname(__file__), '../resources/car.jpg'), 'rb') as image_file:
16-
# print(json.dumps(visual_recognition.classify(images_file=image_file, threshold=0.1,
17-
# classifier_ids=['CarsvsTrucks_1675727418', 'default']), indent=2))
15+
with open(join(dirname(__file__), '../resources/car.jpg'), 'rb') as image_file:
16+
print(json.dumps(visual_recognition.classify(images_file=image_file, threshold=0.1,
17+
classifier_ids=['CarsvsTrucks_1675727418', 'default']), indent=2))
1818

1919
# print(json.dumps(visual_recognition.get_classifier('YOUR CLASSIFIER ID'), indent=2))
2020

21+
# with open(join(dirname(__file__), '../resources/car.jpg'), 'rb') as image_file:
22+
# print(json.dumps(visual_recognition.update_classifier('CarsvsTrucks_1479118188',
23+
# cars_positive_examples=image_file), indent=2))
24+
2125
print(json.dumps(visual_recognition.classify(images_url=test_url), indent=2))
2226

2327
print(json.dumps(visual_recognition.detect_faces(images_url=test_url), indent=2))

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import os
2020
import sys
2121

22-
__version__ = '0.16.1'
22+
__version__ = '0.18.0'
2323

2424
if sys.argv[-1] == 'publish':
2525
# test server

test/test_examples.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111

1212
# tests to exclude
1313
excludes = ['authorization_v1.py', 'alchemy_data_news_v1.py',
14-
'alchemy_language_v1.py', 'alchemy_vision_v1.py']
14+
'alchemy_language_v1.py', 'alchemy_vision_v1.py',
15+
'concept_insights_v2.py']
1516

1617
# examples path. /examples
1718
examples_path = join(dirname(__file__), '../', 'examples', '*.py')

0 commit comments

Comments
 (0)