You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bugs:
- fetch_bilibili.py: keep ps constant across pages. Shrinking ps on the last
page shifts Bilibili's [(pn-1)*ps, pn*ps) window: num=120 re-fetched items
41-60 and never fetched 101-120. Overshoot is trimmed by the existing
[:num] slice. The pagination test's mock computed offsets from constant
PAGE_MAX, which masked exactly this -- it now mirrors the real window
semantics and asserts all 120 vids are distinct (old code fails this test).
- charts.py: run the three charts independently. cross_creator_meme.json is
produced only by the opt-in compare_meme.py, so the standard --report run
always died on chart 3 with FileNotFoundError and the whole charts step
reported as failed. Missing input now skips just that chart with a note;
empty cross_creator_form.json no longer crashes chart 1.
Hardening:
- compare_form.py: imported data with missing/null play or title no longer
raises (KeyError/TypeError); empty creator files are skipped; bot5_med == 0
no longer writes JSON-invalid Infinity into cross_creator_form.json.
- creator_profile.py: fmt_play crashed on play=None (n >= 1e8 TypeError);
now uses the shared formatter with "-" fallback.
- diagnose.py: private-dims failures were swallowed by a blanket
except-pass after the user uploaded their CSV; now logged to stderr.
- fetch_multi.py: the printed time span was taken from the play-sorted list
(date of lowest-play video ~ date of highest-play video); now sorted by date.
Consolidation (anti-drift, same outputs -- formatter outputs are test-pinned):
- video_url was copy-pasted in app/build_report/export_data, fmt_play had
four drifting variants (one with the None crash above); both now live in
schema.py next to the record contract, charts keeps its short axis format
via fmt_play(n, yi=1, wan=0).
- off_tag matching loop unified in features.py (markers parameter);
compare_form keeps only its YouTube-title-only policy wrapper.
- Dead code: analyze_video._url (unused 4th URL builder), unused pathlib
imports in 10 files, a branch in dim_title whose if/elif arms were
identical, hand-rolled median replaced with statistics.median.
Left alone deliberately: diagnose zh_num/en_num (bilingual pair, local by
design), the two _worst() variants (different "na" semantics), and the
mixed naive/UTC created_iso between the two fetchers (changing it would
shift dates on already-fetched data; needs its own change).
Verified: mypy clean (25 files), 23/23 tests pass, compileall clean, all
touched modules import.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0 commit comments