Skip to content

Commit 8eb5655

Browse files
authored
Merge pull request #573 from addisonlynch/clean_for_070_rls
CLN: Prepare for 0.7.0 release
2 parents dc3354b + cae34b6 commit 8eb5655

29 files changed

+64
-404
lines changed

.coveragerc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ include = */pandas_datareader/*
66
omit =
77
*/_version.py
88
*/yahoo/*
9-
*/edgar.py
109
*/google/options.py
1110
*/google/quotes.py
1211
*/tests/google/test_options.py
13-
*/tests/test_edgar.py
12+
1413

1514
[report]
1615
# Regexes for lines to exclude from consideration
@@ -26,9 +25,7 @@ include = */pandas_datareader/*
2625
omit =
2726
*/_version.py
2827
*/yahoo/*
29-
*/edgar.py
3028
*/google/options.py
3129
*/google/quotes.py
3230
*/tests/google/test_options.py
33-
*/tests/test_edgar.py
3431
ignore_errors = True

docs/source/remote_data.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Currently the following sources are supported:
3030
- :ref:`Tiingo<remote_data.tiingo>`
3131
- :ref:`IEX<remote_data.iex>`
3232
- :ref:`Robinhood<remote_data.robinhood>`
33-
- :ref:`AlphaVantage<remote_data.alphavantage>`
33+
- :ref:`Alpha Vantage<remote_data.alphavantage>`
3434
- :ref:`Enigma<remote_data.enigma>`
3535
- :ref:`Quandl<remote_data.quandl>`
3636
- :ref:`St.Louis FED (FRED)<remote_data.fred>`
@@ -112,17 +112,17 @@ year relative to today.
112112
113113
.. _remote_data.alphavantage
114114
115-
AlphaVantage
116-
============
115+
Alpha Vantage
116+
=============
117117

118-
`AlphaVantage <https://www.alphavantage.co/documentation>`__ provides realtime
118+
`Alpha Vantage <https://www.alphavantage.co/documentation>`__ provides realtime
119119
equities and forex data. Free registration is required to get an API key.
120120

121121
Historical Time Series Data
122122
^^^^^^^^^^^^^^^^^^^^^^^^^^^
123123

124124
Through the
125-
`AlphaVantage <https://www.alphavantage.co/documentation>`__ Time Series
125+
`Alpha Vantage <https://www.alphavantage.co/documentation>`__ Time Series
126126
endpoints, it is possible to obtain historical equities data for individual
127127
symbols. The following endpoints are available:
128128

@@ -152,7 +152,7 @@ provided.
152152
Quotes
153153
^^^^^^
154154

155-
`AlphaVantage <https://www.alphavantage.co/documentation>`__ Batch Stock Quotes
155+
`Alpha Vantage <https://www.alphavantage.co/documentation>`__ Batch Stock Quotes
156156
endpoint allows the retrieval of realtime stock quotes for up to 100 symbols at
157157
once. These quotes are accessible through the top-level function
158158
``get_quote_av``.
@@ -171,7 +171,7 @@ once. These quotes are accessible through the top-level function
171171
Forex
172172
^^^^^
173173

174-
`AlphaVantage <https://www.alphavantage.co/documentation>`__ provides realtime
174+
`Alpha Vantage <https://www.alphavantage.co/documentation>`__ provides realtime
175175
currency exchange rates (for physical and digital currencies).
176176

177177
To request the exchange rate of physical or digital currencies, simply format
@@ -199,7 +199,7 @@ Multiple pairs are are allowable:
199199
Sector Performance
200200
^^^^^^^^^^^^^^^^^^
201201

202-
`AlphaVantage <https://www.alphavantage.co/documentation>`__ provides sector
202+
`Alpha Vantage <https://www.alphavantage.co/documentation>`__ provides sector
203203
performances through the top-level function ``get_sector_performance_av``.
204204

205205
.. ipython:: python

docs/source/whatsnew/v0.7.0.txt

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ v0.7.0 (Xxxxxxx YY, 20ZZ)
1111
Highlights include:
1212

1313
- Immediate deprecation of Google finance and Morningstar for historical price data, as these API endpoints are no longer supported by their respective providers. Alternate methods are welcome via pull requests, as PDR would like to restore these features.
14+
- Removal of EDGAR, which was deprecated in v0.6.0.
1415

1516
.. contents:: What's new in v0.7.0
1617
:local:
@@ -22,23 +23,23 @@ Enhancements
2223
~~~~~~~~~~~~
2324

2425
- A new data connector for data provided by
25-
`AlphaVantage <https://www.alphavantage.co/documentation>`__ was
26+
`Alpha Vantage <https://www.alphavantage.co/documentation>`__ was
2627
introduced to obtain Foreign Exchange (FX) data.
2728
(:issue:`389`)
2829

2930
- A new data connector for data provided by
30-
`AlphaVantage <https://www.alphavantage.co/documentation>`__ was
31+
`Alpha Vantage <https://www.alphavantage.co/documentation>`__ was
3132
introduced to obtain historical time series data.
3233
(:issue:`389`)
3334

