WP-09: Formula Engine #74
Labels
No Label
ai-changes-requested
ai-failed
ai-merged
ai-pr-opened
ai-reviewed
ai-reviewing
ai-reviewing
ai-working
bug
enhancement
evolution
performance
phase-0
phase-1a
phase-1b
phase-1c
phase-1d
security
tech-debt
todo
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/paper-dynasty-database#74
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?
Description
Core formula computation logic — three pure functions that compute evolution values from career stats. Called by the evaluator (WP-08).
Repo:
databasePhase: 1b (API & Formula Engine)
Dependencies: WP-02, WP-03
Complexity: S
Formulas
Files
database/app/services/formula_engine.pyTests (write first in
database/tests/test_formula_engine.py)Plan reference:
docs/prd-evolution/PHASE1_PROJECT_PLAN.mdWP-09PR #85 opened: #85
Implemented
app/services/formula_engine.pywith all five public functions:compute_batter_value,compute_sp_value,compute_rp_value— pure formula functionscompute_value_for_track(card_type, stats)— dispatch helpertier_from_value(value, track)— T0–T4 classifier; accepts both dict and Peewee model track objectsOne deviation from the issue spec: pitcher formulas use
stats.k(notstats.so) to match thePlayerSeasonStatsmodel from WP-02 where pitcher Ks are stored askto avoid collision with batterso.19 unit tests, all passing.