From 59f1014fd668bb688256dac12e8d0c039ce66084 Mon Sep 17 00:00:00 2001 From: Mark Santolucito Date: Fri, 25 Jan 2019 11:10:28 -0500 Subject: [PATCH] enable travis --- .travis.yml | 9 +++++++++ tests/test.py | 11 +++++++++++ 2 files changed, 20 insertions(+) create mode 100644 .travis.yml create mode 100644 tests/test.py diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..0cc2cf7 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,9 @@ +language: python +python: + - "3.3" +# command to install dependencies +install: + - pip install -r requirements.txt +# command to run tests +script: + - python tests/test.py diff --git a/tests/test.py b/tests/test.py new file mode 100644 index 0000000..2deef64 --- /dev/null +++ b/tests/test.py @@ -0,0 +1,11 @@ +from clustering.equal_groups import EqualGroupsKMeans + +import numpy as np + +X = np.array([[1, 2], [4, 4], [1, 0], [3, 2], [4, 4], [4, 0]]) + +clf = EqualGroupsKMeans(n_clusters=2) + +clf.fit(X) + +print (clf.labels_)