Skip to content

Add tox (and travis) config for automated tests #21

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -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
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
Deep GP
=====
=======

The Python Implementation of Deep Gaussian Processes

Currently implemented models are

* Deep GPs
* Variational Auto-encoded Deep GPs

Testing locally
---------------

To run the PyDeepGP test suite on your own machine:

1. Install [tox][tox]
2. Clone this repo
3. `cd` into this repo
4. Run `tox` to run the test suite and report test outcomes

[tox]: https://tox.readthedocs.io/en/latest/

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,
@@ -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