Skip to content

Replace verifyproblem classes with models + checks - #478

Merged
pehrsoderman merged 3 commits into
Kattis:masterfrom
gkreitz:verifyproblem_refactor
Aug 28, 2026
Merged

Replace verifyproblem classes with models + checks#478
pehrsoderman merged 3 commits into
Kattis:masterfrom
gkreitz:verifyproblem_refactor

Conversation

@gkreitz

@gkreitz gkreitz commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

This completes the large refactor of splitting verifyproblem into manageable chunks (models + checks) we can more easily work with going forward. Here, we remove all the ProblemPart classes (which were all seams at this point), and replace the whole thing with a thin new class, ProblemVerifier.

There will be follow-up PR:s to fix and clean up things in various checks which I didn't do while extracting functions. My hope is that this is a better foundational design to work from (and cleaner to use as an API).

Added in adjusting the type of the temporary work directory we set up for checking to be Path. As it's now Path in verifyproblem, it ended up very silly to cast it to str to pass it to checks to there cast it back to Path.

Fixes #398

@gkreitz
gkreitz force-pushed the verifyproblem_refactor branch from 850e875 to ebf21f8 Compare August 28, 2026 11:08
Comment thread problemtools/verifyproblem.py
@pehrsoderman
pehrsoderman merged commit be7d58d into Kattis:master Aug 28, 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.

Refactor verifyproblem.py

2 participants