Conversation
There was a problem hiding this comment.
Pull request overview
This PR performs code cleanup for the Inversion Perspective in the qtgui directory, applying ruff formatting, adding type hints, updating docstrings, and removing commented code. The changes are primarily cosmetic and aim to improve code quality without altering functionality.
Changes:
- Added type hints to method signatures across all modified files
- Updated docstrings to follow proper formatting conventions
- Applied ruff code formatting (spacing, quote consistency, line breaks)
- Removed commented code sections
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| InversionPerspectiveTest.py | Added type hints to test methods and fixtures; updated docstrings to single-line format; changed class name from lowercase to PascalCase |
| Thread.py | Added comprehensive type hints for thread classes; reformatted method signatures for better readability; updated docstrings |
| InversionUtils.py | Reformatted WIDGETS enum for improved readability with one item per line |
| InversionPerspective.py | Added type hints to methods; updated docstrings; improved multiline string formatting; removed commented code |
| InversionLogic.py | Added type hints; updated docstrings; improved code formatting and spacing |
| DMaxExplorerWidget.py | Added type hints; updated docstrings; improved code formatting and error message structure |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
DrPaulSharp
left a comment
There was a problem hiding this comment.
Looks good so far, a couple of points to address alongside the remaining copilot comments.
dce3e8d to
87a5055
Compare
|
@DrPaulSharp, I have rebased this on main. Also did some work on One thing I wanted to check - the regularisation constant is called alpha in the code. There is a |
I think it's probably just worth leaving for now. Unless there is a compelling need to change the name it doesn't seem worth doing that much work. |
|
|
||
| logger = logging.getLogger(__name__) | ||
|
|
||
| def help(): |
There was a problem hiding this comment.
Is this documentation anywhere else? Just want to be sure we aren't losing information by deleting this.
There was a problem hiding this comment.
Yes, it is in the documentation for the perspective.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
87a5055 to
cca5afc
Compare
Description
This PR cleans up the code for the Inversion Perspective in the qtgui directory, which includes:
This also includes some work on
invertor.py, #2974How Has This Been Tested?
Manually ran SasView to test functionality is unchanged.
Review Checklist:
Documentation
Installers
Licensing