From 28b65f52e8f1e4965c09ca895d7f3581f20e639f Mon Sep 17 00:00:00 2001 From: Jeff Reback Date: Sun, 30 Nov 2014 15:52:33 -0500 Subject: [PATCH 1/2] BLD: run slow tests on new optional build 2.7_SLOW using current versions of everything BLD: run graphics tests on 2.7_LOCALE using old matplotlib --- .travis.yml | 14 ++++++++++++++ ci/requirements-2.7_LOCALE.txt | 2 +- ci/requirements-2.7_SLOW.txt | 25 +++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 ci/requirements-2.7_SLOW.txt diff --git a/.travis.yml b/.travis.yml index ea1a0d9d6752a..bf6a3f166e706 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,6 +38,13 @@ matrix: - BUILD_TYPE=conda - JOB_NAME: "27_nslow" - DOC_BUILD=true # if rst files were changed, build docs in parallel with tests + - python: 2.7 + env: + - NOSE_ARGS="slow and not network and not disabled" + - FULL_DEPS=true + - JOB_TAG=_SLOW + - BUILD_TYPE=conda + - JOB_NAME: "27_slow" - python: 3.3 env: - NOSE_ARGS="not slow and not disabled" @@ -76,6 +83,13 @@ matrix: - CLIPBOARD_GUI=qt4 - BUILD_TYPE=pydata - JOB_NAME: "32_nslow" + - python: 2.7 + env: + - NOSE_ARGS="slow and not network and not disabled" + - FULL_DEPS=true + - JOB_TAG=_SLOW + - BUILD_TYPE=conda + - JOB_NAME: "27_slow" - python: 2.7 env: - EXPERIMENTAL=true diff --git a/ci/requirements-2.7_LOCALE.txt b/ci/requirements-2.7_LOCALE.txt index 036e597e5b788..6c70bfd77ff3f 100644 --- a/ci/requirements-2.7_LOCALE.txt +++ b/ci/requirements-2.7_LOCALE.txt @@ -7,7 +7,7 @@ xlrd=0.9.2 numpy=1.7.1 cython=0.19.1 bottleneck=0.8.0 -matplotlib=1.3.0 +matplotlib=1.2.1 patsy=0.1.0 sqlalchemy=0.8.1 html5lib=1.0b2 diff --git a/ci/requirements-2.7_SLOW.txt b/ci/requirements-2.7_SLOW.txt new file mode 100644 index 0000000000000..a1ecbceda40dd --- /dev/null +++ b/ci/requirements-2.7_SLOW.txt @@ -0,0 +1,25 @@ +dateutil +pytz +numpy +cython +matplotlib +scipy +patsy +statsmodels +xlwt +openpyxl +xlsxwriter +xlrd +numexpr +pytables +sqlalchemy +lxml +boto +bottleneck +psycopg2 +pymysql +html5lib +beautiful-soup +httplib2 +python-gflags +google-api-python-client From 96d45c30e5d16a0245e439e8d5c97ea97ceeb42c Mon Sep 17 00:00:00 2001 From: Jeff Reback Date: Sun, 30 Nov 2014 16:37:39 -0500 Subject: [PATCH 2/2] TST: skip on < mpl 1.3.1 (GH8947) --- pandas/tests/test_graphics.py | 70 ++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/pandas/tests/test_graphics.py b/pandas/tests/test_graphics.py index 74ec6d22ca4cd..06902dded0da4 100644 --- a/pandas/tests/test_graphics.py +++ b/pandas/tests/test_graphics.py @@ -77,6 +77,9 @@ def setUp(self): else: self.bp_n_objects = 8 + self.mpl_le_1_2_1 = str(mpl.__version__) <= LooseVersion('1.2.1') + self.mpl_ge_1_3_1 = str(mpl.__version__) >= LooseVersion('1.3.1') + def tearDown(self): tm.close() @@ -443,7 +446,6 @@ def setUp(self): import matplotlib as mpl mpl.rcdefaults() - self.mpl_le_1_2_1 = str(mpl.__version__) <= LooseVersion('1.2.1') self.ts = tm.makeTimeSeries() self.ts.name = 'ts' @@ -818,12 +820,13 @@ def test_hist_kwargs(self): self._check_text_labels(ax.yaxis.get_label(), 'Degree') tm.close() - ax = self.ts.plot(kind='hist', orientation='horizontal') - self._check_text_labels(ax.xaxis.get_label(), 'Degree') - tm.close() + if self.mpl_ge_1_3_1: + ax = self.ts.plot(kind='hist', orientation='horizontal') + self._check_text_labels(ax.xaxis.get_label(), 'Degree') + tm.close() - ax = self.ts.plot(kind='hist', align='left', stacked=True) - tm.close() + ax = self.ts.plot(kind='hist', align='left', stacked=True) + tm.close() @slow def test_hist_kde_color(self): @@ -961,9 +964,6 @@ def setUp(self): import matplotlib as mpl mpl.rcdefaults() - self.mpl_le_1_2_1 = str(mpl.__version__) <= LooseVersion('1.2.1') - self.mpl_ge_1_3_1 = str(mpl.__version__) >= LooseVersion('1.3.1') - self.tdf = tm.makeTimeDataFrame() self.hexbin_df = DataFrame({"A": np.random.uniform(size=20), "B": np.random.uniform(size=20), @@ -2141,31 +2141,33 @@ def test_hist_df_coord(self): self._check_box_coord(axes[2].patches, expected_y=np.array([0, 0, 0, 0, 0]), expected_h=np.array([6, 7, 8, 9, 10])) - # horizontal - ax = df.plot(kind='hist', bins=5, orientation='horizontal') - self._check_box_coord(ax.patches[:5], expected_x=np.array([0, 0, 0, 0, 0]), - expected_w=np.array([10, 9, 8, 7, 6])) - self._check_box_coord(ax.patches[5:10], expected_x=np.array([0, 0, 0, 0, 0]), - expected_w=np.array([8, 8, 8, 8, 8])) - self._check_box_coord(ax.patches[10:], expected_x=np.array([0, 0, 0, 0, 0]), - expected_w=np.array([6, 7, 8, 9, 10])) - - ax = df.plot(kind='hist', bins=5, stacked=True, orientation='horizontal') - self._check_box_coord(ax.patches[:5], expected_x=np.array([0, 0, 0, 0, 0]), - expected_w=np.array([10, 9, 8, 7, 6])) - self._check_box_coord(ax.patches[5:10], expected_x=np.array([10, 9, 8, 7, 6]), - expected_w=np.array([8, 8, 8, 8, 8])) - self._check_box_coord(ax.patches[10:], expected_x=np.array([18, 17, 16, 15, 14]), - expected_w=np.array([6, 7, 8, 9, 10])) - - axes = df.plot(kind='hist', bins=5, stacked=True, - subplots=True, orientation='horizontal') - self._check_box_coord(axes[0].patches, expected_x=np.array([0, 0, 0, 0, 0]), - expected_w=np.array([10, 9, 8, 7, 6])) - self._check_box_coord(axes[1].patches, expected_x=np.array([0, 0, 0, 0, 0]), - expected_w=np.array([8, 8, 8, 8, 8])) - self._check_box_coord(axes[2].patches, expected_x=np.array([0, 0, 0, 0, 0]), - expected_w=np.array([6, 7, 8, 9, 10])) + if self.mpl_ge_1_3_1: + + # horizontal + ax = df.plot(kind='hist', bins=5, orientation='horizontal') + self._check_box_coord(ax.patches[:5], expected_x=np.array([0, 0, 0, 0, 0]), + expected_w=np.array([10, 9, 8, 7, 6])) + self._check_box_coord(ax.patches[5:10], expected_x=np.array([0, 0, 0, 0, 0]), + expected_w=np.array([8, 8, 8, 8, 8])) + self._check_box_coord(ax.patches[10:], expected_x=np.array([0, 0, 0, 0, 0]), + expected_w=np.array([6, 7, 8, 9, 10])) + + ax = df.plot(kind='hist', bins=5, stacked=True, orientation='horizontal') + self._check_box_coord(ax.patches[:5], expected_x=np.array([0, 0, 0, 0, 0]), + expected_w=np.array([10, 9, 8, 7, 6])) + self._check_box_coord(ax.patches[5:10], expected_x=np.array([10, 9, 8, 7, 6]), + expected_w=np.array([8, 8, 8, 8, 8])) + self._check_box_coord(ax.patches[10:], expected_x=np.array([18, 17, 16, 15, 14]), + expected_w=np.array([6, 7, 8, 9, 10])) + + axes = df.plot(kind='hist', bins=5, stacked=True, + subplots=True, orientation='horizontal') + self._check_box_coord(axes[0].patches, expected_x=np.array([0, 0, 0, 0, 0]), + expected_w=np.array([10, 9, 8, 7, 6])) + self._check_box_coord(axes[1].patches, expected_x=np.array([0, 0, 0, 0, 0]), + expected_w=np.array([8, 8, 8, 8, 8])) + self._check_box_coord(axes[2].patches, expected_x=np.array([0, 0, 0, 0, 0]), + expected_w=np.array([6, 7, 8, 9, 10])) @slow def test_hist_df_legacy(self):