Implement or document lob_2outs and rbipercent fields in SeasonPitchingStats
#28
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/major-domo-database#28
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
app/dependencies.py:405— Both fields are hardcoded to0.0in the INSERT and never calculated. The model defines both as non-nullableFloatField().Priority: low | Labels: todo, tech-debt
Fixed in PR #59.
Added SQL expressions to the
pitching_statsCTE inupdate_season_pitching_stats()to calculate both fields fromstratplaydata:lob_2outs: runners stranded when pitcher recorded the 3rd out (mirrors batting-sidecount_lo*_3outlogic)rbipercent: RBI allowed (excluding HR) per runner opportunityThe INSERT SELECT now uses
ps.lob_2outs, ps.rbipercentinstead of the hardcoded0.0, 0.0.