Skip to content

Commit b49ddf6

Browse files
committed
Replace VoiceIt3 with voiceit3
1 parent d7fe7e0 commit b49ddf6

5 files changed

Lines changed: 19 additions & 19 deletions

File tree

pypi.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
install_requires=[
2222
"requests",
2323
],
24-
url = "https://github.com/voiceittech/VoiceIt3-Python",
25-
download_url = "https://github.com/voiceittech/VoiceIt3-Python/archive/''' + new_version + '''.tar.gz",
24+
url = "https://github.com/voiceittech/voiceit3-Python",
25+
download_url = "https://github.com/voiceittech/voiceit3-Python/archive/''' + new_version + '''.tar.gz",
2626
keywords = ["biometrics", "voice verification", "voice biometrics"],
2727
classifiers = [
2828
"Programming Language :: Python :: 3",
@@ -40,7 +40,7 @@
4040
release_json = {'tag_name': new_version, 'target_commitish': 'master', 'name': new_version, 'body': '', 'draft': False, 'prerelease': False}
4141

4242
try:
43-
response = requests.post('https://api.github.com/repos/voiceittech/VoiceIt3-Python/releases', headers={'Authorization': 'token ' + gh_token}, data=json.dumps(release_json))
43+
response = requests.post('https://api.github.com/repos/voiceittech/voiceit3-Python/releases', headers={'Authorization': 'token ' + gh_token}, data=json.dumps(release_json))
4444
print(response.text)
4545
except requests.exceptions.HTTPError as e:
4646
print(e.read())

test_example.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#!/usr/bin/env python3
22
"""Full API test: create user, video enroll x3, video verify, cleanup"""
33
import os, sys
4-
from voiceit3 import VoiceIt3
4+
from voiceit3 import voiceit3
55

66
api_key = os.environ.get("VOICEIT_API_KEY", "")
77
api_token = os.environ.get("VOICEIT_API_TOKEN", "")
88
if not api_key or not api_token:
99
print("Set VOICEIT_API_KEY and VOICEIT_API_TOKEN"); sys.exit(1)
1010

11-
vi = VoiceIt3(api_key, api_token)
11+
vi = voiceit3(api_key, api_token)
1212
phrase = "Never forget tomorrow is a new day"
1313
td = "test-data"
1414
errors = 0

tests.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from voiceit3 import VoiceIt3
1+
from voiceit3 import voiceit3
22
import os
33
import unittest
44
import urllib
@@ -14,7 +14,7 @@
1414
def downloadVoiceItDriveFile(fileName):
1515
urllib.request.urlretrieve(VOICEIT_DRIVE_URL + fileName, fileName)
1616

17-
class TestVoiceIt3(unittest.TestCase):
17+
class Testvoiceit3(unittest.TestCase):
1818
@classmethod
1919
def setUpClass(cls):
2020
print('Started Downloading Test Files ...')
@@ -56,7 +56,7 @@ def setUpClass(cls):
5656
@classmethod
5757
def tearDownClass(cls):
5858
global groups_to_delete,users_to_delete
59-
my_voiceit = VoiceIt3(VI_KEY, VI_TOKEN)
59+
my_voiceit = voiceit3(VI_KEY, VI_TOKEN)
6060
for user_id in users_to_delete:
6161
my_voiceit.delete_user(user_id)
6262
for group_id in groups_to_delete:
@@ -97,7 +97,7 @@ def tearDownClass(cls):
9797
# Check if api key and token can be found in the environment variables
9898
def test_webhooks(self):
9999
print('Testing Notification URL')
100-
my_voiceit = VoiceIt3(VI_KEY, VI_TOKEN)
100+
my_voiceit = voiceit3(VI_KEY, VI_TOKEN)
101101
if os.environ['BOXFUSE_ENV'] == 'voiceittest':
102102
text_file = open(os.environ['HOME'] + '/platformVersion', "w")
103103
text_file.write(my_voiceit.version)
@@ -115,7 +115,7 @@ def test_api_key_token(self):
115115
self.assertNotEqual(VI_TOKEN, '')
116116

117117
def test_file_not_found(self):
118-
my_voiceit = VoiceIt3(VI_KEY, VI_TOKEN)
118+
my_voiceit = voiceit3(VI_KEY, VI_TOKEN)
119119
print('Testing File Not Found')
120120
print(' Testing File Not Found Enrollment')
121121
try:
@@ -175,7 +175,7 @@ def test_file_not_found(self):
175175
self.assertTrue(True)
176176

177177
def test_users(self):
178-
my_voiceit = VoiceIt3(VI_KEY, VI_TOKEN)
178+
my_voiceit = voiceit3(VI_KEY, VI_TOKEN)
179179
global users_to_delete
180180
print('Testing User API Calls')
181181

@@ -219,7 +219,7 @@ def test_users(self):
219219
self.assertEqual('SUCC', ret['responseCode'])
220220

221221
def test_sub_accounts(self):
222-
my_voiceit = VoiceIt3(VI_KEY, VI_TOKEN)
222+
my_voiceit = voiceit3(VI_KEY, VI_TOKEN)
223223
print('Testing Sub Account API Calls')
224224

225225
print(' Testing Create Unmanaged Sub Account')
@@ -247,7 +247,7 @@ def test_sub_accounts(self):
247247
ret = my_voiceit.delete_sub_account(managed_sub_account)
248248

249249
def test_phrases(self):
250-
my_voiceit = VoiceIt3(VI_KEY, VI_TOKEN)
250+
my_voiceit = voiceit3(VI_KEY, VI_TOKEN)
251251
print('Testing Phrase API Calls')
252252

253253
print(' Testing Get Phrases')
@@ -257,7 +257,7 @@ def test_phrases(self):
257257
self.assertGreaterEqual(len(ret['phrases']), 0)
258258

259259
def test_groups(self):
260-
my_voiceit = VoiceIt3(VI_KEY, VI_TOKEN)
260+
my_voiceit = voiceit3(VI_KEY, VI_TOKEN)
261261
global groups_to_delete,users_to_delete
262262
print('Test Group API Calls')
263263

@@ -304,7 +304,7 @@ def test_groups(self):
304304
self.assertEqual('SUCC', ret['responseCode'])
305305

306306
def test_enrollments(self):
307-
my_voiceit = VoiceIt3(VI_KEY, VI_TOKEN)
307+
my_voiceit = voiceit3(VI_KEY, VI_TOKEN)
308308
ret = my_voiceit.create_user()
309309
user_id = my_voiceit.create_user()['userId']
310310
users_to_delete.append(user_id)
@@ -367,7 +367,7 @@ def test_enrollments(self):
367367
self.assertEqual('SUCC', ret['responseCode'])
368368

369369
def test_verification(self):
370-
my_voiceit = VoiceIt3(VI_KEY, VI_TOKEN)
370+
my_voiceit = voiceit3(VI_KEY, VI_TOKEN)
371371
user_id = my_voiceit.create_user()['userId']
372372
users_to_delete.append(user_id)
373373
# Create 3 voice,face and video enrollments for user
@@ -414,7 +414,7 @@ def test_verification(self):
414414
self.assertEqual('SUCC', ret['responseCode'])
415415

416416
def test_identification(self):
417-
my_voiceit = VoiceIt3(VI_KEY, VI_TOKEN)
417+
my_voiceit = voiceit3(VI_KEY, VI_TOKEN)
418418
global groups_to_delete,users_to_delete
419419
print('Start Identification Setup...')
420420
user_id_1 = my_voiceit.create_user()['userId']

voiceit3/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from .voiceit3 import VoiceIt3
1+
from .voiceit3 import voiceit3

voiceit3/voiceit3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import urllib
33

44

5-
class VoiceIt3:
5+
class voiceit3:
66
base_url = ''
77
version = '3.0.5'
88
voiceit_basic_auth_credentials = ''

0 commit comments

Comments
 (0)