Skip to content

Commit 4ff6214

Browse files
authored
Merge pull request #1002 from bashtage/rls-0.11
DOC: Fix issues in doc build
2 parents c7a5d16 + fed31cb commit 4ff6214

12 files changed

+65
-27
lines changed

Diff for: ci/azure/azure_template_windows.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
- script: |
7070
echo "Testing editable install"
7171
echo pytest --durations=25 pandas_datareader/tests
72-
pytest --durations=25 pandas_datareader/tests
72+
pytest --durations=25 --cov-config .coveragerc --cov=pandas_datareader --cov-report xml:coverage.xml --cov-report term --junitxml=junit/test-results.xml pandas_datareader/tests
7373
displayName: 'Run tests'
7474
7575
- task: PublishTestResults@2

Diff for: docs/requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ ipython
33
matplotlib
44
requests_cache
55
pydata_sphinx_theme
6+
pickleshare

Diff for: docs/source/conf.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@
6868
#
6969
# The short X.Y version.
7070
version = pdr.__version__.split("+")[0]
71+
7172
if "+" in pdr.__version__:
72-
commit = pdr.__version__.split("+")[1]
73-
commits_since_tag, commit_hash = commit.split(".")[:2]
74-
commit_hash = commit_hash[1:]
73+
commit = pdr.__version__.split("dev")[1]
74+
commits_since_tag, commit_hash = commit.split("+")
7575
commit = " (+" + commits_since_tag + ", " + commit_hash + ")"
7676
version += commit
7777
# The full version, including alpha/beta/rc tags.
@@ -204,6 +204,6 @@
204204

205205

206206
extlinks = {
207-
"issue": ("https://github.com/pydata/pandas-datareader/issues/%s", "GH"),
208-
"wiki": ("https://github.com/pydata/pandas-datareader/wiki/%s", "wiki "),
207+
"issue": ("https://github.com/pydata/pandas-datareader/issues/%s", "GH %s"),
208+
"wiki": ("https://github.com/pydata/pandas-datareader/wiki/%s", "wiki %s"),
209209
}

Diff for: docs/source/remote_data.rst

+49-11
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,33 @@ Remote Data Access
2525

2626
Functions from :mod:`pandas_datareader.data` and :mod:`pandas_datareader.wb`
2727
extract data from various Internet sources into a pandas DataFrame.
28-
Currently the following sources are supported:
28+
Currently the following sources are supported and tested:
2929

30-
- :ref:`Alpha Vantage<remote_data.alphavantage>`
31-
- :ref:`Econdb<remote_data.econdb>`
32-
- :ref:`Enigma<remote_data.enigma>`
33-
- :ref:`Eurostat<remote_data.eurostat>`
34-
- :ref:`IEX<remote_data.iex>`
30+
- :ref:`St.Louis FED (FRED)<remote_data.fred>`
3531
- :ref:`Kenneth French's data library<remote_data.ff>`
32+
- :ref:`Stooq<remote_data.stooq>`
33+
- :ref:`Enigma<remote_data.enigma>`
3634
- :ref:`MOEX<remote_data.moex>`
3735
- :ref:`Nasdaq Trader symbol definitions<remote_data.nasdaq_symbols>`
3836
- :ref:`Naver Finance<remote_data.naver>`
39-
- :ref:`OECD<remote_data.oecd>`
37+
38+
39+
The following sources may not be working since they require an API key for testing:
40+
41+
- :ref:`Alpha Vantage<remote_data.alphavantage>`
4042
- :ref:`Quandl<remote_data.quandl>`
41-
- :ref:`St.Louis FED (FRED)<remote_data.fred>`
42-
- :ref:`Stooq<remote_data.stooq>`
43-
- :ref:`Thrift Savings Plan<remote_data.tsp>`
4443
- :ref:`Tiingo<remote_data.tiingo>`
45-
- :ref:`World Bank<remote_data.wb>`
44+
- :ref:`IEX<remote_data.iex>`
45+
46+
The following sources have been previously supported but are fully working in the current version:
47+
4648
- :ref:`Yahoo Finance<remote_data.yahoo>`
49+
- :ref:`Eurostat<remote_data.eurostat>`
50+
- :ref:`OECD<remote_data.oecd>`
51+
- :ref:`Econdb<remote_data.econdb>`
52+
- :ref:`World Bank<remote_data.wb>`
53+
- :ref:`Thrift Savings Plan<remote_data.tsp>`
54+
4755

