Skip to content

Commit ce06552

Browse files
authored
add tests and compatibility statement for python 3.6 (#286)
* add python 3.6 env file * add python 3.6 to travis config * add 3.6 to readme * add classifier * remove unavailable and optional dependencies from 3.6 tests * replace manual version string checking with pkg_resources. pandas 0.19.2 was distributed with a dirtry version string
1 parent d49b08c commit ce06552

File tree

5 files changed

+25
-11
lines changed

5 files changed

+25
-11
lines changed

.travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ matrix:
1616
env: CONDA_ENV=py34
1717
- python: 3.5
1818
env: CONDA_ENV=py35
19+
- python: 3.6
20+
env: CONDA_ENV=py36
1921

2022
addons:
2123
apt:

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Installation
3131
pvlib-python releases may be installed using the ``pip`` and ``conda`` tools.
3232
Please see the [Installation page](http://pvlib-python.readthedocs.io/en/latest/installation.html) of the documentation for complete instructions.
3333

34-
pvlib-python is compatible with Python versions 2.7, 3.4, 3.5
34+
pvlib-python is compatible with Python versions 2.7, 3.4, 3.5, 3.6
3535

3636

3737
Contributing

ci/requirements-py36.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: test_env
2+
channels:
3+
- defaults
4+
- conda-forge
5+
dependencies:
6+
- python=3.6
7+
- numpy
8+
- scipy
9+
- pandas
10+
- pytz
11+
#- ephem
12+
#- numba
13+
#- siphon
14+
- pytest
15+
- pytest-cov
16+
- nose
17+
- pip:
18+
- coveralls

pvlib/test/conftest.py

+3-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import sys
22
import platform
33

4+
from pkg_resources import parse_version
45
import pandas as pd
56
import numpy as np
67
import pytest
@@ -25,22 +26,14 @@
2526

2627

2728
def pandas_0_17():
28-
version = tuple(map(int, pd.__version__.split('.')))
29-
if version[0] <= 0 and version[1] < 17:
30-
return False
31-
else:
32-
return True
29+
return parse_version(pd.__version__) >= parse_version('0.17.0')
3330

3431
needs_pandas_0_17 = pytest.mark.skipif(
3532
not pandas_0_17(), reason='requires pandas 0.17 or greater')
3633

3734

3835
def numpy_1_10():
39-
version = tuple(map(int, np.__version__.split('.')))
40-
if version[0] <= 1 and version[1] < 10:
41-
return False
42-
else:
43-
return True
36+
return parse_version(np.__version__) >= parse_version('1.10.0')
4437

4538
needs_numpy_1_10 = pytest.mark.skipif(
4639
not numpy_1_10(), reason='requires numpy 1.10 or greater')

setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
'Programming Language :: Python :: 3.3',
6060
'Programming Language :: Python :: 3.4',
6161
'Programming Language :: Python :: 3.5',
62+
'Programming Language :: Python :: 3.6',
6263
'Topic :: Scientific/Engineering',
6364
]
6465

0 commit comments

Comments
 (0)