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

Unified Diff: scripts/slave/recipe_modules/auto_bisect/resources/significantly_different.py

Issue 2247373002: Refactor stages 1, 2 and test_api overhaul. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: scripts/slave/recipe_modules/auto_bisect/resources/significantly_different.py
diff --git a/scripts/slave/recipe_modules/auto_bisect/resources/significantly_different.py b/scripts/slave/recipe_modules/auto_bisect/resources/significantly_different.py
deleted file mode 100644
index 77f0bc5bf6c579b151f2e8ec01a296615a82b89b..0000000000000000000000000000000000000000
--- a/scripts/slave/recipe_modules/auto_bisect/resources/significantly_different.py
+++ /dev/null
@@ -1,49 +0,0 @@
-"""Launches an anaconda environment to run some scipy hypothesis tests."""
-
-import json
-import os
-import subprocess
-import sys
-
-class ScipyNotInstalledError(Exception):
- pass
-
-def main(argv, anaconda_path=None):
- _, list_a, list_b, significance = argv
-
- # Do not even test if there's a single repeated value on both samples.
- if len(set(json.loads(list_a) + json.loads(list_b))) == 1:
- return {
- 'first_sample': json.loads(list_a),
- 'second_sample': json.loads(list_b),
- 'mann_p_value': None,
- 'anderson_p_value': None,
- 'welch_p_value': None,
- 'normal-y': None,
- 'significantly_different': False
- }
-
- if not anaconda_path:
- if os.name == 'nt':
- anaconda_path = r'c:\conda-py-scientific\python.exe'
- else:
- anaconda_path = '/opt/conda-py-scientific/bin/python'
- if not os.path.exists(anaconda_path):
- raise ScipyNotInstalledError()
-
- inner_script_location = os.path.join(os.path.dirname(os.path.realpath(
- __file__)), 'significantly_different_inner.py')
-
- conda_environ = dict(os.environ)
- del conda_environ["PYTHONPATH"]
-
- return json.loads(subprocess.check_output(
- [anaconda_path, inner_script_location,list_a, list_b, significance],
- env=conda_environ))
-
-if __name__ == '__main__':
- result = main(sys.argv)
- if result:
- print json.dumps(result, indent=4)
- sys.exit(0)
- sys.exit(1)

Powered by Google App Engine
This is Rietveld 408576698