From 334ac2d7bd3aebb0b1dd8e95ec30d8e24e673c43 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Wed, 16 Sep 2020 13:21:17 -0500 Subject: [PATCH 1/4] BLD:CI try to fix arm64 build #36397 --- ci/setup_env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/setup_env.sh b/ci/setup_env.sh index aa43d8b7dd00a..06da736b6d686 100755 --- a/ci/setup_env.sh +++ b/ci/setup_env.sh @@ -43,7 +43,7 @@ fi if [ "${TRAVIS_CPU_ARCH}" == "arm64" ]; then sudo apt-get -y install xvfb - CONDA_URL="https://github.com/conda-forge/miniforge/releases/download/4.8.2-1/Miniforge3-4.8.2-1-Linux-aarch64.sh" + CONDA_URL="https://github.com/conda-forge/miniforge/releases/download/4.8.5-0/Miniforge3-4.8.5-0-Linux-aarch64.sh" else CONDA_URL="https://repo.continuum.io/miniconda/Miniconda3-latest-$CONDA_OS.sh" fi From 96fcdaab9147df8d676feafbcaa198a3badb9fd7 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Wed, 16 Sep 2020 19:28:43 -0500 Subject: [PATCH 2/4] BLD/CI try to fix 404 --- ci/setup_env.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/setup_env.sh b/ci/setup_env.sh index 06da736b6d686..961433204cfbb 100755 --- a/ci/setup_env.sh +++ b/ci/setup_env.sh @@ -42,6 +42,7 @@ else fi if [ "${TRAVIS_CPU_ARCH}" == "arm64" ]; then + sudo apt-get update sudo apt-get -y install xvfb CONDA_URL="https://github.com/conda-forge/miniforge/releases/download/4.8.5-0/Miniforge3-4.8.5-0-Linux-aarch64.sh" else From 2b70a24c17f0b9566eb4a91f9bd1dea2bfdba1e9 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Wed, 16 Sep 2020 20:16:18 -0500 Subject: [PATCH 3/4] BLD/CI remove arm64 build from allow_failures --- .travis.yml | 4 ---- ci/deps/travis-37-arm64.yaml | 1 - 2 files changed, 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 93c8238bb5059..e7f24452bc4ae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -58,10 +58,6 @@ matrix: services: - mysql - postgresql - allow_failures: - - arch: arm64 - env: - - JOB="3.7, arm64" PYTEST_WORKERS=8 ENV_FILE="ci/deps/travis-37-arm64.yaml" PATTERN="(not slow and not network and not clipboard)" before_install: diff --git a/ci/deps/travis-37-arm64.yaml b/ci/deps/travis-37-arm64.yaml index d04b1ca0bdcfc..8df6104f43a50 100644 --- a/ci/deps/travis-37-arm64.yaml +++ b/ci/deps/travis-37-arm64.yaml @@ -1,6 +1,5 @@ name: pandas-dev channels: - - defaults - conda-forge dependencies: - python=3.7.* From a1e3c2ed77085f53ed37bdddff7e2331c43b7e62 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Wed, 16 Sep 2020 21:39:32 -0500 Subject: [PATCH 4/4] BLD/CI skip slow tests for arm64 --- .travis.yml | 2 +- pandas/conftest.py | 3 +++ pandas/tests/arithmetic/test_datetime64.py | 1 + pandas/tests/frame/test_constructors.py | 1 + pandas/tests/groupby/test_groupby_dropna.py | 1 + pandas/tests/groupby/transform/test_transform.py | 1 + pandas/tests/indexes/common.py | 1 + pandas/tests/indexes/multi/test_duplicates.py | 1 + pandas/tests/indexes/multi/test_integrity.py | 1 + pandas/tests/indexes/multi/test_setops.py | 1 + pandas/tests/indexes/period/test_indexing.py | 1 + pandas/tests/indexing/interval/test_interval.py | 1 + pandas/tests/indexing/multiindex/test_chaining_and_caching.py | 1 + pandas/tests/indexing/test_chaining_and_caching.py | 1 + pandas/tests/indexing/test_loc.py | 1 + pandas/tests/test_sorting.py | 1 + pandas/tests/tseries/offsets/test_offsets_properties.py | 2 ++ pandas/tests/tseries/offsets/test_ticks.py | 1 + 18 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e7f24452bc4ae..a38e90bbce8ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,7 +42,7 @@ matrix: - arch: arm64 env: - - JOB="3.7, arm64" PYTEST_WORKERS=8 ENV_FILE="ci/deps/travis-37-arm64.yaml" PATTERN="(not slow and not network and not clipboard)" + - JOB="3.7, arm64" PYTEST_WORKERS=8 ENV_FILE="ci/deps/travis-37-arm64.yaml" PATTERN="(not slow and not network and not clipboard and not arm_slow)" - env: - JOB="3.7, locale" ENV_FILE="ci/deps/travis-37-locale.yaml" PATTERN="((not slow and not network and not clipboard) or (single and db))" LOCALE_OVERRIDE="zh_CN.UTF-8" SQL="1" diff --git a/pandas/conftest.py b/pandas/conftest.py index e79370e53ead6..604815d496f80 100644 --- a/pandas/conftest.py +++ b/pandas/conftest.py @@ -55,6 +55,9 @@ def pytest_configure(config): ) config.addinivalue_line("markers", "high_memory: mark a test as a high-memory only") config.addinivalue_line("markers", "clipboard: mark a pd.read_clipboard test") + config.addinivalue_line( + "markers", "arm_slow: mark a test as slow for arm64 architecture" + ) def pytest_addoption(parser): diff --git a/pandas/tests/arithmetic/test_datetime64.py b/pandas/tests/arithmetic/test_datetime64.py index 5dfaea7c77420..0dd389ed516c7 100644 --- a/pandas/tests/arithmetic/test_datetime64.py +++ b/pandas/tests/arithmetic/test_datetime64.py @@ -749,6 +749,7 @@ class TestDatetime64Arithmetic: # ------------------------------------------------------------- # Addition/Subtraction of timedelta-like + @pytest.mark.arm_slow def test_dt64arr_add_timedeltalike_scalar( self, tz_naive_fixture, two_hours, box_with_array ): diff --git a/pandas/tests/frame/test_constructors.py b/pandas/tests/frame/test_constructors.py index eb334e811c5a4..63a2160e128ed 100644 --- a/pandas/tests/frame/test_constructors.py +++ b/pandas/tests/frame/test_constructors.py @@ -2588,6 +2588,7 @@ def test_to_frame_with_falsey_names(self): result = DataFrame(Series(name=0, dtype=object)).dtypes tm.assert_series_equal(result, expected) + @pytest.mark.arm_slow @pytest.mark.parametrize("dtype", [None, "uint8", "category"]) def test_constructor_range_dtype(self, dtype): expected = DataFrame({"A": [0, 1, 2, 3, 4]}, dtype=dtype or "int64") diff --git a/pandas/tests/groupby/test_groupby_dropna.py b/pandas/tests/groupby/test_groupby_dropna.py index 66db06eeebdfb..deb73acbb158a 100644 --- a/pandas/tests/groupby/test_groupby_dropna.py +++ b/pandas/tests/groupby/test_groupby_dropna.py @@ -238,6 +238,7 @@ def test_groupby_dropna_multi_index_dataframe_agg(dropna, tuples, outputs): tm.assert_frame_equal(grouped, expected) +@pytest.mark.arm_slow @pytest.mark.parametrize( "datetime1, datetime2", [ diff --git a/pandas/tests/groupby/transform/test_transform.py b/pandas/tests/groupby/transform/test_transform.py index c09f35526a6bf..97be039e16ebb 100644 --- a/pandas/tests/groupby/transform/test_transform.py +++ b/pandas/tests/groupby/transform/test_transform.py @@ -675,6 +675,7 @@ def test_groupby_cum_skipna(op, skipna, input, exp): tm.assert_series_equal(expected, result) +@pytest.mark.arm_slow @pytest.mark.parametrize( "op, args, targop", [ diff --git a/pandas/tests/indexes/common.py b/pandas/tests/indexes/common.py index 11dc232af8de4..f607f63693c2f 100644 --- a/pandas/tests/indexes/common.py +++ b/pandas/tests/indexes/common.py @@ -905,6 +905,7 @@ def test_is_unique(self): index_na_dup = index_na.insert(0, np.nan) assert index_na_dup.is_unique is False + @pytest.mark.arm_slow def test_engine_reference_cycle(self): # GH27585 index = self.create_index() diff --git a/pandas/tests/indexes/multi/test_duplicates.py b/pandas/tests/indexes/multi/test_duplicates.py index 9add4b478da47..aa2f37dad152c 100644 --- a/pandas/tests/indexes/multi/test_duplicates.py +++ b/pandas/tests/indexes/multi/test_duplicates.py @@ -241,6 +241,7 @@ def test_duplicated(idx_dup, keep, expected): tm.assert_numpy_array_equal(result, expected) +@pytest.mark.arm_slow def test_duplicated_large(keep): # GH 9125 n, k = 200, 5000 diff --git a/pandas/tests/indexes/multi/test_integrity.py b/pandas/tests/indexes/multi/test_integrity.py index c776a33717ccd..6a353fe1ad6e7 100644 --- a/pandas/tests/indexes/multi/test_integrity.py +++ b/pandas/tests/indexes/multi/test_integrity.py @@ -118,6 +118,7 @@ def test_consistency(): assert index.is_unique is False +@pytest.mark.arm_slow def test_hash_collisions(): # non-smoke test that we don't get hash collisions diff --git a/pandas/tests/indexes/multi/test_setops.py b/pandas/tests/indexes/multi/test_setops.py index d7427ee622977..6d4928547cad1 100644 --- a/pandas/tests/indexes/multi/test_setops.py +++ b/pandas/tests/indexes/multi/test_setops.py @@ -37,6 +37,7 @@ def test_intersection_base(idx, sort, klass): first.intersection([1, 2, 3], sort=sort) +@pytest.mark.arm_slow @pytest.mark.parametrize("klass", [MultiIndex, np.array, Series, list]) def test_union_base(idx, sort, klass): first = idx[::-1] diff --git a/pandas/tests/indexes/period/test_indexing.py b/pandas/tests/indexes/period/test_indexing.py index d2499b85ad181..f42499147cdbb 100644 --- a/pandas/tests/indexes/period/test_indexing.py +++ b/pandas/tests/indexes/period/test_indexing.py @@ -157,6 +157,7 @@ def test_getitem_list_periods(self): exp = ts.iloc[[1]] tm.assert_series_equal(ts[[Period("2012-01-02", freq="D")]], exp) + @pytest.mark.arm_slow def test_getitem_seconds(self): # GH#6716 didx = date_range(start="2013/01/01 09:00:00", freq="S", periods=4000) diff --git a/pandas/tests/indexing/interval/test_interval.py b/pandas/tests/indexing/interval/test_interval.py index 634020982b1c2..8976e87a1b75a 100644 --- a/pandas/tests/indexing/interval/test_interval.py +++ b/pandas/tests/indexing/interval/test_interval.py @@ -71,6 +71,7 @@ def test_non_matching(self): with pytest.raises(KeyError, match="^$"): s.loc[[-1, 3]] + @pytest.mark.arm_slow def test_large_series(self): s = Series( np.arange(1000000), index=IntervalIndex.from_breaks(np.arange(1000001)) diff --git a/pandas/tests/indexing/multiindex/test_chaining_and_caching.py b/pandas/tests/indexing/multiindex/test_chaining_and_caching.py index d3b13336e2a44..62c0171fe641f 100644 --- a/pandas/tests/indexing/multiindex/test_chaining_and_caching.py +++ b/pandas/tests/indexing/multiindex/test_chaining_and_caching.py @@ -49,6 +49,7 @@ def test_cache_updating(): assert result == 2 +@pytest.mark.arm_slow def test_indexer_caching(): # GH5727 # make sure that indexers are in the _internal_names_set diff --git a/pandas/tests/indexing/test_chaining_and_caching.py b/pandas/tests/indexing/test_chaining_and_caching.py index 9910ef1b04b1a..66835c586e6c7 100644 --- a/pandas/tests/indexing/test_chaining_and_caching.py +++ b/pandas/tests/indexing/test_chaining_and_caching.py @@ -132,6 +132,7 @@ def test_setitem_chained_setfault(self): result = df.head() tm.assert_frame_equal(result, expected) + @pytest.mark.arm_slow def test_detect_chained_assignment(self): pd.set_option("chained_assignment", "raise") diff --git a/pandas/tests/indexing/test_loc.py b/pandas/tests/indexing/test_loc.py index 9a6f30ec920cc..9b9bca77e17ec 100644 --- a/pandas/tests/indexing/test_loc.py +++ b/pandas/tests/indexing/test_loc.py @@ -785,6 +785,7 @@ def test_loc_non_unique(self): expected = DataFrame({"A": [2, 4, 5], "B": [4, 6, 7]}, index=[1, 1, 2]) tm.assert_frame_equal(result, expected) + @pytest.mark.arm_slow def test_loc_non_unique_memory_error(self): # GH 4280 diff --git a/pandas/tests/test_sorting.py b/pandas/tests/test_sorting.py index 98297474243e4..deb7434694d01 100644 --- a/pandas/tests/test_sorting.py +++ b/pandas/tests/test_sorting.py @@ -60,6 +60,7 @@ def test_int64_overflow(self): assert left[k] == v assert len(left) == len(right) + @pytest.mark.arm_slow def test_int64_overflow_moar(self): # GH9096 diff --git a/pandas/tests/tseries/offsets/test_offsets_properties.py b/pandas/tests/tseries/offsets/test_offsets_properties.py index ca14b202ef888..0fa9081d606b0 100644 --- a/pandas/tests/tseries/offsets/test_offsets_properties.py +++ b/pandas/tests/tseries/offsets/test_offsets_properties.py @@ -12,6 +12,7 @@ from hypothesis import assume, given, strategies as st from hypothesis.extra.dateutil import timezones as dateutil_timezones from hypothesis.extra.pytz import timezones as pytz_timezones +import pytest import pandas as pd from pandas import Timestamp @@ -84,6 +85,7 @@ # Offset-specific behaviour tests +@pytest.mark.arm_slow @given(gen_random_datetime, gen_yqm_offset) def test_on_offset_implementations(dt, offset): assume(not offset.normalize) diff --git a/pandas/tests/tseries/offsets/test_ticks.py b/pandas/tests/tseries/offsets/test_ticks.py index 10c239c683bc0..cc23f5f3201da 100644 --- a/pandas/tests/tseries/offsets/test_ticks.py +++ b/pandas/tests/tseries/offsets/test_ticks.py @@ -64,6 +64,7 @@ def test_tick_add_sub(cls, n, m): assert left - right == expected +@pytest.mark.arm_slow @pytest.mark.parametrize("cls", tick_classes) @settings(deadline=None) @example(n=2, m=3)