Repository navigation
refactor: move scoring into top-level score package (run, aggregate, viz) - #246
Merged
Merged
Conversation
docs/ARCHITECTURE-SPINE.md adopts score/ as a top-level package owning aggregation and visualization. Move judge/score.py and judge/score_viz.py there, update callers, patch targets, and docs. Point the live scoring test at legacy.score, since judge.score lost its CLI in #243. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Avoid repeating the package name (score.score, score_viz). run.py holds the run_scoring entry point, re-exported from score/__init__; aggregate.py holds score computation; viz.py the charts. Make scores_output_dir and save_results_json public, since run.py and the pool script use them. Fix the three pyright errors in score/, which is now clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 tasks done
jgieringer
approved these changes
Oct 8, 2026
jgieringer
left a comment
Collaborator
There was a problem hiding this comment.
love it, especially things like score.viz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Moves scoring out of
judge/into a top-levelscore/package, as adopted indocs/ARCHITECTURE-SPINE.md, using the module-naming convention from #248. No behavior change.judge/score.py→run_scoringscore/run.py, re-exported:from score import run_scoringjudge/score.py→score_results,score_results_by_risk,print_scores, …score/aggregate.pyjudge/score_viz.pyscore/viz.pytests/unit/judge/test_score.pytests/unit/score/test_aggregate.py_scores_output_dir/_save_results_jsonbecome public (scores_output_dir,save_results_json), becausescore/run.pyandscripts/pool_vera_scores.pyuse them across modules.score/;uv run pyright scorenow reports 0 errors.tests/integration/test_scoring.py(live only) ranpython -m judge.score, which has had no CLI since chore: move the legacy scripts into legacy/ (v2.0.2) #243. It now runspython -m legacy.score.AGENTS.md,docs/architecture.md,docs/ARCHITECTURE-SPINE.md,TODO,.claude/commands/*, CHANGELOG "Breaking / migration" entry.Behavior unchanged
I compared each of the 18 top-level functions and constants in the old
score.pywith their counterparts inrun.py/aggregate.py, after parsing the code so formatting doesn't count. The only differences are the two helper renames,df[mask]→df.loc[mask](same rows; gives pyright a DataFrame type), andtight_layout(rect=[…])→rect=(…)(same values).test_score_parity.py, which checks thatvera scoreand the legacy script produce the same scores on a checked-in sample evaluation, passes.Follow-up (not in this PR)
score/still importsjudge.score_utils,judge.constants, andjudge.utils, so the spine's rule thatjudge/andscore/never import each other isn't met yet. That split, and the import-linter contract, belong to the scoring-split work in the upcoming roadmap PR.Test plan
uv run pytest -m "not live"(1181 passed)uv run ruff check .,ruff format --check .,uv run pyright scoreuv run python vera.py score --help,uv run python -m legacy.score --helptests/integration/test_scoring.pynot run (needs API keys)🤖 Generated with Claude Code