Skip to content

feat: Expose a user-friendly version of FailureInfo._lf in FailureInfo.details()#275

Merged
AndreasAlbertQC merged 11 commits intomainfrom
2026-02-16_expose-invalid
Feb 16, 2026
Merged

feat: Expose a user-friendly version of FailureInfo._lf in FailureInfo.details()#275
AndreasAlbertQC merged 11 commits intomainfrom
2026-02-16_expose-invalid

Conversation

@AndreasAlbertQC
Copy link
Collaborator

@AndreasAlbertQC AndreasAlbertQC commented Feb 16, 2026

Motivation

Addresses #272, #122, #124, #190

Changes

  • Added FailureInfo.violation_details, which provides the same rows as FailureInfo.invalid but also includes rule columns as well as original row values. To make usage easier for users, I decided to cast True/False/None to an enum "valid"/"invalid"/"unknown" (Since I know from personal experience that I often forgot whether "True" means good or bad here)
  • Updated docs and fixed pre-existing rooom typo

@github-actions github-actions bot added the enhancement New feature or request label Feb 16, 2026
@codecov
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (bc449c2) to head (510f6a1).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #275   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           54        54           
  Lines         3123      3125    +2     
=========================================
+ Hits          3123      3125    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the FailureInfo.invalid() method to return not only the original row data but also additional columns indicating which validation rules failed for each row. The rule columns are converted from boolean values (True/False/None) to user-friendly enum strings ("valid"/"invalid"/"unknown"). This change addresses multiple user requests for better programmatic access to validation failure details.

Changes:

  • Modified FailureInfo.invalid() to include rule validation status columns as enum values instead of only returning original data columns
  • Fixed pre-existing typo "bedrooom" → "bedroom" in documentation and examples
  • Updated existing tests to select only original columns where needed to maintain test assertions
  • Added comprehensive test coverage for the new invalid() output format
  • Updated documentation with example table showing the new output format

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
dataframely/filter_result.py Core change: modified invalid() to include rule columns as enum values instead of dropping them
tests/schema/test_filter.py Updated existing tests to select specific columns and added new test for the enhanced invalid() output
tests/column_types/test_struct.py Updated tests to select only original columns to maintain existing assertions
tests/column_types/test_list.py Updated test to select only original columns to maintain existing assertions
docs/guides/quickstart.md Fixed typo, added documentation and example table for new invalid() functionality
docs/guides/features/serialization.md Fixed typo in serialization example

@AndreasAlbertQC AndreasAlbertQC marked this pull request as ready for review February 16, 2026 16:14
@AndreasAlbertQC
Copy link
Collaborator Author

docs build appears to be broken independently of this PR, see #276

@AndreasAlbertQC AndreasAlbertQC changed the title feat: Expose a user-friendly version of FailureInfo._lf in FailureInfo.invalid() feat: Expose a user-friendly version of FailureInfo._lf in FailureInfo.violation_details() Feb 16, 2026
Copy link
Member

@borchero borchero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@AndreasAlbertQC AndreasAlbertQC enabled auto-merge (squash) February 16, 2026 18:02
@AndreasAlbertQC AndreasAlbertQC merged commit 573b564 into main Feb 16, 2026
32 checks passed
@AndreasAlbertQC AndreasAlbertQC deleted the 2026-02-16_expose-invalid branch February 16, 2026 18:07
@borchero borchero changed the title feat: Expose a user-friendly version of FailureInfo._lf in FailureInfo.violation_details() feat: Expose a user-friendly version of FailureInfo._lf in FailureInfo.details() Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants