Skip to content

Add Python metrics utilities and dependency tooling - #6

Merged
tmgsr02 merged 2 commits into
masterfrom
codex/implement-metric-functions-and-tests
Oct 24, 2025
Merged

tmgsr02 merged 2 commits into
masterfrom
codex/implement-metric-functions-and-tests

Conversation

@tmgsr02

@tmgsr02 tmgsr02 commented Oct 24, 2025

Copy link
Copy Markdown
Owner

Summary

  • introduce Python metrics helpers for support, risk, lift, leverage, and related calculations
  • add configurable metric thresholds and candidate filtering helpers for summarizers
  • provide functional dependency checking utilities and accompanying randomized tests

Testing

  • pytest -q

https://chatgpt.com/codex/tasks/task_e_68fade175cfc8320983331f681b8bc45

@tmgsr02
tmgsr02 merged commit bf1a9f7 into master Oct 24, 2025
0 of 8 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +132 to +136
satisfies = result.holds
if max_ratio is not None and result.violation_ratio > max_ratio:
satisfies = False
if max_violations is not None and result.violating_rows > max_violations:
satisfies = False

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Threshold parameters never relax functional dependency checks

The dependency_summary helper always seeds satisfies with result.holds, so any dependency that contains even a single violation is reported as False before thresholds are considered. Because violation_ratio and violating_rows are both zero whenever result.holds is True, the max_ratio and max_violations comparisons can never flip a result from False to True; the parameters are effectively ignored. As written, callers cannot use max_ratio or max_violations to permit small numbers of violations, which is what the docstring implies. This makes the threshold arguments useless and prevents summarizing “almost satisfied” dependencies.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant