From 9b6eea91235410af1f8c7a5e4c660db07bd790e2 Mon Sep 17 00:00:00 2001 From: Paddy Mullen Date: Tue, 27 Jan 2026 15:02:58 -0500 Subject: [PATCH 1/2] Pin pandas <3.0 to fix Playwright Jupyter tests Pandas 3.0 introduced a stricter check in DataFrame.to_json(orient='table') that raises ValueError when index names overlap with column names. This breaks buckaroo's serialization in _sd_to_jsondf(). Co-Authored-By: Claude Opus 4.5 --- pyproject.toml | 8 +++----- uv.lock | 11 +++++------ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index cca92fc2..ea97016c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,8 +53,7 @@ dev = [ "anywidget[dev]>=0.9.0", "jupyterlab>=4.2.5", "ruff>=0.6.2", - "pandas; python_version >= '3.13'", # Python 3.13+ - "pandas>=1.3.5; python_version < '3.13'", # Python 3.12 or less + "pandas>=1.3.5,<3.0", "playwright", "pydantic>=2.5.2", "pyarrow", @@ -84,8 +83,7 @@ polars = [ test = [ "nbval>=0.9", - "pandas>=1.3.5; python_version < '3.13'", # Python 3.12 or less - "pandas; python_version >= '3.13'", # Python 3.13+ + "pandas>=1.3.5,<3.0", "pytest-cov>=3", "pytest>=6", "hypothesis>=6.88.1", @@ -257,7 +255,7 @@ dev = [ "jupyterlab>=4.2.5", "ruff>=0.6.2", "polars>=1.5.0", - "pandas >= 1.3.5; python_version < '3.13'", # Python 3.12 or less + "pandas>=1.3.5,<3.0", "playwright", "pydantic>=2.5.2 ; python_version <= '3.13'", # Python 3.13 or less "pyarrow ; python_version <= '3.13'", diff --git a/uv.lock b/uv.lock index 6371f0ef..91d82a08 100644 --- a/uv.lock +++ b/uv.lock @@ -268,7 +268,8 @@ dev = [ { name = "marimo", version = "0.17.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.14'" }, { name = "marimo", version = "0.18.4", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.14'" }, { name = "nbval" }, - { name = "pandas", version = "2.2.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.13'" }, + { name = "pandas", version = "2.2.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.14'" }, + { name = "pandas", version = "2.3.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.14'" }, { name = "playwright" }, { name = "polars", extra = ["timezone"] }, { name = "pyarrow", version = "21.0.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.14'" }, @@ -303,10 +304,8 @@ requires-dist = [ { name = "nbval", marker = "extra == 'test'", specifier = ">=0.9" }, { name = "notebook", marker = "extra == 'notebook'", specifier = ">=7.0.0" }, { name = "numpy", marker = "python_full_version >= '3.13'", specifier = ">=2.2.5" }, - { name = "pandas", marker = "python_full_version >= '3.13' and extra == 'dev'" }, - { name = "pandas", marker = "python_full_version >= '3.13' and extra == 'test'" }, - { name = "pandas", marker = "python_full_version < '3.13' and extra == 'dev'", specifier = ">=1.3.5" }, - { name = "pandas", marker = "python_full_version < '3.13' and extra == 'test'", specifier = ">=1.3.5" }, + { name = "pandas", marker = "extra == 'dev'", specifier = ">=1.3.5,<3.0" }, + { name = "pandas", marker = "extra == 'test'", specifier = ">=1.3.5,<3.0" }, { name = "pandera", marker = "extra == 'test'" }, { name = "pl-series-hash", marker = "extra == 'dev'", specifier = "==0.2.1" }, { name = "pl-series-hash", marker = "extra == 'polars'", specifier = "==0.2.1" }, @@ -344,7 +343,7 @@ dev = [ { name = "jupyterlab", specifier = ">=4.2.5" }, { name = "marimo" }, { name = "nbval", specifier = ">=0.9" }, - { name = "pandas", marker = "python_full_version < '3.13'", specifier = ">=1.3.5" }, + { name = "pandas", specifier = ">=1.3.5,<3.0" }, { name = "playwright" }, { name = "polars", specifier = ">=1.5.0" }, { name = "polars", extras = ["timezone"] }, From 7aa0a7142cf2c2e7d70e099cfc56931bb0397c8a Mon Sep 17 00:00:00 2001 From: Paddy Mullen Date: Tue, 27 Jan 2026 15:03:02 -0500 Subject: [PATCH 2/2] Enable JupyterLab Playwright tests in CI Uncomment the JupyterLab Playwright test step in the CI workflow. These tests verify buckaroo widgets render correctly in JupyterLab. Co-Authored-By: Claude Opus 4.5 --- .github/workflows/ci.yml | 46 ++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 38d97a23..b4fc3268 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,29 +91,29 @@ jobs: run: | bash scripts/test_playwright_storybook.sh - # - name: Run JupyterLab Playwright Tests - # run: | - # # Ensure uv environment is set up - # uv sync --all-extras --group dev - - # # Install the built buckaroo wheel - # uv pip install --force-reinstall dist/*.whl - - # # Install test dependencies (polars, jupyterlab) - # uv pip install polars jupyterlab - - # # Detect venv location (uv sync creates .venv by default, but check if it exists) - # if [ -d ".venv" ]; then - # VENV_LOCATION=".venv" - # else - # # Fallback: try to detect from uv's Python environment - # VENV_LOCATION=$(uv run python -c "import sys; print(sys.prefix)" 2>/dev/null || echo ".venv") - # fi - - # # Run the integration test script with venv location - # bash scripts/test_playwright_jupyter.sh --venv-location="$VENV_LOCATION" - # env: - # UV_PYTHON: ${{ matrix.python-version }} + - name: Run JupyterLab Playwright Tests + run: | + # Ensure uv environment is set up + uv sync --all-extras --group dev + + # Install the built buckaroo wheel + uv pip install --force-reinstall dist/*.whl + + # Install test dependencies (polars, jupyterlab) + uv pip install polars jupyterlab + + # Detect venv location (uv sync creates .venv by default, but check if it exists) + if [ -d ".venv" ]; then + VENV_LOCATION=".venv" + else + # Fallback: try to detect from uv's Python environment + VENV_LOCATION=$(uv run python -c "import sys; print(sys.prefix)" 2>/dev/null || echo ".venv") + fi + + # Run the integration test script with venv location + bash scripts/test_playwright_jupyter.sh --venv-location="$VENV_LOCATION" + env: + UV_PYTHON: ${{ matrix.python-version }}