-
Notifications
You must be signed in to change notification settings - Fork 11
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
Video QOL enhancements #82
Conversation
WalkthroughThe updates across the codebase revolve around enhancing file handling in the Changes
Recent Review DetailsConfiguration used: CodeRabbit UI Files selected for processing (3)
Files skipped from review as they are similar to previous changes (1)
Additional comments not posted (2)
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.
Actionable comments posted: 0
Actionable comments outside the diff hunks (1)
sleap_io/model/video.py (1)
Line range hint
90-90
: Consider specifying exception types in the_get_shape
method to avoid catching unintended exceptions.- except: + except AttributeError:
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #82 +/- ##
==========================================
+ Coverage 95.33% 95.46% +0.12%
==========================================
Files 13 13
Lines 1609 1632 +23
==========================================
+ Hits 1534 1558 +24
+ Misses 75 74 -1 ☔ View full report in Codecov by Sentry. |
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.
Actionable comments posted: 1
Actionable comments outside the diff hunks (13)
README.md (11)
Line range hint
16-16
: Add a blank line below the "Installation" heading to adhere to markdown best practices.16a17 +
Line range hint
119-119
: Add a blank line below the "License" heading to adhere to markdown best practices.119a120 +
Line range hint
17-17
: Add a blank line above and below the fenced code block for the "Installation" section to adhere to markdown best practices.16a17 + 18a20 +
Line range hint
22-22
: Add a blank line above and below the fenced code block for the "Installation" section to adhere to markdown best practices.21a22 + 23a25 +
Line range hint
24-24
: Add a blank line above and below the fenced code block for the "Installation" section to adhere to markdown best practices.23a24 + 25a27 +
Line range hint
25-25
: Add a blank line above and below the fenced code block for the "Installation" section to adhere to markdown best practices.24a25 + 26a28 +
Line range hint
27-27
: Add a blank line above and below the fenced code block for the "Installation" section to adhere to markdown best practices.26a27 + 28a30 +
Line range hint
17-17
: Specify the language for the fenced code blocks in the "Installation" section to improve readability and syntax highlighting.- ``` + ```bash
Line range hint
22-22
: Specify the language for the fenced code blocks in the "Installation" section to improve readability and syntax highlighting.- ``` + ```bash
Line range hint
25-25
: Specify the language for the fenced code blocks in the "Installation" section to improve readability and syntax highlighting.- ``` + ```bash
Line range hint
121-121
: Ensure the file ends with a single newline character to adhere to markdown best practices.121a122 +sleap_io/model/video.py (2)
Line range hint
9-9
: Remove the duplicate import ofOptional
from thetyping
module to clean up the code.- from typing import Tuple, Optional, Optional + from typing import Tuple, Optional
Line range hint
90-90
: Avoid using a bareexcept
statement in the_get_shape
method. It's better to specify the exception type to avoid catching unexpected exceptions, which can make debugging difficult.- except: + except AttributeError: # Assuming AttributeError is the relevant exception here
@@ -89,6 +103,9 @@ lf = sio.LabeledFrame(video=video, frame_idx=0, instances=[instance]) | |||
|
|||
# Create labels. | |||
labels = sio.Labels(videos=[video], skeletons=[skeleton], labeled_frames=[lf]) | |||
|
|||
# Save. | |||
labels.save("labels.slp") | |||
``` | |||
|
|||
## Support |
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.
Add a blank line below the "Support" heading to adhere to markdown best practices.
111a112
+
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
## Support | |
## Support | |
Video.is_open
: Checks if the video exists and the backend is set.Video.open
: Opens or restarts the backend for reading.Video.close
: Closes the backend for reading.Video.exists
: Check if the filename for the video exists.Video.replace_filename
: Replace the filename and restart the backend.Summary by CodeRabbit