Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] passes `black --check pandas_datareader`
- [ ] added entry to docs/source/whatsnew/vLATEST.txt
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,17 @@ matrix:

install:
- source ci/pypi-install.sh;
- pip install codecov coveralls beautifulsoup4 flake8
- pip list
- python setup.py install

script:

- if [[ -n "${TEST_TYPE+x}" ]]; then export MARKERS="-m ${TEST_TYPE}"; fi
- pytest -s -r xX "${MARKERS}" --cov-config .coveragerc --cov=pandas_datareader --cov-report xml:/tmp/cov-datareader.xml --junitxml=/tmp/datareader.xml
- flake8 --version
- flake8 pandas_datareader
- |
if [[ "$TRAVIS_PYTHON_VERSION" != 2.7 ]]; then
black --check pandas_datareader
fi

after_script:
- |
Expand Down
10 changes: 7 additions & 3 deletions ci/pypi-install.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
#!/usr/bin/env bash

echo "PyPI install"

pip install pip --upgrade
pip install numpy=="$NUMPY" pytz python-dateutil coverage setuptools html5lib lxml pytest pytest-cov wrapt
pip install numpy=="$NUMPY" pytz python-dateutil coverage setuptools html5lib lxml pytest pytest-cov wrapt codecov coveralls beautifulsoup4 isort

if [[ "$TRAVIS_PYTHON_VERSION" != 2.7 ]]; then
pip install black
fi

if [[ "$PANDAS" == "MASTER" ]]; then
PRE_WHEELS="https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com"
pip install --pre --upgrade --timeout=60 -f "$PRE_WHEELS" pandas
else
pip install pandas=="$PANDAS"
fi

if [[ "$DOCBUILD" ]]; then
pip install sphinx ipython matplotlib sphinx_rtd_theme doctr
fi
76 changes: 56 additions & 20 deletions pandas_datareader/__init__.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,60 @@
from ._version import get_versions
from .data import (DataReader, Options, get_components_yahoo,
get_dailysummary_iex, get_data_enigma, get_data_famafrench,
get_data_fred, get_data_moex, get_data_quandl,
get_data_stooq, get_data_yahoo, get_data_yahoo_actions,
get_iex_book, get_iex_symbols, get_last_iex,
get_markets_iex, get_nasdaq_symbols, get_quote_yahoo,
get_recent_iex, get_records_iex, get_summary_iex,
get_tops_iex, get_data_tiingo, get_iex_data_tiingo,
get_data_alphavantage)
from .data import (
DataReader,
Options,
get_components_yahoo,
get_dailysummary_iex,
get_data_alphavantage,
get_data_enigma,
get_data_famafrench,
get_data_fred,
get_data_moex,
get_data_quandl,
get_data_stooq,
get_data_tiingo,
get_data_yahoo,
get_data_yahoo_actions,
get_iex_book,
get_iex_data_tiingo,
get_iex_symbols,
get_last_iex,
get_markets_iex,
get_nasdaq_symbols,
get_quote_yahoo,
get_recent_iex,
get_records_iex,
get_summary_iex,
get_tops_iex,
)

__version__ = get_versions()['version']
__version__ = get_versions()["version"]
del get_versions

__all__ = ['__version__', 'get_components_yahoo', 'get_data_enigma',
'get_data_famafrench', 'get_data_yahoo',
'get_data_yahoo_actions', 'get_quote_yahoo',
'get_iex_book', 'get_iex_symbols', 'get_last_iex',
'get_markets_iex', 'get_recent_iex', 'get_records_iex',
'get_summary_iex', 'get_tops_iex',
'get_nasdaq_symbols', 'get_data_quandl', 'get_data_moex',
'get_data_fred', 'get_dailysummary_iex',
'get_data_stooq', 'DataReader', 'Options',
'get_data_tiingo', 'get_iex_data_tiingo', 'get_data_alphavantage']
__all__ = [
"__version__",
"get_components_yahoo",
"get_data_enigma",
"get_data_famafrench",
"get_data_yahoo",
"get_data_yahoo_actions",
"get_quote_yahoo",
"get_iex_book",
"get_iex_symbols",
"get_last_iex",
"get_markets_iex",
"get_recent_iex",
"get_records_iex",
"get_summary_iex",
"get_tops_iex",
"get_nasdaq_symbols",
"get_data_quandl",
"get_data_moex",
"get_data_fred",
"get_dailysummary_iex",
"get_data_stooq",
"DataReader",
"Options",
"get_data_tiingo",
"get_iex_data_tiingo",
"get_data_alphavantage",
]
5 changes: 3 additions & 2 deletions pandas_datareader/_utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import datetime as dt

import requests
from pandas import to_datetime
import requests

from pandas_datareader.compat import is_number


Expand Down Expand Up @@ -33,7 +34,7 @@ def _sanitize_dates(start, end):
if end is None:
end = dt.datetime.today()
if start > end:
raise ValueError('start must be an earlier date than end')
raise ValueError("start must be an earlier date than end")
return start, end


Expand Down
Loading