Skip to content

Python 3.5, reconfigure Travis #90

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 27, 2015
Merged
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
89 changes: 63 additions & 26 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,75 @@
# Based on
# http://conda.pydata.org/docs/travis.html
# https://github.com/xray/xray/blob/master/.travis.yml
# https://github.com/scipy/scipy/blob/master/.travis.yml

language: python
python:
- 2.7
- 3.3
- 3.4
env:
- PD_VERSION=0.13.1
- PD_VERSION="0.14.*"
- PD_VERSION="0.15.*"
- PD_VERSION="0.16.*"
sudo: false # if false, use TravisCI's container based build

matrix:
include:
- python: 2.7
env: CONDA_ENV=py27-min
- python: 2.7
env: CONDA_ENV=py27
- python: 3.4
env: CONDA_ENV=py34
addons:
apt:
packages:
- libatlas-dev
- libatlas-base-dev
- liblapack-dev
- gfortran
- libgmp-dev
- libmpfr-dev
- python: 3.5
env: CONDA_ENV=py35
addons:
apt:
packages:
- libatlas-dev
- libatlas-base-dev
- liblapack-dev
- gfortran
- libgmp-dev
- libmpfr-dev

addons:
apt:
packages:
- ccache

cache:
directories:
- $HOME/.ccache

# setup miniconda for numpy, scipy, pandas
before_install:
- echo "before install"
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b
- export PATH=/home/travis/miniconda/bin:$PATH
- conda update --yes conda
- sudo rm -rf /dev/shm
- sudo ln -s /run/shm /dev/shm
- date
- uname -a
- python -V
- export PATH=/usr/lib/ccache:$PATH
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget http://repo.continuum.io/miniconda/Miniconda-3.16.0-Linux-x86_64.sh -O miniconda.sh;
else
wget http://repo.continuum.io/miniconda/Miniconda3-3.16.0-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 update -q conda
- conda info -a

install:
- echo "install"
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then conda install --yes python=$TRAVIS_PYTHON_VERSION numpy scipy pandas=$PD_VERSION nose pytz ephem; fi
- if [[ $TRAVIS_PYTHON_VERSION == '3.3' || $TRAVIS_PYTHON_VERSION == '3.4' ]]; then conda install --yes python=$TRAVIS_PYTHON_VERSION numpy=1.8 scipy=0.14 pandas nose pytz ephem; conda install --yes pandas=$PD_VERSION --no-deps; fi
- test $PD_VERSION != 0.13.1 && conda install --yes "numba>=0.17" || echo "Not installing numba"
- conda install --yes coverage
- pip install coveralls
- conda env create --file ci/requirements-$CONDA_ENV.yml
- source activate test_env # all envs are named test_env in the yml files
- conda list
- echo $PATH
- ls -l /home/travis/miniconda/envs/test_env/lib
#- pip install . # use pip to automatically install anything not in the yml files (i.e. numpy/scipy/pandas for py3*)
- pip install scipy # won't do anything if already installed
- python setup.py install
# for nosetests to actually work since it alters the path
- python setup.py build_ext --inplace

script:
- nosetests -v --with-coverage --cover-package=pvlib pvlib
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ License
Compatibility
=============

pvlib-python is compatible with Python versions 2.7, 3.3, and 3.4, and pandas versions 0.13.1 through 0.16.2.
pvlib-python is compatible with Python versions 2.7, 3.3, 3.4, 3.5 and Pandas versions 0.13.1 through 0.17. Note that our Numba-accelerated solar position algorithms have more specific version requirements that will be resolved by the Numba installer.

For Linux + Python 3 users: The combination of Linux, Python 3, NumPy 1.9, and SciPy 0.15 has some bugs. The most common place for these bugs to show up when using pvlib-python is in calculating IV curve parameters using the ``singlediode`` function. Downgrade your NumPy to 1.8 and SciPy to 0.14, then install whatever version of pandas you want but without dependencies. The conda commands for this are:
For Linux + Python 3 users: Continuum's Python 3.x SciPy conda package is not compiled properly and has a few bugs related to complex arithmetic. The most common place for these bugs to show up when using pvlib-python is in calculating IV curve parameters using the ``singlediode`` function. We reported [the issue](https://github.com/ContinuumIO/anaconda-issues/issues/425) to Continuum and are waiting for it to be fixed. In the meantime, you can compile your own SciPy distribution, or you can use this trick on Python 3.3 and 3.4 (not 3.5): Downgrade your NumPy to 1.8 and SciPy to 0.14, then install whatever version of pandas you want but without dependencies. The conda commands for this are:

```
conda install numpy=1.8 scipy=0.14
Expand Down
11 changes: 11 additions & 0 deletions ci/requirements-py27-min.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: test_env
dependencies:
- python=2.7
- numpy==1.8.2
- scipy
- pandas==0.13.1
- nose
- pytz
- ephem
- pip:
- coveralls
12 changes: 12 additions & 0 deletions ci/requirements-py27.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: test_env
dependencies:
- python=2.7
- numpy
- scipy
- pandas
- nose
- pytz
- ephem
- numba
- pip:
- coveralls
11 changes: 11 additions & 0 deletions ci/requirements-py34.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: test_env
dependencies:
- python=3.4
- nose
- pytz
- ephem
#- numba
- pip:
- numpy
- pandas
- coveralls
11 changes: 11 additions & 0 deletions ci/requirements-py35.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: test_env
dependencies:
- python=3.5
- nose
- pytz
- ephem
# - numba
- pip:
- numpy
- pandas
- coveralls
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
exec(f.read())

# check python version.
if not sys.version_info[:2] in ((2,7), (3,3), (3,4)):
if not sys.version_info[:2] in ((2,7), (3,3), (3,4), (3,5)):
sys.exit('%s requires Python 2.7, 3.3, or 3.4' % DISTNAME)

setuptools_kwargs = {
'zip_safe': False,
'install_requires': ['numpy >= 1.7.0',
'install_requires': ['numpy >= 1.8.2',
'pandas >= 0.13.1',
'pytz',
'six',
Expand Down