Conversation
klemen1999
previously approved these changes
Dec 9, 2025
Contributor
There was a problem hiding this comment.
Pull request overview
This PR changes the default value of the file_name parameter in the SnapData class constructor from an empty string to "snap_file", addressing an issue where empty filenames were causing snap sending failures.
Key Changes:
- Modified the default value of
file_nameparameter from""to"snap_file"inSnapData.__init__()
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
depthai_nodes/message/snap_data.py
Outdated
| snap_name: str, | ||
| frame: dai.ImgFrame | dai.EncodedFrame, | ||
| file_name: str = "", | ||
| file_name: str = "snap_file", |
There was a problem hiding this comment.
This change breaks the existing test test_snap_data_initialization_minimal in tests/unittests/test_messages/test_snap_data.py at line 28, which asserts that the default file_name is an empty string (""). The test needs to be updated to expect "snap_file" instead to match this new default value.
Collaborator
|
Needs slight test modifications as mentioned by copilot |
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Fixes issue with the empty file name what fails snap sending
Specification
Adds a default value for the file_name attribute in SnapData message
Dependencies & Potential Impact
This fix will allow users not to state file name of the snap
Deployment Plan
None / not applicable
Testing & Validation
None / not applicable