Skip to content

Commit 7de59e8

Browse files
authored
CI: Debug min build timing out (#45946) (#45974)
1 parent b75e82d commit 7de59e8

39 files changed

+69
-55
lines changed

.github/workflows/datamanger.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
data_manager:
1919
name: Test experimental data manager
2020
runs-on: ubuntu-latest
21+
timeout-minutes: 120
2122
services:
2223
moto:
2324
image: motoserver/moto
@@ -43,7 +44,7 @@ jobs:
4344
- name: Run tests
4445
env:
4546
PANDAS_DATA_MANAGER: array
46-
PATTERN: "not network and not clipboard"
47+
PATTERN: "not network and not clipboard and not single_cpu"
4748
PYTEST_WORKERS: "auto"
4849
PYTEST_TARGET: pandas
4950
run: |

.github/workflows/posix.yml

+10-9
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,19 @@ jobs:
2222
defaults:
2323
run:
2424
shell: bash -l {0}
25+
timeout-minutes: 120
2526
strategy:
2627
matrix:
2728
settings: [
28-
[actions-38-downstream_compat.yaml, "not slow and not network", "", "", "", "", ""],
29-
[actions-38-minimum_versions.yaml, "", "", "", "", "", ""],
30-
[actions-38.yaml, "not slow and not network", "language-pack-it", "it_IT.utf8", "it_IT.utf8", "", ""],
31-
[actions-38.yaml, "not slow and not network", "language-pack-zh-hans", "zh_CN.utf8", "zh_CN.utf8", "", ""],
32-
[actions-38.yaml, "", "", "", "", "", ""],
33-
[actions-pypy-38.yaml, "not slow", "", "", "", "", "--max-worker-restart 0"],
34-
[actions-39.yaml, "", "", "", "", "", ""],
35-
[actions-310-numpydev.yaml, "not slow and not network", "", "", "", "deprecate", "-W error"],
36-
[actions-310.yaml, "", "", "", "", "", ""],
29+
[actions-38-downstream_compat.yaml, "not slow and not network and not single_cpu", "", "", "", "", ""],
30+
[actions-38-minimum_versions.yaml, "not single_cpu", "", "", "", "", ""],
31+
[actions-38.yaml, "not slow and not network and not single_cpu", "language-pack-it", "it_IT.utf8", "it_IT.utf8", "", ""],
32+
[actions-38.yaml, "not slow and not network and not single_cpu", "language-pack-zh-hans", "zh_CN.utf8", "zh_CN.utf8", "", ""],
33+
[actions-38.yaml, "not single_cpu", "", "", "", "", ""],
34+
[actions-pypy-38.yaml, "not slow and not single_cpu", "", "", "", "", "--max-worker-restart 0"],
35+
[actions-39.yaml, "not single_cpu", "", "", "", "", ""],
36+
[actions-310-numpydev.yaml, "not slow and not network and not single_cpu", "", "", "", "deprecate", "-W error"],
37+
[actions-310.yaml, "not single_cpu", "", "", "", "", ""],
3738
]
3839
fail-fast: false
3940
env:

.github/workflows/python-dev.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323
env:
2424
PYTEST_WORKERS: "auto"
2525
PANDAS_CI: 1
26-
PATTERN: "not slow and not network and not clipboard"
26+
PATTERN: "not slow and not network and not clipboard and not single_cpu"
2727
COVERAGE: true
2828
PYTEST_TARGET: pandas
2929

azure-pipelines.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pr:
1818
variables:
1919
PYTEST_WORKERS: auto
2020
PYTEST_TARGET: pandas
21-
PATTERN: "not slow and not high_memory and not db and not network"
21+
PATTERN: "not slow and not high_memory and not db and not network and not single_cpu"
2222
PANDAS_CI: 1
2323

2424
jobs:

ci/azure/posix.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,32 @@ jobs:
1111
py38_macos_1:
1212
ENV_FILE: ci/deps/azure-macos-38.yaml
1313
CONDA_PY: "38"
14-
PATTERN: "not slow"
14+
PATTERN: "not slow and not single_cpu"
1515
PYTEST_TARGET: "pandas/tests/[a-h]*"
1616
py38_macos_2:
1717
ENV_FILE: ci/deps/azure-macos-38.yaml
1818
CONDA_PY: "38"
19-
PATTERN: "not slow"
19+
PATTERN: "not slow and not single_cpu"
2020
PYTEST_TARGET: "pandas/tests/[i-z]*"
2121
py39_macos_1:
2222
ENV_FILE: ci/deps/azure-macos-39.yaml
2323
CONDA_PY: "39"
24-
PATTERN: "not slow"
24+
PATTERN: "not slow and not single_cpu"
2525
PYTEST_TARGET: "pandas/tests/[a-h]*"
2626
py39_macos_2:
2727
ENV_FILE: ci/deps/azure-macos-39.yaml
2828
CONDA_PY: "39"
29-
PATTERN: "not slow"
29+
PATTERN: "not slow and not single_cpu"
3030
PYTEST_TARGET: "pandas/tests/[i-z]*"
3131
py310_macos_1:
3232
ENV_FILE: ci/deps/azure-macos-310.yaml
3333
CONDA_PY: "310"
34-
PATTERN: "not slow"
34+
PATTERN: "not slow and not single_cpu"
3535
PYTEST_TARGET: "pandas/tests/[a-h]*"
3636
py310_macos_2:
3737
ENV_FILE: ci/deps/azure-macos-310.yaml
3838
CONDA_PY: "310"
39-
PATTERN: "not slow"
39+
PATTERN: "not slow and not single_cpu"
4040
PYTEST_TARGET: "pandas/tests/[i-z]*"
4141

4242
steps:

pandas/compat/pyarrow.py

+2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@
1313
pa_version_under4p0 = _palv < Version("4.0.0")
1414
pa_version_under5p0 = _palv < Version("5.0.0")
1515
pa_version_under6p0 = _palv < Version("6.0.0")
16+
pa_version_under7p0 = _palv < Version("7.0.0")
1617
except ImportError:
1718
pa_version_under1p01 = True
1819
pa_version_under2p0 = True
1920
pa_version_under3p0 = True
2021
pa_version_under4p0 = True
2122
pa_version_under5p0 = True
2223
pa_version_under6p0 = True
24+
pa_version_under7p0 = True

pandas/tests/base/test_unique.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def test_nunique_null(null_obj, index_or_series_obj):
104104
assert obj.nunique(dropna=False) == max(0, num_unique_values)
105105

106106

107-
@pytest.mark.single
107+
@pytest.mark.single_cpu
108108
@pytest.mark.xfail(
109109
reason="Flaky in the CI. Remove once CI has a single build: GH 44584", strict=False
110110
)

pandas/tests/frame/methods/test_rank.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ def test_rank_pct_true(self, method, exp):
327327
expected = DataFrame(exp)
328328
tm.assert_frame_equal(result, expected)
329329

330-
@pytest.mark.single
330+
@pytest.mark.single_cpu
331331
@pytest.mark.high_memory
332332
def test_pct_max_many_rows(self):
333333
# GH 18271

pandas/tests/io/excel/test_readers.py

+2
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,7 @@ def test_read_from_http_url(self, read_ext):
775775
tm.assert_frame_equal(url_table, local_table)
776776

777777
@td.skip_if_not_us_locale
778+
@pytest.mark.single_cpu
778779
def test_read_from_s3_url(self, read_ext, s3_resource, s3so):
779780
# Bucket "pandas-test" created in tests/io/conftest.py
780781
with open("test1" + read_ext, "rb") as f:
@@ -786,6 +787,7 @@ def test_read_from_s3_url(self, read_ext, s3_resource, s3so):
786787
local_table = pd.read_excel("test1" + read_ext)
787788
tm.assert_frame_equal(url_table, local_table)
788789

790+
@pytest.mark.single_cpu
789791
def test_read_from_s3_object(self, read_ext, s3_resource, s3so):
790792
# GH 38788
791793
# Bucket "pandas-test" created in tests/io/conftest.py

pandas/tests/io/json/test_compression.py

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def test_read_zipped_json(datapath):
3838

3939

4040
@td.skip_if_not_us_locale
41+
@pytest.mark.single_cpu
4142
def test_with_s3_url(compression, s3_resource, s3so):
4243
# Bucket "pandas-test" created in tests/io/conftest.py
4344

pandas/tests/io/json/test_pandas.py

+2
Original file line numberDiff line numberDiff line change
@@ -1222,6 +1222,7 @@ def test_read_inline_jsonl(self):
12221222
expected = DataFrame([[1, 2], [1, 2]], columns=["a", "b"])
12231223
tm.assert_frame_equal(result, expected)
12241224

1225+
@pytest.mark.single_cpu
12251226
@td.skip_if_not_us_locale
12261227
def test_read_s3_jsonl(self, s3_resource, s3so):
12271228
# GH17200
@@ -1749,6 +1750,7 @@ def test_json_multiindex(self, dataframe, expected):
17491750
result = series.to_json(orient="index")
17501751
assert result == expected
17511752

1753+
@pytest.mark.single_cpu
17521754
def test_to_s3(self, s3_resource, s3so):
17531755
import time
17541756

pandas/tests/io/parser/conftest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def all_parsers(request):
110110
pytest.importorskip("pyarrow", VERSIONS["pyarrow"])
111111
# Try setting num cpus to 1 to avoid hangs on Azure MacOS/Windows builds
112112
# or better yet find a way to disable threads
113-
# TODO(GH#44584) pytest.mark.single these tests
113+
# TODO(GH#44584) pytest.mark.single_cpu these tests
114114
import pyarrow
115115

116116
pyarrow.set_cpu_count(1)

pandas/tests/io/parser/test_network.py

+3
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ def tips_df(datapath):
6666
return read_csv(datapath("io", "data", "csv", "tips.csv"))
6767

6868

69+
@pytest.mark.single_cpu
6970
@pytest.mark.usefixtures("s3_resource")
7071
@td.skip_if_not_us_locale()
7172
class TestS3:
@@ -242,6 +243,7 @@ def test_write_s3_parquet_fails(self, tips_df, s3so):
242243
storage_options=s3so,
243244
)
244245

