From 891055d7930dbb0f859d26667ee25b6548c6f040 Mon Sep 17 00:00:00 2001 From: Corey Ziemba Date: Sat, 11 Apr 2015 11:59:17 -0400 Subject: [PATCH 1/3] message to myself --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4ac7af6..85fb4f6 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Get going with contributing to open-source software ## Setting up your environment -1. Make a github account +1. Make a github account, mine 2. Install git on your computer * Mac 1. Create a folder `~/code` by typing into the terminal `mkdir ~/code` From 993d64598d589515ca9cfe07551f636ba79094f1 Mon Sep 17 00:00:00 2001 From: Corey Ziemba Date: Sat, 11 Apr 2015 13:07:13 -0400 Subject: [PATCH 2/3] uncommented cv test and fixed the cv code --- gitgoing/gitgoing.py | 2 +- tests/test_gitgoing.py | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gitgoing/gitgoing.py b/gitgoing/gitgoing.py index 375b900..d7e620d 100755 --- a/gitgoing/gitgoing.py +++ b/gitgoing/gitgoing.py @@ -57,7 +57,7 @@ def cv(x): cv : float The coefficient of variation of the entire array """ - 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..1b13823 100755 --- a/tests/test_gitgoing.py +++ b/tests/test_gitgoing.py @@ -37,14 +37,14 @@ 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) + + # This test will fail + assert test_cv == true_cv @pytest.fixture(params=['soma', 'axon', 'synapse', 'dendrite', pytest.mark.xfail('fibroblast')]) From 9de5badee07aec821cfb2bfc2636c33667cbb758 Mon Sep 17 00:00:00 2001 From: cmziemba Date: Sat, 11 Apr 2015 13:09:58 -0400 Subject: [PATCH 3/3] removed modification to README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 85fb4f6..4ac7af6 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Get going with contributing to open-source software ## Setting up your environment -1. Make a github account, mine +1. Make a github account 2. Install git on your computer * Mac 1. Create a folder `~/code` by typing into the terminal `mkdir ~/code`