Skip to content

fix(transformer): validate dataframe schemas - #99

Merged
alisadeghiaghili merged 4 commits into
mainfrom
test/transformer-container-contracts
Sep 1, 2026
Merged

alisadeghiaghili merged 4 commits into
mainfrom
test/transformer-container-contracts

Conversation

@alisadeghiaghili

Copy link
Copy Markdown
Owner

Summary

  • Reject duplicate pandas column labels before backend-specific validation in transformer fit and transform.
  • Specify pandas-DataFrame-only container support with actionable TypeError contracts for NumPy arrays and SciPy sparse matrices.
  • Preserve caller data on rejected inputs and document the public schema boundary.

Validation

  • pytest -q -p no:cacheprovider tests/test_transformer.py (55 passed)

uff check missingly tests

  • mypy missingly/transformer.py --follow-imports=skip --ignore-missing-imports (0 errors)
  • Installed-module transformer doctest (32 attempted, 0 failed)
  • git diff --check and changed-lines <=88

Coverage and risk

Baseline is the official Python 3.12 artifact on main: 92.56% (3806/4112), 306 missed. This PR does not change any coverage configuration, threshold, omission, or exclusion; CI artifact will determine the delta. The behavioral change is intentionally fail-fast: duplicate labels now raise stable ValueError messages instead of leaking backend-specific errors. NumPy and SciPy sparse inputs remain unsupported and are now contract-tested; optional Polars/Arrow runtime paths were not exercised because this estimator publicly accepts pandas DataFrames only.

Refs #78
Refs #60
Refs #69

@alisadeghiaghili
alisadeghiaghili merged commit f628587 into main Sep 1, 2026
10 checks passed
@alisadeghiaghili
alisadeghiaghili deleted the test/transformer-container-contracts branch September 1, 2026 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant