Uh oh!
There was an error while loading. Please reload this page.
db/gradebook-code: semester-aware gradebook + curve + drop-lowest (epic slice PR3) - #274
Conversation
…ed schema Rewire the gradebook onto the academics-split schema (migration 0021): key gradebook_categories + assignments on enrollment_id instead of user_id+course_id. The public API still speaks the abstract course_id plus an optional `semester` (term label, default = current term); routes resolve (course_id, semester) -> the user's enrollment via services.academics. - services/gradebook_service.py: add drop-lowest (per-category, lowest earned/possible ratio), apply_curve (linear z-score bell curve: avg_target + (raw-mean)*(new_sd/sd), clamped 0-100), and credit-weighted GPA (gpa_points + weighted_gpa). - routes/gradebook.py: enrollment resolver (_resolve_enrollment, semester->term via terms.label); curve folded into current_grade; new PATCH /curve and GET /gpa (per-semester + cumulative/transcript). points stay encrypted at write, decrypted at read. - models: semester + drop_lowest fields, assignment_type enum, SetCurveBody. - tests: enrollment-keyed route tests (filter-aware fake table patching both routes.gradebook.table and services.academics.table), service tests for drop-lowest/curve/GPA incl. a hand-computed credit-weighted GPA fixture (3.7*3 + 2.7*4)/7 = 3.1285714. Fixed test_response_decrypt_boundary for the new resolver shape. Plan: docs/superpowers/plans/2026-06-24-db-gradebook-code.md Out of scope: gradescope sync (gradescope_assignment_id column preserved). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Deploying with |
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs | frontend-staging | 3c67fde | Commit Preview URL Branch Preview URL | Jun 24 2026, 08:32 AM |
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Gradebook slice (migration 0021, + curve/drop-lowest #266). Enrollment-keyed gradebook; per-semester + cumulative GPA; bell-curve (raw vs curved) + drop-lowest;
decrypt_numericon 🔒 points; newPATCH /courses/{id}/curve+GET /gpa; hand-computed GPA fixture. Green; ruff clean.Plan:
docs/superpowers/plans/2026-06-24-db-gradebook-code.md.Integration note: touches
models/__init__.py+tests/test_response_decrypt_boundary.py(also edited by db/identity-code — small additive conflict). Largest slice — suggest merging last.