Skip to content

Commit d155f78

Browse files
committed
MAINT: Fix Quandl
Fix quandl Split alphavantage and quandl Blacken code
1 parent 7044c7d commit d155f78

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+3810
-2116
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
- [ ] closes #xxxx
22
- [ ] tests added / passed
3-
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
3+
- [ ] passes `black --check pandas_datareader`
44
- [ ] added entry to docs/source/whatsnew/vLATEST.txt

.travis.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,35 @@ matrix:
2222
env: PANDAS=0.25 NUMPY=1.17 DOCBUILD=true
2323
- python: 3.7
2424
env: PANDAS=0.25 NUMPY=1.17
25+
- python: 3.7
26+
env: TEST_TYPE="quandl" PANDAS=0.25 NUMPY=1.17
27+
# In allow failures
28+
- python: 3.7
29+
env: TEST_TYPE="alpha_vantage" PANDAS=0.25 NUMPY=1.17
2530
- python: 3.7
2631
env: TEST_TYPE="not stable" PANDAS=0.25 NUMPY=1.17
27-
# In allow failures
2832
- python: 3.7
2933
env: PANDAS="MASTER" NUMPY=1.17
3034
allow_failures:
3135
- python: 3.7
3236
env: PANDAS="MASTER" NUMPY=1.17
37+
- python: 3.7
38+
env: TEST_TYPE="alpha_vantage" PANDAS=0.25 NUMPY=1.17
3339
- python: 3.7
3440
env: TEST_TYPE="not stable" PANDAS=0.25 NUMPY=1.17
3541

3642
install:
3743
- source ci/pypi-install.sh;
38-
- pip install codecov coveralls beautifulsoup4 flake8
3944
- pip list
4045
- python setup.py install
4146

4247
script:
4348
- if [[ -n "${TEST_TYPE+x}" ]]; then export MARKERS="-m ${TEST_TYPE}"; fi
4449
- pytest -s -r xX "${MARKERS}" --cov-config .coveragerc --cov=pandas_datareader --cov-report xml:/tmp/cov-datareader.xml --junitxml=/tmp/datareader.xml
45-
- flake8 --version
46-
- flake8 pandas_datareader
50+
- |
51+
if [[ "$TRAVIS_PYTHON_VERSION" -gt 3.5 ]]; then
52+
black --check pandas_datareader
53+
fi
4754
4855
after_script:
4956
- |

ci/pypi-install.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
#!/usr/bin/env bash
22

3-
echo "PyPI install"
4-
53
pip install pip --upgrade
6-
pip install numpy=="$NUMPY" pytz python-dateutil coverage setuptools html5lib lxml pytest pytest-cov wrapt
4+
pip install numpy=="$NUMPY" pytz python-dateutil coverage setuptools html5lib lxml pytest pytest-cov wrapt codecov coveralls beautifulsoup4 isort
5+
6+
if [[ "$TRAVIS_PYTHON_VERSION" != 2.7 ]]; then
7+
pip install black
8+
fi
9+
710
if [[ "$PANDAS" == "MASTER" ]]; then
811
PRE_WHEELS="https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com"
912
pip install --pre --upgrade --timeout=60 -f "$PRE_WHEELS" pandas
1013
else
1114
pip install pandas=="$PANDAS"
1215
fi
16+
1317
if [[ "$DOCBUILD" ]]; then
1418
pip install sphinx ipython matplotlib sphinx_rtd_theme doctr
1519
fi

docs/source/conf.py

Lines changed: 41 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -39,37 +39,37 @@
3939
import IPython
4040

4141
extensions = [
42-
'sphinx.ext.autodoc',
43-
'sphinx.ext.intersphinx',
44-
'sphinx.ext.extlinks',
45-
'sphinx.ext.napoleon',
46-
'IPython.sphinxext.ipython_directive',
47-
'IPython.sphinxext.ipython_console_highlighting'
42+
"sphinx.ext.autodoc",
43+
"sphinx.ext.intersphinx",
44+
"sphinx.ext.extlinks",
45+
"sphinx.ext.napoleon",
46+
"IPython.sphinxext.ipython_directive",
47+
"IPython.sphinxext.ipython_console_highlighting",
4848
]
4949

5050
# Add any paths that contain templates here, relative to this directory.
51-
templates_path = ['_templates']
51+
templates_path = ["_templates"]
5252

5353
# The suffix(es) of source filenames.
5454
# You can specify multiple suffix as a list of string:
5555
#
5656
# source_suffix = ['.rst', '.md']
57-
source_suffix = '.rst'
57+
source_suffix = ".rst"
5858

5959
# The master toctree document.
60-
master_doc = 'index'
60+
master_doc = "index"
6161

6262
# General information about the project.
63-
project = u'pandas-datareader'
64-
copyright = u'2018, The PyData Development Team'
65-
author = 'The PyData Development Team'
63+
project = u"pandas-datareader"
64+
copyright = u"2018, The PyData Development Team"
65+
author = "The PyData Development Team"
6666

6767
# The version info for the project you're documenting, acts as replacement for
6868
# |version| and |release|, also used in various other places throughout the
6969
# built documents.
7070
#
7171
# The short X.Y version.
72-
version = pdr.__version__.split('+')[0]
72+
version = pdr.__version__.split("+")[0]
7373
# The full version, including alpha/beta/rc tags.
7474
release = pdr.__version__
7575

@@ -86,7 +86,7 @@
8686
exclude_patterns = []
8787

8888
# The name of the Pygments (syntax highlighting) style to use.
89-
pygments_style = 'sphinx'
89+
pygments_style = "sphinx"
9090

9191
# If true, `todo` and `todoList` produce output, else they produce nothing.
9292
todo_include_todos = True
@@ -108,25 +108,25 @@
108108
# Add any paths that contain custom static files (such as style sheets) here,
109109
# relative to this directory. They are copied after the builtin static files,
110110
# so a file named "default.css" will overwrite the builtin "default.css".
111-
html_static_path = ['_static']
111+
html_static_path = ["_static"]
112112

