Skip to content

Commit

Permalink
Add tox and travis config for automated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
willfurnass committed Oct 8, 2019
1 parent dd4e7b4 commit 4aaecde
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,5 @@ target/

.settings
.project
.pydevproject
.pydevproject
.mypy_cache/
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
sudo: false
language: python
python:
- "2.7"
- "3.5"
- "3.6"
- "3.7"
install:
- pip install tox-travis codecov
script:
- tox
- ls -l .coverage
- codecov
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include AUTHORS.txt
27 changes: 20 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import io
import os
from setuptools import setup
import numpy

# Version number
version = '1.0'

def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
with open(fname) as f:
contents = f.read()
return contents

setup(name = 'DGP',
version = version,
Expand All @@ -27,16 +29,27 @@ def read(fname):
package_dir={'deepgp': 'deepgp'},
py_modules = ['deepgp.__init__'],
long_description=read('README.md'),
install_requires=['numpy>=1.7', 'scipy>=0.12','GPy>=1.0'],
include_dirs=[numpy.get_include()],
install_requires=[
'numpy>=1.7',
'scipy>=0.12',
'GPy>=1.0',
],
extras_require={
'test': [
'matplotlib',
'h5py',
'tables',
'theano',
],
},
classifiers=['License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5'
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7'
]
)
25 changes: 25 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[tox]
envlist = py27, py35, py36, py37
[testenv]
extras =
test
passenv = DISPLAY BROWSER TOXENV CI TRAVIS TRAVIS_*
install_command = pip install {opts} {packages}
deps = codecov>=1.4.0
#whitelist_externals =
commands =
python -m unittest deepgp.testing.model_tests_basic

; Used by pytest-cov
[run]
branch = True
source = deepgp

; Used by pytest-cov
[report]
exclude_lines =
if self.debug:
pragma: no cover
raise NotImplementedError
if __name__ == .__main__.:
ignore_errors = True

0 comments on commit 4aaecde

Please sign in to comment.