Skip to content

Commit

Permalink
MAINT: Switch to PyPI and bump min versions
Browse files Browse the repository at this point in the history
Remove conda and use system python
Bump minimum supported versions
  • Loading branch information
bashtage committed Sep 15, 2019
1 parent 38d275a commit 7496711
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 66 deletions.
82 changes: 18 additions & 64 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,94 +1,48 @@
sudo: false

dist: bionic
language: python

env:
global:
# Doctr deploy key for pydata/pandas-datareader
- secure: "iGbOAbBSV5y0TKDh2CifRSk6OpLA9GbEEL/hscHFLSDDUCWcdfvYXda3SWJFWyoQ5QUxSigXWd+ukr4u92d7lmB7m3TWj6BAMNuRpatTgnejLNwLvNeYdvLAxPvx39Cq85frd1Rx1beBLn3h/4wm4Ah+dR5W9NH8+x3OuZMH3Eo="


matrix:
fast_finish: true
include:
- dist: bionic
env:
- PYTHON=2.7 PANDAS=0.19.2
- dist: bionic
env:
- PYTHON=2.7 PANDAS=0.22
- dist: bionic
env:
- PYTHON=3.5 PANDAS=0.19.2
- dist: bionic
env:
- PYTHON=3.5 PANDAS=0.20.3
- dist: bionic
env:
- PYTHON=3.6 PANDAS=0.23.0
- dist: bionic
env:
- PYTHON=3.7 PANDAS=0.25 DOCBUILD=true
- python: 2.7
env: PANDAS=0.24 NUMPY=1.16
- python: 3.5
env: PANDAS=0.21 NUMPY=1.13
- python: 3.5
env: PANDAS=0.22 NUMPY=1.13
- python: 3.6
env: PANDAS=0.23 NUMPY=1.14
- python: 3.7
env: PANDAS=0.25 NUMPY=1.17 DOCBUILD=true
# In allow failures
- dist: bionic
env:
- PYTHON=3.6 PANDAS="MASTER"
- env: PYTHON=3.7 PANDAS="MASTER"
allow_failures:
- dist: bionic
env:
- PYTHON=3.6 PANDAS="MASTER"
- env: PYTHON=3.7 PANDAS="MASTER"

install:
- pip install -qq flake8
# You may want to periodically update this, although the conda update
# conda line below will keep everything up-to-date. We do this
# conditionally because it saves us some downloading if the version is
# the same.
- if [[ "$PYTHON" == "2.7" ]]; then
wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda config --add channels pandas
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
- conda create -q -n test-environment python=$PYTHON coverage setuptools html5lib lxml pytest pytest-cov wrapt
- source activate test-environment
- if [[ "$PANDAS" == "MASTER" ]]; then
conda install numpy pytz python-dateutil;
PRE_WHEELS="https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com";
pip install --pre --upgrade --timeout=60 -f $PRE_WHEELS pandas;
else
conda install pandas=$PANDAS;
fi
- if [[ $DOCBUILD ]]; then
conda install sphinx ipython matplotlib;
pip install sphinx_rtd_theme doctr;
fi
- pip install pip --upgrade
- pip install codecov coveralls beautifulsoup4
- conda list
- source ci/pypi-install.sh;
- pip install codecov coveralls beautifulsoup4 flake8
- pip list
- python setup.py install

script:
- export ENIGMA_API_KEY=$ENIGMA_API_KEY
- pytest -s -r xX --cov-config .coveragerc --cov=pandas_datareader --cov-report xml:/tmp/cov-datareader.xml --junitxml=/tmp/datareader.xml
- flake8 --version
- flake8 pandas_datareader

after_script:
- |
if [[ ${DOCBUILD} ]]; then
if [[ "$DOCBUILD" ]]; then
cd docs
make html && make html
cd ..
doctr deploy devel --build-tags
if [[ -z ${TRAVIS_TAG} ]]; then
if [[ -z "$TRAVIS_TAG" ]]; then
echo "Not a tagged build."
else
doctr deploy stable --build-tags
Expand Down
16 changes: 16 additions & 0 deletions ci/pypi-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

set +x
echo "PyPI install"

pip install pip --upgrade
pip install numpy=="$NUMPY" pytz python-dateutil coverage setuptools html5lib lxml pytest pytest-cov wrapt
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
6 changes: 4 additions & 2 deletions pandas_datareader/econdb.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from pandas_datareader.compat import string_types

import requests
import pandas as pd
import pandas.compat as compat


from pandas_datareader.base import _BaseReader

Expand All @@ -15,7 +17,7 @@ class EcondbReader(_BaseReader):
@property
def url(self):
"""API URL"""
if not isinstance(self.symbols, compat.string_types):
if not isinstance(self.symbols, string_types):
raise ValueError('data name must be string')

return ('{0}?{1}&format=json&page_size=500&expand=meta'
Expand Down
2 changes: 2 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ ipython
requests_cache
sphinx
sphinx_rtd_theme
black
isort
11 changes: 11 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,14 @@ style = pep440
versionfile_source = pandas_datareader/_version.py
versionfile_build = pandas_datareader/_version.py
tag_prefix = v

[isort]
known_compat=pandas_datareader.compat.*
sections=FUTURE,COMPAT,STDLIB,THIRDPARTY,PRE_CORE,FIRSTPARTY,LOCALFOLDER
known_first_party=pandas_datareader
known_third_party=numpy,pandas,pytest,requests
multi_line_output=0
force_grid_wrap=0
combine_as_imports=True
force_sort_within_sections=True
line_width=99

0 comments on commit 7496711

Please sign in to comment.