Skip to content

Commit

Permalink
BLD: Use tox for test and environment management.
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Sanderson committed Jul 19, 2016
1 parent 9b7f04f commit 7268e5f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 17 deletions.
29 changes: 12 additions & 17 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python
from setuptools import setup
from setuptools import setup, find_packages
import sys

long_description = ''
Expand All @@ -9,23 +9,22 @@
long_description = f.read()

install_reqs = [
'funcsigs>=0.4',
'matplotlib>=1.4.0',
'mock>=1.1.2',
'numpy>=1.9.1',
'pandas>=0.16.1',
'pyparsing>=2.0.3',
'python-dateutil>=2.4.2',
'pytz>=2014.10',
'scipy>=0.14.0',
'seaborn>=0.6.0',
'statsmodels>=0.6.1'
'statsmodels>=0.6.1',
'IPython>=3.2.3',
]

test_reqs = [
"nose>=1.3.7",
"nose_parameterized>=0.5.0"
]
extra_reqs = {
'test': [
"nose>=1.3.7",
"nose_parameterized>=0.5.0",
"tox>=2.3.1",
],
}

if __name__ == "__main__":
setup(
Expand All @@ -34,11 +33,7 @@
description='Factor analysis tools',
author='Quantopian Inc.',
author_email='[email protected]',
packages=[
'alphalens',
'alphalens.examples',
'alphalens.tests',
],
packages=['alphalens'],
long_description=long_description,
classifiers=[
'Development Status :: 4 - Beta',
Expand All @@ -52,5 +47,5 @@
],
url='https://github.com/quantopian/alphalens',
install_requires=install_reqs,
test_requires=test_reqs
extras_require=extra_reqs,
)
14 changes: 14 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[tox]
envlist=py{27,35}-pandas{17,18}
skip_missing_interpreters=True

[testenv]
commands=
py{27,34,35}-pandas17: pip install -vv pandas>=0.17,<0.18
py{27,34,35}-pandas18: pip install -vv pandas>=0.18,<0.19

pip install .[test]
# cd out of the alphalens root so that we actually use what we installed
# with our sdist. Otherwise, our imports will find alphalens' source from
# our CWD.
/bin/bash -c 'cd /tmp && nosetests -P {toxinidir}'

0 comments on commit 7268e5f

Please sign in to comment.