fix: remove dead hasattr branch in WealthPercentileTransformer.fit (#168) - #175
fix: remove dead hasattr branch in WealthPercentileTransformer.fit (#168)#175HeaTTap wants to merge 2 commits into
Conversation
|
Thanks for this, the fix matches #168 exactly. There's a merge conflict now against
git fetch origin
git rebase origin/main
# resolve the three spots above, then:
git add -A && git rebase --continue
git push --force-with-leaseOnce that's green I'll merge it. Nice first PR, thanks for tightening this up. |
Closes #156. WealthPercentileTransformer.fit now raises an actionable ValueError when an explicit wealth_cols list matches no training column; partial matches and automatic detection are unchanged. Also removes the dead hasattr(X, 'columns') branch in fit, which closes #168 and subsumes PRs #175 and #176.
|
Thank you for this, @HeaTTap, and sorry for the outcome: the fix is correct but it has landed by another route. Issue #168 is now closed by #179, which was merged as 6dfafa5. That PR removed the same dead Two contributors independently opened a fix for #168 the same evening (#175 and #176), which is our process failure, not yours. We are adding a "claim the issue before you open a PR" rule to CONTRIBUTING.md so this stops happening. You are owed a CONTRIBUTORS.md line and do not have one yet. That is tracked and will be added in a follow-up PR, not dropped. Closing as subsumed by #179. |
…attempt (#187) Two follow-ups after the #175/#176 duplicate-PR triage: - CONTRIBUTING.md gets a "Claiming an issue" rule (comment before opening a PR, wait for maintainer assignment) so two people never again spend an evening fixing the same four-line bug. The issue-draft template states the same rule inline, so every newly filed good-first-issue carries it without depending on a reader following a link. - @HeaTTap independently identified and fixed the same dead `hasattr(X, "columns")` branch as @Larslllllll, via #175. That PR was closed as subsumed by #179 (which carried the same fix), but @HeaTTap had no CONTRIBUTORS.md line as a result; Lars was already credited via #174. This adds it.
|
@HeaTTap following up on this one properly rather than leaving it as a silent close. You and another contributor solved the same four-line problem on the same evening, and closing yours cost you that evening for nothing. That was the project's process failure, not yours. There was no way to claim an issue before opening a pull request, so there was no way for either of you to know the other was working on it. The only person who could see both was me, and I didn't act on it fast enough. That's fixed now. #187 is merged and adds a claim-before-PR rule to CONTRIBUTING.md, so an issue gets assigned before anyone writes code, and it credits you by name in CHANGELOG.md for the fix attempt. If you want another one, the |
What & why
Resolves #168
In WealthPercentileTransformer.fit, validate_data returns a NumPy array so hasattr(X, "columns") was never True and that branch never executed. The elif branch beneath it was handling both DataFrame and ndarray inputs.
This PR:
Checklist
make cipasses locally (lint -> collection -> tests -> coverage >= 92%)__init__.pyCHANGELOG.mdupdated under[Unreleased]CONTRIBUTORS.md(skip if you would rather not be listed)