Skip to content

Commit 4c5ccdc

Browse files
committed
MAINT: Fix IEX
Fix IEX tests
1 parent c47efbe commit 4c5ccdc

File tree

5 files changed

+27
-14
lines changed

5 files changed

+27
-14
lines changed

README.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,17 @@ Requirements
6060

6161
Using pandas datareader requires the following packages:
6262

63-
* pandas>=0.19.2
63+
* pandas>=0.23
6464
* lxml
65-
* requests>=2.3.0
65+
* requests>=2.19.0
6666

6767
Building the documentation additionally requires:
6868

6969
* matplotlib
7070
* ipython
7171
* requests_cache
7272
* sphinx
73-
* sphinx_rtd_theme
73+
* pydata_sphinx_theme
7474

7575
Development and testing additionally requires:
7676

docs/requirements.txt

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

docs/source/conf.py

+18-6
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,19 @@
1414
# serve to show the default.
1515

1616
import os
17-
import sys
1817

1918
# Add any Sphinx extension module names here, as strings. They can be
2019
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
2120
# ones.
22-
import IPython
21+
2322

2423
import pandas_datareader as pdr
25-
import sphinx_rtd_theme
24+
25+
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
26+
if on_rtd:
27+
import sphinx_rtd_theme
28+
else:
29+
import pydata_sphinx_theme # noqa: F401
2630

2731
# If extensions (or modules to document with autodoc) are in another directory,
2832
# add these directories to sys.path here. If the directory is relative to the
@@ -64,7 +68,7 @@
6468

6569
# General information about the project.
6670
project = u"pandas-datareader"
67-
copyright = u"2018, The PyData Development Team"
71+
copyright = u"2020, The PyData Development Team"
6872
author = "The PyData Development Team"
6973

7074
# The version info for the project you're documenting, acts as replacement for
@@ -105,8 +109,16 @@
105109

106110
# The theme to use for HTML and HTML Help pages. See the documentation for
107111
# a list of builtin themes.
108-
html_theme = "sphinx_rtd_theme"
109-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
112+
if on_rtd:
113+
html_theme = "sphinx_rtd_theme"
114+
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
115+
else:
116+
html_theme = "pydata_sphinx_theme"
117+
# html_theme_path = pydata_sphinx_theme.get_html_theme_path()
118+
html_theme_options = {
119+
"external_links": [],
120+
"github_url": "https://github.com/pydata/pandas-datareader",
121+
}
110122

111123
# Theme options are theme-specific and customize the look and feel of a theme
112124
# further. For a list of options available for each theme, see the

pandas_datareader/tests/test_iex_daily.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def test_daily_invalid_date(self):
4141
def test_single_symbol(self):
4242
df = web.DataReader("AAPL", "iex", self.start, self.end)
4343
assert list(df) == ["open", "high", "low", "close", "volume"]
44-
assert len(df) == 578
44+
assert len(df) == 476
4545

4646
def test_multiple_symbols(self):
4747
syms = ["AAPL", "MSFT", "TSLA"]
@@ -103,19 +103,19 @@ def test_range_string_from_date(self):
103103
IEXDailyReader(
104104
symbols=syms, start=date.today() - timedelta(days=365), end=date.today()
105105
)._range_string_from_date()
106-
== "2y"
106+
== "1y"
107107
)
108108
assert (
109109
IEXDailyReader(
110110
symbols=syms, start=date.today() - timedelta(days=730), end=date.today()
111111
)._range_string_from_date()
112-
== "5y"
112+
== "2y"
113113
)
114114
assert (
115115
IEXDailyReader(
116116
symbols=syms,
117117
start=date.today() - timedelta(days=1826),
118118
end=date.today(),
119119
)._range_string_from_date()
120-
== "max"
120+
== "5y"
121121
)

versioneer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, env=
430430

431431
LONG_VERSION_PY[
432432
"git"
433-
] = '''
433+
] = r'''
434434
# This file helps to compute a version number in source trees obtained from
435435
# git-archive tarball (such as those provided by githubs download-from-tag
436436
# feature). Distribution tarballs (built by setup.py sdist) and build

0 commit comments

Comments
 (0)