agentleFS
NVIDIAKnown publisherNVIDIA/cudf/.agents/skills/update-narwhals-testing/SKILL.md

update-narwhals-testing

Skill9.8k starsChanged 4 months agoApache-2.0View on GitHub

Use when updating Narwhals for cudf-polars and cudf testing in CI

  • Installs packages

Trending

Quiet since October.thin dataabout the whole repository

Jan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 2 mentionsOct 2026: 7 mentionsNov 2026: 0 mentionsDec 2026: 0 mentions
Jan 2026Jul 2026Dec 2026
Mentions a month of the NVIDIA/cudf repository that our weekly crawl found: only 9 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about NVIDIA/cudf

The biggest 5 of 9 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 9

Talked about on GitHub (9 times).

On GitHub · 9

4 more on GitHub

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Ensure the Narwhals Git source tree is checked-out to the target upgrade version before installing.

    line 27
  2. Very specific:

    Before running Narwhals unit tests, review each TESTS_TO_SKIP and EXPECTED_FAILURES in the plugin files and remove entries where the pytest …

    line 58
  3. Very specific:

    If a test is failing because it exercises behavior that cannot be supported in cudf or cudf-polars, add a key, value pair to the …

    line 65

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Narwhals testing for cudf-polars and cudf

This rule describes the procedure for updating Narwhals unit testing for cudf-polars and cudf in CI. A successful update involves verifying locally that the variations of Narwhals unit test run in ci/test_narwhals.sh all pass.

Prerequisites

  1. Prompt the user for a suitable development environment that contains both cudf and cudf-polars.
  2. Prompt the user for the target Narwhals version for the upgrade.

Notes on the development environment:

  • The environment must also have pytest-env installed (it is a CI-only dependency and is often missing from local dev environments). Without it, the runs fail with ImportError: Error importing plugin "env".
  • The environment may contain extra packages that the test_python_narwhals CI job does not install (for example dask). Such packages can cause spurious local-only failures (for example tests/tpch_q1_test.py::test_q1[dask], which pytest.importorskips away in CI). Do not add these to a plugin; confirm a failure is reproducible in CI's dependency set before recording it.

Step 1. Bump Narwhals in dependencies.yaml

In the depends_on_narwhals section in dependencies.yaml, change the narwhals== version pinning to the target Narwhals version

Step 2. Install Narwhals from a local repository

Identify a directory that contains the Narwhals repository to install it into the development environment. If it is not provided by the user or one cannot be identified, clone it to a temporary location.

Ensure the Narwhals Git source tree is checked-out to the target upgrade version before installing.

Recent Narwhals versions use the uv_build build backend, so the editable install requires uv and uv-build in the environment and must be run with --no-build-isolation.

For example, to clone Narwhals and install it in a fictional, conda development environment named "cudf-dev"

NARWHALS_VERSION="v2.24.0"
git clone https://github.com/narwhals-dev/narwhals.git --single-branch --branch $NARWHALS_VERSION /tmp/narwhals
cd /tmp/narwhals
conda run -n cudf-dev pip install uv uv-build
conda run -n cudf-dev pip install -U -e . --no-build-isolation

Step 3. Iterate and classify test failures from pytest invocations in ci/test_narwhals.sh

Next, iterate through the various Narwhals unit test invocations in ci/test_narwhals.sh via pytest until there are no test failures.

Currently 3 variations of Narwhals unit tests are run:

  1. With cudf through setting --constructors=cudf
  2. With cudf-polars through setting the NARWHALS_POLARS_GPU=1 environment variable and --constructors=polars[lazy]
  3. With cudf.pandas through setting the NARWHALS_DEFAULT_CONSTRUCTORS=pandas environment variable and -p cudf.pandas

Each of these variations has an accompanying pytest plugin to mark tests to skip or as expected to fail before the tests are run.

  1. The cudf test run uses ci/narwhals_cudf_test_plugin.py via -p narwhals_cudf_test_plugin
  2. The cudf.polars test run uses ci/narwhals_cudf_polars_test_plugin.py via -p narwhals_cudf_polars_test_plugin
  3. The cudf.pandas test run uses ci/narwhals_cudf_pandas_test_plugin.py via -p narwhals_cudf_pandas_test_plugin

The TESTS_TO_SKIP and EXPECTED_FAILURES dictionaries in each file contain keys that are valid pytest test identifiers and values that are the reasons for skipping or failure of the test respectively.

Before running Narwhals unit tests, review each TESTS_TO_SKIP and EXPECTED_FAILURES in the plugin files and remove entries where the pytest test identifier no longer points to a test in Narwhals, as tests may have been removed in a newer Narwhals version.

Next, for each variation of Narwhals unit tests:

  1. Run the exact pytest command found in ci/test_narwhals.sh for the test variation and pipe the output to a file. Run it from within the cloned Narwhals repository (the CI script does pushd narwhals first) and set PYTHONPATH to the ci/ directory so the -p narwhals_*_test_plugin plugins can be imported, e.g. PYTHONPATH="<repo>/ci" .... Node ids in this working directory are of the form tests/...py::<test>[...], which is exactly the dictionary key format.
  2. Review the test output file and collect the failing tests.
  3. For each failing test:
    • If a test is failing because it exercises behavior that cannot be supported in cudf or cudf-polars, add a key, value pair to the TESTS_TO_SKIP dictionary where the key is in the format <path>::<pytest_node_id> and the value is a short reason for skipping.
    • If a test is failing because of a bug in cudf or cudf-polars, or a bug or bad assumption in Narwhals, add a key, value pair to the EXPECTED_FAILURES dictionary where the key is in the format <path>::<pytest_node_id> and the value is a short reason for failure.
    • If a test reports [XPASS(strict)] (Narwhals marks it xfail(strict=True) for the constructor but it now passes), it must go in TESTS_TO_SKIP, not EXPECTED_FAILURES. Adding an xfail marker does not override Narwhals' own strict marker, so the strict XPASS would still fail; skipping is the equivalent of the old deselection.
  4. Repeat the process until the test output file reports no failures.

Importantly when evaluating failing tests, do not attempt to fix cudf or cudf-polars to solve the failures. This is out of scope.

Once all variations of Narwhals unit tests pass, report the new test failures for each variation.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.