From 70d061860bbc02c01120a24988cb677da7a2b30a Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Wed, 10 Feb 2021 20:50:47 -0600 Subject: [PATCH 01/15] enable arm64 build on drone.io #39730 --- .drone.yml | 22 ++++++ .travis.yml | 78 ------------------- ...avis-37-arm64.yaml => drone-37-arm64.yaml} | 0 3 files changed, 22 insertions(+), 78 deletions(-) create mode 100644 .drone.yml delete mode 100644 .travis.yml rename ci/deps/{travis-37-arm64.yaml => drone-37-arm64.yaml} (100%) diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000000000..099ca7767f0a7 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,22 @@ +kind: pipeline +type: docker +name: py37-amd64 + +platform: + arch: amd64 + +steps: +- name: test + image: python:3.7 + commands: + - pip install -r requirements-dev.txt + - python setup.py build_ext -j 4 + - python -m pip install -e . --no-build-isolation --no-use-pep517 + - pytest -m "(not slow and not network and not clipboard and not arm_slow)" -n 2 --dist=loadfile -s --strict-markers --durations=30 --junitxml=test-data.xml pandas + +trigger: + branch: + - master + - feature/* + event: + - push \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8ede978074a9c..0000000000000 --- a/.travis.yml +++ /dev/null @@ -1,78 +0,0 @@ -language: python -python: 3.7 - -addons: - apt: - update: true - packages: - - xvfb - -services: - - xvfb - -# To turn off cached cython files and compiler cache -# set NOCACHE-true -# To delete caches go to https://travis-ci.org/OWNER/REPOSITORY/caches or run -# travis cache --delete inside the project directory from the travis command line client -# The cache directories will be deleted if anything in ci/ changes in a commit -cache: - apt: true - ccache: true - directories: - - $HOME/.cache # cython cache - -env: - global: - # create a github personal access token - # cd pandas-dev/pandas - # travis encrypt 'PANDAS_GH_TOKEN=personal_access_token' -r pandas-dev/pandas - - secure: "EkWLZhbrp/mXJOx38CHjs7BnjXafsqHtwxPQrqWy457VDFWhIY1DMnIR/lOWG+a20Qv52sCsFtiZEmMfUjf0pLGXOqurdxbYBGJ7/ikFLk9yV2rDwiArUlVM9bWFnFxHvdz9zewBH55WurrY4ShZWyV+x2dWjjceWG5VpWeI6sA=" - -git: - depth: false - -matrix: - fast_finish: true - - include: - - arch: arm64 - env: - - JOB="3.7, arm64" PYTEST_WORKERS=1 ENV_FILE="ci/deps/travis-37-arm64.yaml" PATTERN="(not slow and not network and not clipboard and not arm_slow)" - - allow_failures: - # Moved to allowed_failures 2020-09-29 due to timeouts https://github.com/pandas-dev/pandas/issues/36719 - - arch: arm64 - env: - - JOB="3.7, arm64" PYTEST_WORKERS=1 ENV_FILE="ci/deps/travis-37-arm64.yaml" PATTERN="(not slow and not network and not clipboard and not arm_slow)" - - -before_install: - - echo "before_install" - # Use blocking IO on travis. Ref: https://github.com/travis-ci/travis-ci/issues/8920#issuecomment-352661024 - - python -c 'import os,sys,fcntl; flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL); fcntl.fcntl(sys.stdout, fcntl.F_SETFL, flags&~os.O_NONBLOCK);' - - source ci/travis_process_gbq_encryption.sh - - export PATH="$HOME/miniconda3/bin:$PATH" - - df -h - - pwd - - uname -a - - git --version - - ./ci/check_git_tags.sh - -install: - - echo "install start" - - ci/prep_cython_cache.sh - - ci/setup_env.sh - - ci/submit_cython_cache.sh - - echo "install done" - -script: - - echo "script start" - - echo "$JOB" - - source activate pandas-dev - - ci/run_tests.sh - -after_script: - - echo "after_script start" - - source activate pandas-dev && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd - - ci/print_skipped.py - - echo "after_script done" diff --git a/ci/deps/travis-37-arm64.yaml b/ci/deps/drone-37-arm64.yaml similarity index 100% rename from ci/deps/travis-37-arm64.yaml rename to ci/deps/drone-37-arm64.yaml From 9684d73b9512d01f6d1187cc2c0937f66fff4aab Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Wed, 10 Feb 2021 20:54:18 -0600 Subject: [PATCH 02/15] enable ci on pr --- .drone.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 099ca7767f0a7..7e7632f08ab88 100644 --- a/.drone.yml +++ b/.drone.yml @@ -19,4 +19,5 @@ trigger: - master - feature/* event: - - push \ No newline at end of file + - push + - pull_request \ No newline at end of file From 4a289a970f4fd1526a0310f1f22e2e0a9110273f Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Wed, 10 Feb 2021 21:39:35 -0600 Subject: [PATCH 03/15] check arch --- .drone.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 7e7632f08ab88..a234be4dcd042 100644 --- a/.drone.yml +++ b/.drone.yml @@ -9,6 +9,7 @@ steps: - name: test image: python:3.7 commands: + - python -c "import platform; print(platform.machine())" - pip install -r requirements-dev.txt - python setup.py build_ext -j 4 - python -m pip install -e . --no-build-isolation --no-use-pep517 @@ -20,4 +21,4 @@ trigger: - feature/* event: - push - - pull_request \ No newline at end of file + - pull_request From 0e2659cdaf18cc18cc9132eb187bcb6de0f2a5f4 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Wed, 10 Feb 2021 22:20:30 -0600 Subject: [PATCH 04/15] fixi arch --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index a234be4dcd042..a8018c0767023 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,9 +1,9 @@ kind: pipeline type: docker -name: py37-amd64 +name: py37-arm64 platform: - arch: amd64 + arch: arm64 steps: - name: test From 61a613df193f2d5a96290446876df15d149f4da0 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Thu, 11 Feb 2021 09:37:46 -0600 Subject: [PATCH 05/15] update pip --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index a8018c0767023..61f469ad6f6cf 100644 --- a/.drone.yml +++ b/.drone.yml @@ -9,7 +9,7 @@ steps: - name: test image: python:3.7 commands: - - python -c "import platform; print(platform.machine())" + - pip install --upgrade pip setuptools - pip install -r requirements-dev.txt - python setup.py build_ext -j 4 - python -m pip install -e . --no-build-isolation --no-use-pep517 From 938c751b9d181d6610fc20bd124f38cc7cc8d5b3 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Thu, 11 Feb 2021 10:09:57 -0600 Subject: [PATCH 06/15] fix install --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 61f469ad6f6cf..6accd62d5a396 100644 --- a/.drone.yml +++ b/.drone.yml @@ -10,7 +10,7 @@ steps: image: python:3.7 commands: - pip install --upgrade pip setuptools - - pip install -r requirements-dev.txt + - pip install cython numpy python-dateutil pytz pytest pytest-xdist hypothesis botocore flask moto - python setup.py build_ext -j 4 - python -m pip install -e . --no-build-isolation --no-use-pep517 - pytest -m "(not slow and not network and not clipboard and not arm_slow)" -n 2 --dist=loadfile -s --strict-markers --durations=30 --junitxml=test-data.xml pandas From 2988f27bd355b8abbd441912d512690bec1ab854 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Mon, 15 Feb 2021 16:23:24 -0600 Subject: [PATCH 07/15] use minimal deps --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 6accd62d5a396..7c2c65c006555 100644 --- a/.drone.yml +++ b/.drone.yml @@ -10,7 +10,7 @@ steps: image: python:3.7 commands: - pip install --upgrade pip setuptools - - pip install cython numpy python-dateutil pytz pytest pytest-xdist hypothesis botocore flask moto + - pip install cython numpy python-dateutil pytz pytest pytest-xdist hypothesis - python setup.py build_ext -j 4 - python -m pip install -e . --no-build-isolation --no-use-pep517 - pytest -m "(not slow and not network and not clipboard and not arm_slow)" -n 2 --dist=loadfile -s --strict-markers --durations=30 --junitxml=test-data.xml pandas From 88236f278bc14f470394710d294d73c51a9710de Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Sun, 7 Mar 2021 23:35:33 -0600 Subject: [PATCH 08/15] seperate steps, add git tags --- .drone.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 7c2c65c006555..4c1856e01d429 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,13 +6,26 @@ platform: arch: arm64 steps: -- name: test +- name: Fetch Tags + image: alpine/git + commands: + - git fetch --tags + +- name: Install Dependencies image: python:3.7 commands: - pip install --upgrade pip setuptools - pip install cython numpy python-dateutil pytz pytest pytest-xdist hypothesis + +- name: Build Pandas + image: python:3.7 + commands: - python setup.py build_ext -j 4 - python -m pip install -e . --no-build-isolation --no-use-pep517 + +- name: Run Test + image: python:3.7 + commands: - pytest -m "(not slow and not network and not clipboard and not arm_slow)" -n 2 --dist=loadfile -s --strict-markers --durations=30 --junitxml=test-data.xml pandas trigger: From c4552ba86a7811f789e8d116a2a0c98b9b3d2ab9 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Mon, 8 Mar 2021 00:05:19 -0600 Subject: [PATCH 09/15] seperate steps, add shared venv --- .drone.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 4c1856e01d429..0ffa06d902be8 100644 --- a/.drone.yml +++ b/.drone.yml @@ -11,21 +11,25 @@ steps: commands: - git fetch --tags -- name: Install Dependencies +- name: Setup Environment image: python:3.7 commands: - - pip install --upgrade pip setuptools - - pip install cython numpy python-dateutil pytz pytest pytest-xdist hypothesis + - python -m venv pandas-dev + - . pandas-dev/bin/activate + - python -m pip install --upgrade pip setuptools + - python -m pip install cython numpy python-dateutil pytz pytest pytest-xdist hypothesis - name: Build Pandas image: python:3.7 commands: + - . pandas-dev/bin/activate - python setup.py build_ext -j 4 - python -m pip install -e . --no-build-isolation --no-use-pep517 - name: Run Test image: python:3.7 commands: + - . pandas-dev/bin/activate - pytest -m "(not slow and not network and not clipboard and not arm_slow)" -n 2 --dist=loadfile -s --strict-markers --durations=30 --junitxml=test-data.xml pandas trigger: From b68fe1c412293a85c12ae3cfb59c53f317578f85 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Mon, 8 Mar 2021 11:38:47 -0600 Subject: [PATCH 10/15] xfail arm64 tests --- pandas/compat/__init__.py | 1 + pandas/tests/indexes/interval/test_astype.py | 3 +++ pandas/tests/tools/test_to_numeric.py | 3 ++- pandas/tests/window/test_rolling.py | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pandas/compat/__init__.py b/pandas/compat/__init__.py index eb6cf4f9d7d85..1e7a69aa2d8a0 100644 --- a/pandas/compat/__init__.py +++ b/pandas/compat/__init__.py @@ -26,6 +26,7 @@ PY39 = sys.version_info >= (3, 9) PYPY = platform.python_implementation() == "PyPy" IS64 = sys.maxsize > 2 ** 32 +ARM64 = platform.machine() in ["arm64", "aarch64"] def set_function_name(f: F, name: str, cls) -> F: diff --git a/pandas/tests/indexes/interval/test_astype.py b/pandas/tests/indexes/interval/test_astype.py index f421a4695138c..6926ee49ec911 100644 --- a/pandas/tests/indexes/interval/test_astype.py +++ b/pandas/tests/indexes/interval/test_astype.py @@ -3,6 +3,8 @@ import numpy as np import pytest +from pandas.compat import ARM64 + from pandas.core.dtypes.dtypes import ( CategoricalDtype, IntervalDtype, @@ -168,6 +170,7 @@ def test_subtype_integer_with_non_integer_borders(self, subtype): ) tm.assert_index_equal(result, expected) + @pytest.mark.xfail(ARM64, reason="GH 38923") def test_subtype_integer_errors(self): # float64 -> uint64 fails with negative values index = interval_range(-10.0, 10.0) diff --git a/pandas/tests/tools/test_to_numeric.py b/pandas/tests/tools/test_to_numeric.py index 65aa189a3e965..80597f60a9495 100644 --- a/pandas/tests/tools/test_to_numeric.py +++ b/pandas/tests/tools/test_to_numeric.py @@ -11,6 +11,7 @@ Series, to_numeric, ) +from pandas.compat import ARM64 import pandas._testing as tm @@ -752,7 +753,7 @@ def test_to_numeric_from_nullable_string(values, expected): "UInt64", "signed", "UInt64", - marks=pytest.mark.xfail(reason="GH38798"), + marks=pytest.mark.xfail(not ARM64, reason="GH38798"), ), ([1, 1], "Int64", "unsigned", "UInt8"), ([1.0, 1.0], "Float32", "unsigned", "UInt8"), diff --git a/pandas/tests/window/test_rolling.py b/pandas/tests/window/test_rolling.py index 70c076e086fb7..841f3bbc043be 100644 --- a/pandas/tests/window/test_rolling.py +++ b/pandas/tests/window/test_rolling.py @@ -6,6 +6,7 @@ import numpy as np import pytest +from pandas.compat import ARM64 from pandas.errors import UnsupportedFunctionCall from pandas import ( @@ -896,6 +897,7 @@ def test_rolling_sem(frame_or_series): tm.assert_series_equal(result, expected) +@pytest.mark.xfail(ARM64, reason="GH 38921") @pytest.mark.parametrize( ("func", "third_value", "values"), [ From 5e8d6fc5656d2ea8752f0b4e1e29249b28223eb5 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Mon, 8 Mar 2021 11:40:31 -0600 Subject: [PATCH 11/15] sort import --- pandas/tests/tools/test_to_numeric.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/tests/tools/test_to_numeric.py b/pandas/tests/tools/test_to_numeric.py index 80597f60a9495..7af551a0764d9 100644 --- a/pandas/tests/tools/test_to_numeric.py +++ b/pandas/tests/tools/test_to_numeric.py @@ -4,6 +4,8 @@ from numpy import iinfo import pytest +from pandas.compat import ARM64 + import pandas as pd from pandas import ( DataFrame, @@ -11,7 +13,6 @@ Series, to_numeric, ) -from pandas.compat import ARM64 import pandas._testing as tm From 66f0e3e32cfb66612be68a1d68f2f8b20fcb3272 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Mon, 8 Mar 2021 19:54:35 -0600 Subject: [PATCH 12/15] remove arm_slow marker --- .drone.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 - .../multiindex/test_chaining_and_caching.py | 1 - .../tests/indexing/test_chaining_and_caching.py | 15 --------------- pandas/tests/indexing/test_loc.py | 1 - pandas/tests/test_sorting.py | 1 - .../tseries/offsets/test_offsets_properties.py | 1 - pandas/tests/tseries/offsets/test_ticks.py | 1 - 18 files changed, 1 insertion(+), 34 deletions(-) diff --git a/.drone.yml b/.drone.yml index 0ffa06d902be8..c19b4d629d81b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -30,7 +30,7 @@ steps: image: python:3.7 commands: - . pandas-dev/bin/activate - - pytest -m "(not slow and not network and not clipboard and not arm_slow)" -n 2 --dist=loadfile -s --strict-markers --durations=30 --junitxml=test-data.xml pandas + - pytest -m "(not slow and not network and not clipboard)" -n 2 --dist=loadfile -s --strict-markers --durations=30 --junitxml=test-data.xml pandas trigger: branch: diff --git a/pandas/conftest.py b/pandas/conftest.py index 688ad6dcc5e48..6f124039aeb2d 100644 --- a/pandas/conftest.py +++ b/pandas/conftest.py @@ -82,9 +82,6 @@ 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 f75b3800f623f..25b65e6561422 100644 --- a/pandas/tests/arithmetic/test_datetime64.py +++ b/pandas/tests/arithmetic/test_datetime64.py @@ -806,7 +806,6 @@ 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 8da7af5c4d86e..caabd421b5bfc 100644 --- a/pandas/tests/frame/test_constructors.py +++ b/pandas/tests/frame/test_constructors.py @@ -2163,7 +2163,6 @@ 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 ab568e24ff029..169d4c53b827e 100644 --- a/pandas/tests/groupby/test_groupby_dropna.py +++ b/pandas/tests/groupby/test_groupby_dropna.py @@ -262,7 +262,6 @@ 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 9350a3fcd3036..9c2bde978ba9f 100644 --- a/pandas/tests/groupby/transform/test_transform.py +++ b/pandas/tests/groupby/transform/test_transform.py @@ -631,7 +631,6 @@ 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 e5a24e9b938e2..7b19191385aae 100644 --- a/pandas/tests/indexes/common.py +++ b/pandas/tests/indexes/common.py @@ -699,7 +699,6 @@ 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 bc0b6e0b028a8..203e22b531575 100644 --- a/pandas/tests/indexes/multi/test_duplicates.py +++ b/pandas/tests/indexes/multi/test_duplicates.py @@ -244,7 +244,6 @@ 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 ff0c2a0d67885..b728a06374dd2 100644 --- a/pandas/tests/indexes/multi/test_integrity.py +++ b/pandas/tests/indexes/multi/test_integrity.py @@ -122,7 +122,6 @@ 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 4a170d9cd161f..5e5a4bf6449c3 100644 --- a/pandas/tests/indexes/multi/test_setops.py +++ b/pandas/tests/indexes/multi/test_setops.py @@ -41,7 +41,6 @@ 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 fcf01f850711b..0745dad0ff4ca 100644 --- a/pandas/tests/indexes/period/test_indexing.py +++ b/pandas/tests/indexes/period/test_indexing.py @@ -182,7 +182,6 @@ 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 eaf597e6bf978..fa7b7ba48b91a 100644 --- a/pandas/tests/indexing/interval/test_interval.py +++ b/pandas/tests/indexing/interval/test_interval.py @@ -71,7 +71,6 @@ def test_getitem_non_matching(self, series_with_interval_index, indexer_sl): with pytest.raises(KeyError, match=r"^\[-1\]$"): indexer_sl(ser)[[-1, 3]] - @pytest.mark.arm_slow def test_loc_getitem_large_series(self): ser = 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 f71b39d53d825..baf354d6fe938 100644 --- a/pandas/tests/indexing/multiindex/test_chaining_and_caching.py +++ b/pandas/tests/indexing/multiindex/test_chaining_and_caching.py @@ -53,7 +53,6 @@ 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 49181f0fdee7e..e53a74f494bbc 100644 --- a/pandas/tests/indexing/test_chaining_and_caching.py +++ b/pandas/tests/indexing/test_chaining_and_caching.py @@ -154,7 +154,6 @@ 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") @@ -168,7 +167,6 @@ def test_detect_chained_assignment(self): df["A"][1] = -6 tm.assert_frame_equal(df, expected) - @pytest.mark.arm_slow def test_detect_chained_assignment_raises(self): # test with the chaining @@ -188,7 +186,6 @@ def test_detect_chained_assignment_raises(self): assert df["A"]._is_copy is None - @pytest.mark.arm_slow def test_detect_chained_assignment_fails(self): # Using a copy (the chain), fails @@ -202,7 +199,6 @@ def test_detect_chained_assignment_fails(self): with pytest.raises(com.SettingWithCopyError, match=msg): df.loc[0]["A"] = -5 - @pytest.mark.arm_slow def test_detect_chained_assignment_doc_example(self): # Doc example @@ -218,7 +214,6 @@ def test_detect_chained_assignment_doc_example(self): indexer = df.a.str.startswith("o") df[indexer]["c"] = 42 - @pytest.mark.arm_slow def test_detect_chained_assignment_object_dtype(self): expected = DataFrame({"A": [111, "bbb", "ccc"], "B": [1, 2, 3]}) @@ -233,7 +228,6 @@ def test_detect_chained_assignment_object_dtype(self): df.loc[0, "A"] = 111 tm.assert_frame_equal(df, expected) - @pytest.mark.arm_slow def test_detect_chained_assignment_is_copy_pickle(self): # gh-5475: Make sure that is_copy is picked up reconstruction @@ -246,7 +240,6 @@ def test_detect_chained_assignment_is_copy_pickle(self): df2["B"] = df2["A"] df2["B"] = df2["A"] - @pytest.mark.arm_slow def test_detect_chained_assignment_setting_entire_column(self): # gh-5597: a spurious raise as we are setting the entire column here @@ -267,7 +260,6 @@ def test_detect_chained_assignment_setting_entire_column(self): assert df._is_copy is None df["letters"] = df["letters"].apply(str.lower) - @pytest.mark.arm_slow def test_detect_chained_assignment_implicit_take(self): # Implicitly take @@ -278,7 +270,6 @@ def test_detect_chained_assignment_implicit_take(self): assert df._is_copy is not None df["letters"] = df["letters"].apply(str.lower) - @pytest.mark.arm_slow def test_detect_chained_assignment_implicit_take2(self): # Implicitly take 2 @@ -295,14 +286,12 @@ def test_detect_chained_assignment_implicit_take2(self): df["letters"] = df["letters"].apply(str.lower) assert df._is_copy is None - @pytest.mark.arm_slow def test_detect_chained_assignment_str(self): df = random_text(100000) indexer = df.letters.apply(lambda x: len(x) > 10) df.loc[indexer, "letters"] = df.loc[indexer, "letters"].apply(str.lower) - @pytest.mark.arm_slow def test_detect_chained_assignment_is_copy(self): # an identical take, so no copy @@ -310,7 +299,6 @@ def test_detect_chained_assignment_is_copy(self): assert df._is_copy is None df["a"] += 1 - @pytest.mark.arm_slow def test_detect_chained_assignment_sorting(self): df = DataFrame(np.random.randn(10, 4)) @@ -319,7 +307,6 @@ def test_detect_chained_assignment_sorting(self): tm.assert_series_equal(ser, df.iloc[:, 0].sort_values()) tm.assert_series_equal(ser, df[0].sort_values()) - @pytest.mark.arm_slow def test_detect_chained_assignment_false_positives(self): # see gh-6025: false positives @@ -335,7 +322,6 @@ def test_detect_chained_assignment_false_positives(self): df["column1"] = df["column1"] + "c" str(df) - @pytest.mark.arm_slow def test_detect_chained_assignment_undefined_column(self): # from SO: @@ -346,7 +332,6 @@ def test_detect_chained_assignment_undefined_column(self): with pytest.raises(com.SettingWithCopyError, match=msg): df.iloc[0:5]["group"] = "a" - @pytest.mark.arm_slow def test_detect_chained_assignment_changing_dtype(self): # Mixed type setting but same dtype & changing dtype diff --git a/pandas/tests/indexing/test_loc.py b/pandas/tests/indexing/test_loc.py index 9dbce283d2a8f..b7f10fa0ed2e6 100644 --- a/pandas/tests/indexing/test_loc.py +++ b/pandas/tests/indexing/test_loc.py @@ -853,7 +853,6 @@ 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 2fa3acf939c5b..a49b7c2b7f86e 100644 --- a/pandas/tests/test_sorting.py +++ b/pandas/tests/test_sorting.py @@ -67,7 +67,6 @@ 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 8e0ace7775868..c899bca3fb36a 100644 --- a/pandas/tests/tseries/offsets/test_offsets_properties.py +++ b/pandas/tests/tseries/offsets/test_offsets_properties.py @@ -91,7 +91,6 @@ # 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 52a2f3aeee850..158e81cdf9566 100644 --- a/pandas/tests/tseries/offsets/test_ticks.py +++ b/pandas/tests/tseries/offsets/test_ticks.py @@ -82,7 +82,6 @@ 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) From 3bc9d12b5b2c47ab8e6391da31277bf73a9e8434 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Wed, 10 Mar 2021 10:17:16 -0600 Subject: [PATCH 13/15] skip slow arm test --- pandas/tests/indexing/test_chaining_and_caching.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandas/tests/indexing/test_chaining_and_caching.py b/pandas/tests/indexing/test_chaining_and_caching.py index e53a74f494bbc..90f645f128e4f 100644 --- a/pandas/tests/indexing/test_chaining_and_caching.py +++ b/pandas/tests/indexing/test_chaining_and_caching.py @@ -11,6 +11,7 @@ date_range, option_context, ) +from pandas.compat import ARM64 import pandas._testing as tm import pandas.core.common as com @@ -28,6 +29,7 @@ def random_text(nobs=100): return DataFrame(df, columns=["letters"]) +@pytest.mark.skipif(ARM64, reason="timeout on ARM64 GH 36719") class TestCaching: def test_slice_consolidate_invalidate_item_cache(self): From 7fc92d949321dc0e8da7f355ed5e9f01d12775e9 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Wed, 10 Mar 2021 10:26:01 -0600 Subject: [PATCH 14/15] sort import --- pandas/tests/indexing/test_chaining_and_caching.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/tests/indexing/test_chaining_and_caching.py b/pandas/tests/indexing/test_chaining_and_caching.py index 90f645f128e4f..ecb0b0b5d4d0e 100644 --- a/pandas/tests/indexing/test_chaining_and_caching.py +++ b/pandas/tests/indexing/test_chaining_and_caching.py @@ -3,6 +3,8 @@ import numpy as np import pytest +from pandas.compat import ARM64 + import pandas as pd from pandas import ( DataFrame, @@ -11,7 +13,6 @@ date_range, option_context, ) -from pandas.compat import ARM64 import pandas._testing as tm import pandas.core.common as com From 99de5714528b1477659be208b49bb56831423664 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Thu, 11 Mar 2021 21:56:30 -0600 Subject: [PATCH 15/15] skip slow arm64 tests --- pandas/tests/arithmetic/test_datetime64.py | 6 +++++- pandas/tests/frame/test_constructors.py | 6 +++++- pandas/tests/groupby/test_groupby_dropna.py | 3 +++ pandas/tests/groupby/transform/test_transform.py | 3 +++ pandas/tests/indexes/multi/test_duplicates.py | 2 ++ pandas/tests/indexes/multi/test_integrity.py | 3 +++ pandas/tests/indexes/multi/test_setops.py | 3 +++ pandas/tests/indexes/period/test_indexing.py | 2 ++ pandas/tests/indexing/interval/test_interval.py | 3 +++ pandas/tests/indexing/test_loc.py | 2 ++ pandas/tests/test_sorting.py | 3 +++ pandas/tests/tseries/offsets/test_offsets_properties.py | 3 +++ pandas/tests/tseries/offsets/test_ticks.py | 2 ++ 13 files changed, 39 insertions(+), 2 deletions(-) diff --git a/pandas/tests/arithmetic/test_datetime64.py b/pandas/tests/arithmetic/test_datetime64.py index 25b65e6561422..faa2c567869de 100644 --- a/pandas/tests/arithmetic/test_datetime64.py +++ b/pandas/tests/arithmetic/test_datetime64.py @@ -19,7 +19,10 @@ from pandas._libs.tslibs.conversion import localize_pydatetime from pandas._libs.tslibs.offsets import shift_months -from pandas.compat import np_datetime64_compat +from pandas.compat import ( + ARM64, + np_datetime64_compat, +) from pandas.errors import PerformanceWarning import pandas as pd @@ -806,6 +809,7 @@ class TestDatetime64Arithmetic: # ------------------------------------------------------------- # Addition/Subtraction of timedelta-like + @pytest.mark.skipif(ARM64, reason="timeout on ARM64 GH 36719") 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 caabd421b5bfc..f67dbf5c65e77 100644 --- a/pandas/tests/frame/test_constructors.py +++ b/pandas/tests/frame/test_constructors.py @@ -17,7 +17,10 @@ import pytest import pytz -from pandas.compat import np_version_under1p19 +from pandas.compat import ( + ARM64, + np_version_under1p19, +) import pandas.util._test_decorators as td from pandas.core.dtypes.common import is_integer_dtype @@ -2163,6 +2166,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.skipif(ARM64, reason="timeout on ARM64 GH 36719") @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 169d4c53b827e..4ba293076c685 100644 --- a/pandas/tests/groupby/test_groupby_dropna.py +++ b/pandas/tests/groupby/test_groupby_dropna.py @@ -1,6 +1,8 @@ import numpy as np import pytest +from pandas.compat import ARM64 + import pandas as pd import pandas._testing as tm @@ -262,6 +264,7 @@ def test_groupby_dropna_multi_index_dataframe_agg(dropna, tuples, outputs): tm.assert_frame_equal(grouped, expected) +@pytest.mark.skipif(ARM64, reason="timeout on ARM64 GH 36719") @pytest.mark.parametrize( "datetime1, datetime2", [ diff --git a/pandas/tests/groupby/transform/test_transform.py b/pandas/tests/groupby/transform/test_transform.py index 9c2bde978ba9f..cf8a2d12532cb 100644 --- a/pandas/tests/groupby/transform/test_transform.py +++ b/pandas/tests/groupby/transform/test_transform.py @@ -4,6 +4,8 @@ import numpy as np import pytest +from pandas.compat import ARM64 + from pandas.core.dtypes.common import ( ensure_platform_int, is_timedelta64_dtype, @@ -631,6 +633,7 @@ def test_groupby_cum_skipna(op, skipna, input, exp): tm.assert_series_equal(expected, result) +@pytest.mark.skipif(ARM64, reason="timeout on ARM64 GH 36719") @pytest.mark.parametrize( "op, args, targop", [ diff --git a/pandas/tests/indexes/multi/test_duplicates.py b/pandas/tests/indexes/multi/test_duplicates.py index 203e22b531575..3251011a323ed 100644 --- a/pandas/tests/indexes/multi/test_duplicates.py +++ b/pandas/tests/indexes/multi/test_duplicates.py @@ -4,6 +4,7 @@ import pytest from pandas._libs import hashtable +from pandas.compat import ARM64 from pandas import ( DatetimeIndex, @@ -244,6 +245,7 @@ def test_duplicated(idx_dup, keep, expected): tm.assert_numpy_array_equal(result, expected) +@pytest.mark.skipif(ARM64, reason="timeout on ARM64 GH 36719") 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 b728a06374dd2..b047a89566a7d 100644 --- a/pandas/tests/indexes/multi/test_integrity.py +++ b/pandas/tests/indexes/multi/test_integrity.py @@ -3,6 +3,8 @@ import numpy as np import pytest +from pandas.compat import ARM64 + from pandas.core.dtypes.cast import construct_1d_object_array_from_listlike import pandas as pd @@ -122,6 +124,7 @@ def test_consistency(): assert index.is_unique is False +@pytest.mark.skipif(ARM64, reason="timeout on ARM64 GH 36719") 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 5e5a4bf6449c3..74b95d7754d9d 100644 --- a/pandas/tests/indexes/multi/test_setops.py +++ b/pandas/tests/indexes/multi/test_setops.py @@ -1,6 +1,8 @@ import numpy as np import pytest +from pandas.compat import ARM64 + import pandas as pd from pandas import ( Index, @@ -41,6 +43,7 @@ def test_intersection_base(idx, sort, klass): first.intersection([1, 2, 3], sort=sort) +@pytest.mark.skipif(ARM64, reason="timeout on ARM64 GH 36719") @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 35ee290bb9209..95c73859c8945 100644 --- a/pandas/tests/indexes/period/test_indexing.py +++ b/pandas/tests/indexes/period/test_indexing.py @@ -8,6 +8,7 @@ import pytest from pandas._libs.tslibs import period as libperiod +from pandas.compat import ARM64 from pandas.errors import InvalidIndexError import pandas as pd @@ -182,6 +183,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.skipif(ARM64, reason="timeout on ARM64 GH 36719") 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 fa7b7ba48b91a..1f2f19ed89772 100644 --- a/pandas/tests/indexing/interval/test_interval.py +++ b/pandas/tests/indexing/interval/test_interval.py @@ -1,6 +1,8 @@ import numpy as np import pytest +from pandas.compat import ARM64 + import pandas as pd from pandas import ( DataFrame, @@ -71,6 +73,7 @@ def test_getitem_non_matching(self, series_with_interval_index, indexer_sl): with pytest.raises(KeyError, match=r"^\[-1\]$"): indexer_sl(ser)[[-1, 3]] + @pytest.mark.skipif(ARM64, reason="timeout on ARM64 GH 36719") def test_loc_getitem_large_series(self): ser = Series( np.arange(1000000), index=IntervalIndex.from_breaks(np.arange(1000001)) diff --git a/pandas/tests/indexing/test_loc.py b/pandas/tests/indexing/test_loc.py index b7f10fa0ed2e6..180e6bf9e8d6a 100644 --- a/pandas/tests/indexing/test_loc.py +++ b/pandas/tests/indexing/test_loc.py @@ -13,6 +13,7 @@ import numpy as np import pytest +from pandas.compat import ARM64 import pandas.util._test_decorators as td import pandas as pd @@ -853,6 +854,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.skipif(ARM64, reason="timeout on ARM64 GH 36719") 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 a49b7c2b7f86e..4344ebfb1fca4 100644 --- a/pandas/tests/test_sorting.py +++ b/pandas/tests/test_sorting.py @@ -5,6 +5,8 @@ import numpy as np import pytest +from pandas.compat import ARM64 + from pandas import ( DataFrame, MultiIndex, @@ -67,6 +69,7 @@ def test_int64_overflow(self): assert left[k] == v assert len(left) == len(right) + @pytest.mark.skipif(ARM64, reason="timeout on ARM64 GH 36719") 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 c899bca3fb36a..a959ced5cd798 100644 --- a/pandas/tests/tseries/offsets/test_offsets_properties.py +++ b/pandas/tests/tseries/offsets/test_offsets_properties.py @@ -20,6 +20,8 @@ import pytest import pytz +from pandas.compat import ARM64 + import pandas as pd from pandas import Timestamp @@ -91,6 +93,7 @@ # Offset-specific behaviour tests +@pytest.mark.skipif(ARM64, reason="timeout on ARM64 GH 36719") @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 158e81cdf9566..9e826ed12ea59 100644 --- a/pandas/tests/tseries/offsets/test_ticks.py +++ b/pandas/tests/tseries/offsets/test_ticks.py @@ -17,6 +17,7 @@ import pytest from pandas._libs.tslibs.offsets import delta_to_tick +from pandas.compat import ARM64 from pandas import ( Timedelta, @@ -82,6 +83,7 @@ def test_tick_add_sub(cls, n, m): assert left - right == expected +@pytest.mark.skipif(ARM64, reason="timeout on ARM64 GH 36719") @pytest.mark.parametrize("cls", tick_classes) @settings(deadline=None) @example(n=2, m=3)