Skip to content

Commit 3b73536

Browse files
authored
Merge pull request #2 from pydata/master
Updating fork
2 parents 6498ad3 + 63a51b4 commit 3b73536

Some content is hidden

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

90 files changed

+4873
-2604
lines changed

.codecov.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
codecov:
2+
notify:
3+
require_ci_to_pass: no
4+
coverage:
5+
status:
6+
project:
7+
default:
8+
# Require 1% coverage, i.e., always succeed
9+
target: 1
10+
patch: false
11+
changes: false

.github/PULL_REQUEST_TEMPLATE.md

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

.travis.yml

Lines changed: 48 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,72 @@
1-
sudo: false
2-
1+
dist: bionic
32
language: python
43

54
env:
65
global:
6+
- TEST_TYPE="stable and not requires_api_key"
77
# Doctr deploy key for pydata/pandas-datareader
88
- secure: "iGbOAbBSV5y0TKDh2CifRSk6OpLA9GbEEL/hscHFLSDDUCWcdfvYXda3SWJFWyoQ5QUxSigXWd+ukr4u92d7lmB7m3TWj6BAMNuRpatTgnejLNwLvNeYdvLAxPvx39Cq85frd1Rx1beBLn3h/4wm4Ah+dR5W9NH8+x3OuZMH3Eo="
99

10-
1110
matrix:
1211
fast_finish: true
1312
include:
14-
- dist: bionic
15-
env:
16-
- PYTHON=2.7 PANDAS=0.19.2
17-
- dist: bionic
18-
env:
19-
- PYTHON=2.7 PANDAS=0.22
20-
- dist: bionic
21-
env:
22-
- PYTHON=3.5 PANDAS=0.19.2
23-
- dist: bionic
24-
env:
25-
- PYTHON=3.5 PANDAS=0.20.3
26-
- dist: bionic
27-
env:
28-
- PYTHON=3.6 PANDAS=0.23.0
29-
- dist: bionic
30-
env:
31-
- PYTHON=3.7 PANDAS=0.25 DOCBUILD=true
32-
# In allow failures
33-
- dist: bionic
34-
env:
35-
- PYTHON=3.6 PANDAS="MASTER"
13+
- python: 2.7
14+
env: PANDAS=0.24 NUMPY=1.16
15+
- python: 3.5
16+
env: PANDAS=0.21 NUMPY=1.13
17+
- python: 3.5
18+
env: PANDAS=0.22 NUMPY=1.13
19+
- python: 3.6
20+
env: PANDAS=0.23 NUMPY=1.14
21+
- python: 3.7
22+
env: PANDAS=0.25 NUMPY=1.17 DOCBUILD=true
23+
- python: 3.7
24+
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
30+
- python: 3.7
31+
env: TEST_TYPE="not stable and not alpha_vantage and not quandl" PANDAS=0.25 NUMPY=1.17
32+
- python: 3.7
33+
env: PANDAS="MASTER" NUMPY=1.17
3634
allow_failures:
37-
- dist: bionic
38-
env:
39-
- PYTHON=3.6 PANDAS="MASTER"
35+
- python: 3.7
36+
env: PANDAS="MASTER" NUMPY=1.17
37+
- python: 3.7
38+
env: TEST_TYPE="alpha_vantage" PANDAS=0.25 NUMPY=1.17
39+
- python: 3.7
40+
env: TEST_TYPE="not stable and not alpha_vantage and not quandl" PANDAS=0.25 NUMPY=1.17
4041

4142
install:
42-
- pip install -qq flake8
43-
# You may want to periodically update this, although the conda update
44-
# conda line below will keep everything up-to-date. We do this
45-
# conditionally because it saves us some downloading if the version is
46-
# the same.
47-
- if [[ "$PYTHON" == "2.7" ]]; then
48-
wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
49-
else
50-
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
51-
fi
52-
- bash miniconda.sh -b -p $HOME/miniconda
53-
- export PATH="$HOME/miniconda/bin:$PATH"
54-
- hash -r
55-
- conda config --set always_yes yes --set changeps1 no
56-
- conda config --add channels pandas
57-
- conda update -q conda
58-
# Useful for debugging any issues with conda
59-
- conda info -a
60-
- conda create -q -n test-environment python=$PYTHON coverage setuptools html5lib lxml pytest pytest-cov wrapt
61-
- source activate test-environment
62-
- if [[ "$PANDAS" == "MASTER" ]]; then
63-
conda install numpy pytz python-dateutil;
64-
PRE_WHEELS="https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com";
65-
pip install --pre --upgrade --timeout=60 -f $PRE_WHEELS pandas;
66-
else
67-
conda install pandas=$PANDAS;
68-
fi
69-
- if [[ $DOCBUILD ]]; then
70-
conda install sphinx ipython matplotlib;
71-
pip install sphinx_rtd_theme doctr;
72-
fi
73-
- pip install pip --upgrade
74-
- pip install codecov coveralls beautifulsoup4
75-
- conda list
43+
- source ci/pypi-install.sh;
44+
- pip list
7645
- python setup.py install
7746