246+
@pytest.mark.single_cpu
245247
def test_read_csv_handles_boto_s3_object(self, s3_resource, tips_file):
246248
# see gh-16135
247249

@@ -257,6 +259,7 @@ def test_read_csv_handles_boto_s3_object(self, s3_resource, tips_file):
257259
expected = read_csv(tips_file)
258260
tm.assert_frame_equal(result, expected)
259261

262+
@pytest.mark.single_cpu
260263
@pytest.mark.skipif(
261264
is_ci_environment(),
262265
reason="This test can hang in our CI min_versions build "

pandas/tests/io/parser/test_parse_dates.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818

1919
from pandas._libs.tslibs import parsing
2020
from pandas._libs.tslibs.parsing import parse_datetime_string
21-
from pandas.compat.pyarrow import pa_version_under6p0
21+
from pandas.compat.pyarrow import (
22+
pa_version_under6p0,
23+
pa_version_under7p0,
24+
)
2225

2326
import pandas as pd
2427
from pandas import (
@@ -948,10 +951,11 @@ def test_parse_dates_custom_euro_format(all_parsers, kwargs):
948951
)
949952

950953

951-
@xfail_pyarrow
952-
def test_parse_tz_aware(all_parsers):
954+
def test_parse_tz_aware(all_parsers, request):
953955
# See gh-1693
954956
parser = all_parsers
957+
if parser.engine == "pyarrow" and pa_version_under7p0:
958+
request.node.add_marker(pytest.mark.xfail(reason="Fails for pyarrow < 7.0"))
955959
data = "Date,x\n2012-06-13T01:39:00Z,0.5"
956960

957961
result = parser.read_csv(StringIO(data), index_col=0, parse_dates=True)

pandas/tests/io/pytables/test_append.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
ensure_clean_store,
2525
)
2626

