-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Update test assets for quality tests #8763
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
Conversation
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe changes involve modifications to the Changes
Poem
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration 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
🧹 Outside diff range and nitpick comments (2)
tests/cypress/support/default-specs.js (2)
9-11
: LGTM! Consider adding JSDoc documentation.The new parameters are well-organized and maintain backward compatibility. However, adding JSDoc documentation would help other developers understand the purpose and expected values of these parameters.
Example documentation:
+ /** + * Generates default task specification for testing + * @param {Object} params - Task specification parameters + * @param {string} params.labelName - Name of the label + * @param {string} params.taskName - Name of the task + * @param {string[]} params.serverFiles - List of files on server + * @param {number} [params.startFrame] - Starting frame number + * @param {string} [params.frameFilter] - Frame filter expression + * @param {number} [params.segmentSize] - Size of task segments + * @param {Object} [params.validationParams] - Validation parameters + * @returns {Object} Task specification object + */
35-40
: LGTM! Consider adding input validation.The implementation correctly handles frame-related parameters. However, since these parameters are critical for frame selection, consider adding basic validation:
- startFrame should be a non-negative integer
- frameFilter should be a valid filter expression
if (startFrame) { + if (!Number.isInteger(startFrame) || startFrame < 0) { + throw new Error('startFrame must be a non-negative integer'); + } dataSpec.start_frame = startFrame; } if (frameFilter) { + if (typeof frameFilter !== 'string' || !frameFilter.trim()) { + throw new Error('frameFilter must be a non-empty string'); + } dataSpec.frame_filter = frameFilter; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
tests/cypress/support/default-specs.js
(2 hunks)
🔇 Additional comments (1)
tests/cypress/support/default-specs.js (1)
24-26
: LGTM! Verify segment size constraints.
The implementation correctly adds the segment_size parameter when provided. However, it might be worth verifying if there are any constraints on the segment size value in CVAT.
✅ Verification successful
Based on the search results, I can provide a final response since I have enough information about segment size constraints and usage in CVAT:
Segment size implementation is correct and follows CVAT's design
The segment size parameter is used to divide datasets into smaller parts for concurrent annotation by multiple annotators. The implementation correctly:
- Accepts any positive integer value without hard constraints
- Divides the task into segments based on the specified size
- Handles segment size appropriately for both video and image datasets
- Integrates with other parameters like overlap size and chunk size
- Is used consistently across the codebase for job segmentation
The test cases demonstrate proper handling of various segment sizes (1, 3, 4, 5, 10, etc.) without any validation issues. The parameter is well-documented and its behavior aligns with CVAT's task management design.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for any segment size validation or constraints in the codebase
rg -g '!*.{json,lock}' -i 'segment.*size' -A 5 -B 5
Length of output: 81744
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #8763 +/- ##
========================================
Coverage 73.92% 73.92%
========================================
Files 409 409
Lines 43944 43945 +1
Branches 3985 3985
========================================
+ Hits 32485 32488 +3
+ Misses 11459 11457 -2
|
|
Motivation and context
How has this been tested?
Checklist
develop
branch[ ] I have created a changelog fragment[ ] I have updated the documentation accordingly[ ] I have added tests to cover my changes[ ] I have linked related issues (see GitHub docs)[ ] I have increased versions of npm packages if it is necessary(cvat-canvas,
cvat-core,
cvat-data and
cvat-ui)
License
Feel free to contact the maintainers if that's a concern.
Summary by CodeRabbit