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.
src/sas/qtgui/Perspectives/Inversion/UnitTesting/InversionPerspectiveTest.py
Outdated
Show resolved
Hide resolved
src/sas/qtgui/Perspectives/Inversion/UnitTesting/InversionPerspectiveTest.py
Outdated
Show resolved
Hide resolved
b95db4e to
dce3e8d
Compare
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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. |
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