Skip to content

Commit b19f74c

Browse files
committed
add 3.5 to travis conda line
move 3.5 install line in travis build for pure install reconfigure travis setup to use pip for some things make pandas versions explicit in req files add numba to non min builds remove numba from 3.5 since it is not yet supported move scipy to setup.py. remove from conda ymls switch from setup.py to pip install . add path echo add ls lib add atlas try installing scipy using apt move np/pd earlier in build remove scipy as dependency. add scipy testing to travis script. remove cruft. simplify pip scipy install command remove numba from py34. update readme
1 parent a51f2ca commit b19f74c

File tree

7 files changed

+107
-31
lines changed

7 files changed

+107
-31
lines changed

.travis.yml

Lines changed: 59 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,71 @@
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-
- 3.5
7-
env:
8-
- PD_VERSION=0.13.1
9-
- PD_VERSION="0.14.*"
10-
- PD_VERSION="0.15.*"
11-
- PD_VERSION="0.16.*"
12-
- PD_VERSION="0.17.*"
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+
39+
# - ccache
40+
#cache:
41+
# directories:
42+
# - $HOME/.ccache
1343

1444
# setup miniconda for numpy, scipy, pandas
1545
before_install:
1646
- echo "before install"
17-
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
18-
- chmod +x miniconda.sh
19-
- ./miniconda.sh -b
20-
- export PATH=/home/travis/miniconda/bin:$PATH
21-
- conda update --yes conda
22-
- sudo rm -rf /dev/shm
23-
- sudo ln -s /run/shm /dev/shm
24-
- date
25-
- uname -a
26-
- python -V
47+
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
48+
wget http://repo.continuum.io/miniconda/Miniconda-3.16.0-Linux-x86_64.sh -O miniconda.sh;
49+
else
50+
wget http://repo.continuum.io/miniconda/Miniconda3-3.16.0-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 update -q conda
57+
- conda info -a
2758

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

3970
script:
4071
- 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
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)