Skip to content

Commit c76db6c

Browse files
committed
Correct imports on python code
[skip ci]
1 parent 92d5a87 commit c76db6c

File tree

5 files changed

+63
-11
lines changed

5 files changed

+63
-11
lines changed

pyslicer/api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ def _handler_request(self, req):
134134
try:
135135
result = ujson.loads(req.text)
136136
except ValueError as e:
137-
raise exceptions.InternalException("Error while trying to load Json: %s" % e.message)
137+
raise exceptions.InternalException("Error while trying to load"
138+
" Json: %s" % e.message)
138139

139140
sd_response = SDHandlerResponse(
140141
result=result,

pyslicer/exceptions.py

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ def __init__(self, *args, **kwargs):
4040

4141
class RequestBodySizeExceededException(SlicingDiceException):
4242
def __init__(self, *args, **kwargs):
43-
super(RequestBodySizeExceededException, self).__init__(self, *args, **kwargs)
43+
super(RequestBodySizeExceededException, self).__init__(self, *args,
44+
**kwargs)
4445

4546

4647
class IndexEntitiesLimitException(SlicingDiceException):
@@ -52,6 +53,7 @@ class IndexColumnsLimitException(SlicingDiceException):
5253
def __init__(self, *args, **kwargs):
5354
super(IndexColumnsLimitException, self).__init__(self, *args, **kwargs)
5455

56+
5557
# Validation exceptions
5658

5759

@@ -62,4 +64,51 @@ def __init__(self, *args, **kwargs):
6264

6365
class InvalidQueryException(SlicingDiceException):
6466
def __init__(self, *args, **kwargs):
65-
super(InvalidQueryException, self).__init__(self, *args, **kwargs)
67+
super(InvalidQueryException, self).__init__(self, *args, **kwargs)
68+
69+
70+
class InvalidColumnTypeException(SlicingDiceException):
71+
def __init__(self, *args, **kwargs):
72+
super(InvalidColumnTypeException, self).__init__(self, *args, **kwargs)
73+
74+
75+
class InvalidSlicingDiceKeysException(SlicingDiceException):
76+
def __init__(self, *args, **kwargs):
77+
super(InvalidSlicingDiceKeysException, self).__init__(self, *args,
78+
**kwargs)
79+
80+
81+
class InvalidQueryTypeException(SlicingDiceException):
82+
def __init__(self, *args, **kwargs):
83+
super(InvalidQueryTypeException, self).__init__(self, *args,
84+
**kwargs)
85+
86+
87+
class WrongTypeException(SlicingDiceException):
88+
def __init__(self, *args, **kwargs):
89+
super(WrongTypeException, self).__init__(self, *args,
90+
**kwargs)
91+
92+
93+
class InvalidInsertException(SlicingDiceException):
94+
def __init__(self, *args, **kwargs):
95+
super(InvalidInsertException, self).__init__(self, *args,
96+
**kwargs)
97+
98+
99+
class InvalidColumnException(SlicingDiceException):
100+
def __init__(self, *args, **kwargs):
101+
super(InvalidColumnException, self).__init__(self, *args,
102+
**kwargs)
103+
104+
105+
class InvalidColumnNameException(SlicingDiceException):
106+
def __init__(self, *args, **kwargs):
107+
super(InvalidColumnNameException, self).__init__(self, *args,
108+
**kwargs)
109+
110+
111+
class InvalidColumnDescriptionException(SlicingDiceException):
112+
def __init__(self, *args, **kwargs):
113+
super(InvalidColumnDescriptionException, self).__init__(self, *args,
114+
**kwargs)

pyslicer/utils/validators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def __init__(self, data_column):
272272
self._valid_type_columns = [
273273
"unique-id", "boolean", "string", "integer", "decimal",
274274
"enumerated", "date", "integer-time-series",
275-
"decimal-time-series", "string-time-series"
275+
"decimal-time-series", "string-time-series", "datetime"
276276
]
277277

278278
def _validate_name(self):

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
def read(fname):
66
return open(os.path.join(os.path.dirname(__file__), fname)).read()
77

8+
89
setup(
910
name="pyslicer",
1011
version="2.0.0",
1112
author="SlicingDice LLC",
1213
author_email="help@slicingdice.com",
13-
description="Official Python client for SlicingDice, Data Warehouse and Analytics Database as a Service.",
14+
description="Official Python client for SlicingDice, Data Warehouse and "
15+
"Analytics Database as a Service.",
1416
install_requires=["requests", "six", "ujson"],
1517
license="BSD",
1618
keywords="slicingdice slicing dice data analysis analytics database",

tests_and_examples/run_query_tests.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -336,12 +336,12 @@ def compare_values(expected, result):
336336
def main():
337337
# SlicingDice queries to be tested. Must match the JSON file name.
338338
query_types = [
339-
# 'count_entity',
340-
# 'count_event',
341-
# 'top_values',
342-
# 'aggregation',
343-
# 'score',
344-
# 'result',
339+
'count_entity',
340+
'count_event',
341+
'top_values',
342+
'aggregation',
343+
'score',
344+
'result',
345345
'sql'
346346
]
347347

0 commit comments

Comments
 (0)