From a184cff79a45a5b84659bed76c5b2c1954882cc7 Mon Sep 17 00:00:00 2001 From: Brock Date: Tue, 10 Nov 2020 10:06:09 -0800 Subject: [PATCH 01/14] troubleshoot windows builds --- ci/run_tests.sh | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/ci/run_tests.sh b/ci/run_tests.sh index 9b553fbc81a03..fa6eded30f49f 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -24,8 +24,36 @@ PYTEST_CMD="${XVFB}pytest -m \"$PATTERN\" -n $PYTEST_WORKERS --dist=loadfile -s if [[ $(uname) != "Linux" && $(uname) != "Darwin" ]]; then # GH#37455 windows py38 build appears to be running out of memory - # skip collection of window tests - PYTEST_CMD="$PYTEST_CMD --ignore=pandas/tests/window/" + # run tests in multiple phases to limit memory footprint + PYTEST_CMD="$PYTEST_CMD/tests/window" + PYTEST_CMD="$PYTEST_CMD/tests/api" + PYTEST_CMD="$PYTEST_CMD/tests/arithmetic" + PYTEST_CMD="$PYTEST_CMD/tests/arrays" + PYTEST_CMD="$PYTEST_CMD/tests/base" + PYTEST_CMD="$PYTEST_CMD/tests/computation" + PYTEST_CMD="$PYTEST_CMD/tests/config" + PYTEST_CMD="$PYTEST_CMD/tests/dtypes" + PYTEST_CMD="$PYTEST_CMD/tests/extension" + PYTEST_CMD="$PYTEST_CMD/tests/frame" + PYTEST_CMD="$PYTEST_CMD/tests/generic" + PYTEST_CMD="$PYTEST_CMD/tests/groupby" + PYTEST_CMD="$PYTEST_CMD/tests/indexes" + PYTEST_CMD="$PYTEST_CMD/tests/indexing" + PYTEST_CMD="$PYTEST_CMD/tests/internals" + PYTEST_CMD="$PYTEST_CMD/tests/io" + PYTEST_CMD="$PYTEST_CMD/tests/libs" + PYTEST_CMD="$PYTEST_CMD/tests/plotting" + PYTEST_CMD="$PYTEST_CMD/tests/reductions" + PYTEST_CMD="$PYTEST_CMD/tests/resample" + PYTEST_CMD="$PYTEST_CMD/tests/reshape" + PYTEST_CMD="$PYTEST_CMD/tests/scalar" + PYTEST_CMD="$PYTEST_CMD/tests/series" + PYTEST_CMD="$PYTEST_CMD/tests/tools" + PYTEST_CMD="$PYTEST_CMD/tests/tseries" + PYTEST_CMD="$PYTEST_CMD/tests/tslibs" + PYTEST_CMD="$PYTEST_CMD/tests/util" + PYTEST_CMD="$PYTEST_CMD/tests/window" + PYTEST_CMD="$PYTEST_CMD/tests/test*.py" fi echo $PYTEST_CMD From df3f89791e8c72281957021064fc4c6dc426b7c9 Mon Sep 17 00:00:00 2001 From: Brock Date: Tue, 10 Nov 2020 10:55:03 -0800 Subject: [PATCH 02/14] Fixup run the tests, not edit the command --- ci/run_tests.sh | 47 ++++++++++++++++++----------------------------- 1 file changed, 18 insertions(+), 29 deletions(-) diff --git a/ci/run_tests.sh b/ci/run_tests.sh index fa6eded30f49f..f1b1e451bba28 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -22,38 +22,27 @@ fi PYTEST_CMD="${XVFB}pytest -m \"$PATTERN\" -n $PYTEST_WORKERS --dist=loadfile -s --strict --durations=30 --junitxml=test-data.xml $TEST_ARGS $COVERAGE pandas" +echo $PYTEST_CMD + if [[ $(uname) != "Linux" && $(uname) != "Darwin" ]]; then # GH#37455 windows py38 build appears to be running out of memory # run tests in multiple phases to limit memory footprint - PYTEST_CMD="$PYTEST_CMD/tests/window" - PYTEST_CMD="$PYTEST_CMD/tests/api" - PYTEST_CMD="$PYTEST_CMD/tests/arithmetic" - PYTEST_CMD="$PYTEST_CMD/tests/arrays" - PYTEST_CMD="$PYTEST_CMD/tests/base" - PYTEST_CMD="$PYTEST_CMD/tests/computation" - PYTEST_CMD="$PYTEST_CMD/tests/config" - PYTEST_CMD="$PYTEST_CMD/tests/dtypes" - PYTEST_CMD="$PYTEST_CMD/tests/extension" - PYTEST_CMD="$PYTEST_CMD/tests/frame" - PYTEST_CMD="$PYTEST_CMD/tests/generic" - PYTEST_CMD="$PYTEST_CMD/tests/groupby" - PYTEST_CMD="$PYTEST_CMD/tests/indexes" - PYTEST_CMD="$PYTEST_CMD/tests/indexing" - PYTEST_CMD="$PYTEST_CMD/tests/internals" - PYTEST_CMD="$PYTEST_CMD/tests/io" - PYTEST_CMD="$PYTEST_CMD/tests/libs" - PYTEST_CMD="$PYTEST_CMD/tests/plotting" - PYTEST_CMD="$PYTEST_CMD/tests/reductions" - PYTEST_CMD="$PYTEST_CMD/tests/resample" - PYTEST_CMD="$PYTEST_CMD/tests/reshape" - PYTEST_CMD="$PYTEST_CMD/tests/scalar" - PYTEST_CMD="$PYTEST_CMD/tests/series" - PYTEST_CMD="$PYTEST_CMD/tests/tools" - PYTEST_CMD="$PYTEST_CMD/tests/tseries" - PYTEST_CMD="$PYTEST_CMD/tests/tslibs" - PYTEST_CMD="$PYTEST_CMD/tests/util" - PYTEST_CMD="$PYTEST_CMD/tests/window" - PYTEST_CMD="$PYTEST_CMD/tests/test*.py" + sh -c "$PYTEST_CMD/tests/a*" + sh -c "$PYTEST_CMD/tests/b*" + sh -c "$PYTEST_CMD/tests/c*" + sh -c "$PYTEST_CMD/tests/d*" + sh -c "$PYTEST_CMD/tests/e*" + sh -c "$PYTEST_CMD/tests/g*" + sh -c "$PYTEST_CMD/tests/i*" + sh -c "$PYTEST_CMD/tests/l*" + sh -c "$PYTEST_CMD/tests/p*" + sh -c "$PYTEST_CMD/tests/r*" + sh -c "$PYTEST_CMD/tests/s*" + sh -c "$PYTEST_CMD/tests/t*" + sh -c "$PYTEST_CMD/tests/u*" + sh -c "$PYTEST_CMD/tests/w*" +else + sh -c "$PYTEST_CMD" fi echo $PYTEST_CMD From 1f3b9f68056d1f4e8137b2f6d2669d49b2972abf Mon Sep 17 00:00:00 2001 From: Brock Date: Wed, 11 Nov 2020 14:54:26 -0800 Subject: [PATCH 03/14] xfail on windows --- pandas/tests/plotting/test_converter.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pandas/tests/plotting/test_converter.py b/pandas/tests/plotting/test_converter.py index b2eeb649276d5..e6c06442a3c6c 100644 --- a/pandas/tests/plotting/test_converter.py +++ b/pandas/tests/plotting/test_converter.py @@ -7,6 +7,7 @@ import pandas._config.config as cf +from pandas.compat import is_platform_windows from pandas.compat.numpy import np_datetime64_compat import pandas.util._test_decorators as td @@ -71,13 +72,17 @@ def test_registering_no_warning(self): register_matplotlib_converters() ax.plot(s.index, s.values) - def test_pandas_plots_register(self): + def test_pandas_plots_register(self, request): pytest.importorskip("matplotlib.pyplot") s = Series(range(12), index=date_range("2017", periods=12)) # Set to the "warn" state, in case this isn't the first test run with tm.assert_produces_warning(None) as w: s.plot() + if is_platform_windows(): + mark = pytest.mark.xfail(reason="Getting two warnings") + request.node.add_marker(mark) + assert len(w) == 0 def test_matplotlib_formatters(self): From 2c64fa2d9a4a86992d572a1b8e0e10bdb4ea7751 Mon Sep 17 00:00:00 2001 From: Brock Date: Wed, 11 Nov 2020 18:17:53 -0800 Subject: [PATCH 04/14] not strict --- pandas/tests/plotting/test_converter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/plotting/test_converter.py b/pandas/tests/plotting/test_converter.py index e6c06442a3c6c..2c35d48c3fe46 100644 --- a/pandas/tests/plotting/test_converter.py +++ b/pandas/tests/plotting/test_converter.py @@ -80,7 +80,7 @@ def test_pandas_plots_register(self, request): s.plot() if is_platform_windows(): - mark = pytest.mark.xfail(reason="Getting two warnings") + mark = pytest.mark.xfail(reason="Getting two warnings", strict=False) request.node.add_marker(mark) assert len(w) == 0 From dd60ce7c3316e1c3b1f64e8f6d9bfeb4fa3cdf56 Mon Sep 17 00:00:00 2001 From: Brock Date: Wed, 11 Nov 2020 19:12:43 -0800 Subject: [PATCH 05/14] xfail harder --- pandas/tests/plotting/test_groupby.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/tests/plotting/test_groupby.py b/pandas/tests/plotting/test_groupby.py index 805a284c8f863..7ed29507fe0f4 100644 --- a/pandas/tests/plotting/test_groupby.py +++ b/pandas/tests/plotting/test_groupby.py @@ -4,7 +4,7 @@ import numpy as np import pytest -from pandas.compat import PY38, is_platform_windows +from pandas.compat import is_platform_windows import pandas.util._test_decorators as td from pandas import DataFrame, Index, Series @@ -15,7 +15,7 @@ @td.skip_if_no_mpl class TestDataFrameGroupByPlots(TestPlotBase): @pytest.mark.xfail( - is_platform_windows() and not PY38, + is_platform_windows(), reason="Looks like LinePlot._is_ts_plot is wrong", strict=False, ) From 58a32b9cb752114f1b393632819f10ef24513606 Mon Sep 17 00:00:00 2001 From: Brock Date: Thu, 12 Nov 2020 13:01:35 -0800 Subject: [PATCH 06/14] re-xfail --- pandas/tests/plotting/test_converter.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pandas/tests/plotting/test_converter.py b/pandas/tests/plotting/test_converter.py index c524b21f1be9e..a42885b7ea4ab 100644 --- a/pandas/tests/plotting/test_converter.py +++ b/pandas/tests/plotting/test_converter.py @@ -7,6 +7,7 @@ import pandas._config.config as cf +from pandas.compat import is_platform_windows from pandas.compat.numpy import np_datetime64_compat import pandas.util._test_decorators as td @@ -72,13 +73,17 @@ def test_registering_no_warning(self): ax.plot(s.index, s.values) plt.close() - def test_pandas_plots_register(self): + def test_pandas_plots_register(self, request): plt = pytest.importorskip("matplotlib.pyplot") s = Series(range(12), index=date_range("2017", periods=12)) # Set to the "warn" state, in case this isn't the first test run with tm.assert_produces_warning(None) as w: s.plot() + if is_platform_windows(): + mark = pytest.mark.xfail(reason="Getting two warnings", strict=False) + request.node.add_marker(mark) + assert len(w) == 0 plt.close() From 8d4bc20d3c385caa07802f4382aad8856064ce1b Mon Sep 17 00:00:00 2001 From: Brock Date: Thu, 12 Nov 2020 17:37:15 -0800 Subject: [PATCH 07/14] dummy commit to force CI From 675e8f58f427f0f775af3491c84ec8e5b4c0e3dc Mon Sep 17 00:00:00 2001 From: Brock Date: Thu, 12 Nov 2020 21:28:16 -0800 Subject: [PATCH 08/14] now the linux-locale-slow build is complaining --- pandas/tests/plotting/test_converter.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pandas/tests/plotting/test_converter.py b/pandas/tests/plotting/test_converter.py index a42885b7ea4ab..78bd1d0dd6900 100644 --- a/pandas/tests/plotting/test_converter.py +++ b/pandas/tests/plotting/test_converter.py @@ -73,19 +73,20 @@ def test_registering_no_warning(self): ax.plot(s.index, s.values) plt.close() - def test_pandas_plots_register(self, request): + @pytest.mark.xfail( + is_platform_windows(), reason="Getting two warnings", strict=False + ) + def test_pandas_plots_register(self): plt = pytest.importorskip("matplotlib.pyplot") s = Series(range(12), index=date_range("2017", periods=12)) # Set to the "warn" state, in case this isn't the first test run with tm.assert_produces_warning(None) as w: s.plot() - if is_platform_windows(): - mark = pytest.mark.xfail(reason="Getting two warnings", strict=False) - request.node.add_marker(mark) - - assert len(w) == 0 - plt.close() + try: + assert len(w) == 0 + finally: + plt.close() def test_matplotlib_formatters(self): units = pytest.importorskip("matplotlib.units") From 0c027abee4d7729467accd5957e7cca777f6a17e Mon Sep 17 00:00:00 2001 From: Brock Date: Fri, 13 Nov 2020 17:17:41 -0800 Subject: [PATCH 09/14] troubleshoot --- ci/deps/azure-windows-38.yaml | 13 ------------- ci/run_tests.sh | 17 ++--------------- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/ci/deps/azure-windows-38.yaml b/ci/deps/azure-windows-38.yaml index 449bbd05991bf..a57669d698b95 100644 --- a/ci/deps/azure-windows-38.yaml +++ b/ci/deps/azure-windows-38.yaml @@ -8,29 +8,16 @@ dependencies: # tools - cython>=0.29.21 - pytest>=5.0.1 - - pytest-xdist>=1.21 - hypothesis>=3.58.0 - pytest-azurepipelines # pandas dependencies - blosc - bottleneck - - fastparquet>=0.3.2 - - flask - - fsspec>=0.8.0 - matplotlib=3.1.3 - - moto>=1.3.14 - numba - numexpr - numpy=1.18.* - - openpyxl - - jinja2 - - pyarrow>=0.15.0 - - pytables - python-dateutil - pytz - - s3fs>=0.4.0 - scipy - - xlrd - - xlsxwriter - - xlwt diff --git a/ci/run_tests.sh b/ci/run_tests.sh index f1b1e451bba28..9813abcc32b27 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -26,21 +26,8 @@ echo $PYTEST_CMD if [[ $(uname) != "Linux" && $(uname) != "Darwin" ]]; then # GH#37455 windows py38 build appears to be running out of memory - # run tests in multiple phases to limit memory footprint - sh -c "$PYTEST_CMD/tests/a*" - sh -c "$PYTEST_CMD/tests/b*" - sh -c "$PYTEST_CMD/tests/c*" - sh -c "$PYTEST_CMD/tests/d*" - sh -c "$PYTEST_CMD/tests/e*" - sh -c "$PYTEST_CMD/tests/g*" - sh -c "$PYTEST_CMD/tests/i*" - sh -c "$PYTEST_CMD/tests/l*" - sh -c "$PYTEST_CMD/tests/p*" - sh -c "$PYTEST_CMD/tests/r*" - sh -c "$PYTEST_CMD/tests/s*" - sh -c "$PYTEST_CMD/tests/t*" - sh -c "$PYTEST_CMD/tests/u*" - sh -c "$PYTEST_CMD/tests/w*" + # so troubleshoot without parallelism + sh -c "pytest -m \"$PATTERN\" --strict --durations=30 $TEST_ARGS pandas/tests/" else sh -c "$PYTEST_CMD" fi From 0c3342a9f60420f32575aba26142f53fdeb75bdb Mon Sep 17 00:00:00 2001 From: Brock Date: Fri, 13 Nov 2020 19:15:41 -0800 Subject: [PATCH 10/14] restore xdist --- ci/deps/azure-windows-38.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/deps/azure-windows-38.yaml b/ci/deps/azure-windows-38.yaml index a57669d698b95..5180206d7ab1f 100644 --- a/ci/deps/azure-windows-38.yaml +++ b/ci/deps/azure-windows-38.yaml @@ -8,6 +8,7 @@ dependencies: # tools - cython>=0.29.21 - pytest>=5.0.1 + - pytest-xdist>=1.21 - hypothesis>=3.58.0 - pytest-azurepipelines From c2e0c7394ce4532adb54a11e1a1543619939b4b0 Mon Sep 17 00:00:00 2001 From: Brock Date: Sun, 15 Nov 2020 15:10:46 -0800 Subject: [PATCH 11/14] try ignoring window again --- ci/run_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/run_tests.sh b/ci/run_tests.sh index 9813abcc32b27..81f30ffe06641 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -27,7 +27,7 @@ echo $PYTEST_CMD if [[ $(uname) != "Linux" && $(uname) != "Darwin" ]]; then # GH#37455 windows py38 build appears to be running out of memory # so troubleshoot without parallelism - sh -c "pytest -m \"$PATTERN\" --strict --durations=30 $TEST_ARGS pandas/tests/" + sh -c "pytest -m \"$PATTERN\" --strict --durations=30 $TEST_ARGS pandas/tests/ --ignore=pandas/tests/window" else sh -c "$PYTEST_CMD" fi From 064f6865ae4fe0c59181b0e6b18be217a3dafa2e Mon Sep 17 00:00:00 2001 From: Brock Date: Sun, 15 Nov 2020 20:50:05 -0800 Subject: [PATCH 12/14] ignore more --- ci/run_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/run_tests.sh b/ci/run_tests.sh index 81f30ffe06641..339a92b357a87 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -27,7 +27,7 @@ echo $PYTEST_CMD if [[ $(uname) != "Linux" && $(uname) != "Darwin" ]]; then # GH#37455 windows py38 build appears to be running out of memory # so troubleshoot without parallelism - sh -c "pytest -m \"$PATTERN\" --strict --durations=30 $TEST_ARGS pandas/tests/ --ignore=pandas/tests/window" + sh -c "pytest -m \"$PATTERN\" --strict --durations=30 $TEST_ARGS pandas/tests/ --ignore=pandas/tests/window --ignore=pandas/tests/groupby --ignore=pandas/tests/plotting" else sh -c "$PYTEST_CMD" fi From bdb97d4f38a4b24ddabc309a4d84ab5a851bb408 Mon Sep 17 00:00:00 2001 From: Brock Date: Tue, 17 Nov 2020 16:13:07 -0800 Subject: [PATCH 13/14] fixup dont re-run --- ci/run_tests.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/ci/run_tests.sh b/ci/run_tests.sh index 339a92b357a87..8c6eac24a283c 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -32,9 +32,6 @@ else sh -c "$PYTEST_CMD" fi -echo $PYTEST_CMD -sh -c "$PYTEST_CMD" - if [[ "$COVERAGE" && $? == 0 && "$TRAVIS_BRANCH" == "master" ]]; then echo "uploading coverage" echo "bash <(curl -s https://codecov.io/bash) -Z -c -f $COVERAGE_FNAME" From f6716c5eaaae1b70ddc026cff23e9de77f7314ed Mon Sep 17 00:00:00 2001 From: Brock Date: Tue, 17 Nov 2020 19:58:24 -0800 Subject: [PATCH 14/14] ignore plotting --- ci/deps/azure-windows-38.yaml | 12 ++++++++++++ ci/run_tests.sh | 11 +++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/ci/deps/azure-windows-38.yaml b/ci/deps/azure-windows-38.yaml index 5180206d7ab1f..449bbd05991bf 100644 --- a/ci/deps/azure-windows-38.yaml +++ b/ci/deps/azure-windows-38.yaml @@ -15,10 +15,22 @@ dependencies: # pandas dependencies - blosc - bottleneck + - fastparquet>=0.3.2 + - flask + - fsspec>=0.8.0 - matplotlib=3.1.3 + - moto>=1.3.14 - numba - numexpr - numpy=1.18.* + - openpyxl + - jinja2 + - pyarrow>=0.15.0 + - pytables - python-dateutil - pytz + - s3fs>=0.4.0 - scipy + - xlrd + - xlsxwriter + - xlwt diff --git a/ci/run_tests.sh b/ci/run_tests.sh index 8c6eac24a283c..78d24c814840a 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -22,16 +22,15 @@ fi PYTEST_CMD="${XVFB}pytest -m \"$PATTERN\" -n $PYTEST_WORKERS --dist=loadfile -s --strict --durations=30 --junitxml=test-data.xml $TEST_ARGS $COVERAGE pandas" -echo $PYTEST_CMD - if [[ $(uname) != "Linux" && $(uname) != "Darwin" ]]; then # GH#37455 windows py38 build appears to be running out of memory - # so troubleshoot without parallelism - sh -c "pytest -m \"$PATTERN\" --strict --durations=30 $TEST_ARGS pandas/tests/ --ignore=pandas/tests/window --ignore=pandas/tests/groupby --ignore=pandas/tests/plotting" -else - sh -c "$PYTEST_CMD" + # skip collection of window tests + PYTEST_CMD="$PYTEST_CMD --ignore=pandas/tests/window/ --ignore=pandas/tests/plotting/" fi +echo $PYTEST_CMD +sh -c "$PYTEST_CMD" + if [[ "$COVERAGE" && $? == 0 && "$TRAVIS_BRANCH" == "master" ]]; then echo "uploading coverage" echo "bash <(curl -s https://codecov.io/bash) -Z -c -f $COVERAGE_FNAME"