Skip to content
This repository was archived by the owner on Apr 30, 2022. It is now read-only.

Commit 233bb63

Browse files
authored
update the data size exceeded message (#95)
* update the data size exceeded message * fix style issues * update test * change email to connect
1 parent bacbc58 commit 233bb63

File tree

8 files changed

+31
-12
lines changed

8 files changed

+31
-12
lines changed

CHANGELOG.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
1+
### 3.2.1 - 2017-10-23
2+
3+
* Provide a more actionable warning when asking for data over 1M rows
4+
5+
### 3.2.0 - 2017-06-14
6+
7+
* Add test support for python 3.6.
8+
9+
* Raise error when over 1000000 rows when fetching tables with paginate
10+
11+
* Pandas fix for newer pandas version.
12+
13+
* Bug fixes
14+
115
### 3.1.0 - 2017-03-07
216

317
* Bug: support column with a name 'code'
418

5-
619
### 3.0.1 - 2016-05-25
720

821
* Handle unexpected errors
@@ -12,4 +25,4 @@
1225
* Datatables for developers
1326
* Datatables for analysts
1427
* Backwards compatibility
15-
* Documentation updates
28+
* Documentation updates

quandl/get_table.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ def get_table(datatable_code, **options):
2424
data.extend(next_data)
2525

2626
if page_count >= ApiConfig.page_limit:
27-
raise LimitExceededError(Message.WARN_DATA_LIMIT_EXCEEDED)
27+
raise LimitExceededError(
28+
Message.WARN_DATA_LIMIT_EXCEEDED % (datatable_code,
29+
ApiConfig.api_key
30+
)
31+
)
2832

2933
next_cursor_id = next_data.meta['next_cursor_id']
3034

quandl/message.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ class Message:
2222
minimum index is 1 and the maximum index is %s'
2323
ERROR_REQUESTED_COLUMN_NOT_EXIST = 'Requested column index %s does not exist'
2424

25-
WARN_DATA_LIMIT_EXCEEDED = 'This call returns a larger amount of data than quandl.get_table() \
26-
allows. Please view our documentation on developer methods to request more data. \
27-
https://github.com/quandl/quandl-python/blob/master/FOR_ANALYSTS.md#things-to-note'
25+
WARN_DATA_LIMIT_EXCEEDED = 'This call exceeds the amount of data that quandl.get_table() allows. \
26+
Please use the following link in your browser, which will download the full results as \
27+
a CSV file: https://www.quandl.com/api/v3/datatables/%s?qopts.export=true&api_key=%s. See \
28+
our API documentation for more info: \
29+
https://docs.quandl.com/docs/in-depth-usage-1#section-download-an-entire-table'
2830
WARN_PAGE_LIMIT_EXCEEDED = 'To request more pages, please set paginate=true in your \
2931
quandl.get_table() call. For more information see our documentation: \
3032
https://github.com/quandl/quandl-python/blob/master/FOR_ANALYSTS.md#things-to-note'

quandl/model/model_list.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ def __init__(self, klass, values, meta):
2929
self.meta = meta
3030

3131
def to_list(self):
32-
l = list([x.to_list() for x in self.values])
33-
return l
32+
return list([x.to_list() for x in self.values])
3433

3534
def __getattr__(self, k):
3635
if k in self.meta:

quandl/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = '3.2.0'
1+
VERSION = '3.2.1'

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@
4949
long_description=long_description,
5050
version=VERSION,
5151
author='Quandl',
52+
author_email='connect@quandl.com',
5253
maintainer='Quandl Development Team',
53-
maintainer_email='dev@quandl.com',
54+
maintainer_email='connect@quandl.com',
5455
url='https://github.com/quandl/quandl-python',
5556
license='MIT',
5657
install_requires=install_requires,

test/helpers/my_httpretty.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from requests.packages.urllib3.contrib.pyopenssl \
66
import inject_into_urllib3, extract_from_urllib3
77
pyopenssl_override = True
8-
except:
8+
except: # noqa: E722
99
pyopenssl_override = False
1010

1111

test/test_connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,6 @@ def test_build_request(self, mock):
6767
'accept': ('application/json, '
6868
'application/vnd.quandl+json;version=2015-04-09'),
6969
'request-source': 'python',
70-
'request-source-version': '3.2.0'},
70+
'request-source-version': '3.2.1'},
7171
params={'per_page': 10, 'page': 2})
7272
self.assertEqual(mock.call_args, expected)

0 commit comments

Comments
 (0)