Skip to content

Constraint adherence metric - #913

Merged
sarahmish merged 49 commits into
mainfrom
issue-899-constraint-adherence
Sep 15, 2026
Merged

sarahmish merged 49 commits into
mainfrom
issue-899-constraint-adherence

Conversation

@sarahmish

@sarahmish sarahmish commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Resolve #899

This PR focuses on single-table constraints. I will follow-up with multi-table constraints in another PR.

@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.84512% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.17%. Comparing base (506ba8d) to head (8ded575).

Files with missing lines Patch % Lines
...rics/multi_table/statistical/constraints/_utils.py 94.24% 11 Missing ⚠️
...etrics/multi_table/statistical/constraints/base.py 91.66% 7 Missing ⚠️
...able/statistical/constraints/chained_inequality.py 88.00% 6 Missing ⚠️
...e/statistical/constraints/referential_hierarchy.py 97.60% 3 Missing ⚠️
..._table/statistical/constraints/fixed_increments.py 95.12% 2 Missing ⚠️
.../multi_table/statistical/constraints/inequality.py 96.36% 2 Missing ⚠️
...trics/multi_table/statistical/constraints/range.py 98.30% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #913      +/-   ##
==========================================
+ Coverage   95.70%   96.17%   +0.46%     
==========================================
  Files         122      145      +23     
  Lines        5332     6816    +1484     
==========================================
+ Hits         5103     6555    +1452     
- Misses        229      261      +32     
Flag Coverage Δ
integration 77.67% <64.17%> (-3.77%) ⬇️
unit 87.76% <97.77%> (+2.78%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.

@sarahmish
sarahmish marked this pull request as ready for review August 25, 2026 16:56
@sarahmish
sarahmish requested a review from a team as a code owner August 25, 2026 16:56
@sarahmish
sarahmish requested review from R-Palazzo and frances-h and removed request for a team August 25, 2026 16:56
@sarahmish sarahmish self-assigned this Aug 27, 2026

@R-Palazzo R-Palazzo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looking really good!

I left just a few minor comments, mostly around the single- vs multi-table handling.

Could we also add an integration test similar to the code snippet in the issue, so we can check the import and the end-to-end usage as well?

Comment thread sdmetrics/multi_table/statistical/constraints/base.py
Comment thread sdmetrics/multi_table/statistical/constraints/base.py Outdated
Comment thread sdmetrics/multi_table/statistical/constraints/base.py Outdated
Comment thread sdmetrics/multi_table/statistical/constraints/_utils.py
@sarahmish
sarahmish requested a review from R-Palazzo August 31, 2026 08:21

@R-Palazzo R-Palazzo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@sarahmish
sarahmish merged commit 2e8255a into main Sep 15, 2026
57 checks passed
@sarahmish
sarahmish deleted the issue-899-constraint-adherence branch September 15, 2026 16:41
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.

Add ConstraintAdherence metric

3 participants