Skip to content

Refactor verifyproblem - extract Diagnostics #398#409

Merged
pehrsoderman merged 2 commits intoKattis:masterfrom
gkreitz:398_extract_observer
Apr 22, 2026
Merged

Refactor verifyproblem - extract Diagnostics #398#409
pehrsoderman merged 2 commits intoKattis:masterfrom
gkreitz:398_extract_observer

Conversation

@gkreitz
Copy link
Copy Markdown
Contributor

@gkreitz gkreitz commented Apr 22, 2026

Starting to break apart verifyproblem, #398. These PR:s are going to quickly end up on the large side, unfortunately.

This PR cleans up the interface to Problem a bit by doing two things:

  • Extracts an observer, called Diagnostics which a called to Problem supplies and which handles logging and error counting. This got rid of most of the reasons for Problem taking an argparse.Namespace argument
  • Moved the remaining config (parts to check, number of threads) to Context, and let the caller supply that when calling problem.check()

The Diagnostics objects are currently stored in ProblemAspect, to keep the size of this PR a bit more manageable.

@pehrsoderman pehrsoderman merged commit 927e14f into Kattis:master Apr 22, 2026
5 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