From 668a715e3626030edad87b428678ce9eca66eb3d Mon Sep 17 00:00:00 2001 From: Zachary Sloan Date: Wed, 21 Aug 2013 18:05:21 -0500 Subject: Fixed an issue where correlationFunction was being imported instead of its updated name correlation_function --- misc/notes.txt | 7 ++++ webtests/show_trait_js_test.py | 51 ++++++++++++++++++++++++ wqflask/wqflask/correlation/show_corr_results.py | 2 +- 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 webtests/show_trait_js_test.py diff --git a/misc/notes.txt b/misc/notes.txt index ede8176b..91a0e67c 100644 --- a/misc/notes.txt +++ b/misc/notes.txt @@ -292,3 +292,10 @@ CREATE FULLTEXT INDEX __________ ON Table (Column); If <4 character searches not working: Add ft_min_word_len = 2 (to make te minimum characters 2) to config file Rebuild relevant tables with fulltext indexes with "REPAIR TABLE _______ QUICK" + +=========================================== + +To delete all .pyc files (for example if there's some issue you're having trouble resolving): +find . -name '*.pyc' -delete +http://stackoverflow.com/questions/785519/how-do-i-remove-all-pyc-files-from-a-project + diff --git a/webtests/show_trait_js_test.py b/webtests/show_trait_js_test.py new file mode 100644 index 00000000..d92cf369 --- /dev/null +++ b/webtests/show_trait_js_test.py @@ -0,0 +1,51 @@ +""" +Test calculate correlations + +>>> test.get("http://genenetwork.org") +title: GeneNetwork + +Choose the type +>>> test.click_option('''//*[@id="tissue"]''', 'Hippocampus mRNA') + +Enter the Get Any +>>> test.enter_text('''//*[@id="tfor"]''', 'ssh') +text: ssh + +Search +>>> test.click('//*[@id="btsearch"]') +clicked: Search + +Choose the first result +>>> test.click('''/html/body/table/tbody/tr[3]/td/table/tbody/tr/td/form/p/table/tbody/tr[3]/td/div/table/tbody/tr[2]/td[2]/a''') +clicked: 1455854_a_at + +A new window is created, so we switch to it +>>> test.switch_window() +title: Hippocampus M430v2 BXD 06/06 PDNN : 1455854_a_at: Display Trait + +Click on Calculate Correlations +>>> test.click('''//*[@id="title3"]''') +clicked: Calculate Correlations + +Click on Compute +>>> test.click('''/html/body/table/tbody/tr[3]/td/table/tbody/tr/td/form/p[6]/table/tbody/tr/td/div/div/span/table/tbody/tr/td/input[3]''') +clicked: Compute + +Another new window +>>> test.switch_window() +title: Correlation + +Sleep a bunch because this can take a while +>>> sleep(25) + +Ensure the Sample rho is the exepcted 1.000 because it should be the same record +>>> test.get_text('''/html/body/table/tbody/tr[3]/td/table/tbody/tr/td/form/table/tbody/tr[2]/td/div/table/tbody/tr[2]/td[9]/a''') +text: 1.000 + +""" + +from __future__ import absolute_import, division, print_function + +from browser_test import * + +testmod() diff --git a/wqflask/wqflask/correlation/show_corr_results.py b/wqflask/wqflask/correlation/show_corr_results.py index 07d70897..1615fe21 100644 --- a/wqflask/wqflask/correlation/show_corr_results.py +++ b/wqflask/wqflask/correlation/show_corr_results.py @@ -49,7 +49,7 @@ from base.templatePage import templatePage from utility import webqtlUtil, helper_functions, corr_result_helpers from dbFunction import webqtlDatabaseFunction import utility.webqtlUtil #this is for parallel computing only. -from wqflask.correlation import correlationFunction +from wqflask.correlation import correlation_function from utility.benchmark import Bench from MySQLdb import escape_string as escape -- cgit v1.2.3