Skip to content

Commit bd0c661

Browse files
committed
Bump version to 0.3.8
1 parent 9531c53 commit bd0c661

File tree

6 files changed

+19
-15
lines changed

6 files changed

+19
-15
lines changed

requirements/requirements-base.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
clint==0.5.1
2-
polystores==0.0.9
2+
polystores==0.1.0
33
psutil==5.4.7
44
requests>=2.20.1
55
requests-toolbelt==0.8.0

requirements/requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
-r requirements-base.txt
22

3-
-e git+https://github.com/polyaxon/polyaxon-schemas.git@master#egg=polyaxon-schemas==0.3.7
3+
-e git+https://github.com/polyaxon/polyaxon-schemas.git@master#egg=polyaxon-schemas==0.3.8

requirements/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
-r requirements-base.txt
22

3-
polyaxon-schemas==0.3.7
3+
polyaxon-schemas==0.3.8

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def run_tests(self):
2424

2525

2626
setup(name='polyaxon-client',
27-
version='0.3.7',
27+
version='0.3.8',
2828
description='Python client to interact with Polyaxon API.',
2929
long_description=read_readme(),
3030
maintainer='Mourad Mourafiq',
@@ -55,8 +55,8 @@ def run_tests(self):
5555
],
5656
install_requires=[
5757
"clint==0.5.1",
58-
"polyaxon-schemas==0.3.7",
59-
"polystores==0.0.9",
58+
"polyaxon-schemas==0.3.8",
59+
"polystores==0.1.0",
6060
"psutil==5.4.7",
6161
"requests>=2.20.0",
6262
"requests-toolbelt==0.8.0",

tests/test_api/test_auth.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ def test_login_experiment_ephemeral_token(self):
8282
content_type='application/json', status=200)
8383

8484
# Login without updating the token and without persistence
85-
if os.path.exists('/tmp/.polyaxon/.authtoken'):
86-
os.remove('/tmp/.polyaxon/.authtoken')
85+
if os.path.exists(settings.TMP_AUTH_TOKEN_PATH):
86+
os.remove(settings.TMP_AUTH_TOKEN_PATH)
8787
assert self.api_config.token == 'token'
8888
assert token == self.api_handler.login_experiment_ephemeral_token(
8989
username='user',
@@ -93,11 +93,11 @@ def test_login_experiment_ephemeral_token(self):
9393
set_token=False,
9494
persist_token=False)
9595
assert self.api_config.token == 'token'
96-
assert os.path.exists('/tmp/.polyaxon/.authtoken') is False
96+
assert os.path.exists(settings.TMP_AUTH_TOKEN_PATH) is False
9797

9898
# Login and update the token and persistence
99-
if os.path.exists('/tmp/.polyaxon/.authtoken'):
100-
os.remove('/tmp/.polyaxon/.authtoken')
99+
if os.path.exists(settings.TMP_AUTH_TOKEN_PATH):
100+
os.remove(settings.TMP_AUTH_TOKEN_PATH)
101101
assert self.api_config.token == 'token'
102102
assert token == self.api_handler.login_experiment_ephemeral_token(
103103
username='user',
@@ -107,13 +107,13 @@ def test_login_experiment_ephemeral_token(self):
107107
set_token=True,
108108
persist_token=True)
109109
assert self.api_config.token == token
110-
assert os.path.exists('/tmp/.polyaxon/.authtoken') is True
110+
assert os.path.exists(settings.TMP_AUTH_TOKEN_PATH) is True
111111

112112
# Login remove ephemeral token from env var and settings
113113
os.environ[settings.SECRET_EPHEMERAL_TOKEN_KEY] = 'value'
114114
settings.SECRET_EPHEMERAL_TOKEN = 'eph_token' # noqa
115-
if os.path.exists('/tmp/.polyaxon/.authtoken'):
116-
os.remove('/tmp/.polyaxon/.authtoken')
115+
if os.path.exists(settings.TMP_AUTH_TOKEN_PATH):
116+
os.remove(settings.TMP_AUTH_TOKEN_PATH)
117117
assert self.api_config.token == token
118118
assert os.environ.get(settings.SECRET_EPHEMERAL_TOKEN_KEY) == 'value'
119119
assert settings.SECRET_EPHEMERAL_TOKEN == 'eph_token'
@@ -125,7 +125,7 @@ def test_login_experiment_ephemeral_token(self):
125125
set_token=True,
126126
persist_token=True)
127127
assert self.api_config.token == token
128-
assert os.path.exists('/tmp/.polyaxon/.authtoken') is True
128+
assert os.path.exists(settings.TMP_AUTH_TOKEN_PATH) is True
129129
assert os.environ.get(settings.SECRET_EPHEMERAL_TOKEN_KEY) is None
130130
assert not hasattr(settings, 'SECRET_EPHEMERAL_TOKEN')
131131

tests/test_api/utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# -*- coding: utf-8 -*-
22
from __future__ import absolute_import, division, print_function
33

4+
import tempfile
45
import time
56

67
from unittest import TestCase
78

89
from mock import patch
910

11+
from polyaxon_client import settings
1012
from polyaxon_client.api_config import ApiConfig
1113
from polyaxon_client.transport import Transport
1214

@@ -28,6 +30,8 @@ def setUp(self):
2830
timeout=0.01,
2931
schema_response=True)
3032
self.transport = Transport(config=self.api_config)
33+
settings.TMP_AUTH_TOKEN_PATH = '{}/{}'.format(tempfile.mkdtemp(), '.plx')
34+
settings.CLIENT_CONFIG_PATH = '{}/{}'.format(tempfile.mkdtemp(), '.plx')
3135

3236
def set_raw_response(self):
3337
self.api_config.schema_response = False

0 commit comments

Comments
 (0)