-
Notifications
You must be signed in to change notification settings - Fork 3k
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
stop using datumaro.util.test_utils #8259
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 recent changes streamline the testing framework within the CVAT dataset manager by refactoring utility functions and enhancing organization. Key updates include the removal of 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 (
|
6edc253
to
196acce
Compare
Quality Gate passedIssues Measures |
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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- cvat/apps/dataset_manager/tests/test_rest_api_formats.py (6 hunks)
- cvat/apps/dataset_manager/tests/utils.py (1 hunks)
- cvat/apps/engine/tests/test_rest_api.py (1 hunks)
- cvat/apps/engine/tests/test_rest_api_3D.py (1 hunks)
Files skipped from review due to trivial changes (2)
- cvat/apps/engine/tests/test_rest_api.py
- cvat/apps/engine/tests/test_rest_api_3D.py
Additional comments not posted (9)
cvat/apps/dataset_manager/tests/utils.py (3)
17-35
: Verify the necessity of handlingunittest.SkipTest
.The exception handling for
unittest.SkipTest
is unusual in this context. Ensure that it is necessary and correctly implemented.
37-74
: LGTM!The
TestDir
class correctly extendsFileRemover
to create a temporary directory for tests.
77-85
: LGTM!The
compare_datasets
function correctly compares two datasets usingExactComparator
.cvat/apps/dataset_manager/tests/test_rest_api_formats.py (6)
1037-1037
: LGTM!The function
test_api_v2_tasks_annotations_dump_and_upload_many_jobs_with_datumaro
correctly callscompare_datasets
without theself
parameter.
1113-1113
: LGTM!The function
test_api_v2_tasks_annotations_dump_and_upload_with_datumaro
correctly callscompare_datasets
without theself
parameter.
1179-1179
: LGTM!The function
test_api_v2_check_duplicated_polygon_points
correctly callscompare_datasets
without theself
parameter.
1252-1252
: LGTM!The function
test_api_v2_check_widerface_with_all_attributes
correctly callscompare_datasets
without theself
parameter.
1215-1215
: LGTM!The function
test_api_v2_check_mot_with_shapes_only
correctly callscompare_datasets
without theself
parameter.
1252-1252
: LGTM!The function
test_api_v2_check_attribute_import_in_tracks
correctly callscompare_datasets
without theself
parameter.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #8259 +/- ##
===========================================
- Coverage 74.29% 74.26% -0.04%
===========================================
Files 403 403
Lines 43316 43316
Branches 3914 3914
===========================================
- Hits 32183 32169 -14
- Misses 11133 11147 +14
|
196acce
to
9c92e07
Compare
|
||
|
||
class FileRemover: | ||
def __init__(self, path, is_dir=False): |
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.
Could you add type annotations in the updated code and enable code formatting for the new files?
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.
Added annotations and enabled black and isort for the new 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.
Correction: I can not enable black and isort on CI for the new file alone, because the linters are run on folders, not individual files. Disabled them back
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.
It still makes sense to add this file into dev/format_python_code.sh
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.
Added it there
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.
^
Quality Gate passedIssues Measures |
Motivation and context
we want to move datumaro.util.test_utils to datumaro.tests.utils.test_utils, but to do it we need to stop using functions from there in cvat
How has this been tested?
Checklist
develop
branch(cvat-canvas,
cvat-core,
cvat-data and
cvat-ui)
License
Feel free to contact the maintainers if that's a concern.
Summary by CodeRabbit
compare_datasets
function.