Skip to content

Commit 538ff0b

Browse files
mroeschkelithomas1
authored andcommitted
Backport PR pandas-dev#45257 CI: Simplify GHA dependency files (pandas-dev#45257)
1 parent b762af6 commit 538ff0b

13 files changed

+73
-192
lines changed

.github/workflows/posix.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ jobs:
2828
[actions-38-downstream_compat.yaml, "not slow and not network and not clipboard", "", "", "", "", ""],
2929
[actions-38-minimum_versions.yaml, "slow", "", "", "", "", ""],
3030
[actions-38-minimum_versions.yaml, "not slow and not network and not clipboard", "", "", "", "", ""],
31-
[actions-38-locale_slow.yaml, "slow", "language-pack-it xsel", "it_IT.utf8", "it_IT.utf8", "", ""],
31+
[actions-38.yaml, "not slow and not network", "language-pack-it xsel", "it_IT.utf8", "it_IT.utf8", "", ""],
32+
[actions-38.yaml, "not slow and not network", "language-pack-zh-hans xsel", "zh_CN.utf8", "zh_CN.utf8", "", ""],
3233
[actions-38.yaml, "not slow and not clipboard", "", "", "", "", ""],
33-
[actions-38-slow.yaml, "slow", "", "", "", "", ""],
34-
[actions-38-locale.yaml, "not slow and not network", "language-pack-zh-hans xsel", "zh_CN.utf8", "zh_CN.utf8", "", ""],
35-
[actions-39-slow.yaml, "slow", "", "", "", "", ""],
34+
[actions-38.yaml, "slow", "", "", "", "", ""],
3635
[actions-pypy-38.yaml, "not slow and not clipboard", "", "", "", "", "--max-worker-restart 0"],
3736
[actions-39-numpydev.yaml, "not slow and not network", "xsel", "", "", "deprecate", "-W error"],
37+
[actions-39.yaml, "slow", "", "", "", "", ""],
3838
[actions-39.yaml, "not slow and not clipboard", "", "", "", "", ""]
3939
]
4040
fail-fast: false

ci/deps/actions-38-locale.yaml

-36
This file was deleted.

ci/deps/actions-38-locale_slow.yaml

-30
This file was deleted.

ci/deps/actions-38-slow.yaml

-37
This file was deleted.

ci/deps/actions-38.yaml

+36-6
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,50 @@
11
name: pandas-dev
22
channels:
3-
- defaults
43
- conda-forge
54
dependencies:
65
- python=3.8
76

8-
# tools
9-
- cython>=0.29.24
7+
# test dependencies
8+
- cython=0.29.24
109
- pytest>=6.0
1110
- pytest-cov
1211
- pytest-xdist>=1.31
1312
- hypothesis>=5.5.3
13+
- psutil
1414

15-
# pandas dependencies
16-
- numpy
15+
# required dependencies
1716
- python-dateutil
18-
- nomkl
17+
- numpy
1918
- pytz
19+
20+
# optional dependencies
21+
- beautifulsoup4
22+
- blosc
23+
- bottleneck
24+
- fastparquet
25+
- fsspec
26+
- html5lib
27+
- gcsfs
28+
- jinja2
29+
- lxml
30+
- matplotlib
31+
- numba
32+
- numexpr
33+
- openpyxl
34+
- odfpy
35+
- pandas-gbq
36+
- psycopg2
37+
- pymysql
38+
- pytables
39+
- pyarrow
40+
- pyreadstat
41+
- pyxlsb
42+
- s3fs
43+
- scipy
44+
- sqlalchemy
2045
- tabulate
46+
- xarray
47+
- xlrd
48+
- xlsxwriter
49+
- xlwt
50+
- zstandard

ci/deps/actions-39-slow.yaml

-41
This file was deleted.

pandas/tests/arrays/floating/test_construction.py

+6-12
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
import locale
2-
31
import numpy as np
42
import pytest
53

6-
from pandas.compat import (
7-
is_platform_windows,
8-
np_version_under1p20,
9-
)
4+
from pandas.compat import np_version_under1p20
105

116
import pandas as pd
127
import pandas._testing as tm
@@ -47,7 +42,7 @@ def test_floating_array_constructor():
4742
FloatingArray(values)
4843

4944

50-
def test_floating_array_disallows_float16(request):
45+
def test_floating_array_disallows_float16():
5146
# GH#44715
5247
arr = np.array([1, 2], dtype=np.float16)
5348
mask = np.array([False, False])
@@ -56,11 +51,10 @@ def test_floating_array_disallows_float16(request):
5651
with pytest.raises(TypeError, match=msg):
5752
FloatingArray(arr, mask)
5853

59-
if np_version_under1p20 or (
60-
locale.getlocale()[0] != "en_US" and not is_platform_windows()
61-
):
62-
# the locale condition may need to be refined; this fails on
63-
# the CI in the ZH_CN build
54+
55+
def test_floating_array_disallows_Float16_dtype(request):
56+
# GH#44715
57+
if np_version_under1p20:
6458
# https://github.com/numpy/numpy/issues/20512
6559
mark = pytest.mark.xfail(reason="numpy does not raise on np.dtype('Float16')")
6660
request.node.add_marker(mark)

pandas/tests/arrays/period/test_arrow_compat.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import pytest
22

3-
from pandas.compat import pa_version_under4p0
3+
from pandas.compat import pa_version_under3p0
44

55
from pandas.core.dtypes.dtypes import PeriodDtype
66

@@ -72,7 +72,7 @@ def test_arrow_array_missing():
7272

7373

