feat: add pythonlings doctor diagnostics - #61
Closed
Huoyanlifusu wants to merge 1 commit into
Closed
Conversation
Add a `pythonlings doctor` subcommand that inspects the runtime, package version, workspace structure, manifest, solutions, state, reset snapshots, and bundled docs without mutating any files. Warnings do not fail the command; required failures exit 1.
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Closes #46
Summary
Adds
pythonlings [--root PATH] doctor, a read-only diagnostic command that reports:Warnings never fail the command; required failures exit 1. The command never
creates, repairs, renames, or otherwise modifies workspace files — it uses its own
non-mutating inspection path (no reuse of the mutating state loader) and mirrors
core/reset.py's snapshot-path logic only.Behavior
pythonlings --helpand respects global--root(explicit--rootwins over the current workspace).~user) are reported as a friendly[FAIL] Workspace:line with no traceback.belong) are caught and reported as
[FAIL] Manifest:with no traceback..bak, no repair).Tests
python -m pytest tests/unit/test_doctor.py tests/integration/test_cli_doctor.py -q18 passedpython -m pytest -q169 passedpythonlings --root tests/fixtures/passing_curriculum verifypythonlings --root tests/fixtures/passing_curriculum doctor8 checks, 3 warning(s), 0 failure(s)(fixture lacks solutions/snapshots/docs)inited workspace (1172 files): SHA-256 hashesidentical before and after
doctorRepresentative output (healthy workspace)