Michael Rabinovich commited on
Commit
046548a
·
1 Parent(s): 8676e14

app: split Leaderboard into Validated + Unvalidated tables

Browse files

Bundle 1+2 C3. Swaps the single Leaderboard widget for two stacked
ones (Validated on top, Unvalidated below) and wires the existing
auto-refresh Timer + Refresh button to push fresh dataframes into
both. Initial render reads via the C2 `load_leaderboard_split()`;
existing rows all land in Unvalidated until a maintainer flips
`validation_status` to `"validated"` on a row in the submissions
dataset.

- app.py: replaces `df_view` with `validated_view` + `unvalidated_view`.
Single timer tick now fans out to both widgets (load split runs
once per tick, both halves get pushed). Refresh button same
fan-out shape. Inline comment points at the validation policy
decision doc.
- leaderboard.py: drops the now-unused single-DataFrame
`load_leaderboard()` per the C3 cleanup half. Stale docstring
references that pointed at the dead function got smoothed out
(the split reader's doc is self-contained now).
- tests/test_smoke.py: picks up the C3 acceptance with a new
`test_two_leaderboard_widgets_render` that boots the app in the
existing subprocess fixture and asserts both "Validated
Leaderboard" and "Unvalidated Leaderboard" labels are visible.
Case-sensitive disjoint substrings so each `get_by_text` resolves
to exactly one element.

Verified locally: app.py module import is clean, Blocks builds,
the Hub fetch returns 200, the existing C2 leaderboard unit tests
still pass (4/4) since `load_leaderboard_split` is unchanged here.

3 files changed +61 -50
Files changed (3)
app.py+25-7
leaderboard.py+4-40
tests/test_smoke.py+32-3