7474
@pytest.mark.xfail(
75-
pa_version_under4p0, reason="pyarrow incorrectly uses pandas internals API"
75+
pa_version_under3p0, reason="pyarrow incorrectly uses pandas internals API"
7676
)
7777
def test_arrow_table_roundtrip():
7878
from pandas.core.arrays._arrow_utils import ArrowPeriodType
@@ -94,7 +94,7 @@ def test_arrow_table_roundtrip():
9494

9595

9696
@pytest.mark.xfail(
97-
pa_version_under4p0, reason="pyarrow incorrectly uses pandas internals API"
97+
pa_version_under3p0, reason="pyarrow incorrectly uses pandas internals API"
9898
)
9999
def test_arrow_load_from_zero_chunks():
100100
# GH-41040
@@ -115,7 +115,7 @@ def test_arrow_load_from_zero_chunks():
115115

116116

117117
@pytest.mark.xfail(
118-
pa_version_under4p0, reason="pyarrow incorrectly uses pandas internals API"
118+
pa_version_under3p0, reason="pyarrow incorrectly uses pandas internals API"
119119
)
120120
def test_arrow_table_roundtrip_without_metadata():
121121
arr = PeriodArray([1, 2, 3], freq="H")

pandas/tests/io/excel/test_readers.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -738,10 +738,9 @@ def test_bad_sheetname_raises(self, read_ext, sheet_name):
738738

739739
def test_missing_file_raises(self, read_ext):
740740
bad_file = f"foo{read_ext}"
741-
# CI tests with zh_CN.utf8, translates to "No such file or directory"
742-
with pytest.raises(
743-
FileNotFoundError, match=r"(No such file or directory|没有那个文件或目录)"
744-
):
741+
# CI tests with other languages, translates to "No such file or directory"
742+
match = r"(No such file or directory|没有那个文件或目录|File o directory non esistente)"
743+
with pytest.raises(FileNotFoundError, match=match):
745744
pd.read_excel(bad_file)
746745

747746
def test_corrupt_bytes_raises(self, read_ext, engine):

pandas/tests/io/test_feather.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import numpy as np
33
import pytest
44

5-
from pandas.compat.pyarrow import pa_version_under4p0
5+
from pandas.compat.pyarrow import pa_version_under3p0
66

77
import pandas as pd
88
import pandas._testing as tm
@@ -87,7 +87,7 @@ def test_basic(self):
8787
),
8888
}
8989
)
90-
if not pa_version_under4p0:
90+
if not pa_version_under3p0:
9191
# older pyarrow incorrectly uses pandas internal API, so
9292
# constructs invalid Block
9393
df["periods"] = pd.period_range("2013", freq="M", periods=3)

pandas/tests/io/test_parquet.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
from pandas.compat.pyarrow import (
1717
pa_version_under2p0,
18-
pa_version_under4p0,
18+
pa_version_under3p0,
1919
pa_version_under5p0,
2020
pa_version_under6p0,
2121
)
@@ -654,8 +654,10 @@ def test_use_nullable_dtypes(self, engine, request):
654654
"float",
655655
pytest.param(
656656
"period[D]",
657+
# Note: I don't know exactly what version the cutoff is;
658+
# On the CI it fails with 1.0.1 & 2.0.0
657659
marks=pytest.mark.xfail(
658-
pa_version_under4p0,
660+
pa_version_under3p0,
659661
reason="pyarrow uses pandas internal API incorrectly",
660662
),
661663
),
@@ -898,7 +900,7 @@ def test_pyarrow_backed_string_array(self, pa, string_storage):
898900

899901
@td.skip_if_no("pyarrow")
900902
@pytest.mark.xfail(
901-
pa_version_under4p0, reason="pyarrow uses pandas internal API incorrectly"
903+
pa_version_under3p0, reason="pyarrow uses pandas internal API incorrectly"
902904
)
903905
def test_additional_extension_types(self, pa):
904906
# test additional ExtensionArrays that are supported through the

pandas/tests/tools/test_to_datetime.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -288,26 +288,26 @@ def test_to_datetime_format_microsecond(self, cache):
288288
"%m/%d/%Y %I:%M %p",
289289
Timestamp("2010-01-10 20:14"),
290290
marks=pytest.mark.xfail(
291-
locale.getlocale()[0] == "zh_CN",
292-
reason="fail on a CI build with LC_ALL=zh_CN.utf8",
291+
locale.getlocale()[0] in ("zh_CN", "it_IT"),
292+
reason="fail on a CI build with LC_ALL=zh_CN.utf8/it_IT.utf8",
293293
),
294294
),
295295
pytest.param(
296296
"01/10/2010 07:40 AM",
297297
"%m/%d/%Y %I:%M %p",
298298
Timestamp("2010-01-10 07:40"),
299299
marks=pytest.mark.xfail(
300-
locale.getlocale()[0] == "zh_CN",
301-
reason="fail on a CI build with LC_ALL=zh_CN.utf8",
300+
locale.getlocale()[0] in ("zh_CN", "it_IT"),
301+
reason="fail on a CI build with LC_ALL=zh_CN.utf8/it_IT.utf8",
302302
),
303303
),
304304
pytest.param(
305305
"01/10/2010 09:12:56 AM",
306306
"%m/%d/%Y %I:%M:%S %p",
307307
Timestamp("2010-01-10 09:12:56"),
308308
marks=pytest.mark.xfail(
309-
locale.getlocale()[0] == "zh_CN",
310-
reason="fail on a CI build with LC_ALL=zh_CN.utf8",
309+
locale.getlocale()[0] in ("zh_CN", "it_IT"),
310+
reason="fail on a CI build with LC_ALL=zh_CN.utf8/it_IT.utf8",
311311
),
312312
),
313313
],

0 commit comments

Comments
 (0)