3435
- A new data connector for data provided by
35-
`AlphaVantage <https://www.alphavantage.co/documentation>`__ was
36+
`Alpha Vantage <https://www.alphavantage.co/documentation>`__ was
3637
introduced to obtain sector performance data, accessed through the
3738
top-level function ``get_sector_performance_av``.
3839
(:issue:`389`)
3940

4041
- A new data connector for data provided by
41-
`AlphaVantage <https://www.alphavantage.co/documentation>`__ was
42+
`Alpha Vantage <https://www.alphavantage.co/documentation>`__ was
4243
introduced to obtain real-time Batch Stock Quotes through the
4344
top-level function ``get_quote_av``.
4445
(:issue:`389`)
@@ -65,10 +66,7 @@ Bug Fixes
6566

6667
- Added support for passing the API KEY to QuandlReader either directly or by
6768
setting the environmental variable QUANDL_API_KEY (:issue:`485`).
68-
- Handle Morningstar index volume data properly (:issue:`486`).
6969
- Added support for optionally passing a custom base_url to the EnigmaReader (:issue:`499`).
70-
- Fixed Morningstar 'retry' incrementation (:issue:`513`)
71-
- Updated Google Daily Price API to functional url (:issue:`502`)
7270
- Fix Yahoo! price data (:issue:`498`)
7371
- Added back support for Yahoo! price, dividends, and splits data for stocks
7472
and currency pairs (:issue:`487`).

pandas_datareader/av/__init__.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,16 @@
1010

1111
class AlphaVantage(_BaseReader):
1212
"""
13-
Base class for all AlphaVantage queries
13+
Base class for all Alpha Vantage queries
14+
15+
Notes
16+
-----
17+
See `Alpha Vantage <https://www.alphavantage.co/>`__
1418
"""
1519
_format = 'json'
1620

1721
def __init__(self, symbols=None, start=None, end=None, retry_count=3,
18-
pause=0.001, session=None, api_key=None):
22+
pause=0.1, session=None, api_key=None):
1923
super(AlphaVantage, self).__init__(symbols=symbols, start=start,
2024
end=end, retry_count=retry_count,
2125
pause=pause, session=session)
@@ -42,12 +46,12 @@ def params(self):
4246

4347
@property
4448
def function(self):
45-
""" AlphaVantage endpoint function"""
49+
""" Alpha Vantage endpoint function"""
4650
raise NotImplementedError
4751

4852
@property
4953
def data_key(self):
50-
""" Key of data returned from AlphaVantage """
54+
""" Key of data returned from Alpha Vantage """
5155
raise NotImplementedError
5256

5357
def _read_lines(self, out):
@@ -61,6 +65,5 @@ def _read_lines(self, out):
6165
else:
6266
raise RemoteDataError()
6367
df = df[sorted(df.columns)]
64-
# df.sort_index(ascending=True, inplace=True)
6568
df.columns = [id[3:] for id in df.columns]
6669
return df

