Closed roomrys closed 2 months ago
The changes involve modifications to the add_menu_item
function in sleap/gui/app.py
, where a lambda function is introduced to handle the connection of the state variable to the menu action's setChecked
method. Additionally, the toggle_and_verify_visibility
function in tests/gui/test_app.py
is enhanced with assertions to verify the menu item's checked state against the "color predicted" state in the window.
File | Change Summary |
---|---|
sleap/gui/app.py | Modified the add_menu_item function to use a lambda function for connecting the state variable to the setChecked method of the menu action. |
tests/gui/test_app.py | Enhanced the toggle_and_verify_visibility function by adding assertions that verify the menu item's checked state against the "color predicted" state. |
sleap-label
command.🐇 In the garden, I hop with glee,
A menu's state, now clear as can be!
With checks and toggles, all in line,
The code is tidy, oh how it shines!
So let's celebrate with a joyful cheer,
For every change brings us near! 🌼
[!TIP]
Announcements
- The review status is no longer posted as a separate comment when there are no actionable or nitpick comments. In such cases, the review status is included in the walkthrough comment. - We have updated our review workflow to use the Anthropic's Claude family of models. Please share any feedback in the [discussion post](https://discordapp.com/channels/1134356397673414807/1279579842131787838) on our Discord. - Possibly related PRs: Walkthrough comment now includes a list of potentially related PRs to help you recall past context. Please share any feedback in the [discussion post](https://discordapp.com/channels/1134356397673414807/1282535539299323995) on our Discord. - Suggested labels: CodeRabbit can now suggest labels by learning from your past PRs in the walkthrough comment. You can also provide custom labeling instructions in the UI or configuration file. - Possibly related PRs, automatic label suggestions based on past PRs, learnings, and possibly related issues require data opt-in (enabled by default).
tests/gui/test_app.py (1)
`417-422`: **LGTM!** The new assertions comprehensively verify that the menu item's checked state stays in sync with the window's "color predicted" state.sleap/gui/app.py (1)
`380-382`: **LGTM!** The change to use a lambda function for connecting the menu item's checked state to the state variable is a good improvement. It provides more flexibility for future modifications without changing the core connection logic.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 75.34%. Comparing base (
7ed1229
) to head (93e0aa2
). Report is 50 commits behind head on develop.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Description
When upgrading a few of our dependendencies (in SLEAP >1.3.3), we started getting this message printed in the terminal:
. While the appearance of this error message also coincided with the GUI crashing on a mouseWheel event (zooming in/out), these errors are actually two different errors both caused by the same update. The GUI-crash-on-scroll issue was much more debilitating, but this error message printing in the terminal is just cosmetically annoying.
We don't want to release a release where we have this new annoying message in the terminal that appears everytime someone clicks a check button. So... this PR investigates this issue and removes the error message seen above without taking away any GUI functionality.
Types of changes
Does this address any currently open issues?
1803
1802
1841
Outside contributors checklist
Thank you for contributing to SLEAP!
:heart:
Summary by CodeRabbit
New Features
Bug Fixes