Skip to content

Constraint adherence metric - #913

Open
sarahmish wants to merge 31 commits into
mainfrom
issue-899-constraint-adherence
Open

Constraint adherence metric#913
sarahmish wants to merge 31 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 96.61191% with 33 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.82%. Comparing base (57fff5e) to head (5118a80).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
...rics/multi_table/statistical/constraints/_utils.py 91.47% 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 ⚠️
...ulti_table/statistical/constraints/mixed_scales.py 98.63% 1 Missing ⚠️
...trics/multi_table/statistical/constraints/range.py 98.30% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #913      +/-   ##
==========================================
+ Coverage   95.68%   95.82%   +0.14%     
==========================================
  Files         122      138      +16     
  Lines        5308     6281     +973     
==========================================
+ Hits         5079     6019     +940     
- Misses        229      262      +33     
Flag Coverage Δ
integration 75.32% <41.99%> (-6.13%) ⬇️
unit 86.73% <96.61%> (+1.80%) ⬆️

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
@sarahmish
sarahmish force-pushed the issue-899-constraint-adherence branch from eb97a50 to 95d7dda Compare August 27, 2026 06:02

@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!

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