7847
script:
79-
- export ENIGMA_API_KEY=$ENIGMA_API_KEY
80-
- pytest -s -r xX --cov-config .coveragerc --cov=pandas_datareader --cov-report xml:/tmp/cov-datareader.xml --junitxml=/tmp/datareader.xml
81-
- flake8 --version
82-
- flake8 pandas_datareader
83-
84-
after_script:
48+
- if [[ -n "${TEST_TYPE+x}" ]]; then export MARKERS="-m ${TEST_TYPE}"; fi
49+
- pytest -v -s -r xX "${MARKERS}" --cov-config .coveragerc --cov=pandas_datareader --cov-report xml:/tmp/cov-datareader.xml --junitxml=/tmp/datareader.xml
50+
- |
51+
if (( $(echo "$TRAVIS_PYTHON_VERSION > 3.5" | bc -l) )); then
52+
black --check pandas_datareader
53+
fi
54+
- flake8 --version
55+
- flake8 pandas_datareader
8556
- |
86-
if [[ ${DOCBUILD} ]]; then
57+
if [[ "$DOCBUILD" ]]; then
58+
set -e
8759
cd docs
88-
make html && make html
60+
make html
8961
cd ..
90-
doctr deploy devel --build-tags
91-
if [[ -z ${TRAVIS_TAG} ]]; then
92-
echo "Not a tagged build."
62+
if [[ -z "$TRAVIS_TAG" ]]; then
63+
doctr deploy devel --build-tags
9364
else
94-
doctr deploy stable --build-tags
65+
doctr deploy . --build-tags
9566
fi
67+
set +e
9668
fi
69+
70+
after_script:
9771
- coveralls
9872
- codecov

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
include README.md
22
include LICENSE.md
3+
include requirements.txt
4+
include requirements-dev.txt
35
include pandas_datareader/*.py
46

57
include pandas_datareader/tests/*.py

README.rst

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,18 @@ Up to date remote data access for pandas, works for multiple versions of pandas.
1818
.. image:: https://readthedocs.org/projects/pandas-datareader/badge/?version=latest
1919
:target: https://pandas-datareader.readthedocs.io/en/latest/
2020

21-
.. image:: https://landscape.io/github/pydata/pandas-datareader/master/landscape.svg?style=flat
22-
:target: https://landscape.io/github/pydata/pandas-datareader/master
23-
:alt: Code Health
21+
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
22+
:target: https://github.com/psf/black
23+
24+
25+
.. warning::
26+
27+
v0.8.0 is the last version which officially supports Python 2.7. Future versions of ``pandas_datareader`` will end support for Python 2.x.
2428

2529
.. warning::
2630

27-
As of v0.7.0 Google finance and Morningstar have been been immediately deprecated due to
28-
large changes in their API and no stable replacement.
31+
As of v0.8.0 Robinhood has been immediately deprecated due to
32+
large changes in their API and no stable replacement.
2933

3034

3135
Usage
@@ -49,9 +53,9 @@ Many functions from the data module have been included in the top level API.
4953
Documentation
5054
-------------
5155

52-
`Stable documentation <https://pydata.github.io/pandas-datareader/stable/>`__
56+
`Stable documentation <https://pydata.github.io/pandas-datareader/>`__
5357
is available on
54-
`github.io <https://pydata.github.io/pandas-datareader/stable/>`__.
58+
`github.io <https://pydata.github.io/pandas-datareader/>`__.
5559
A second copy of the stable documentation is hosted on
5660
`read the docs <https://pandas-datareader.readthedocs.io/>`_ for more details.
5761

@@ -69,16 +73,25 @@ Using pandas datareader requires the following packages:
6973
* pandas>=0.19.2
7074
* lxml
7175
* requests>=2.3.0
72-
* wrapt
7376

7477
Building the documentation additionally requires:
7578

7679
* matplotlib
7780
* ipython
81+
* requests_cache
7882
* sphinx
7983
* sphinx_rtd_theme
8084

81-
Testing requires pytest.
85+
Development and testing additionally requires:
86+
87+
* black
88+
* coverage
89+
* codecov
90+
* coveralls
91+
* flake8
92+
* pytest
93+
* pytest-cov
94+
* wrapt
8295

8396
Install latest release version via pip
8497
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ci/pypi-install.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
3+
pip install pip --upgrade
4+
pip install numpy=="$NUMPY" lxml
5+
pip install -r requirements-dev.txt
6+
7+
if [[ "$PANDAS" == "MASTER" ]]; then
8+
PRE_WHEELS="https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com"
9+
pip install --pre --upgrade --timeout=60 -f "$PRE_WHEELS" pandas
10+
else
11+
pip install pandas=="$PANDAS"
12+
fi
13+
14+
if [[ "$DOCBUILD" ]]; then
15+
pip install doctr
16+
pip install -r docs/requirements.txt
17+
fi

docs/contributors.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
"""
2+
Get a list of contributors between now and a start date
3+
"""
4+
5+
import datetime as dt
6+
import os
7+
8+
from github import Github
9+
10+
# or using an access token
11+
g = Github(os.environ.get("GITHUB_API_KEY"))
12+
13+
repo = g.get_repo("pydata/pandas-datareader")
14+
15+
start = dt.datetime(2018, 9, 12, 0, 0, 0)
16+
pulls = repo.get_pulls(state="closed", sort="updated", base="master", direction="desc")
17+
18+
users = set()
19+
for i, p in enumerate(pulls):
20+
print(f"{i}: {p.number}")
21+
if p.merged and p.merged_at >= start:
22+
users.update([p.user.name])
23+
if p.updated_at < start:
24+
break
25+
26+
contrib = sorted((c for c in users if c), key=lambda s: s.split(" ")[-1])
27+
28+
for c in contrib:
29+
print(f"- {c}")

docs/requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
sphinx
2+
ipython
3+
matplotlib
4+
sphinx_rtd_theme
5+
requests_cache

0 commit comments

Comments
 (0)