Skip to content

Commit 44750b2

Browse files
committed
[add] Add .travis.yml and Add a dummy test case
1 parent bf1c72e commit 44750b2

File tree

5 files changed

+61
-3
lines changed

5 files changed

+61
-3
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
/.idea
2+
*.egg-info/
3+
__pycache__/

.travis.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# (from: https://qiita.com/masashi127/items/5bfcba5cad8e82958844)
2+
3+
language: python
4+
5+
python:
6+
- 3.4
7+
- 3.5
8+
- 3.6
9+
10+
addons:
11+
apt:
12+
packages:
13+
# (from: https://github.com/dnouri/nolearn/blob/master/.travis.yml)
14+
- libblas-dev
15+
- liblapack-dev
16+
- gfortran
17+
18+
19+
before_install:
20+
- pip install -U pip setuptools wheel # (from: https://github.com/dnouri/nolearn/blob/master/.travis.yml)
21+
22+
install:
23+
- travis_wait travis_retry pip install -r requirements.txt # (from: https://github.com/dnouri/nolearn/blob/master/.travis.yml)
24+
- pip install coveralls
25+
26+
script:
27+
- coverage run --source=nwtgck_hello_test setup.py test
28+
29+
after_success:
30+
- coveralls
31+
32+
cache:
33+
- apt
34+
- directories:
35+
- $HOME/.cache/pip

setup.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
# (from: https://github.com/masaponto/Python-MLP/blob/master/setup.py)
2-
from distutils.core import setup
2+
# (from: https://qiita.com/masashi127/items/5bfcba5cad8e82958844)
3+
# (from: https://qiita.com/hotoku/items/4789533f5e497f3dc6e0)
4+
5+
from setuptools import setup, find_packages
6+
import sys
7+
8+
sys.path.append('./src')
9+
sys.path.append('./tests')
310

411
setup(
512
name='multi_svr',
613
version='0.1.0-SNAPSHOT',
714
description='Multiple-targets Support Vector Regression',
815
author='Ryo Ota',
916
author_email='[email protected]',
10-
install_requires=['scikit-learn', 'numpy'],
17+
install_requires=['scikit-learn', 'numpy', 'SciPy'],
1118
py_modules=["multi_svr"],
12-
package_dir={'': 'src'}
19+
packages=find_packages(),
20+
test_suite='tests'
1321
)

tests/__init__.py

Whitespace-only changes.

tests/multi_svr_test.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import unittest
2+
import multi_svr
3+
4+
class MultiSVRTest(unittest.TestCase):
5+
6+
def test_1(self):
7+
self.assertEqual(1, 1) # TODO impl
8+
9+
10+
def suite():
11+
suite = unittest.TestSuite()
12+
suite.addTest(unittest.makeSuite(MultiSVRTest))
13+
return suite

0 commit comments

Comments
 (0)