4856
It should be noted, that various sources support different kinds of data, so not all sources implement the same methods and the data elements returned might also differ.
4957

@@ -447,6 +455,7 @@ FRED
447455
====
448456

449457
.. ipython:: python
458+
:okexcept:
450459
451460
import pandas_datareader.data as web
452461
import datetime
@@ -470,6 +479,7 @@ Access datasets from the `Fama/French Data Library
470479
The ``get_available_datasets`` function returns a list of all available datasets.
471480

472481
.. ipython:: python
482+
:okexcept:
473483
474484
from pandas_datareader.famafrench import get_available_datasets
475485
import pandas_datareader.data as web
@@ -650,6 +660,11 @@ See docstrings for more info.
650660
OECD
651661
====
652662
663+
.. warning::
664+
665+
The OECD reader is currently not working. PRs to fix are welcome.
666+
667+
653668
`OECD Statistics <http://stats.oecd.org/>`__ are available via ``DataReader``.
654669
You have to specify OECD's data set code.
655670
@@ -658,6 +673,7 @@ example is to download 'Trade Union Density' data which set code is 'TUD'.
658673
659674
660675
.. ipython:: python
676+
:okexcept:
661677
662678
import pandas_datareader.data as web
663679
import datetime
@@ -673,6 +689,11 @@ example is to download 'Trade Union Density' data which set code is 'TUD'.
673689
Eurostat
674690
========
675691
692+
.. warning::
693+
694+
The Eurostat reader is currently not working. PRs to fix are welcome.
695+
696+
676697
`Eurostat <http://ec.europa.eu/eurostat/>`__ are available via ``DataReader``.
677698
678699
Get `Rail accidents by type of accident (ERA data) <http://appsso.eurostat.ec.europa.eu/nui/show.do?dataset=tran_sf_railac&lang=en>`_ data. The result will be a ``DataFrame`` which has ``DatetimeIndex`` as index and ``MultiIndex`` of attributes or countries as column. The target URL is:
@@ -682,6 +703,7 @@ Get `Rail accidents by type of accident (ERA data) <http://appsso.eurostat.ec.eu
682703
You can specify dataset ID 'tran_sf_railac' to get corresponding data via ``DataReader``.
683704
684705
.. ipython:: python
706+
:okexcept:
685707
686708
import pandas_datareader.data as web
687709
@@ -693,9 +715,15 @@ You can specify dataset ID 'tran_sf_railac' to get corresponding data via ``Data
693715
Thrift Savings Plan (TSP) Fund Data
694716
===================================
695717
718+
.. warning::
719+
720+
The TSP reader is currently not working. PRs to fix are welcome.
721+
722+
696723
Download mutual fund index prices for the Thrift Savings Plan (TSP).
697724
698725
.. ipython:: python
726+
:okexcept:
699727
700728
import pandas_datareader.tsp as tsp
701729
tspreader = tsp.TSPReader(start='2015-10-1', end='2015-12-31')
@@ -738,6 +766,7 @@ Stooq Index Data
738766
Google finance doesn't provide common index data download. The Stooq site has the data for download.
739767
740768
.. ipython:: python
769+
:okexcept:
741770
742771
import pandas_datareader.data as web
743772
f = web.DataReader('^DJI', 'stooq')
@@ -753,6 +782,7 @@ The Moscow Exchange (MOEX) provides historical data.
753782
``pandas_datareader.moex.MoexReader(*args).read()``
754783
755784
.. ipython:: python
785+
:okexcept:
756786
757787
import pandas_datareader as pdr
758788
f = pdr.get_data_moex(['USD000UTSTOM', 'MAGN'], '2020-07-02', '2020-07-07')
@@ -772,6 +802,7 @@ Naver Finance Data
772802
(`KOSPI`_, `KOSDAQ`_) historical data.
773803
774804
.. ipython:: python
805+
:okexcept:
775806
776807
import pandas_datareader.data as web
777808
df = web.DataReader('005930', 'naver', start='2019-09-10', end='2019-10-09')
@@ -784,6 +815,12 @@ Naver Finance Data
784815
785816
Yahoo Finance Data
786817
==================
818+
819+
.. warning::
820+
821+
The Yahoo Finance reader is currently not working. PRs to fix are welcome.
822+
823+
787824
Yahoo Finance provides stock market data
788825
789826
The following endpoints are available:
@@ -793,6 +830,7 @@ The following endpoints are available:
793830
* ``yahoo-dividends`` - retrieve historical dividends
794831
795832
.. ipython:: python
833+
:okexcept:
796834
797835
import pandas_datareader.data as web
798836
import pandas as pd

Diff for: pandas_datareader/tests/test_data.py

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88

99
class TestDataReader:
10+
11+
@pytest.mark.xfail(reason="Changes in API need fixes")
1012
def test_read_iex(self):
1113
gs = DataReader("GS", "iex-last")
1214
assert isinstance(gs, DataFrame)

Diff for: pandas_datareader/tests/test_econdb.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from pandas_datareader import data as web
66

7-
pytestmark = pytest.mark.stable
7+
pytestmark = pytest.mark.xfail(reason="Changes in API need fixes")
88

99

1010
def assert_equal(x, y):

Diff for: pandas_datareader/tests/test_eurostat.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from pandas_datareader import data as web
77

8-
pytestmark = pytest.mark.stable
8+
pytestmark = pytest.mark.xfail(reason="Changes in API need fixes")
99

1010

1111
class TestEurostat:

Diff for: pandas_datareader/tests/test_iex.py

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
)
1414
from pandas_datareader.exceptions import UnstableAPIWarning
1515

16+
pytestmark = pytest.mark.xfail(reason="Changes in API need fixes")
17+
1618

1719
class TestIEX:
1820
@classmethod

Diff for: pandas_datareader/tests/test_oecd.py

+1
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ def test_get_un_den(self):
187187
expected = pd.Series(values, index=index, name=label)
188188
tm.assert_series_equal(df[label], expected)
189189

190+
@pytest.mark.xfail(reason="Changes in API need fixes")
190191
def test_get_tourism(self):
191192
df = web.DataReader(
192193
"TOURISM_INBOUND",

Diff for: pandas_datareader/tests/test_stooq.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def test_stooq_sp500():
2626
assert f.shape[0] > 0
2727

2828

29-
@pytest.mark.xfail(reason="No longer works as of Otober 2023")
29+
@pytest.mark.xfail(reason="No longer works as of October 2023")
3030
def test_stooq_clx19f():
3131
f = get_data_stooq("CLX26.F", start="20200101", end="20200115")
3232
assert f.shape[0] > 0

Diff for: pandas_datareader/tests/yahoo/test_yahoo.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
XFAIL_REASON = "Known connection failures on Yahoo when testing!"
1616

17-
pytestmark = pytest.mark.stable
17+
pytestmark = pytest.mark.xfail(reason="Changes in API need fixes")
1818

1919

2020
class TestYahoo:

Diff for: pandas_datareader/yahoo/options.py

-6
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ class Options(_OptionBaseReader):
6666

6767
def get_options_data(self, month=None, year=None, expiry=None):
6868
"""
69-
***Experimental***
7069
Gets call/put data for the stock with the expiration data in the
7170
given month and year
7271
@@ -184,7 +183,6 @@ def _get_option_data(self, expiry, name):
184183

185184
def get_call_data(self, month=None, year=None, expiry=None):
186185
"""
187-
***Experimental***
188186
Gets call/put data for the stock with the expiration data in the
189187
given month and year
190188
@@ -254,7 +252,6 @@ def get_call_data(self, month=None, year=None, expiry=None):
254252

255253
def get_put_data(self, month=None, year=None, expiry=None):
256254
"""
257-
***Experimental***
258255
Gets put data for the stock with the expiration data in the
259256
given month and year
260257
@@ -328,7 +325,6 @@ def get_near_stock_price(
328325
self, above_below=2, call=True, put=False, month=None, year=None, expiry=None
329326
):
330327
"""
331-
***Experimental***
332328
Returns a DataFrame of options that are near the current stock price.
333329
334330
Parameters
@@ -506,7 +502,6 @@ def get_forward_data(
506502
self, months, call=True, put=False, near=False, above_below=2
507503
): # pragma: no cover
508504
"""
509-
***Experimental***
510505
Gets either call, put, or both data for months starting in the current
511506
month and going out in the future a specified amount of time.
512507
@@ -573,7 +568,6 @@ def get_forward_data(
573568

574569
def get_all_data(self, call=True, put=True):
575570
"""
576-
***Experimental***
577571
Gets either call, put, or both data for all available months starting
578572
in the current month.
579573

0 commit comments

Comments
 (0)