Skip to content

Commit 325e04c

Browse files
authored
CI: Test clipboard on Linux via pyqt (#56084)
1 parent 38e29ab commit 325e04c

15 files changed

+73
-102
lines changed

.github/workflows/unit-tests.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,15 @@ jobs:
8888
name: ${{ matrix.name || format('ubuntu-latest {0}', matrix.env_file) }}
8989
env:
9090
PATTERN: ${{ matrix.pattern }}
91-
EXTRA_APT: ${{ matrix.extra_apt || '' }}
9291
LANG: ${{ matrix.lang || 'C.UTF-8' }}
9392
LC_ALL: ${{ matrix.lc_all || '' }}
9493
PANDAS_COPY_ON_WRITE: ${{ matrix.pandas_copy_on_write || '0' }}
9594
PANDAS_CI: ${{ matrix.pandas_ci || '1' }}
9695
TEST_ARGS: ${{ matrix.test_args || '' }}
9796
PYTEST_WORKERS: 'auto'
9897
PYTEST_TARGET: ${{ matrix.pytest_target || 'pandas' }}
98+
# Clipboard tests
99+
QT_QPA_PLATFORM: offscreen
99100
concurrency:
100101
# https://github.community/t/concurrecy-not-work-for-push/183068/7
101102
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.env_file }}-${{ matrix.pattern }}-${{ matrix.extra_apt || '' }}-${{ matrix.pandas_copy_on_write || '' }}
@@ -145,8 +146,8 @@ jobs:
145146
fetch-depth: 0
146147

147148
- name: Extra installs
148-
# xsel for clipboard tests
149-
run: sudo apt-get update && sudo apt-get install -y xsel ${{ env.EXTRA_APT }}
149+
run: sudo apt-get update && sudo apt-get install -y ${{ matrix.extra_apt }}
150+
if: ${{ matrix.extra_apt }}
150151

151152
- name: Generate extra locales
152153
# These extra locales will be available for locale.setlocale() calls in tests

ci/deps/actions-310.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ dependencies:
1515
- pytest-cov
1616
- pytest-xdist>=2.2.0
1717
- pytest-localserver>=0.7.1
18+
- pytest-qt>=4.2.0
1819
- boto3
1920

2021
# required dependencies
@@ -42,6 +43,7 @@ dependencies:
4243
- psycopg2>=2.9.6
4344
- pyarrow>=10.0.1
4445
- pymysql>=1.0.2
46+
- pyqt>=5.15.9
4547
- pyreadstat>=1.2.0
4648
- pytables>=3.8.0
4749
- python-calamine>=0.1.6
@@ -58,5 +60,4 @@ dependencies:
5860
- pip:
5961
- adbc-driver-postgresql>=0.8.0
6062
- adbc-driver-sqlite>=0.8.0
61-
- pyqt5>=5.15.8
6263
- tzdata>=2022.7

ci/deps/actions-311-downstream_compat.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ dependencies:
1616
- pytest-cov
1717
- pytest-xdist>=2.2.0
1818
- pytest-localserver>=0.7.1
19+
- pytest-qt>=4.2.0
1920
- boto3
2021

2122
# required dependencies
@@ -43,6 +44,7 @@ dependencies:
4344
- psycopg2>=2.9.6
4445
- pyarrow>=10.0.1
4546
- pymysql>=1.0.2
47+
- pyqt>=5.15.9
4648
- pyreadstat>=1.2.0
4749
- pytables>=3.8.0
4850
- python-calamine>=0.1.6
@@ -73,5 +75,4 @@ dependencies:
7375
- adbc-driver-postgresql>=0.8.0
7476
- adbc-driver-sqlite>=0.8.0
7577
- dataframe-api-compat>=0.1.7
76-
- pyqt5>=5.15.8
7778
- tzdata>=2022.7

ci/deps/actions-311.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ dependencies:
1515
- pytest-cov
1616
- pytest-xdist>=2.2.0
1717
- pytest-localserver>=0.7.1
18+
- pytest-qt>=4.2.0
1819
- boto3
1920

