Skip to content

Extract testcase model - #472

Merged
pehrsoderman merged 4 commits into
Kattis:masterfrom
gkreitz:extract_testcase_model
Aug 26, 2026
Merged

pehrsoderman merged 4 commits into
Kattis:masterfrom
gkreitz:extract_testcase_model

Conversation

@gkreitz

@gkreitz gkreitz commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Refactors TestCase and TestCaseGroup from verifyproblem into models + checks. In the model, I renamed the latter to TestDataGroups as that seems to be the naming in the problem format now.

Note that this implementation is pretty closely tied to legacy (as was the code in verifyproblem). Rules and properties have changed quite significantly in the new version, and I did not add plumbing for that in this PR.

Checks were kept as close as possible. This means (temporarily) exposing the constants DEFAULT_CONFIG and SCORING_ONLY_KEYS from model.

The check for out-of-bounds score in a group was moved to submission checks (as we only discover that by running submissions).

Progress on #398 (verifyproblem.py is now < 1000 lines! :)

Comment thread problemtools/model/testdata.py Resolved
@pehrsoderman
pehrsoderman merged commit e9634a8 into Kattis:master Aug 26, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants