Conversation
…ackage. Add tests for doctor command. Catch errors gracefully. Check socrates version.
Contributor
There was a problem hiding this comment.
Pull request overview
Improves proteus doctor by using reliable version parsing/comparison, expanding checks (SOCRATES + additional env vars), and adding unit tests to prevent regressions like downgrade suggestions.
Changes:
- Switch version comparison logic to
packaging.version.Versionand add a “local is newer than latest release” status. - Update checked packages (use
fwl-aragog) and add a SOCRATES latest-release check via GitHub. - Expand environment variable checks and add unit tests covering version-status logic and expected env vars.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/proteus/doctor.py |
Implements packaging-based version comparison, adds SOCRATES + env var checks, updates aragog package name. |
tests/test_doctor.py |
Adds unit tests for BasePackage.get_status_message() behaviors and expected env vars list. |
pyproject.toml |
Adds packaging dependency to support robust version parsing. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #669 +/- ##
==========================================
+ Coverage 69.15% 69.50% +0.35%
==========================================
Files 98 98
Lines 10214 10225 +11
Branches 1422 1425 +3
==========================================
+ Hits 7063 7107 +44
+ Misses 2811 2805 -6
+ Partials 340 313 -27
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
Author
|
@egpbos @timlichtenberg the patch coverage is now 100% and the tests are passing, so the PR is ready for review. |
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.
Description
packagingpackage to reliably check if modules are up to date withproteus doctorfwl-aragogpackage, rather than deprecatedaragogoneproteus doctorcommandCloses #646
Future PRs should also check the Obliqua repo for updates, once a release has been made for it.
Validation of changes
Works on Fedora 43 with Python 3.12:
Checklist
Relevant people
@timlichtenberg @egpbos