Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Commit 888a2c5

Browse files
pprettAxik
authored andcommitted
Update trafaret dependencies to be compatible with datarobot-sdk (#145)
* update CHANGES * Bump version in __init_
1 parent be4224a commit 888a2c5

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

CHANGES.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
1.15.0 (Unreleased)
1+
1.15.1 (Unreleased)
2+
===================
3+
4+
Enhancements
5+
------------
6+
* Updated `trafaret` dependency to support the same version as https://pypi.org/project/datarobot/ .
7+
8+
1.15.0 (2018 Nov 23)
29
===================
310

411
Enhancements

datarobot_batch_scoring/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.15.0'
1+
__version__ = '1.15.1'

datarobot_batch_scoring/utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@
3030
def verify_objectid(value):
3131
"""Verify if id_ is a proper ObjectId. """
3232
try:
33-
t.String(regex='^[A-Fa-f0-9]{24}$').check(value)
33+
t.Regexp(regexp='^[A-Fa-f0-9]{24}$').check(value)
3434
except t.DataError:
3535
raise ValueError('id {} not a valid project/model id'.format(value))
3636

3737

3838
config_validator = t.Dict({
3939
OptKey('host'): t.String,
40-
OptKey('project_id'): t.String(regex='^[A-Fa-f0-9]{24}$'),
41-
OptKey('model_id'): t.String(regex='^[A-Fa-f0-9]{24}$'),
42-
OptKey('deployment_id'): t.String(regex='^[A-Fa-f0-9]{24}$'),
40+
OptKey('project_id'): t.Regexp(regexp='^[A-Fa-f0-9]{24}$'),
41+
OptKey('model_id'): t.Regexp(regexp='^[A-Fa-f0-9]{24}$'),
42+
OptKey('deployment_id'): t.Regexp(regexp='^[A-Fa-f0-9]{24}$'),
4343
OptKey('import_id'): t.String,
4444
OptKey('n_retry'): t.Int,
4545
OptKey('keep_cols'): t.String,

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
six>=1.9.0
22
requests>=2.20.0
3-
trafaret==0.10.0
3+
trafaret>=0.7,<2.0,!=1.1.0
44
contextlib2>=0.5.1
55
futures>=3.0.4
66
chardet>=3.0.2<3.1.0
7+

0 commit comments

Comments
 (0)