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

Update trafaret dependencies to be compatible with datarobot-sdk #145

Merged
merged 2 commits into from
Dec 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
1.15.0 (Unreleased)
1.15.1 (Unreleased)
===================

Enhancements
------------
* Updated `trafaret` dependency to support the same version as https://pypi.org/project/datarobot/ .

1.15.0 (2018 Nov 23)
===================

Enhancements
Expand Down
2 changes: 1 addition & 1 deletion datarobot_batch_scoring/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.15.0'
__version__ = '1.15.1'
8 changes: 4 additions & 4 deletions datarobot_batch_scoring/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@
def verify_objectid(value):
"""Verify if id_ is a proper ObjectId. """
try:
t.String(regex='^[A-Fa-f0-9]{24}$').check(value)
t.Regexp(regexp='^[A-Fa-f0-9]{24}$').check(value)
except t.DataError:
raise ValueError('id {} not a valid project/model id'.format(value))


config_validator = t.Dict({
OptKey('host'): t.String,
OptKey('project_id'): t.String(regex='^[A-Fa-f0-9]{24}$'),
OptKey('model_id'): t.String(regex='^[A-Fa-f0-9]{24}$'),
OptKey('deployment_id'): t.String(regex='^[A-Fa-f0-9]{24}$'),
OptKey('project_id'): t.Regexp(regexp='^[A-Fa-f0-9]{24}$'),
OptKey('model_id'): t.Regexp(regexp='^[A-Fa-f0-9]{24}$'),
OptKey('deployment_id'): t.Regexp(regexp='^[A-Fa-f0-9]{24}$'),
OptKey('import_id'): t.String,
OptKey('n_retry'): t.Int,
OptKey('keep_cols'): t.String,
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
six>=1.9.0
requests>=2.20.0
trafaret==0.10.0
trafaret>=0.7,<2.0,!=1.1.0
contextlib2>=0.5.1
futures>=3.0.4
chardet>=3.0.2<3.1.0