113113
# Custom sidebar templates, must be a dictionary that maps document names
114114
# to template names.
115115
#
116116
# This is required for the alabaster theme
117117
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
118118
html_sidebars = {
119-
'**': [
120-
'relations.html', # needs 'show_related': True theme option to display
121-
'searchbox.html',
119+
"**": [
120+
"relations.html", # needs 'show_related': True theme option to display
121+
"searchbox.html",
122122
]
123123
}
124124

125125

126126
# -- Options for HTMLHelp output ------------------------------------------
127127

128128
# Output file base name for HTML help builder.
129-
htmlhelp_basename = 'pandas-datareaderdoc'
129+
htmlhelp_basename = "pandas-datareaderdoc"
130130

131131

132132
# -- Options for LaTeX output ---------------------------------------------
@@ -135,15 +135,12 @@
135135
# The paper size ('letterpaper' or 'a4paper').
136136
#
137137
# 'papersize': 'letterpaper',
138-
139138
# The font size ('10pt', '11pt' or '12pt').
140139
#
141140
# 'pointsize': '10pt',
142-
143141
# Additional stuff for the LaTeX preamble.
144142
#
145143
# 'preamble': '',
146-
147144
# Latex figure (float) alignment
148145
#
149146
# 'figure_align': 'htbp',
@@ -153,8 +150,13 @@
153150
# (source start file, target name, title,
154151
# author, documentclass [howto, manual, or own class]).
155152
latex_documents = [
156-
(master_doc, 'pandas-datareader.tex', 'pandas-datareader Documentation',
157-
'pydata', 'manual'),
153+
(
154+
master_doc,
155+
"pandas-datareader.tex",
156+
"pandas-datareader Documentation",
157+
"pydata",
158+
"manual",
159+
)
158160
]
159161

160162

@@ -163,8 +165,7 @@
163165
# One entry per manual page. List of tuples
164166
# (source start file, name, description, authors, manual section).
165167
man_pages = [
166-
(master_doc, 'pandas-datareader', 'pandas-datareader Documentation',
167-
[author], 1)
168+
(master_doc, "pandas-datareader", "pandas-datareader Documentation", [author], 1)
168169
]
169170

170171

@@ -174,19 +175,23 @@
174175
# (source start file, target name, title, author,
175176
# dir menu entry, description, category)
176177
texinfo_documents = [
177-
(master_doc, 'pandas-datareader', 'pandas-datareader Documentation',
178-
author, 'pandas-datareader', 'One line description of project.',
179-
'Miscellaneous'),
178+
(
179+
master_doc,
180+
"pandas-datareader",
181+
"pandas-datareader Documentation",
182+
author,
183+
"pandas-datareader",
184+
"One line description of project.",
185+
"Miscellaneous",
186+
)
180187
]
181188

182189

183-
184-
185190
# Example configuration for intersphinx: refer to the Python standard library.
186-
intersphinx_mapping = {'http://docs.python.org/': None}
191+
intersphinx_mapping = {"http://docs.python.org/": None}
187192

188193

189-
extlinks = {'issue': ('https://github.com/pydata/pandas-datareader/issues/%s',
190-
'GH'),
191-
'wiki': ('https://github.com/pydata/pandas-datareader/wiki/%s',
192-
'wiki ')}
194+
extlinks = {
195+
"issue": ("https://github.com/pydata/pandas-datareader/issues/%s", "GH"),
196+
"wiki": ("https://github.com/pydata/pandas-datareader/wiki/%s", "wiki "),
197+
}

pandas_datareader/__init__.py

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,34 @@
2727
get_tops_iex,
2828
)
2929

30-
__version__ = get_versions()['version']
30+
__version__ = get_versions()["version"]
3131
del get_versions
3232

33-
__all__ = ['__version__', 'get_components_yahoo', 'get_data_enigma',
34-
'get_data_famafrench', 'get_data_yahoo',
35-
'get_data_yahoo_actions', 'get_quote_yahoo',
36-
'get_iex_book', 'get_iex_symbols', 'get_last_iex',
37-
'get_markets_iex', 'get_recent_iex', 'get_records_iex',
38-
'get_summary_iex', 'get_tops_iex',
39-
'get_nasdaq_symbols', 'get_data_quandl', 'get_data_moex',
40-
'get_data_fred', 'get_dailysummary_iex',
41-
'get_data_stooq', 'DataReader', 'Options',
42-
'get_data_tiingo', 'get_iex_data_tiingo', 'get_data_alphavantage']
33+
__all__ = [
34+
"__version__",
35+
"get_components_yahoo",
36+
"get_data_enigma",
37+
"get_data_famafrench",
38+
"get_data_yahoo",
39+
"get_data_yahoo_actions",
40+
"get_quote_yahoo",
41+
"get_iex_book",
42+
"get_iex_symbols",
43+
"get_last_iex",
44+
"get_markets_iex",
45+
"get_recent_iex",
46+
"get_records_iex",
47+
"get_summary_iex",
48+
"get_tops_iex",
49+
"get_nasdaq_symbols",
50+
"get_data_quandl",
51+
"get_data_moex",
52+
"get_data_fred",
53+
"get_dailysummary_iex",
54+
"get_data_stooq",
55+
"DataReader",
56+
"Options",
57+
"get_data_tiingo",
58+
"get_iex_data_tiingo",
59+
"get_data_alphavantage",
60+
]

pandas_datareader/_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def _sanitize_dates(start, end):
3434
if end is None:
3535
end = dt.datetime.today()
3636
if start > end:
37-
raise ValueError('start must be an earlier date than end')
37+
raise ValueError("start must be an earlier date than end")
3838
return start, end
3939

4040

0 commit comments

Comments
 (0)