Repository navigation
Q1-05: split core/commands.py - #493
Merged
Merged
Conversation
The 952-line module is now a package, reframe.core.commands, with one module per command group: starting (run, resume, claude, the worker), reading (status, events, report, compare), answering, reconciling (reconcile, review), designing (design, export), sharing (publish, reports) and tearing_down. - The shared helpers (say, _fail, _prompt, _start_worker, find_run) stay in the package. The command modules look them up, and the commands that start others, through the package, so reframe.core.commands.<name> is still the one place a test replaces each. The Q1-04 tests and every other test pass unchanged (461). - Every function body is the original's, apart from that lookup. Checked mechanically against the old file. - reframe.core.commands is off the mypy override list, which is now empty. Checking it found one fault: in the worker's handlers, `stop` was reused after its except block. Those branches now name it `failure`; the behaviour is unchanged. - CONTRIBUTING says mypy checks every module. Prepared with AI assistance.
This was referenced Nov 28, 2026
This was referenced Nov 28, 2026
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.
Q1-05 (#454), part of #449.
src/reframe/core/commands.py(952 lines) is now the packagereframe.core.commands, with one module per command group:startingreadingansweringreconcilingdesigningsharingtearing_downsay,_fail,_prompt,_start_worker,find_run) stay in the package. The command modules look them up through the package, and the commands that start others too. Somock.patch.object(commands, "_start_worker")and the other Q1-04 patches still reach every command. All 461 tests pass with no test file changed.commands.lookups and one renamed variable.reframe.core.commandsis off it. Checking the package found one fault: in the worker's three exception handlers,stopwas reused after itsexcept Stop as stopblock. Those branches now name itfailure; the behaviour is unchanged.Checked locally with the
devextra:ruff check src tests: passes.mypy: no issues in 96 files.coverage run -m unittest discover -s tests -t .: 461 tests pass, 81% total against the floor of 80.reframe --helpruns.Prepared with AI assistance.