27-
pytestmark = pytest.mark.single
27+
pytestmark = pytest.mark.single_cpu
2828

2929

3030
@pytest.mark.filterwarnings("ignore:object name:tables.exceptions.NaturalNameWarning")

pandas/tests/io/pytables/test_categorical.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
)
1717

1818
pytestmark = [
19-
pytest.mark.single,
19+
pytest.mark.single_cpu,
2020
# pytables https://github.com/PyTables/PyTables/issues/822
2121
pytest.mark.filterwarnings(
2222
"ignore:a closed node found in the registry:UserWarning"

pandas/tests/io/pytables/test_errors.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
_maybe_adjust_name,
2626
)
2727

28-
pytestmark = pytest.mark.single
28+
pytestmark = pytest.mark.single_cpu
2929

3030

3131
def test_pass_spec_to_storer(setup_path):

pandas/tests/io/pytables/test_file_handling.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
Term,
2727
)
2828

29-
pytestmark = pytest.mark.single
29+
pytestmark = pytest.mark.single_cpu
3030

3131

3232
@pytest.mark.parametrize("mode", ["r", "r+", "a", "w"])

pandas/tests/io/pytables/test_keys.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
tables,
1212
)
1313

14-
pytestmark = pytest.mark.single
14+
pytestmark = pytest.mark.single_cpu
1515

