-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add ImageVideo
backend
#88
Conversation
WalkthroughThe recent updates enhance the Changes
Recent Review DetailsConfiguration used: CodeRabbit UI Files selected for processing (1)
Files skipped from review due to trivial changes (1)
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 (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #88 +/- ##
==========================================
+ Coverage 95.46% 95.61% +0.14%
==========================================
Files 14 14
Lines 1633 1665 +32
==========================================
+ Hits 1559 1592 +33
+ Misses 74 73 -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: 2
Out of diff range and nitpick comments (2)
sleap_io/model/video.py (2)
Line range hint
9-9
: Remove duplicate import ofOptional
.- from typing import Tuple, Optional, Optional + from typing import Tuple, Optional
Line range hint
90-90
: Replace bareexcept
with more specific exception handling to avoid suppressing unexpected errors.- except: + except AttributeError: # Assuming AttributeError is the relevant exception here
if isinstance(filename, Path): | ||
filename = filename.as_posix() | ||
|
||
if type(filename) == str and Path(filename).is_dir(): |
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.
Use isinstance()
instead of type comparison for checking if filename
is a string.
- if type(filename) == str and Path(filename).is_dir():
+ if isinstance(filename, str) and Path(filename).is_dir():
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.
if type(filename) == str and Path(filename).is_dir(): | |
if isinstance(filename, str) and Path(filename).is_dir(): |
|
||
if filename.endswith(MediaVideo.EXTS): | ||
if type(filename) == list: |
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.
Use isinstance()
for type checking to ensure consistency and readability.
- if type(filename) == list:
+ if isinstance(filename, list):
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.
if type(filename) == list: | |
if isinstance(filename, list): |
Adds support for videos that are defined as a list of images.
Summary by CodeRabbit
New Features
Bug Fixes
Tests