Skip to content

Commit 69911ee

Browse files
authored
Merge pull request #27 from DevoInc/release-next
[1.5.1] - 2018-12-28
2 parents 9e1f72d + 91ae074 commit 69911ee

File tree

6 files changed

+30
-14
lines changed

6 files changed

+30
-14
lines changed

.travis.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
language: python
22
python:
3-
- "2.7"
4-
- "3.6"
3+
- '2.7'
4+
- '3.6'
55
install:
6-
- pip install .
7-
- pip install pyyaml
8-
# command to run tests
6+
- pip install .
7+
- pip install pyyaml
98
script:
10-
- python run_tests.py
9+
- python run_tests.py
10+
deploy:
11+
provider: pypi
12+
user: worvast
13+
password:
14+
secure: J3YPGEaDHD1H9pVQscrh4J2U18ptq8pM5UsjIKGe6WGlgiTMhR+WYRcdQSFIGSyKZMkdnLavSuvImcUzBSL6L3WqarRZ6HBgGXtxxHRVNmk96ZZlBN5qq0AUJzHN61x5JbG+OWzJMZE1HDo6zcD36KvaIAfKu3AyaEYeVes54PY5cLC/JH/HooOP0FS643kbttkiTYKmEajJiCgu/SiXH5dtfuz5GO0CXrEp0ww+FtcTmC9T9txyjS+IBIvbNPHJC9M5jg6bgu214fCIr5iGNZ8LQulRskBOsqhCRbyyWjuF0wgl3Dkefa0z3YJpl2KYHYW0bT0UY2J8WXnE66NT6js2sv/mNdcRAZjjzugcr9mr11FrLazIjNJwDwlSTtuNoys4E449wQZfQ4vUsUANwnsXQJAdujANS8O2Yuk65uIlgnNpYBxXI71OPYZ6dzhDOsAcwlUrS9jZi2+UWGtOXoZX3i3qLWwBHEASXNSN2WLZOVj3lTEyBB7WCbBqDANHCRLrkyHMrUkOP9ptE7lvATCVfHIO2axsaxNJRKHI6W53p+6uMRAt9u0LIKBB4hyZMo51j7xkq6uO4cQt2CINVU24gYajcalswtJ/Cr0onj26xx2g/xq19sU1L7rpp8OZGFnLPHptxV3ezTlhdk86ZfwOQI1TC4KPAQlRZARDeSk=
15+
on:
16+
tags: true

CHANGELOG.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,16 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7-
## [1.5.0]
7+
8+
## [1.5.1] - 2018-12-28
9+
#### Fixed
10+
* devo.common buffer now receive data when CSV response
11+
* devo.common buffer.is_empty
12+
13+
#### Added
14+
* Travis CI deploy automatic options
15+
16+
## [1.5.0] - 2018-12-27
817
#### Changed
918
* Modify Configuration loads functions
1019
* Now Sender send, send_raw, flush_buffer and fill_buffer return the number of lines sent
@@ -13,7 +22,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1322
* Problems when loads configuration from default sites
1423
* Problems with local_server
1524

16-
## [1.4.0]
25+
## [1.4.0] - 2018-12-17
1726
#### Added
1827
* Allow the parameters user, application name and comment to queries
1928
* Add tests (test_pragmas and test_pragmas test_pragmas_not_comment_free) in the query.py file.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
[![master Build Status](https://travis-ci.com/DevoInc/python-sdk.svg?branch=master)](https://travis-ci.com/DevoInc/python-sdk) [![LICENSE](https://img.shields.io/dub/l/vibe-d.svg)](https://github.com/DevoInc/python-sdk/blob/master/LICENSE)
33

4-
[![wheel](https://img.shields.io/badge/wheel-yes-brightgreen.svg)](https://pypi.org/project/devo-sdk/) [![version](https://img.shields.io/badge/version-1.5.0-blue.svg)](https://pypi.org/project/devo-sdk/) [![python](https://img.shields.io/badge/python-2.7%20%7C%203.3%20%7C%203.4%20%7C%203.5%20%7C%203.6%20%7C%203.7-blue.svg)](https://pypi.org/project/devo-sdk/)
4+
[![wheel](https://img.shields.io/badge/wheel-yes-brightgreen.svg)](https://pypi.org/project/devo-sdk/) [![version](https://img.shields.io/badge/version-1.5.1-blue.svg)](https://pypi.org/project/devo-sdk/) [![python](https://img.shields.io/badge/python-2.7%20%7C%203.3%20%7C%203.4%20%7C%203.5%20%7C%203.6%20%7C%203.7-blue.svg)](https://pypi.org/project/devo-sdk/)
55

66

77
# Devo Python SDK

devo/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
__description__ = 'Devo Python Library.'
22
__url__ = 'http://www.devo.com'
3-
__version__ = "1.5.0"
3+
__version__ = "1.5.1"
44
__author__ = 'Devo'
55
__author_email__ = 'support@devo.com'
66
__license__ = 'MIT'

devo/api/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def query(self, **kwargs):
194194
self.connect()
195195

196196
if self.buffer is None:
197-
self.buffer = Buffer()
197+
self.buffer = Buffer(api_response=opts['response'])
198198
self.buffer.create_thread(
199199
target=self._call_stream,
200200
kwargs=({'payload': self._get_payload(query, query_id,

devo/common/data/buffer.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ class DevoBufferException(Exception):
1515

1616
class Buffer(object):
1717
""" Simple Buffer class """
18-
def __init__(self, buffer_max_size=1000):
18+
def __init__(self, buffer_max_size=1000, api_response="json/compact"):
1919
self.queue = Queue.Queue(maxsize=buffer_max_size)
2020
self.thread = None
2121
self.temp = None
2222
self.error = None
2323
self.close = False
2424
self.timeout = 0
25+
self.response_split = "\n" if api_response is "csv" else "\r\n "
2526

2627
def is_alive(self):
2728
return self.thread.isAlive()
@@ -30,7 +31,7 @@ def set_timeout(self, timeout):
3031
self.timeout = timeout
3132

3233
def is_empty(self):
33-
return True if self.size() > 0 else False
34+
return True if self.size() < 0 else False
3435

3536
def create_thread(self, target, kwargs):
3637
""" Function for create one separate thread for Queue"""
@@ -77,7 +78,7 @@ def proccess_recv(self, data):
7778
if not isinstance(data, str):
7879
data = data.decode('utf8')
7980

80-
data = data[data.find("\r\n") + 2:].split("\r\n ")
81+
data = data[data.find("\r\n") + 2:].split(self.response_split)
8182

8283
data_len = len(data)
8384
if self.temp is not None:

0 commit comments

Comments
 (0)