Skip to content

Commit a3ef558

Browse files
committed
use different strategy for testing multiple pandas versions
1 parent cd5467d commit a3ef558

File tree

3 files changed

+4330
-2165
lines changed

3 files changed

+4330
-2165
lines changed

.github/workflows/run-pytest.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
run: |
5555
uv venv
5656
source .venv/bin/activate
57-
uv sync --extra dev_optional
57+
uv sync --extra dev_optional --extra dev_pandas3
5858
python --version
5959
- name: Test core
6060
run: |
@@ -82,20 +82,16 @@ jobs:
8282
python -m pytest -x test_init/test_lazy_imports.py
8383
8484
test-optional-legacy-pandas:
85-
name: Optional tests (Python ${{ matrix.python-version }}, pandas${{ matrix.pandas-version }}, numpy${{ matrix.numpy-version }})
85+
name: Optional tests (Python ${{ matrix.python-version }}, pandas ${{ matrix.pandas-version }})
8686
runs-on: ubuntu-latest
8787
strategy:
8888
fail-fast: false
8989
matrix:
9090
include:
9191
- python-version: "3.9"
92-
pandas-version: "==1.2.4"
93-
numpy-version: "==1.26.4"
94-
setuptools-version: "<82"
92+
pandas-version: "1"
9593
- python-version: "3.11"
96-
pandas-version: "==2.3.3"
97-
numpy-version: "==2.4.0"
98-
setuptools-version: ""
94+
pandas-version: "2"
9995
steps:
10096
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
10197
- name: Set up Python
@@ -110,8 +106,7 @@ jobs:
110106
run: |
111107
uv venv
112108
source .venv/bin/activate
113-
uv sync --extra dev_optional
114-
uv pip install "pandas${{ matrix.pandas-version }}" "numpy${{ matrix.numpy-version }}" "setuptools${{ matrix.setuptools-version }}"
109+
uv sync --extra dev_optional --extra dev_pandas${{ matrix.pandas-version }}
115110
- name: Test core
116111
run: |
117112
source .venv/bin/activate

pyproject.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,26 @@ dev = [
8383
"plotly[dev_optional]"
8484
]
8585

86+
# The following extras are intended for use in CI only
87+
dev_pandas1 = [
88+
"pandas>=1,<2",
89+
"numpy>=1,<2",
90+
"setuptools<82"
91+
]
92+
dev_pandas2 = [
93+
"pandas>=2,<3",
94+
]
95+
dev_pandas3 = [
96+
"pandas>=3;python_version>='3.11'",
97+
]
98+
8699
[tool.uv]
87100
exclude-newer = "72 hours"
101+
conflicts = [
102+
[{ extra = "dev_pandas1" }, { extra = "dev_pandas2" }],
103+
[{ extra = "dev_pandas1" }, { extra = "dev_pandas3" }],
104+
[{ extra = "dev_pandas2" }, { extra = "dev_pandas3" }],
105+
]
88106

89107
[project.scripts]
90108
plotly_get_chrome = "plotly.io._kaleido:plotly_get_chrome"

0 commit comments

Comments
 (0)