Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: scripts/slave/recipe_modules/auto_bisect/resources/significantly_different.py

Issue 2158413003: Parameters to significantly_different.py need to be parsed as lists. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/auto_bisect/resources/significantly_different_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 """Launches an anaconda environment to run some scipy hypothesis tests.""" 1 """Launches an anaconda environment to run some scipy hypothesis tests."""
2 2
3 import json 3 import json
4 import os 4 import os
5 import subprocess 5 import subprocess
6 import sys 6 import sys
7 7
8 class ScipyNotInstalledError(Exception): 8 class ScipyNotInstalledError(Exception):
9 pass 9 pass
10 10
11 def main(argv, anaconda_path=None): 11 def main(argv, anaconda_path=None):
12 _, list_a, list_b, significance = argv 12 _, list_a, list_b, significance = argv
13 13
14 # Do not even test if there's a single repeated value on both samples. 14 # Do not even test if there's a single repeated value on both samples.
15 if len(set(list_a + list_b)) == 1: 15 if len(set(json.loads(list_a) + json.loads(list_b))) == 1:
16 return { 16 return {
17 'first_sample': list_a, 17 'first_sample': list_a,
dtu 2016/07/20 00:08:52 Need it as a python list here as well.
18 'second_sample': list_b, 18 'second_sample': list_b,
19 'mann_p_value': None, 19 'mann_p_value': None,
20 'anderson_p_value': None, 20 'anderson_p_value': None,
21 'welch_p_value': None, 21 'welch_p_value': None,
22 'normal-y': None, 22 'normal-y': None,
23 'significantly_different': False 23 'significantly_different': False
24 } 24 }
25 25
26 if not anaconda_path: 26 if not anaconda_path:
27 if os.name == 'nt': 27 if os.name == 'nt':
(...skipping 12 matching lines...) Expand all
40 return json.loads(subprocess.check_output( 40 return json.loads(subprocess.check_output(
41 [anaconda_path, inner_script_location,list_a, list_b, significance], 41 [anaconda_path, inner_script_location,list_a, list_b, significance],
42 env=conda_environ)) 42 env=conda_environ))
43 43
44 if __name__ == '__main__': 44 if __name__ == '__main__':
45 result = main(sys.argv) 45 result = main(sys.argv)
46 if result: 46 if result:
47 print json.dumps(result, indent=4) 47 print json.dumps(result, indent=4)
48 sys.exit(0) 48 sys.exit(0)
49 sys.exit(1) 49 sys.exit(1)
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/auto_bisect/resources/significantly_different_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698