Skip to content

Commit

Permalink
add tests and compatibility statement for python 3.6 (#286)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
wholmgren committed Dec 28, 2016
1 parent d49b08c commit ce06552
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Expand Up @@ -16,6 +16,8 @@ matrix:
env: CONDA_ENV=py34
- python: 3.5
env: CONDA_ENV=py35
- python: 3.6
env: CONDA_ENV=py36

addons:
apt:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -31,7 +31,7 @@ Installation
pvlib-python releases may be installed using the ``pip`` and ``conda`` tools.
Please see the [Installation page](http://pvlib-python.readthedocs.io/en/latest/installation.html) of the documentation for complete instructions.

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


Contributing
Expand Down
18 changes: 18 additions & 0 deletions ci/requirements-py36.yml
@@ -0,0 +1,18 @@
name: test_env
channels:
- defaults
- conda-forge
dependencies:
- python=3.6
- numpy
- scipy
- pandas
- pytz
#- ephem
#- numba
#- siphon
- pytest
- pytest-cov
- nose
- pip:
- coveralls
13 changes: 3 additions & 10 deletions pvlib/test/conftest.py
@@ -1,6 +1,7 @@
import sys
import platform

from pkg_resources import parse_version
import pandas as pd
import numpy as np
import pytest
Expand All @@ -25,22 +26,14 @@


def pandas_0_17():
version = tuple(map(int, pd.__version__.split('.')))
if version[0] <= 0 and version[1] < 17:
return False
else:
return True
return parse_version(pd.__version__) >= parse_version('0.17.0')

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


def numpy_1_10():
version = tuple(map(int, np.__version__.split('.')))
if version[0] <= 1 and version[1] < 10:
return False
else:
return True
return parse_version(np.__version__) >= parse_version('1.10.0')

needs_numpy_1_10 = pytest.mark.skipif(
not numpy_1_10(), reason='requires numpy 1.10 or greater')
Expand Down
1 change: 1 addition & 0 deletions setup.py
Expand Up @@ -59,6 +59,7 @@
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Scientific/Engineering',
]

Expand Down

0 comments on commit ce06552

Please sign in to comment.