Skip to content

Commit

Permalink
MAINT: Fix IEX
Browse files Browse the repository at this point in the history
Fix IEX tests
  • Loading branch information
bashtage committed Jul 7, 2020
1 parent c47efbe commit 4c5ccdc
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 14 deletions.
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,17 @@ Requirements

Using pandas datareader requires the following packages:

* pandas>=0.19.2
* pandas>=0.23
* lxml
* requests>=2.3.0
* requests>=2.19.0

Building the documentation additionally requires:

* matplotlib
* ipython
* requests_cache
* sphinx
* sphinx_rtd_theme
* pydata_sphinx_theme

Development and testing additionally requires:

Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ ipython
matplotlib
sphinx_rtd_theme
requests_cache
pydata_sphinx_theme
24 changes: 18 additions & 6 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,19 @@
# serve to show the default.

import os
import sys

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
import IPython


import pandas_datareader as pdr
import sphinx_rtd_theme

on_rtd = os.environ.get("READTHEDOCS", None) == "True"
if on_rtd:
import sphinx_rtd_theme
else:
import pydata_sphinx_theme # noqa: F401

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

# General information about the project.
project = u"pandas-datareader"
copyright = u"2018, The PyData Development Team"
copyright = u"2020, The PyData Development Team"
author = "The PyData Development Team"

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

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
if on_rtd:
html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
else:
html_theme = "pydata_sphinx_theme"
# html_theme_path = pydata_sphinx_theme.get_html_theme_path()
html_theme_options = {
"external_links": [],
"github_url": "https://github.com/pydata/pandas-datareader",
}

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down
8 changes: 4 additions & 4 deletions pandas_datareader/tests/test_iex_daily.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_daily_invalid_date(self):
def test_single_symbol(self):
df = web.DataReader("AAPL", "iex", self.start, self.end)
assert list(df) == ["open", "high", "low", "close", "volume"]
assert len(df) == 578
assert len(df) == 476

def test_multiple_symbols(self):
syms = ["AAPL", "MSFT", "TSLA"]
Expand Down Expand Up @@ -103,19 +103,19 @@ def test_range_string_from_date(self):
IEXDailyReader(
symbols=syms, start=date.today() - timedelta(days=365), end=date.today()
)._range_string_from_date()
== "2y"
== "1y"
)
assert (
IEXDailyReader(
symbols=syms, start=date.today() - timedelta(days=730), end=date.today()
)._range_string_from_date()
== "5y"
== "2y"
)
assert (
IEXDailyReader(
symbols=syms,
start=date.today() - timedelta(days=1826),
end=date.today(),
)._range_string_from_date()
== "max"
== "5y"
)
2 changes: 1 addition & 1 deletion versioneer.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, env=

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

0 comments on commit 4c5ccdc

Please sign in to comment.