1616

1717
def test_keys(setup_path):

pandas/tests/io/pytables/test_put.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
)
3030
from pandas.util import _test_decorators as td
3131

32-
pytestmark = pytest.mark.single
32+
pytestmark = pytest.mark.single_cpu
3333

3434

3535
def test_format_type(setup_path):

pandas/tests/io/pytables/test_read.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
from pandas.io.pytables import TableIterator
2727

28-
pytestmark = pytest.mark.single
28+
pytestmark = pytest.mark.single_cpu
2929

3030

3131
def test_read_missing_key_close_store(setup_path):

pandas/tests/io/pytables/test_retain_attributes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
ensure_clean_store,
1818
)
1919

20-
pytestmark = pytest.mark.single
20+
pytestmark = pytest.mark.single_cpu
2121

2222

2323
def test_retain_index_attributes(setup_path):

pandas/tests/io/pytables/test_round_trip.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
_default_compressor = "blosc"
3131

3232

33-
pytestmark = pytest.mark.single
33+
pytestmark = pytest.mark.single_cpu
3434

3535

3636
def test_conv_read_write(setup_path):

pandas/tests/io/pytables/test_select.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
from pandas.io.pytables import Term
2929

30-
pytestmark = pytest.mark.single
30+
pytestmark = pytest.mark.single_cpu
3131

3232

3333
def test_select_columns_in_where(setup_path):

pandas/tests/io/pytables/test_store.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
read_hdf,
4141
)
4242

43-
pytestmark = pytest.mark.single
43+
pytestmark = pytest.mark.single_cpu
4444

4545

4646
def test_context(setup_path):

pandas/tests/io/pytables/test_time_series.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
)
1111
from pandas.tests.io.pytables.common import ensure_clean_store
1212

13-
pytestmark = pytest.mark.single
13+
pytestmark = pytest.mark.single_cpu
1414

1515

1616
def test_store_datetime_fractional_secs(setup_path):

pandas/tests/io/test_clipboard.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def test_mock_clipboard(mock_clipboard):
148148
assert result == "abc"
149149

150150

151-
@pytest.mark.single
151+
@pytest.mark.single_cpu
152152
@pytest.mark.clipboard
153153
@pytest.mark.usefixtures("mock_clipboard")
154154
class TestClipboard:

pandas/tests/io/test_feather.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515

1616
@filter_sparse
17-
@pytest.mark.single
17+
@pytest.mark.single_cpu
1818
@pytest.mark.filterwarnings("ignore:CategoricalBlock is deprecated:DeprecationWarning")
1919
class TestFeather:
2020
def check_error_on_write(self, df, exc, err_msg):

pandas/tests/io/test_fsspec.py

+3
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ def test_fastparquet_options(fsspectest):
199199
assert fsspectest.test[0] == "parquet_read"
200200

201201

202+
@pytest.mark.single_cpu
202203
@td.skip_if_no("s3fs")
203204
def test_from_s3_csv(s3_resource, tips_file, s3so):
204205
tm.assert_equal(
@@ -215,6 +216,7 @@ def test_from_s3_csv(s3_resource, tips_file, s3so):
215216
)
216217

217218

219+
@pytest.mark.single_cpu
218220
@pytest.mark.parametrize("protocol", ["s3", "s3a", "s3n"])
219221
@td.skip_if_no("s3fs")
220222
def test_s3_protocols(s3_resource, tips_file, protocol, s3so):
@@ -224,6 +226,7 @@ def test_s3_protocols(s3_resource, tips_file, protocol, s3so):
224226
)
225227

226228

229+
@pytest.mark.single_cpu
227230
@td.skip_array_manager_not_yet_implemented # TODO(ArrayManager) fastparquet
228231
@td.skip_if_no("s3fs")
229232
@td.skip_if_no("fastparquet")

0 commit comments

Comments
 (0)