Skip to content

Commit 685c796

Browse files
committed
Add tox and travis config for automated tests
1 parent dd4e7b4 commit 685c796

6 files changed

Lines changed: 75 additions & 9 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,5 @@ target/
6363

6464
.settings
6565
.project
66-
.pydevproject
66+
.pydevproject
67+
.mypy_cache/

.travis.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
sudo: false
2+
language: python
3+
python:
4+
- "2.7"
5+
- "3.5"
6+
- "3.6"
7+
- "3.7"
8+
install:
9+
- pip install tox-travis codecov
10+
script:
11+
- tox
12+
- ls -l .coverage
13+
- codecov

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include AUTHORS.txt

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
11
Deep GP
2-
=====
2+
=======
33

44
The Python Implementation of Deep Gaussian Processes
55

66
Currently implemented models are
77

88
* Deep GPs
99
* Variational Auto-encoded Deep GPs
10+
11+
Testing locally
12+
---------------
13+
14+
To run the PyDeepGP test suite on your own machine:
15+
16+
1. Install [tox][tox]
17+
2. Clone this repo
18+
3. `cd` into this repo
19+
4. Run `tox` to run the test suite and report test outcomes
20+
21+
[tox]: https://tox.readthedocs.io/en/latest/
22+

setup.py

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33

4+
import io
45
import os
56
from setuptools import setup
6-
import numpy
77

88
# Version number
99
version = '1.0'
1010

1111
def read(fname):
12-
return open(os.path.join(os.path.dirname(__file__), fname)).read()
12+
with open(fname) as f:
13+
contents = f.read()
14+
return contents
1315

1416
setup(name = 'DGP',
1517
version = version,
@@ -27,16 +29,27 @@ def read(fname):
2729
package_dir={'deepgp': 'deepgp'},
2830
py_modules = ['deepgp.__init__'],
2931
long_description=read('README.md'),
30-
install_requires=['numpy>=1.7', 'scipy>=0.12','GPy>=1.0'],
31-
include_dirs=[numpy.get_include()],
32+
install_requires=[
33+
'numpy>=1.7',
34+
'scipy>=0.12',
35+
'GPy>=1.0',
36+
],
37+
extras_require={
38+
'test': [
39+
'matplotlib',
40+
'h5py',
41+
'tables',
42+
'theano',
43+
],
44+
},
3245
classifiers=['License :: OSI Approved :: BSD License',
3346
'Natural Language :: English',
3447
'Operating System :: MacOS :: MacOS X',
3548
'Operating System :: Microsoft :: Windows',
3649
'Operating System :: POSIX :: Linux',
3750
'Programming Language :: Python :: 2.7',
38-
'Programming Language :: Python :: 3.3',
39-
'Programming Language :: Python :: 3.4',
40-
'Programming Language :: Python :: 3.5'
51+
'Programming Language :: Python :: 3.5',
52+
'Programming Language :: Python :: 3.6',
53+
'Programming Language :: Python :: 3.7'
4154
]
4255
)

tox.ini

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[tox]
2+
envlist = py27, py35, py36, py37
3+
[testenv]
4+
extras =
5+
test
6+
passenv = DISPLAY BROWSER TOXENV CI TRAVIS TRAVIS_*
7+
install_command = pip install {opts} {packages}
8+
deps = codecov>=1.4.0
9+
#whitelist_externals =
10+
commands =
11+
python -m unittest deepgp.testing.model_tests_basic
12+
13+
; Used by pytest-cov
14+
[run]
15+
branch = True
16+
source = deepgp
17+
18+
; Used by pytest-cov
19+
[report]
20+
exclude_lines =
21+
if self.debug:
22+
pragma: no cover
23+
raise NotImplementedError
24+
if __name__ == .__main__.:
25+
ignore_errors = True

0 commit comments

Comments
 (0)