Skip to content

Commit 9b2b368

Browse files
committed
Merge pull request #90 from wholmgren/python35
Python 3.5, reconfigure Travis
2 parents d00ef2d + 5bb39e2 commit 9b2b368

File tree

7 files changed

+112
-30
lines changed

7 files changed

+112
-30
lines changed

.travis.yml

Lines changed: 63 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,75 @@
1+
# Based on
2+
# http://conda.pydata.org/docs/travis.html
3+
# https://github.com/xray/xray/blob/master/.travis.yml
4+
# https://github.com/scipy/scipy/blob/master/.travis.yml
5+
16
language: python
2-
python:
3-
- 2.7
4-
- 3.3
5-
- 3.4
6-
env:
7-
- PD_VERSION=0.13.1
8-
- PD_VERSION="0.14.*"
9-
- PD_VERSION="0.15.*"
10-
- PD_VERSION="0.16.*"
7+
sudo: false # if false, use TravisCI's container based build
8+
9+
matrix:
10+
include:
11+
- python: 2.7
12+
env: CONDA_ENV=py27-min
13+
- python: 2.7
14+
env: CONDA_ENV=py27
15+
- python: 3.4
16+
env: CONDA_ENV=py34
17+
addons:
18+
apt:
19+
packages:
20+
- libatlas-dev
21+
- libatlas-base-dev
22+
- liblapack-dev
23+
- gfortran
24+
- libgmp-dev
25+
- libmpfr-dev
26+
- python: 3.5
27+
env: CONDA_ENV=py35
28+
addons:
29+
apt:
30+
packages:
31+
- libatlas-dev
32+
- libatlas-base-dev
33+
- liblapack-dev
34+
- gfortran
35+
- libgmp-dev
36+
- libmpfr-dev
37+
38+
addons:
39+
apt:
40+
packages:
41+
- ccache
42+
43+
cache:
44+
directories:
45+
- $HOME/.ccache
1146

1247
# setup miniconda for numpy, scipy, pandas
1348
before_install:
1449
- echo "before install"
15-
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
16-
- chmod +x miniconda.sh
17-
- ./miniconda.sh -b
18-
- export PATH=/home/travis/miniconda/bin:$PATH
19-
- conda update --yes conda
20-
- sudo rm -rf /dev/shm
21-
- sudo ln -s /run/shm /dev/shm
22-
- date
23-
- uname -a
24-
- python -V
50+
- export PATH=/usr/lib/ccache:$PATH
51+
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
52+
wget http://repo.continuum.io/miniconda/Miniconda-3.16.0-Linux-x86_64.sh -O miniconda.sh;
53+
else
54+
wget http://repo.continuum.io/miniconda/Miniconda3-3.16.0-Linux-x86_64.sh -O miniconda.sh;
55+
fi
56+
- bash miniconda.sh -b -p $HOME/miniconda
57+
- export PATH="$HOME/miniconda/bin:$PATH"
58+
- hash -r
59+
- conda config --set always_yes yes --set changeps1 no
60+
- conda update -q conda
61+
- conda info -a
2562

2663
install:
2764
- echo "install"
28-
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then conda install --yes python=$TRAVIS_PYTHON_VERSION numpy scipy pandas=$PD_VERSION nose pytz ephem; fi
29-
- 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
30-
- test $PD_VERSION != 0.13.1 && conda install --yes "numba>=0.17" || echo "Not installing numba"
31-
- conda install --yes coverage
32-
- pip install coveralls
65+
- conda env create --file ci/requirements-$CONDA_ENV.yml
66+
- source activate test_env # all envs are named test_env in the yml files
67+
- conda list
68+
- echo $PATH
69+
- ls -l /home/travis/miniconda/envs/test_env/lib
70+
#- pip install . # use pip to automatically install anything not in the yml files (i.e. numpy/scipy/pandas for py3*)
71+
- pip install scipy # won't do anything if already installed
3372
- python setup.py install
34-
# for nosetests to actually work since it alters the path
35-
- python setup.py build_ext --inplace
3673

3774
script:
3875
- nosetests -v --with-coverage --cover-package=pvlib pvlib

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ License
127127
Compatibility
128128
=============
129129

130-
pvlib-python is compatible with Python versions 2.7, 3.3, and 3.4, and pandas versions 0.13.1 through 0.16.2.
130+
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.
131131

132-
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:
132+
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:
133133

134134
```
135135
conda install numpy=1.8 scipy=0.14

ci/requirements-py27-min.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: test_env
2+
dependencies:
3+
- python=2.7
4+
- numpy==1.8.2
5+
- scipy
6+
- pandas==0.13.1
7+
- nose
8+
- pytz
9+
- ephem
10+
- pip:
11+
- coveralls

ci/requirements-py27.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: test_env
2+
dependencies:
3+
- python=2.7
4+
- numpy
5+
- scipy
6+
- pandas
7+
- nose
8+
- pytz
9+
- ephem
10+
- numba
11+
- pip:
12+
- coveralls

ci/requirements-py34.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: test_env
2+
dependencies:
3+
- python=3.4
4+
- nose
5+
- pytz
6+
- ephem
7+
#- numba
8+
- pip:
9+
- numpy
10+
- pandas
11+
- coveralls

ci/requirements-py35.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: test_env
2+
dependencies:
3+
- python=3.5
4+
- nose
5+
- pytz
6+
- ephem
7+
# - numba
8+
- pip:
9+
- numpy
10+
- pandas
11+
- coveralls

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
exec(f.read())
2727

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

3232
setuptools_kwargs = {
3333
'zip_safe': False,
34-
'install_requires': ['numpy >= 1.7.0',
34+
'install_requires': ['numpy >= 1.8.2',
3535
'pandas >= 0.13.1',
3636
'pytz',
3737
'six',

0 commit comments

Comments
 (0)