pandas_datareader/av/forex.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
class AVForexReader(AlphaVantage):
99
"""
10-
Returns DataFrame of the AlphaVantage Foreign Exchange (FX) Exchange Rates
10+
Returns DataFrame of the Alpha Vantage Foreign Exchange (FX) Exchange Rates
1111
data.
1212
1313
.. versionadded:: 0.7.0
@@ -18,16 +18,16 @@ class AVForexReader(AlphaVantage):
1818
Single currency pair (formatted 'FROM/TO') or list of the same.
1919
retry_count : int, default 3
2020
Number of times to retry query request.
21-
pause : int, default 0.5
21+
pause : int, default 0.1
2222
Time, in seconds, to pause between consecutive queries of chunks. If
2323
single value given for symbol, represents the pause between retries.
2424
session : Session, default None
2525
requests.sessions.Session instance to be used
2626
api_key : str, optional
27-
AlphaVantage API key . If not provided the environmental variable
27+
Alpha Vantage API key . If not provided the environmental variable
2828
ALPHAVANTAGE_API_KEY is read. The API key is *required*.
2929
"""
30-
def __init__(self, symbols=None, retry_count=3, pause=0.5, session=None,
30+
def __init__(self, symbols=None, retry_count=3, pause=0.1, session=None,
3131
api_key=None):
3232

3333
super(AVForexReader, self).__init__(symbols=symbols,

pandas_datareader/av/quotes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class AVQuotesReader(AlphaVantage):
88
"""
9-
Returns DataFrame of AlphaVantage Realtime Stock quotes for a symbol or
9+
Returns DataFrame of Alpha Vantage Realtime Stock quotes for a symbol or
1010
list of symbols.
1111
1212
Parameters
@@ -16,13 +16,13 @@ class AVQuotesReader(AlphaVantage):
1616
DataFrame with index containing stock symbols.
1717
retry_count : int, default 3
1818
Number of times to retry query request.
19-
pause : int, default 0
19+
pause : int, default 0.1
2020
Time, in seconds, to pause between consecutive queries of chunks. If
2121
single value given for symbol, represents the pause between retries.
2222
session : Session, default None
2323
requests.sessions.Session instance to be used
2424
"""
25-
def __init__(self, symbols=None, retry_count=3, pause=0.5, session=None,
25+
def __init__(self, symbols=None, retry_count=3, pause=0.1, session=None,
2626
api_key=None):
2727
if isinstance(symbols, str):
2828
syms = [symbols]

pandas_datareader/av/sector.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class AVSectorPerformanceReader(AlphaVantage):
88
"""
9-
Returns DataFrame of the AlphaVantage Sector Performances SECTOR data.
9+
Returns DataFrame of the Alpha Vantage Sector Performances SECTOR data.
1010
1111
.. versionadded:: 0.7.0
1212
@@ -16,13 +16,13 @@ class AVSectorPerformanceReader(AlphaVantage):
1616
Single currency pair (formatted 'FROM/TO') or list of the same.
1717
retry_count : int, default 3
1818
Number of times to retry query request.
19-
pause : int, default 0.5
19+
pause : int, default 0.1
2020
Time, in seconds, to pause between consecutive queries of chunks. If
2121
single value given for symbol, represents the pause between retries.
2222
session : Session, default None
2323
requests.sessions.Session instance to be used
2424
api_key : str, optional
25-
AlphaVantage API key . If not provided the environmental variable
25+
Alpha Vantage API key . If not provided the environmental variable
2626
ALPHAVANTAGE_API_KEY is read. The API key is *required*.
2727
"""
2828
@property

pandas_datareader/av/time_series.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
class AVTimeSeriesReader(AlphaVantage):
77
"""
8-
Returns DataFrame of the AlphaVantage Stock Time Series endpoints
8+
Returns DataFrame of the Alpha Vantage Stock Time Series endpoints
99
1010
.. versionadded:: 0.7.0
1111
@@ -20,7 +20,7 @@ class AVTimeSeriesReader(AlphaVantage):
2020
Ending date, timestamp. Same format as starting date.
2121
retry_count : int, default 3
2222
Number of times to retry query request.
23-
pause : int, default 0.5
23+
pause : int, default 0.1
2424
Time, in seconds, to pause between consecutive queries of chunks. If
2525
single value given for symbol, represents the pause between retries.
2626
session : Session, default None
@@ -39,7 +39,7 @@ class AVTimeSeriesReader(AlphaVantage):
3939
}
4040

4141
def __init__(self, symbols=None, function="TIME_SERIES_DAILY",
42-
start=None, end=None, retry_count=3, pause=0.35,
42+
start=None, end=None, retry_count=3, pause=0.1,
4343
session=None, chunksize=25, api_key=None):
4444
super(AVTimeSeriesReader, self).__init__(symbols=symbols, start=start,
4545
end=end,
@@ -55,7 +55,7 @@ def function(self):
5555

5656
@property
5757
def output_size(self):
58-
""" Used to limit the size of the AlphaVantage query when
58+
""" Used to limit the size of the Alpha Vantage query when
5959
possible.
6060
"""
6161
delta = datetime.now() - self.start

pandas_datareader/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ class _DailyBaseReader(_BaseReader):
192192
""" Base class for Google / Yahoo daily reader """
193193

194194
def __init__(self, symbols=None, start=None, end=None, retry_count=3,
195-
pause=0.001, session=None, chunksize=25):
195+
pause=0.1, session=None, chunksize=25):
196196
super(_DailyBaseReader, self).__init__(symbols=symbols,
197197
start=start, end=end,
198198
retry_count=retry_count,

pandas_datareader/data.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from pandas_datareader.av.sector import AVSectorPerformanceReader
1010
from pandas_datareader.av.time_series import AVTimeSeriesReader
1111
from pandas_datareader.bankofcanada import BankOfCanadaReader
12-
from pandas_datareader.edgar import EdgarIndexReader
1312
from pandas_datareader.enigma import EnigmaReader
1413
from pandas_datareader.eurostat import EurostatReader
1514
from pandas_datareader.exceptions import DEP_ERROR_MSG, \
@@ -255,7 +254,7 @@ def get_iex_book(*args, **kwargs):
255254

256255

257256
def DataReader(name, data_source=None, start=None, end=None,
258-
retry_count=3, pause=0.001, session=None, access_key=None):
257+
retry_count=3, pause=0.1, session=None, access_key=None):
259258
"""
260259
Imports data from a number of online sources.
261260
@@ -368,11 +367,6 @@ def DataReader(name, data_source=None, start=None, end=None,
368367
return EurostatReader(symbols=name, start=start, end=end,
369368
retry_count=retry_count, pause=pause,
370369
session=session).read()
371-
elif data_source == "edgar-index":
372-
raise ImmediateDeprecationError(DEP_ERROR_MSG.format('EDGAR'))
373-
return EdgarIndexReader(symbols=name, start=start, end=end,
374-
retry_count=retry_count, pause=pause,
375-
session=session).read()
376370
elif data_source == 'nasdaq':
377371
if name != 'symbols':
378372
raise ValueError("Only the string 'symbols' is supported for "

0 commit comments

Comments
 (0)