update-narwhals-testing

Updates Narwhals version pins and pytest skip lists for cudf CI testing.

9.7k|1.1k|Updated May 7, 2017
One-click install
npx skills add https://github.com/rapidsai/cudf --skill update-narwhals-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: update-narwhals-testing
Source: https://github.com/rapidsai/cudf/tree/main/.agents/skills/update-narwhals-testing
Command: npx skills add https://github.com/rapidsai/cudf --skill update-narwhals-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pytest-env, uv, uv-build.

What problem does it solve?

Upgrading the Narwhals dependency in cudf requires manually re-running three Narwhals test variations and maintaining skip/expected-failure lists, which is error-prone and time-consuming without a defined procedure.

Core Features & Use Cases

  • Dependency Version Bump: Updates the narwhals version pin in dependencies.yaml and installs the target Narwhals release from a local clone using uv-build.
  • Iterative Test Triage: Runs the three pytest variations from ci/test_narwhals.sh (cudf, cudf-polars, cudf.pandas) and classifies each failure into TESTS_TO_SKIP or EXPECTED_FAILURES in the corresponding plugin files.
  • Use Case: When Narwhals releases a new version, use this Skill to bump the pin, run all CI test variations locally, and update the plugin dictionaries until every variation passes.

Quick Start

Update the Narwhals testing setup for cudf and cudf-polars to target Narwhals version v2.24.0 and make all CI test variations pass.

Frequently Asked Questions about update-narwhals-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I update Narwhals testing for cudf-polars in CI?

Bump the narwhals version pin in dependencies.yaml, install the target Narwhals release from a local clone, then iterate through the pytest variations in ci/test_narwhals.sh, classifying failures into TESTS_TO_SKIP or EXPECTED_FAILURES until all runs pass.

How to run Narwhals unit tests against cudf and cudf-polars?

Run the exact pytest commands from ci/test_narwhals.sh inside the cloned Narwhals repository with PYTHONPATH set to the ci directory. The three variations use --constructors=cudf, NARWHALS_POLARS_GPU=1 with polars[lazy], and NARWHALS_DEFAULT_CONSTRUCTORS=pandas with -p cudf.pandas.

Why does Narwhals testing fail with ImportError for plugin env?

The failure occurs because pytest-env is missing from the local development environment. It is a CI-only dependency, so install pytest-env before running the Narwhals test variations locally.

What is the difference between TESTS_TO_SKIP and EXPECTED_FAILURES in Narwhals plugins?

TESTS_TO_SKIP holds tests exercising behavior cudf or cudf-polars cannot support, while EXPECTED_FAILURES holds tests failing due to bugs in cudf, cudf-polars, or Narwhals. Strict XPASS results must go in TESTS_TO_SKIP because xfail cannot override Narwhals' strict marker.

Should I fix cudf bugs found during a Narwhals version upgrade?

No, fixing cudf or cudf-polars to resolve Narwhals test failures is explicitly out of scope. Record such failures in EXPECTED_FAILURES with a short reason and report them after all test variations pass.