2021
# required dependencies
@@ -38,6 +39,7 @@ dependencies:
3839
- numexpr>=2.8.4
3940
- odfpy>=1.4.1
4041
- qtpy>=2.3.0
42+
- pyqt>=5.15.9
4143
- openpyxl>=3.1.0
4244
- psycopg2>=2.9.6
4345
- pyarrow>=10.0.1
@@ -58,5 +60,4 @@ dependencies:
5860
- pip:
5961
- adbc-driver-postgresql>=0.8.0
6062
- adbc-driver-sqlite>=0.8.0
61-
- pyqt5>=5.15.8
6263
- tzdata>=2022.7

ci/deps/actions-39-minimum_versions.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ dependencies:
1717
- pytest-cov
1818
- pytest-xdist>=2.2.0
1919
- pytest-localserver>=0.7.1
20+
- pytest-qt>=4.2.0
2021
- boto3
2122

2223
# required dependencies
@@ -44,6 +45,7 @@ dependencies:
4445
- psycopg2=2.9.6
4546
- pyarrow=10.0.1
4647
- pymysql=1.0.2
48+
- pyqt=5.15.9
4749
- pyreadstat=1.2.0
4850
- pytables=3.8.0
4951
- python-calamine=0.1.6
@@ -61,5 +63,4 @@ dependencies:
6163
- adbc-driver-postgresql==0.8.0
6264
- adbc-driver-sqlite==0.8.0
6365
- dataframe-api-compat==0.1.7
64-
- pyqt5==5.15.8
6566
- tzdata==2022.7

ci/deps/actions-39.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ dependencies:
1515
- pytest-cov
1616
- pytest-xdist>=2.2.0
1717
- pytest-localserver>=0.7.1
18+
- pytest-qt>=4.2.0
1819
- boto3
1920

2021
# required dependencies
@@ -42,6 +43,7 @@ dependencies:
4243
- psycopg2>=2.9.6
4344
- pyarrow>=10.0.1
4445
- pymysql>=1.0.2
46+
- pyqt>=5.15.9
4547
- pyreadstat>=1.2.0
4648
- pytables>=3.8.0
4749
- python-calamine>=0.1.6
@@ -58,5 +60,4 @@ dependencies:
5860
- pip:
5961
- adbc-driver-postgresql>=0.8.0
6062
- adbc-driver-sqlite>=0.8.0
61-
- pyqt5>=5.15.8
6263
- tzdata>=2022.7

ci/deps/circle-310-arm64.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ dependencies:
1515
- pytest-cov
1616
- pytest-xdist>=2.2.0
1717
- pytest-localserver>=0.7.1
18+
- pytest-qt>=4.2.0
1819
- boto3
1920

2021
# required dependencies
@@ -42,6 +43,7 @@ dependencies:
4243
- psycopg2>=2.9.6
4344
- pyarrow>=10.0.1
4445
- pymysql>=1.0.2
46+
- pyqt>=5.15.9
4547
- pyreadstat>=1.2.0
4648
- pytables>=3.8.0
4749
- python-calamine>=0.1.6

doc/source/getting_started/install.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ Installable with ``pip install "pandas[clipboard]"``.
397397
========================= ================== =============== =============================================================
398398
Dependency Minimum Version pip extra Notes
399399
========================= ================== =============== =============================================================
400-
PyQt4/PyQt5 5.15.8 clipboard Clipboard I/O
400+
PyQt4/PyQt5 5.15.9 clipboard Clipboard I/O
401401
qtpy 2.3.0 clipboard Clipboard I/O
402402
========================= ================== =============== =============================================================
403403

environment.yml

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ dependencies:
1616
- pytest>=7.3.2
1717
- pytest-cov
1818
- pytest-xdist>=2.2.0
19+
- pytest-qt>=4.2.0
20+
- pyqt>=5.15.9
1921
- coverage
2022

2123
# required dependencies

pandas/compat/_optional.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"zstandard": "0.19.0",
5353
"tzdata": "2022.7",
5454
"qtpy": "2.3.0",
55-
"pyqt5": "5.15.8",
55+
"pyqt5": "5.15.9",
5656
}
5757

5858
# A mapping from import name to package name (on PyPI) for packages where

0 commit comments

Comments
 (0)