-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(4a -> 4) Add visual indicator for current camera #1783
(4a -> 4) Add visual indicator for current camera #1783
Conversation
Warning Review failedThe pull request is closed. Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Works as expected, just a request on the formatting. Also, run black
to lint/format any python files you've touched (ideally before pushing):
black sleap/gui/app.py
. Otherwise, the Lint test will fail.
You can also set your VSCode up to run black for you each time you save a file.
sleap/gui/app.py
Outdated
@@ -1391,6 +1391,10 @@ def updateStatusMessage(self, message: Optional[str] = None): | |||
else: | |||
self.statusBar().setStyleSheet("color: black") | |||
|
|||
# TODO(JS): Add Camera indicator test here | |||
if self.state["session"] is not None and current_video is not None: | |||
message += f'{spacer}Camera: {self.state["session"].get_camera(video=self.state["video"])}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really want to rely on the Camcorder.__repr__
here. Can we instead print just the Camcorder.name
?
message += f'{spacer}Camera: {self.state["session"].get_camera(video=self.state["video"])}' | |
camera = self.state["session"].get_camera(video=self.state["video"]) | |
if camera is not None: | |
message += f'{spacer}Camera: {camera.name}' |
sleap/gui/app.py
Outdated
@@ -1391,6 +1391,10 @@ def updateStatusMessage(self, message: Optional[str] = None): | |||
else: | |||
self.statusBar().setStyleSheet("color: black") | |||
|
|||
# TODO(JS): Add Camera indicator test here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We normally add tests in the tests folder, but for this particular PR (since it is extremely visual/GUI-based) I would just manually test it by using the GUI with
sleap-label tests\data\cameras\minimal_session\min_session_frame_groups.slp
and then clicking through the Videos to see that the statusBar
is updated accordingly.
# TODO(JS): Add Camera indicator test here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
52962a0
into
talmolab:liezl/add-gui-elements-for-sessions
Description
Add an indication for which Camcorder is linked to the Video that the user is currently viewing a frame for.
Types of changes
Does this address any currently open issues?
[list open issues here]
Outside contributors checklist
Thank you for contributing to SLEAP!
❤️