Commit f1d4bbb6 authored by Juan Antonio Navarro Perez's avatar Juan Antonio Navarro Perez Committed by Commit Bot

[flakiness_cli] Run using vpython

Run the main flakiness_cli script using vpython. Also add pandas (and
dependencies) to src/.vpython itself.

Bug: 875251,878994
Change-Id: Ib0160b18c9bd2423659ac13d24979eccf91c2d7c

TBR=nednguyen@chromium.org

Change-Id: Ib0160b18c9bd2423659ac13d24979eccf91c2d7c
Reviewed-on: https://chromium-review.googlesource.com/c/1238569
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: default avatarNed Nguyen <nednguyen@google.com>
Cr-Commit-Position: refs/heads/master@{#604795}
parent c4406c06
......@@ -134,6 +134,38 @@ wheel: <
version: "version:0.10.3"
>
# Used by:
# tools/perf/flakiness_cli
wheel: <
name: "infra/python/wheels/pandas/${vpython_platform}"
version: "version:0.23.4"
match_tag: <
platform: "win32"
>
match_tag: <
platform: "win_amd64"
>
match_tag: <
abi: "cp27mu"
platform: "manylinux1_i686"
>
match_tag: <
abi: "cp27mu"
platform: "manylinux1_x86_64"
>
match_tag: <
platform: "macosx_10_6_intel"
>
>
wheel: <
name: "infra/python/wheels/pytz-py2_py3"
version: "version:2018.4"
>
wheel: <
name: "infra/python/wheels/python-dateutil-py2_py3"
version: "version:2.7.3"
>
# Used by:
# chrome/test/vr/perf/latency/run_latency_test.py
wheel: <
......
#!/usr/bin/env python
#!/usr/bin/env vpython
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
......@@ -60,5 +60,4 @@ def main():
if __name__ == '__main__':
core.CheckDependencies()
sys.exit(main())
......@@ -4,12 +4,8 @@
import fnmatch
try:
import numpy
import pandas
except ImportError:
numpy = None
pandas = None
import numpy # pylint: disable=import-error
import pandas # pylint: disable=import-error
SECONDS_IN_A_DAY = 60 * 60 * 24
......
......@@ -8,7 +8,6 @@ from test_results import analysis
from test_results import frames
@unittest.skipIf(frames.pandas is None, 'pandas module not available')
class TestAnalysis(unittest.TestCase):
def testFilterBy(self):
builders = frames.pandas.DataFrame.from_records([
......
......@@ -4,18 +4,11 @@
import datetime
import hashlib
import sys
from test_results import api
from test_results import frames
def CheckDependencies():
"""Check that module dependencies are satisfied, otherwise exit with error."""
if frames.pandas is None:
sys.exit('ERROR: This tool requires pandas to run, try: pip install pandas')
def GetBuilders():
"""Get the builders data frame and keep a cached copy."""
def make_frame():
......
......@@ -7,10 +7,7 @@
import datetime
import os
try:
import pandas
except ImportError:
pandas = None
import pandas # pylint: disable=import-error
CACHE_DIR = os.path.normpath(
......
......@@ -13,7 +13,6 @@ import mock
from test_results import frames
@unittest.skipIf(frames.pandas is None, 'pandas module not available')
class TestDataFrames(unittest.TestCase):
def testBuildersDataFrame(self):
sample_data = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment