From f39667919f4194886afaa4189035af66b9fdbae9 Mon Sep 17 00:00:00 2001 From: Katherine Shakman Date: Sat, 11 Apr 2015 11:55:46 -0400 Subject: [PATCH 1/5] I edited the README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4ac7af6..8d7fe0d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # gitgoing +# This is from Katie's clone of a gitgoing fork. [![Build Status](https://travis-ci.org/CodeNeuro/gitgoing.png?branch=master)](https://travis-ci.org/CodeNeuro/gitgoing) [![Join the chat at https://gitter.im/CodeNeuro/gitgoing](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/CodeNeuro/gitgoing?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) From 86d10d3f9b75aedfdeb9e22d5d17e0bd9a01efb6 Mon Sep 17 00:00:00 2001 From: katieshakman Date: Sat, 11 Apr 2015 12:23:17 -0400 Subject: [PATCH 2/5] changed title --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8d7fe0d..6c6b03c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# gitgoing +# gitgoing Katie # This is from Katie's clone of a gitgoing fork. [![Build Status](https://travis-ci.org/CodeNeuro/gitgoing.png?branch=master)](https://travis-ci.org/CodeNeuro/gitgoing) From 8acfcc199e9805f996ea0d74d4557ae26c268a08 Mon Sep 17 00:00:00 2001 From: katieshakman Date: Sat, 11 Apr 2015 12:49:59 -0400 Subject: [PATCH 3/5] Yup. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6c6b03c..2033da2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # gitgoing Katie -# This is from Katie's clone of a gitgoing fork. +# This is from Katie's clone of a gitgoing fork. Yup. [![Build Status](https://travis-ci.org/CodeNeuro/gitgoing.png?branch=master)](https://travis-ci.org/CodeNeuro/gitgoing) [![Join the chat at https://gitter.im/CodeNeuro/gitgoing](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/CodeNeuro/gitgoing?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) From 193ff80ee92716a97ad9c889ece7ebe9101b1ac1 Mon Sep 17 00:00:00 2001 From: katieshakman Date: Sat, 11 Apr 2015 13:25:46 -0400 Subject: [PATCH 4/5] update --- gitgoing/gitgoing.py | 3 ++- tests/test_gitgoing.py | 14 ++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/gitgoing/gitgoing.py b/gitgoing/gitgoing.py index 375b900..597f43a 100755 --- a/gitgoing/gitgoing.py +++ b/gitgoing/gitgoing.py @@ -57,7 +57,8 @@ def cv(x): cv : float The coefficient of variation of the entire array """ - return mean_plus_one(x)/std_plus_one(x) + #return mean_plus_one(x)/std_plus_one(x) + return std_plus_one(x)/mean_plus_one(x) def is_neuron_component(component): return component in NEURON_COMPONENTS \ No newline at end of file diff --git a/tests/test_gitgoing.py b/tests/test_gitgoing.py index 5d4b76c..812688d 100755 --- a/tests/test_gitgoing.py +++ b/tests/test_gitgoing.py @@ -37,14 +37,12 @@ def test_std_plus_one(x_norm): true_std = np.std(x_norm) + 1 assert test_std == true_std -# def test_cv_broken(x_norm): -# from gitgoing.gitgoing import std_plus_one, mean_plus_one, cv -# -# test_cv = cv(x_norm) -# true_cv = std_plus_one(x_norm)/mean_plus_one(x_norm) -# -# # This test will fail -# assert test_cv == true_cv +def test_cv_broken(x_norm): + from gitgoing.gitgoing import std_plus_one, mean_plus_one, cv + + test_cv = cv(x_norm) + true_cv = std_plus_one(x_norm)/mean_plus_one(x_norm) + assert test_cv == true_cv # This test will fail @pytest.fixture(params=['soma', 'axon', 'synapse', 'dendrite', pytest.mark.xfail('fibroblast')]) From df3cc03d059a2e3904e8669ecde14ac7deb12609 Mon Sep 17 00:00:00 2001 From: katieshakman Date: Sat, 11 Apr 2015 13:39:06 -0400 Subject: [PATCH 5/5] Fixed the test. --- tests/test_gitgoing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_gitgoing.py b/tests/test_gitgoing.py index 812688d..6042388 100755 --- a/tests/test_gitgoing.py +++ b/tests/test_gitgoing.py @@ -38,9 +38,9 @@ def test_std_plus_one(x_norm): assert test_std == true_std def test_cv_broken(x_norm): - from gitgoing.gitgoing import std_plus_one, mean_plus_one, cv + from gitgoing.gitgoing import std_plus_one, mean_plus_one, cv - test_cv = cv(x_norm) + test_cv = cv(x_norm) true_cv = std_plus_one(x_norm)/mean_plus_one(x_norm) assert test_cv == true_cv # This test will fail