Skip to content

CI: test pyjanitor against the candidate janitor-rs wheel #1697

Description

@samukweku

Background

The janitor-rs Rust CI runs wrapper tests with NumPy installed, and pyjanitor has integration coverage for the reverse aggregation contract. However, these checks currently run independently.

Add a dedicated pyjanitor CI job that builds or installs the candidate janitor-rs wheel and runs the relevant conditional-join aggregation tests against that exact wheel.

Related: pyjanitor-devs/janitor-rs#23

Why this matters

The two repositories must agree on the boundary contract:

  • Direct Rust reverse match kernels reject an empty matches tape.
  • Pyjanitor handles a valid all-zero-width batch before Rust dispatch and returns the expected empty result.
  • New Rust position kernels omit the legacy length argument; pyjanitor must remain compatible with old wheels during rollout.

Separate repository tests can both pass while a built wheel and the current pyjanitor call path are incompatible.

ELI5

Rust and Python are two halves of the same machine. Today each half is tested on its own. This job plugs the real Rust wheel into Python and presses the buttons users press, so we catch a loose connection before release.

Proposed scope

  • Build/install the janitor-rs wheel produced for the test job, or install the candidate wheel artifact.
  • Install pyjanitor test dependencies, including NumPy.
  • Run focused conditional-join aggregation tests covering:
    • empty matches from all-zero-width ranges;
    • non-empty tapes containing zero-width individual rows;
    • reverse positions calls with the new signature;
    • legacy-signature compatibility if the matrix tests an older wheel.
  • Keep the job separate from benchmark timing jobs.

Acceptance criteria

  • CI exercises pyjanitor against the exact janitor-rs wheel under review.
  • The all-zero-width integration test fails if Python dispatches an empty tape to Rust.
  • The job reports actionable failures for signature mismatches such as an unexpected length keyword.
  • The job is documented in the contributor/release workflow instructions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions