-
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
Export only annotated images option. #8340
base: develop
Are you sure you want to change the base?
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 across the codebase introduce a new parameter, Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant API
participant ExportManager
participant Dataset
User->>API: Request Export with all_images
API->>ExportManager: Pass all_images parameter
ExportManager->>Dataset: Export Dataset with all_images
Dataset-->>ExportManager: Return Export Status
ExportManager-->>API: Return API Response
API-->>User: Provide Export Results
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, codebase verification and nitpick comments (1)
cvat/apps/engine/utils.py (1)
393-398
: Update function calls to include theall_images
parameterThe
build_annotations_file_name
function has been updated with a newall_images
parameter, but the current calls to this function incvat/apps/engine/background.py
do not include this parameter. Please update these calls to ensure consistency in the filename generation logic.
cvat/apps/engine/background.py
: Update calls tobuild_annotations_file_name
to include theall_images
parameter.Analysis chain
Ensure consistency in the
build_annotations_file_name
logic.The addition of the
all_images
parameter allows for more nuanced filename generation. Verify that the logic aligns with the intended behavior and that all relevant code paths are updated.Run the following script to verify the function usage:
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `build_annotations_file_name` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type python -A 5 $'build_annotations_file_name'Length of output: 82
Script:
#!/bin/bash # Description: Verify all function calls to `build_annotations_file_name` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type py -A 5 $'build_annotations_file_name'Length of output: 1713
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (40)
- cvat-core/src/annotations.ts (2 hunks)
- cvat-core/src/project-implementation.ts (1 hunks)
- cvat-core/src/project.ts (2 hunks)
- cvat-core/src/server-proxy.ts (3 hunks)
- cvat-core/src/session-implementation.ts (2 hunks)
- cvat-core/src/session.ts (3 hunks)
- cvat-ui/src/actions/export-actions.ts (2 hunks)
- cvat-ui/src/components/export-dataset/export-dataset-modal.tsx (7 hunks)
- cvat/apps/dataset_manager/bindings.py (5 hunks)
- cvat/apps/dataset_manager/formats/camvid.py (1 hunks)
- cvat/apps/dataset_manager/formats/cityscapes.py (1 hunks)
- cvat/apps/dataset_manager/formats/coco.py (2 hunks)
- cvat/apps/dataset_manager/formats/cvat.py (4 hunks)
- cvat/apps/dataset_manager/formats/datumaro.py (2 hunks)
- cvat/apps/dataset_manager/formats/icdar.py (3 hunks)
- cvat/apps/dataset_manager/formats/imagenet.py (1 hunks)
- cvat/apps/dataset_manager/formats/kitti.py (1 hunks)
- cvat/apps/dataset_manager/formats/labelme.py (1 hunks)
- cvat/apps/dataset_manager/formats/lfw.py (1 hunks)
- cvat/apps/dataset_manager/formats/market1501.py (1 hunks)
- cvat/apps/dataset_manager/formats/mask.py (1 hunks)
- cvat/apps/dataset_manager/formats/mot.py (1 hunks)
- cvat/apps/dataset_manager/formats/mots.py (1 hunks)
- cvat/apps/dataset_manager/formats/openimages.py (1 hunks)
- cvat/apps/dataset_manager/formats/pascal_voc.py (1 hunks)
- cvat/apps/dataset_manager/formats/pointcloud.py (1 hunks)
- cvat/apps/dataset_manager/formats/velodynepoint.py (1 hunks)
- cvat/apps/dataset_manager/formats/vggface2.py (1 hunks)
- cvat/apps/dataset_manager/formats/widerface.py (1 hunks)
- cvat/apps/dataset_manager/formats/yolo.py (1 hunks)
- cvat/apps/dataset_manager/project.py (2 hunks)
- cvat/apps/dataset_manager/task.py (4 hunks)
- cvat/apps/dataset_manager/util.py (1 hunks)
- cvat/apps/dataset_manager/views.py (4 hunks)
- cvat/apps/engine/background.py (6 hunks)
- cvat/apps/engine/mixins.py (3 hunks)
- cvat/apps/engine/utils.py (1 hunks)
- cvat/apps/engine/views.py (3 hunks)
- cvat/apps/events/handlers.py (1 hunks)
- cvat/schema.yml (3 hunks)
Additional comments not posted (70)
cvat/apps/dataset_manager/formats/widerface.py (1)
18-21
: LGTM! But verify the function usage in the codebase.The addition of the
all_images
parameter to the_export
function is well-implemented and aligns with the PR objectives.However, ensure that all function calls to
_export
correctly handle the newall_images
parameter.Run the following script to verify the function usage:
Verification successful
No direct usage of
_export
function in widerface.py found in the codebase. The_export
function inwiderface.py
is not directly referenced or imported elsewhere, indicating that the addition of theall_images
parameter does not affect other parts of the codebase.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `_export` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type python -A 5 $'_export'Length of output: 62
Script:
#!/bin/bash # Description: Verify all function calls to `_export` match the new signature. # Corrected Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type py -A 5 '_export'Length of output: 158023
Script:
#!/bin/bash # Description: Search for any imports or references to the `_export` function in widerface.py # Search for imports of widerface.py rg --type py 'import widerface' -A 5 # Search for any references to the `_export` function in widerface.py rg --type py '_export' -A 5Length of output: 158062
cvat/apps/dataset_manager/formats/lfw.py (1)
27-28
: LGTM! But verify the function usage in the codebase.The addition of the
all_images
parameter to the_exporter
function is well-implemented and aligns with the PR objectives.However, ensure that all function calls to
_exporter
correctly handle the newall_images
parameter.Run the following script to verify the function usage:
Verification successful
Function usage verified successfully. The
all_images
parameter in the_exporter
function is correctly handled in the codebase through themake_exporter
function. The parameter is passed appropriately in theexport
calls in the following files:
cvat/apps/dataset_manager/project.py
cvat/apps/dataset_manager/task.py
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `_exporter` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type python -A 5 $'_exporter'Length of output: 64
Script:
#!/bin/bash # Corrected script to verify all function calls to `_exporter` match the new signature. # Search for the function usage in Python files and include context lines. rg '_exporter' --glob '*.py' -A 5Length of output: 3336
cvat/apps/dataset_manager/formats/vggface2.py (1)
18-21
: LGTM! But verify the function usage in the codebase.The addition of the
all_images
parameter to the_export
function is well-implemented and aligns with the PR objectives.However, ensure that all function calls to
_export
correctly handle the newall_images
parameter.Run the following script to verify the function usage:
Verification successful
Function Usage Verification:
_export
invggface2.py
The
_export
function invggface2.py
correctly handles theall_images
parameter in its implementation. However, there are no direct calls to this function within the file, suggesting it might be used elsewhere in the codebase or intended for internal use. No further issues were found regarding the handling of the new parameter.
- The
_export
function correctly includesall_images
in its call todataset.export
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `_export` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type python -A 5 $'_export'Length of output: 62
Script:
#!/bin/bash # Description: Verify all function calls to `_export` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type py -A 5 $'_export'Length of output: 158023
Script:
#!/bin/bash # Description: Verify the usage of `_export` within the vggface2.py file to ensure the new parameter is handled correctly. # Test: Search for the function usage within the file. rg --type py -A 5 '_export' cvat/apps/dataset_manager/formats/vggface2.pyLength of output: 445
cvat/apps/dataset_manager/formats/labelme.py (1)
18-19
: LGTM! The addition of theall_images
parameter enhances flexibility.The changes align with the PR objectives and provide more control over the export process.
cvat/apps/dataset_manager/formats/imagenet.py (1)
20-21
: LGTM! The addition of theall_images
parameter enhances flexibility.The changes align with the PR objectives and provide more control over the export process.
cvat/apps/dataset_manager/formats/pointcloud.py (1)
19-21
: LGTM! The addition of theall_images
parameter enhances flexibility.The changes align with the PR objectives and provide more control over the export process.
cvat/apps/dataset_manager/formats/mask.py (1)
18-19
: Enhance flexibility with theall_images
parameter.The addition of the
all_images
parameter to the_export
function provides users with the flexibility to choose whether to include all images during the export process. Ensure that this parameter is correctly handled in all relevant parts of the codebase.Run the following script to verify the function usage:
Verification successful
Ensure correct handling of the
all_images
parameter across the codebase.The
all_images
parameter is consistently included in the_export
function signatures across various files, indicating that it is correctly handled. The function calls match the new signature, ensuring flexibility in the export process.
- The
_export
function inmask.py
and other related files includes theall_images
parameter.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `_export` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type python -A 5 $'_export'Length of output: 62
Script:
#!/bin/bash # Description: Verify all function calls to `_export` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type py -A 5 $'_export'Length of output: 158023
cvat/apps/dataset_manager/formats/camvid.py (1)
19-20
: Enhance flexibility with theall_images
parameter.The addition of the
all_images
parameter to the_export
function provides users with the flexibility to choose whether to include all images during the export process. Ensure that this parameter is correctly handled in all relevant parts of the codebase.Run the following script to verify the function usage:
cvat/apps/dataset_manager/formats/velodynepoint.py (1)
29-31
: Enhance flexibility with theall_images
parameter.The addition of the
all_images
parameter to the_export_images
function provides users with the flexibility to choose whether to include all images during the export process. Ensure that this parameter is correctly handled in all relevant parts of the codebase.Run the following script to verify the function usage:
Verification successful
The
all_images
parameter is correctly handled across the codebase.The
_export_images
function, with theall_images
parameter, is used consistently across different files, ensuring its proper handling. The parameter is correctly passed to relevant functions, confirming its integration.
cvat/apps/dataset_manager/formats/pointcloud.py
cvat/apps/dataset_manager/formats/velodynepoint.py
cvat/apps/dataset_manager/formats/cvat.py
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `_export_images` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type python -A 5 $'_export_images'Length of output: 69
Script:
#!/bin/bash # Description: Verify all function calls to `_export_images` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type py -A 5 $'_export_images'Length of output: 1936
cvat/apps/dataset_manager/formats/yolo.py (1)
22-23
: Verify the integration of theall_images
parameter.The addition of the
all_images
parameter to the_export
function and its usage inGetCVATDataExtractor
enhances configurability. Ensure that this parameter is correctly passed and utilized in all relevant parts of the codebase.Run the following script to verify the function usage:
cvat/apps/dataset_manager/formats/cityscapes.py (1)
22-23
: Verify the integration of theall_images
parameter.The addition of the
all_images
parameter to the_export
function and its usage inGetCVATDataExtractor
enhances configurability. Ensure that this parameter is correctly passed and utilized in all relevant parts of the codebase.Run the following script to verify the function usage:
cvat/apps/dataset_manager/formats/kitti.py (1)
22-23
: Verify the integration of theall_images
parameter.The addition of the
all_images
parameter to the_export
function and its usage inGetCVATDataExtractor
enhances configurability. Ensure that this parameter is correctly passed and utilized in all relevant parts of the codebase.Run the following script to verify the function usage:
Verification successful
Integration of
all_images
Parameter VerifiedThe
all_images
parameter is consistently passed toGetCVATDataExtractor
across multiple files, confirming its correct integration in the codebase. No issues were found.
- Instances in files like
yolo.py
,kitti.py
,coco.py
, and others show correct usage.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `_export` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type python -A 5 $'_export'Length of output: 62
Script:
#!/bin/bash # Description: Verify all function calls to `_export` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type py -A 5 '_export('Length of output: 97
Script:
#!/bin/bash # Description: Verify all function calls to `_export` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type py -A 5 '_export\('Length of output: 35114
Script:
#!/bin/bash # Description: Search for references to the `_export` function to verify parameter usage. # Test: Search for references or calls to `_export`. Expect: To find how the function is invoked. rg --type py '_export'Length of output: 41045
Script:
#!/bin/bash # Description: Search for instances of `GetCVATDataExtractor` to verify `all_images` usage. # Test: Search for `GetCVATDataExtractor` usage. Expect: To verify `all_images` parameter usage. rg --type py 'GetCVATDataExtractor'Length of output: 6388
cvat/apps/dataset_manager/formats/pascal_voc.py (1)
22-23
: LGTM! Verify theall_images
parameter usage.The addition of the
all_images
parameter enhances the flexibility of the export process. The changes align with the PR objectives.Ensure that the
all_images
parameter is correctly utilized in the codebase.Run the following script to verify the usage of the
all_images
parameter:Verification successful
The
all_images
parameter is correctly utilized across the codebase. The parameter is consistently used in various export functions, ensuring the intended flexibility in handling images during export processes.
cvat/apps/dataset_manager/formats/pascal_voc.py
: Used in_export
function.cvat/apps/dataset_manager/formats/mots.py
: Used in_export
function.cvat/apps/dataset_manager/formats/yolo.py
: Used in_export
function.- And many other files as shown in the search results.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of the `all_images` parameter in the codebase. # Test: Search for the `all_images` parameter usage. Expect: Consistent usage across the codebase. rg --type python -A 5 $'all_images='Length of output: 66
Script:
#!/bin/bash # Corrected command to verify the usage of the `all_images` parameter in the codebase. # Test: Search for the `all_images` parameter usage. Expect: Consistent usage across the codebase. rg -A 5 'all_images='Length of output: 30651
cvat/apps/dataset_manager/formats/datumaro.py (1)
28-29
: LGTM! Verify theall_images
parameter usage.The addition of the
all_images
parameter in both instances of the_export
function enhances the flexibility of the export process. The changes align with the PR objectives.Ensure that the
all_images
parameter is correctly utilized in the codebase.Run the following script to verify the usage of the
all_images
parameter:Also applies to: 49-51
Verification successful
The
all_images
parameter is correctly utilized across the codebase.The
all_images
parameter is consistently used in various export functions and related processes, aligning with the intended functionality. No issues were found with its implementation.
- Files with
all_images
usage:
cvat/apps/events/handlers.py
cvat/apps/engine/background.py
cvat/apps/engine/mixins.py
cvat/apps/dataset_manager/task.py
cvat/apps/dataset_manager/views.py
cvat/apps/dataset_manager/project.py
cvat/apps/dataset_manager/formats/*
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of the `all_images` parameter in the codebase. # Test: Search for the `all_images` parameter usage. Expect: Consistent usage across the codebase. rg --type python -A 5 $'all_images='Length of output: 66
Script:
#!/bin/bash # Description: Verify the usage of the `all_images` parameter in the codebase. # Test: Search for the `all_images` parameter usage. Expect: Consistent usage across the codebase. rg --type py -A 5 $'all_images='Length of output: 30661
cvat/apps/dataset_manager/formats/market1501.py (1)
64-65
: LGTM! Verify theall_images
parameter usage.The addition of the
all_images
parameter enhances the flexibility of the export process. The changes align with the PR objectives.Ensure that the
all_images
parameter is correctly utilized in the codebase.Run the following script to verify the usage of the
all_images
parameter:cvat/apps/dataset_manager/formats/openimages.py (1)
41-42
: Enhancement: Addedall_images
parameter to_export
.The addition of the
all_images
parameter provides more control over the image export process. The default value ofTrue
maintains backward compatibility.Verify that the
GetCVATDataExtractor
correctly handles theall_images
parameter.Run the following script to verify the usage of the
all_images
parameter inGetCVATDataExtractor
:cvat/apps/dataset_manager/formats/coco.py (2)
43-44
: Enhancement: Addedall_images
parameter to_export
.The addition of the
all_images
parameter provides more control over the image export process. The default value ofTrue
maintains backward compatibility.Verify that the
GetCVATDataExtractor
correctly handles theall_images
parameter.Run the following script to verify the usage of the
all_images
parameter inGetCVATDataExtractor
:
19-20
: Enhancement: Addedall_images
parameter to_export
.The addition of the
all_images
parameter provides more control over the image export process. The default value ofTrue
maintains backward compatibility.Verify that the
GetCVATDataExtractor
correctly handles theall_images
parameter.Run the following script to verify the usage of the
all_images
parameter inGetCVATDataExtractor
:cvat/apps/dataset_manager/formats/mot.py (1)
96-97
: Enhancement: Addedall_images
parameter to_export
.The addition of the
all_images
parameter provides more control over the image export process. The default value ofTrue
maintains backward compatibility.Verify that the
GetCVATDataExtractor
correctly handles theall_images
parameter.Run the following script to verify the usage of the
all_images
parameter inGetCVATDataExtractor
:cvat/apps/dataset_manager/formats/mots.py (1)
96-97
: Enhancement: Addedall_images
parameter to_export
.The addition of the
all_images
parameter allows for more control over the export process, aligning with the PR's objective to provide an option for exporting only annotated images.cvat-ui/src/actions/export-actions.ts (2)
106-106
: Enhancement: AddedallImages
parameter toexportDatasetAsync
.The inclusion of the
allImages
parameter provides more granular control over the dataset export process, allowing users to specify whether all images should be included.
118-118
: Update: Modified call toexportDataset
to includeallImages
.The call to
instance.annotations.exportDataset
now includes theallImages
parameter, ensuring that the export process respects the user's choice regarding image inclusion.cvat/apps/dataset_manager/formats/icdar.py (3)
80-81
: Enhancement: Addedall_images
parameter to_export_recognition
.The inclusion of the
all_images
parameter allows for more flexible data extraction, aligning with the PR's objective to provide an option for exporting only annotated images.
103-104
: Enhancement: Addedall_images
parameter to_export_localization
.The addition of the
all_images
parameter provides more control over the export process, enhancing the flexibility of the function.
125-126
: Enhancement: Addedall_images
parameter to_export_segmentation
.The inclusion of the
all_images
parameter allows users to specify their preference for image inclusion during the export process, improving the function's configurability.cvat/apps/dataset_manager/util.py (1)
163-173
: LGTM! Verify the usage of the new parameter.The changes to the
make_export_filename
function look good. The new parameterall_images
is correctly integrated into the logic.However, ensure that all calls to
make_export_filename
are updated to include the newall_images
parameter.Run the following script to verify the function usage:
Verification successful
Function Usage Verified: The
make_export_filename
function is correctly called with theall_images
parameter in the codebase. No further updates are necessary.
- The function call in
cvat/apps/dataset_manager/views.py
includes theall_images
parameter.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `make_export_filename` include the new `all_images` parameter. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type python -A 5 $'make_export_filename'Length of output: 75
Script:
#!/bin/bash # Description: Verify all function calls to `make_export_filename` include the new `all_images` parameter. # Corrected command to search for the function usage. rg 'make_export_filename' --type py -A 5Length of output: 1195
cvat-core/src/project-implementation.ts (1)
114-127
: LGTM! Verify the usage of the new parameter.The changes to the
exportDataset
function call look good. The new parameterallImages
is correctly integrated into the logic.However, ensure that all calls to
exportDataset
are updated to include the newallImages
parameter.Run the following script to verify the function usage:
Verification successful
All function calls to
exportDataset
include theallImages
parameter. The integration of the new parameter is consistent across the codebase.
- The
allImages
parameter is correctly included in calls toexportDataset
in various files such ascvat-ui/src/actions/export-actions.ts
,cvat-core/src/project-implementation.ts
, and others.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `exportDataset` include the new `allImages` parameter. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type js -A 5 $'exportDataset'Length of output: 9025
Script:
#!/bin/bash # Description: Search for direct calls to the `exportDataset` function in the codebase to verify the inclusion of the `allImages` parameter. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type ts --type js -A 5 'exportDataset('Length of output: 125
Script:
#!/bin/bash # Description: Search for direct calls to the `exportDataset` function in the codebase to verify the inclusion of the `allImages` parameter. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type ts --type js -A 5 'exportDataset\('Length of output: 5529
cvat/apps/dataset_manager/project.py (1)
Line range hint
29-41
: LGTM! Verify the usage of the new parameter.The changes to the
export_project
function look good. The new parameterall_images
is correctly integrated into the logic.However, ensure that all calls to
export_project
are updated to include the newall_images
parameter.Run the following script to verify the function usage:
Verification successful
Verification Successful: The
all_images
parameter is correctly integrated.The
export_project
function is not directly called elsewhere in the codebase, indicating that its usage is consistent with the changes made. The related functions inviews.py
correctly incorporate theall_images
parameter.
- No direct calls to
export_project
were found outside its definition.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `export_project` include the new `all_images` parameter. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type python -A 5 $'export_project'Length of output: 69
Script:
#!/bin/bash # Description: Verify all function calls to `export_project` include the new `all_images` parameter. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg -t py -A 5 'export_project'Length of output: 13638
Script:
#!/bin/bash # Description: Verify all direct calls to `export_project` include the new `all_images` parameter. # Test: Search for direct calls to the `export_project` function. rg -t py 'export_project('Length of output: 109
Script:
#!/bin/bash # Description: Verify all direct calls to `export_project` include the new `all_images` parameter. # Test: Search for direct calls to the `export_project` function. rg -t py 'export_project\('Length of output: 441
cvat-core/src/annotations.ts (1)
140-140
: Verify the usage of theallImages
parameter.Ensure that the
allImages
parameter is correctly passed and utilized in theserverProxy
calls for tasks, jobs, and projects.Run the following script to verify the usage of the
allImages
parameter in theserverProxy
calls:Verification successful
The
allImages
parameter is correctly utilized in the codebase.The
allImages
parameter is consistently passed and utilized in theexportDataset
function calls across various components and modules, including theserverProxy
. This confirms its proper integration for tasks, jobs, and projects.
cvat-core/src/annotations.ts
: UtilizesallImages
inserverProxy
calls for tasks, jobs, and projects.cvat-ui/src/actions/export-actions.ts
: PassesallImages
inexportDatasetAsync
.cvat-core/src/session.ts
: IncludesallImages
in function definitions and calls.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of the `allImages` parameter in serverProxy calls. # Test: Search for the usage of `exportDataset` in serverProxy. Expect: Correct usage of `allImages`. rg --type typescript -A 5 $'serverProxy.tasks.exportDataset' rg --type typescript -A 5 $'serverProxy.jobs.exportDataset' rg --type typescript -A 5 $'serverProxy.projects.exportDataset'Length of output: 286
Script:
#!/bin/bash # Description: Verify the usage of the `allImages` parameter in serverProxy calls. # Test: Search for the usage of `exportDataset` in serverProxy. Expect: Correct usage of `allImages`. rg --type ts -A 5 $'serverProxy.tasks.exportDataset' rg --type ts -A 5 $'serverProxy.jobs.exportDataset' rg --type ts -A 5 $'serverProxy.projects.exportDataset'Length of output: 157
Script:
#!/bin/bash # Description: Search for any usage of `exportDataset` in the codebase to verify the `allImages` parameter. # Test: Search for any occurrence of `exportDataset` in TypeScript files. rg --type ts -A 5 'exportDataset'Length of output: 17908
cvat-ui/src/components/export-dataset/export-dataset-modal.tsx (4)
41-41
: Verify the default value ofallImages
.Ensure that the default value of
allImages
is correctly set totrue
in theinitialValues
object.Run the following script to verify the default value of
allImages
:Verification successful
Default value of
allImages
is correctly set totrue
.The
initialValues
object incvat-ui/src/components/export-dataset/export-dataset-modal.tsx
confirms thatallImages
is set totrue
. No changes are needed.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the default value of `allImages` in initialValues. # Test: Search for the default value of `allImages` in initialValues. Expect: Default value is `true`. rg --type tsx -A 5 $'initialValues'Length of output: 62
Script:
#!/bin/bash # Description: Verify the default value of `allImages` in initialValues. # Test: Search for the default value of `allImages` in initialValues. Expect: Default value is `true`. rg --glob '*.tsx' -A 10 'initialValues'Length of output: 21839
32-32
: Verify the addition ofallImages
toFormValues
.Ensure that the
allImages
property is correctly integrated into theFormValues
type and used appropriately in the form.Run the following script to verify the integration of the
allImages
property in the form:Verification successful
Integration of
allImages
inFormValues
VerifiedThe
allImages
property is correctly integrated into theFormValues
type and is appropriately used in the form logic withinexport-dataset-modal.tsx
. It is utilized in setting form values and is part of the radio button group for image saving options. Additionally, its presence in related files supports its role in the export functionality.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the integration of the `allImages` property in the form. # Test: Search for the usage of `allImages` in the form. Expect: Correct integration in form logic. rg --type tsx -A 5 $'allImages'Length of output: 58
Script:
#!/bin/bash # Description: Verify the integration of the `allImages` property in the form. # Test: Search for the usage of `allImages` in the form. Expect: Correct integration in form logic. rg --type ts -A 5 'allImages'Length of output: 11439
59-59
: Verify the management ofsaveImages
state.Ensure that the
saveImages
state is correctly managed and reset when the modal is closed.Run the following script to verify the management of the
saveImages
state:Verification successful
The
saveImages
state is correctly managed.The
saveImages
state is reset tofalse
when the modal is closed, ensuring proper state management. No issues found with the current implementation.
- The state is initialized with
useState(false)
.- It is reset to
false
when the modal is closed.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the management of `saveImages` state. # Test: Search for the management of `saveImages` state. Expect: Correct management and reset logic. rg --type tsx -A 5 $'setSaveImages'Length of output: 62
Script:
#!/bin/bash # Description: Verify the management of `saveImages` state. # Test: Search for the management of `saveImages` state. Expect: Correct management and reset logic. rg --glob '*.tsx' -A 5 'setSaveImages'Length of output: 1957
200-210
: Verify the conditional rendering of the radio button group.Ensure that the radio button group for image saving options is correctly conditionally rendered based on the
saveImages
state.Run the following script to verify the conditional rendering of the radio button group:
Verification successful
Conditional Rendering Verified
The radio button group for image saving options is correctly conditionally rendered based on the
saveImages
state. The logic{saveImages && (
ensures that the component is only rendered whensaveImages
is true.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the conditional rendering of the radio button group. # Test: Search for the conditional rendering logic of the radio button group. Expect: Correct conditional rendering based on `saveImages`. rg --type tsx -A 5 $'saveImages &&'Length of output: 64
Script:
#!/bin/bash # Description: Verify the conditional rendering of the radio button group. # Find all .tsx files and search for the conditional rendering logic of the radio button group. fd --extension tsx --exec rg 'saveImages &&' {}Length of output: 84
cvat/apps/dataset_manager/views.py (4)
211-212
: Verify the newexport_project_as_dataset_full
function.Ensure that the
export_project_as_dataset_full
function is correctly implemented to export with all images.Run the following script to verify the implementation of the
export_project_as_dataset_full
function:Verification successful
Function
export_project_as_dataset_full
is correctly implemented.The function is designed to export all images by setting
save_images=True
andall_images=True
. No issues were found with its implementation.
- Location:
cvat/apps/dataset_manager/views.py
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the implementation of export_project_as_dataset_full function. # Test: Search for the implementation of `export_project_as_dataset_full`. Expect: Correct implementation for exporting with all images. rg --type python -A 5 $'def export_project_as_dataset_full'Length of output: 91
Script:
#!/bin/bash # Corrected command to search for the implementation of export_project_as_dataset_full function. rg -A 5 'def export_project_as_dataset_full'Length of output: 491
202-203
: Verify the newexport_task_as_dataset_full
function.Ensure that the
export_task_as_dataset_full
function is correctly implemented to export with all images.Run the following script to verify the implementation of the
export_task_as_dataset_full
function:Verification successful
The
export_task_as_dataset_full
function is correctly implemented.The function correctly calls the
export
function withall_images=True
, ensuring that all images are included in the export process. No issues were found with its implementation.
- Location:
cvat/apps/dataset_manager/views.py
at lines 202-203Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the implementation of export_task_as_dataset_full function. # Test: Search for the implementation of `export_task_as_dataset_full`. Expect: Correct implementation for exporting with all images. rg --type python -A 5 $'def export_task_as_dataset_full'Length of output: 88
Script:
#!/bin/bash # Using ast-grep to find the implementation of the export_task_as_dataset_full function ast-grep --lang python --pattern $'def export_task_as_dataset_full($_, $_, $_):\n $$$'Length of output: 348
193-194
: Verify the newexport_job_as_dataset_full
function.Ensure that the
export_job_as_dataset_full
function is correctly implemented to export with all images.Run the following script to verify the implementation of the
export_job_as_dataset_full
function:Verification successful
The
export_job_as_dataset_full
function is correctly implemented.The function calls
export
withsave_images=True
andall_images=True
, ensuring it exports all images as intended. The implementation aligns with the expected behavior.
- Location:
cvat/apps/dataset_manager/views.py
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the implementation of export_job_as_dataset_full function. # Test: Search for the implementation of `export_job_as_dataset_full`. Expect: Correct implementation for exporting with all images. rg --type python -A 5 $'def export_job_as_dataset_full'Length of output: 87
Script:
#!/bin/bash # Description: Verify the implementation of export_job_as_dataset_full function. # Test: Search for the implementation of `export_job_as_dataset_full`. Expect: Correct implementation for exporting with all images. rg -A 5 $'def export_job_as_dataset_full'Length of output: 609
100-100
: Verify the usage of theall_images
parameter inexport
.Ensure that the
all_images
parameter is correctly integrated into theexport
function and used appropriately in the export logic.Run the following script to verify the usage of the
all_images
parameter in theexport
function:Verification successful
The
all_images
parameter is correctly integrated into theexport
function.The
all_images
parameter is used in constructing the export filename and is passed to theexport_fn
function, indicating its proper integration into the export logic. No issues were found with its usage.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of the `all_images` parameter in export function. # Test: Search for the usage of `all_images` in export function. Expect: Correct integration in export logic. rg --type python -A 5 $'def export'Length of output: 67
Script:
#!/bin/bash # Description: Verify the usage of the `all_images` parameter in export function. # Search for the export function and display its implementation to verify the usage of the `all_images` parameter. rg 'def export' -A 20 cvat/apps/dataset_manager/views.pyLength of output: 3185
Script:
#!/bin/bash # Description: Verify the usage of the `all_images` parameter in export function by displaying more lines of its implementation. # Search for the export function and display more lines to capture the usage of the `all_images` parameter. rg 'def export' -A 50 cvat/apps/dataset_manager/views.pyLength of output: 5807
cvat-core/src/project.ts (2)
37-37
: Ensure proper handling of the newallImages
parameter.The addition of the
allImages
parameter to theexportDataset
method enhances flexibility. Ensure that the parameter is correctly handled in all invocations of this method.Run the following script to verify the function usage:
Verification successful
The
allImages
parameter is properly handled in theexportDataset
method.The
allImages
parameter is consistently included in the function signatures and calls across the codebase, indicating correct handling.
- Files where
exportDataset
is used withallImages
:
cvat-core/src/annotations.ts
cvat-core/src/project.ts
cvat-core/src/session.ts
cvat-core/src/server-proxy.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `exportDataset` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type typescript -A 5 $'exportDataset'Length of output: 76
Script:
#!/bin/bash # Description: Verify all function calls to `exportDataset` match the new signature. # Corrected Test: Search for the function usage in TypeScript files. Expect: Only occurrences of the new signature. rg --type ts -A 5 $'exportDataset'Length of output: 17908
269-279
: Verify the propagation of theallImages
parameter.Ensure that the
allImages
parameter is correctly propagated through thePluginRegistry.apiWrapper.call
function, and that any downstream logic that relies on this parameter is updated accordingly.Run the following script to verify the function usage:
Verification successful
The
allImages
parameter is correctly propagated and utilized.The
allImages
parameter is passed through thePluginRegistry.apiWrapper.call
function and is correctly used in theexportDataset
function withincvat-core/src/annotations.ts
. This confirms that the parameter is being handled as expected in the export logic.
cvat-core/src/annotations.ts
: TheallImages
parameter is used in theexportDataset
function implementation.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the `allImages` parameter is correctly propagated. # Test: Search for the function usage. Expect: Correct propagation of `allImages`. rg --type typescript -A 5 $'PluginRegistry.apiWrapper.call'Length of output: 93
Script:
#!/bin/bash # Description: Verify that the `allImages` parameter is correctly propagated. # Test: Search for the function usage. Expect: Correct propagation of `allImages`. rg -A 5 $'PluginRegistry.apiWrapper.call'Length of output: 29566
Script:
#!/bin/bash # Description: Search for the implementation of `Project.prototype.annotations.exportDataset` to verify the usage of `allImages`. # Test: Find the function definition and its usage of `allImages`. ast-grep --lang typescript --pattern $'class Project { $$$ annotations = { $$$ exportDataset($_, $_, $_, $_, $_, $_) { $$$ } $$$ } $$$ }'Length of output: 168
Script:
#!/bin/bash # Description: Search for the implementation of `exportDataset` to verify the usage of `allImages`. # Test: Find the function definition and its usage of `allImages`. rg 'exportDataset' -A 10Length of output: 38186
cvat/apps/events/handlers.py (1)
501-504
: Verify the integration of theall_images
parameter.The addition of the
all_images
parameter to thehandle_dataset_export
function enhances the export functionality. Ensure that the parameter is correctly integrated and that any downstream logic that relies on this parameter is updated accordingly.Run the following script to verify the function usage:
Verification successful
Integration of
all_images
Parameter VerifiedThe
all_images
parameter has been correctly integrated into thehandle_dataset_export
function. The function call incvat/apps/engine/background.py
includes this parameter, ensuring that it is being utilized as intended. No further updates are necessary.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `handle_dataset_export` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type python -A 5 $'handle_dataset_export'Length of output: 76
Script:
#!/bin/bash # Description: Verify all function calls to `handle_dataset_export` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type py -A 5 $'handle_dataset_export'Length of output: 1182
cvat/apps/engine/mixins.py (3)
463-464
: OpenAPI documentation update looks good.The addition of the
all_images
parameter in the OpenAPI documentation is clear and provides necessary information to the users.
431-434
: Ensure correct handling ofall_images
parameter.The
all_images
parameter is being correctly retrieved and used in theexport_dataset_v1
function. Ensure that this parameter is properly handled in the callback function and theDatasetExportManager
.Run the following script to verify the usage of
all_images
in the callback function:
478-481
: Ensure correct handling ofall_images
parameter inexport_dataset_v2
.The
all_images
parameter is being correctly retrieved and used in theexport_dataset_v2
function. Ensure that this parameter is properly handled in the callback function and theDatasetExportManager
.Run the following script to verify the usage of
all_images
in the callback function:Verification successful
Correct handling of
all_images
parameter verified.The
all_images
parameter is properly handled in both theDatasetExportManager
and theget_export_callback
function. It is used to determine the appropriate export function based on its value. No issues found.
DatasetExportManager
incvat/apps/engine/background.py
get_export_callback
incvat/apps/engine/views.py
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of `all_images` in the callback function. # Test: Search for the callback function usage. Expect: `all_images` is used appropriately. rg --type python -A 5 $'def get_export_callback'Length of output: 80
Script:
#!/bin/bash # Search for the definition of the get_export_callback function and check for the usage of the all_images parameter. ast-grep --lang python --pattern 'def get_export_callback($_, $_): $$$' # Search for the DatasetExportManager class to verify handling of the all_images parameter. ast-grep --lang python --pattern 'class DatasetExportManager($$$_): $$$'Length of output: 26010
Script:
#!/bin/bash # Search for the definition of the get_export_callback function across the codebase. rg --type py 'def get_export_callback'Length of output: 370
Script:
#!/bin/bash # Extract the implementation of the get_export_callback function to verify the usage of the all_images parameter. ast-grep --lang python --pattern 'def get_export_callback(self, save_images: bool, all_images: bool) -> Callable: $$$' cvat/apps/engine/views.pyLength of output: 1762
cvat/apps/engine/background.py (5)
162-162
: Addition ofall_images
inExportArgs
is appropriate.The
all_images
attribute is correctly added to theExportArgs
dataclass, enhancing the export functionality.
Line range hint
175-195
: Ensure correct initialization ofall_images
.The
all_images
parameter is correctly initialized in the constructor ofDatasetExportManager
. Ensure that this parameter is properly utilized in the export logic.Run the following script to verify the usage of
all_images
in the export logic:Verification successful
all_images
Parameter Utilization VerifiedThe
all_images
parameter is correctly utilized in the export logic across various parts of the codebase. It is consistently used to determine whether to include all images or only annotated ones during dataset export.
- Files Involved:
cvat/apps/dataset_manager/views.py
cvat/apps/dataset_manager/task.py
cvat/apps/dataset_manager/formats/*.py
The parameter's usage aligns with its intended functionality, ensuring proper dataset export behavior.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of `all_images` in the export logic. # Test: Search for the usage of `all_images` in export-related functions. Expect: `all_images` is used appropriately. rg --type python -A 5 $'def export'Length of output: 67
Script:
#!/bin/bash # Description: Search for the usage of `all_images` in the codebase to verify its utilization in export logic. # Search for the usage of `all_images` in the codebase to understand its role in export-related functions. rg 'all_images' -A 10Length of output: 67225
217-217
: Ensureall_images
is used correctly inExportArgs
.The
all_images
attribute is correctly included in theExportArgs
instantiation. Ensure that this attribute is used effectively in the export process.Run the following script to verify the usage of
all_images
in the export process:Verification successful
all_images
is correctly used in the export process.The
all_images
attribute is consistently utilized across various export-related functions, indicating its proper integration into the export logic.
cvat/apps/dataset_manager/views.py
: Used in theexport
function.cvat/apps/engine/mixins.py
: Passed toget_export_callback
.cvat/apps/dataset_manager/formats/*.py
: Used in multiple_export
functions.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of `all_images` in the export process. # Test: Search for the usage of `all_images` in export-related methods. Expect: `all_images` is used appropriately. rg --type python -A 5 $'class DatasetExportManager'Length of output: 83
Script:
#!/bin/bash # Corrected script to verify the usage of `all_images` in the export process. # Search for the usage of `all_images` in the DatasetExportManager class. rg 'class DatasetExportManager' -A 50 | rg 'all_images'Length of output: 465
Script:
#!/bin/bash # Further verification of the usage of `all_images` in export-related logic. # Search for `all_images` in export-related functions or methods to verify its impact on the export process. rg 'def ' -A 10 | rg 'all_images'Length of output: 11766
248-248
: Ensureall_images
is passed correctly inhandle_local_download
.The
all_images
parameter is correctly passed to thehandle_local_download
function. Ensure that this parameter is utilized correctly in the function logic.Run the following script to verify the usage of
all_images
in thehandle_local_download
function:Verification successful
all_images
is used correctly inhandle_local_download
. Theall_images
parameter is passed to thebuild_annotations_file_name
function, where it determines the dataset type in the file name, ensuring correct usage in the function logic.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of `all_images` in the `handle_local_download` function. # Test: Search for the usage of `all_images` in the function. Expect: `all_images` is used appropriately. rg --type python -A 5 $'def handle_local_download'Length of output: 82
Script:
#!/bin/bash # Corrected script to verify the usage of `all_images` in the `handle_local_download` function. # Test: Search for the usage of `all_images` in the function. Expect: `all_images` is used appropriately. rg --type py -A 10 $'def handle_local_download'Length of output: 927
Script:
#!/bin/bash # Extended script to verify the usage of `all_images` in the `handle_local_download` function. # Test: Search for the usage of `all_images` in the function with more context lines. rg --type py -A 50 $'def handle_local_download'Length of output: 3821
Script:
#!/bin/bash # Script to verify the usage of `all_images` in the `build_annotations_file_name` function. # Test: Search for the `build_annotations_file_name` function and check the usage of `all_images`. rg --type py -A 20 $'def build_annotations_file_name'Length of output: 1261
410-410
: Ensureall_images
is used correctly inhandle_dataset_export
.The
all_images
parameter is correctly passed to thehandle_dataset_export
function. Ensure that this parameter is utilized correctly in the function logic.Run the following script to verify the usage of
all_images
in thehandle_dataset_export
function:cvat/apps/dataset_manager/task.py (2)
Line range hint
967-979
: Ensure correct handling ofall_images
inexport_task
.The
all_images
parameter is correctly added to theexport_task
function. Ensure that this parameter is utilized correctly in the export logic.Run the following script to verify the usage of
all_images
in theexport_task
function:
Line range hint
918-930
: Ensure correct handling ofall_images
inexport_job
.The
all_images
parameter is correctly added to theexport_job
function. Ensure that this parameter is utilized correctly in the export logic.Run the following script to verify the usage of
all_images
in theexport_job
function:cvat-core/src/session.ts (2)
Line range hint
176-186
: LGTM! Verify the function usage in the codebase.The addition of the
allImages
parameter is consistent and logical.Ensure that all calls to
exportDataset
in the codebase are updated to include the newallImages
parameter.Run the following script to verify the function usage:
Verification successful
Function Usage Verified Successfully
The
exportDataset
function calls have been updated to include theallImages
parameter across the codebase. The changes are consistent with the new function signature.
- Locations include:
cvat-ui/src/components/export-dataset/export-dataset-modal.tsx
cvat-ui/src/actions/export-actions.ts
cvat-core/src/session.ts
cvat-core/src/project.ts
cvat-core/src/annotations.ts
cvat-core/src/session-implementation.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `exportDataset` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type typescript -A 5 $'exportDataset'Length of output: 76
Script:
#!/bin/bash # Description: Verify all function calls to `exportDataset` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type ts -A 5 $'exportDataset'Length of output: 17908
364-364
: LGTM! Verify the method usage in the codebase.The addition of the
allImages
parameter is consistent and logical.Ensure that all calls to the
exportDataset
method in the codebase are updated to include the newallImages
parameter.Run the following script to verify the method usage:
Verification successful
All usages of
exportDataset
are updated withallImages
parameter.The method
exportDataset
is consistently used with theallImages
parameter across the codebase, confirming that all necessary updates have been made.
cvat-core/src/session.ts
cvat-core/src/project.ts
cvat-core/src/server-proxy.ts
cvat-core/src/annotations.ts
cvat-core/src/project-implementation.ts
cvat-core/src/session-implementation.ts
cvat-ui/src/actions/export-actions.ts
cvat-ui/src/components/export-dataset/export-dataset-modal.tsx
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all method calls to `exportDataset` match the new signature. # Test: Search for the method usage. Expect: Only occurrences of the new signature. rg --type typescript -A 5 $'exportDataset'Length of output: 76
Script:
#!/bin/bash # Description: Verify all method calls to `exportDataset` match the new signature. # Test: Search for the method usage. Expect: Only occurrences of the new signature. rg --type ts -A 5 'exportDataset'Length of output: 17908
cvat-core/src/session-implementation.ts (2)
516-529
: LGTM! Verify the function usage in the codebase.The addition of the
allImages
parameter is consistent and logical.Ensure that all calls to
exportDataset
in the codebase are updated to include the newallImages
parameter.Run the following script to verify the function usage:
Verification successful
Let's correct the previous script to properly search for the
exportDataset
function usage across TypeScript files.
Function Usage Verified:
exportDataset
Updated CorrectlyThe
exportDataset
function calls throughout the codebase have been updated to include the newallImages
parameter, confirming consistency with the intended changes.
- Instances of
exportDataset
in various prototypes and implementations include theallImages
parameter.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `exportDataset` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type typescript -A 5 $'exportDataset'Length of output: 76
Script:
#!/bin/bash # Description: Verify all function calls to `exportDataset` match the new signature. # Use `fd` to find TypeScript files and `rg` to search for `exportDataset` within them. fd -e ts -x rg 'exportDataset' -A 5Length of output: 8916
1177-1190
: LGTM! Verify the function usage in the codebase.The addition of the
allImages
parameter is consistent and logical.Ensure that all calls to
exportDataset
in the codebase are updated to include the newallImages
parameter.Run the following script to verify the function usage:
Verification successful
Function usage verified successfully.
The
exportDataset
function calls have been updated to include theallImages
parameter consistently across the codebase. No discrepancies were found.
- Files with updated function calls:
cvat-core/src/session-implementation.ts
cvat-core/src/server-proxy.ts
cvat-core/src/session.ts
cvat-core/src/annotations.ts
cvat-core/src/project-implementation.ts
cvat-core/src/project.ts
cvat-ui/src/actions/export-actions.ts
cvat-ui/src/components/export-dataset/export-dataset-modal.tsx
cvat-ui/src/components/annotation-page/top-bar/annotation-menu.tsx
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `exportDataset` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type typescript -A 5 $'exportDataset'Length of output: 76
Script:
#!/bin/bash # Description: Verify all function calls to `exportDataset` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type-add 'ts:*.ts' --type ts -A 5 'exportDataset'Length of output: 17929
cvat/apps/dataset_manager/formats/cvat.py (5)
1430-1436
: LGTM! Verify the function usage in the codebase.The addition of the
all_images
parameter is consistent and logical.Ensure that all calls to
_export_video
in the codebase are updated to include the newall_images
parameter.Run the following script to verify the function usage:
Line range hint
1373-1394
: LGTM! Verify the function usage in the codebase.The addition of the
all_images
parameter is consistent and logical.Ensure that all calls to
dump_media_files
in the codebase are updated to include the newall_images
parameter.Run the following script to verify the function usage:
Verification successful
Function Usage Verified
All instances of the
dump_media_files
function in the codebase have been updated to include the newall_images
parameter, ensuring consistency with the updated function signature.
cvat/apps/dataset_manager/formats/cvat.py
: Calls todump_media_files
includeall_images
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `dump_media_files` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type python -A 5 $'dump_media_files'Length of output: 71
Script:
#!/bin/bash # Description: Verify all function calls to `dump_media_files` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type py -A 5 $'dump_media_files'Length of output: 1510
1405-1410
: LGTM! Verify the function usage in the codebase.The addition of the
all_images
parameter is consistent and logical.Ensure that all calls to
_export_task_or_job
in the codebase are updated to include the newall_images
parameter.Run the following script to verify the function usage:
Verification successful
Function Usage Verified:
All calls to
_export_task_or_job
in the codebase have been updated to include theall_images
parameter, ensuring consistency with the new function signature.
- Locations:
cvat/apps/dataset_manager/formats/cvat.py
: Lines where_export_task_or_job
is called.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `_export_task_or_job` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type python -A 5 $'_export_task_or_job'Length of output: 74
Script:
#!/bin/bash # Description: Verify all function calls to `_export_task_or_job` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg -A 5 '_export_task_or_job'Length of output: 1850
Line range hint
1415-1425
: LGTM! Verify the function usage in the codebase.The addition of the
all_images
parameter is consistent and logical.Ensure that all calls to
_export_project
in the codebase are updated to include the newall_images
parameter.Run the following script to verify the function usage:
Verification successful
Function Usage Verified:
_export_project
The
_export_project
function has been updated to include theall_images
parameter, and all usages in the codebase reflect this change correctly.
- The function is defined and used in
cvat/apps/dataset_manager/formats/cvat.py
.No further updates are required.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `_export_project` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type python -A 5 $'_export_project'Length of output: 70
Script:
#!/bin/bash # Description: Verify all function calls to `_export_project` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type py -A 5 $'_export_project'Length of output: 4260
1439-1445
: LGTM! Verify the function usage in the codebase.The addition of the
all_images
parameter is consistent and logical.Ensure that all calls to
_export_images
in the codebase are updated to include the newall_images
parameter.Run the following script to verify the function usage:
Verification successful
Function Usage Verified: Consistent Signature Across Codebase
The
_export_images
function includes theall_images
parameter consistently across its definitions and usages in the codebase. No discrepancies were found.
cvat/apps/dataset_manager/formats/pointcloud.py
cvat/apps/dataset_manager/formats/velodynepoint.py
cvat/apps/dataset_manager/formats/cvat.py
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `_export_images` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type python -A 5 $'_export_images'Length of output: 69
Script:
#!/bin/bash # Description: Verify all function calls to `_export_images` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --glob '*.py' -A 5 '_export_images'Length of output: 1940
cvat-core/src/server-proxy.ts (2)
41-41
: Addition ofall_images
inParams
type is appropriate.The
all_images
parameter is added as an optional boolean, which aligns with the intended functionality.
Line range hint
809-822
: Inclusion ofallImages
parameter inexportDataset
is correct.The
allImages
parameter is correctly integrated into the function signature and used in theparams
object.Ensure that all calls to
exportDataset
are updated to include the newallImages
parameter.Run the following script to verify the function usage:
Verification successful
Inclusion of
allImages
parameter inexportDataset
is verified.The
allImages
parameter is correctly integrated into theexportDataset
function and is consistently used across the codebase.
- Files with verified usage:
cvat-ui/src/components/export-dataset/export-dataset-modal.tsx
cvat-core/src/session.ts
cvat-core/src/project.ts
cvat-core/src/annotations.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `exportDataset` include the `allImages` parameter. # Test: Search for the function usage. Expect: Occurrences of the new parameter. rg --type typescript -A 5 $'exportDataset'Length of output: 76
Script:
#!/bin/bash # Description: Verify all function calls to `exportDataset` include the `allImages` parameter. # Test: Search for the function usage. Expect: Occurrences of the new parameter. rg --type ts -A 5 $'exportDataset'Length of output: 17908
cvat/apps/dataset_manager/bindings.py (3)
1500-1500
: Inclusion ofall_images
parameter inCvatTaskOrJobDataExtractor
is correct.The
all_images
parameter is appropriately added to the constructor, aligning with the intended functionality.
1567-1568
: Usage ofall_images
in conditional check is appropriate.The
all_images
parameter is correctly used to control the inclusion of items in the dataset.
1677-1684
: Inclusion ofall_images
parameter inGetCVATDataExtractor
is correct.The
all_images
parameter is correctly integrated into the function signature and passed to the extractor classes.cvat/apps/engine/views.py (3)
314-320
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
get_export_callback
match the new signature.Run the following script to verify the function usage:
Verification successful
Function usage verified and consistent with the new signature.
The function
get_export_callback
is used correctly with the new parameterssave_images
andall_images
in the codebase.
cvat/apps/engine/mixins.py
: The function is called with both parameters as expected.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `get_export_callback` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type python -A 5 $'get_export_callback'Length of output: 74
Script:
#!/bin/bash # Description: Verify all function calls to `get_export_callback` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg -A 5 'get_export_callback'Length of output: 2250
1325-1331
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
get_export_callback
match the new signature.Run the following script to verify the function usage:
Verification successful
Function usage verified successfully.
The function
get_export_callback
is used correctly with the updated signature in the codebase.
cvat/apps/engine/mixins.py
: The function calls include bothsave_images
andall_images
parameters.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `get_export_callback` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type python -A 5 $'get_export_callback'Length of output: 74
Script:
#!/bin/bash # Description: Verify all function calls to `get_export_callback` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type py -A 5 $'get_export_callback'Length of output: 2260
2028-2034
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
get_export_callback
match the new signature.Run the following script to verify the function usage:
Verification successful
Function usage verified successfully.
The
get_export_callback
function calls in the codebase have been updated to match the new signature withsave_images
andall_images
parameters. No issues were found.
cvat/apps/engine/mixins.py
: Correct usage ofget_export_callback
with the new parameters.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `get_export_callback` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type python -A 5 $'get_export_callback'Length of output: 74
Script:
#!/bin/bash # Description: Verify all function calls to `get_export_callback` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type py -A 5 $'get_export_callback'Length of output: 2260
cvat/schema.yml (3)
2549-2554
: Addition ofall_images
parameter is appropriate.The
all_images
parameter is correctly added to provide flexibility in exporting datasets. The default value offalse
aligns with the existing behavior.
3974-3979
: Addition ofall_images
parameter is appropriate.The
all_images
parameter is correctly added to provide flexibility in exporting datasets. The default value offalse
aligns with the existing behavior.
5923-5928
: Addition ofall_images
parameter is appropriate.The
all_images
parameter is correctly added to provide flexibility in exporting datasets. The default value offalse
aligns with the existing behavior.
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.
Please add at least some tests for the updated functionality.
If you have some automation for task creation, so you know was it a dataset originally, you can upload only empty images or upload everything and mark the extra images as deleted. |
I'm getting a bunch of tests failing due to an APIException with the following error message: "TypeError: _export_task_orjob() got an unexpected keyword argument all_images." It traces back to the cvat.py format file which does indeed have the parameter all_images within all necessary functions. Interestingly enough, if I change the test to use a different format it works fine. Just wondering if you might know why specifically for cvat format I get this exception? Screenshot linked with the output I get. |
Maybe you need to rebuild the containers before running tests. |
@ bschultz96 Hello brother, have you made any progress? Perhaps there are other ideas for implementation? |
I couldn't figure out why the tests I added to test the new functionality aren't returning the results I expect. When I run the tests the endpoint is always downloading either all or no images and behavior doesn't change for whichever all_images is set to. Manually testing the endpoint works fine, so I think I'm missing something in the testing environment backend but after spending a few hours couldn't find make any headway. |
Have you tried |
<!-- Raise an issue to propose your change (https://github.com/cvat-ai/cvat/issues). It helps to avoid duplication of efforts from multiple independent contributors. Discuss your ideas with maintainers to be sure that changes will be approved and merged. Read the [Contribution guide](https://docs.cvat.ai/docs/contributing/). --> <!-- Provide a general summary of your changes in the Title above --> ### Motivation and context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. Describe your changes in detail, add screenshots. --> fixing cvat-ai#7783 also fixing related problem - some jobs from the issue can not be opened in ui due to missing shapes ### How has this been tested? <!-- Please describe in detail how you tested your changes. Include details of your testing environment, and the tests you ran to see how your change affects other areas of the code, etc. --> ### Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. If an item isn't applicable for some reason, then ~~explicitly strikethrough~~ the whole line. If you don't do that, GitHub will show incorrect progress for the pull request. If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [ ] I submit my changes into the `develop` branch - [ ] I have created a changelog fragment <!-- see top comment in CHANGELOG.md --> - [ ] I have updated the documentation accordingly - [ ] I have added tests to cover my changes - [ ] I have linked related issues (see [GitHub docs]( https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword)) - [ ] I have increased versions of npm packages if it is necessary ([cvat-canvas](https://github.com/cvat-ai/cvat/tree/develop/cvat-canvas#versioning), [cvat-core](https://github.com/cvat-ai/cvat/tree/develop/cvat-core#versioning), [cvat-data](https://github.com/cvat-ai/cvat/tree/develop/cvat-data#versioning) and [cvat-ui](https://github.com/cvat-ai/cvat/tree/develop/cvat-ui#versioning)) ### License - [ ] I submit _my code changes_ under the same [MIT License]( https://github.com/cvat-ai/cvat/blob/develop/LICENSE) that covers the project. Feel free to contact the maintainers if that's a concern. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced data integrity in annotation processing by adding filtering steps before sorting. - New entries for "many jobs skeleton tracks with missing shapes" and "many jobs skeleton" added to the dataset, improving job tracking capabilities and complex job definitions. - Introduced a new static method for annotation creation, improving code modularity and reusability. - **Bug Fixes** - Improved error handling in annotation functions to prevent runtime errors when accessing potentially undefined variables. - **Tests** - Expanded the testing framework with new tests for annotation creation scenarios, ensuring comprehensive coverage. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This has several goals: * Remove `LambdaType.UNKNOWN`. Functions with this non-type are useless and should not be presented to the user. * Don't return 404 from the list endpoint if one function cannot be loaded. This prevents one bad function from essentially disabling the entire serverless function feature. Instead, log the error and ignore the function. * Don't return 404 from other endpoints either when the problem is a bad function. This is not a client problem. Raise an exception and let Django log it and return a 500. * Remove HTTP codes from `LambdaFunction`, to improve separation of concerns.
This is consistent with other user-controllable objects, and when you're triggering the API manually, makes it easier to determine which ID to use.
This enum is used for a field named `kind` in a resource located at `/api/lambda/function`, so it seems pretty clear that it should be named `FunctionKind`. (Or perhaps `LambdaFunctionKind`, but I omitted the "lambda" for consistency with views and serializers.) In addition to renaming, move it to `models`, so that it can be used by serializers. No such serializers currently exist, but I'd like to add them later. Turn it into a Django choice enum as well, so that `__str__` works out of the box.
Due to how `WebhookPermission.get_scopes` is written, any unhandled endpoint will result in an empty list being returned, and thus no access control being performed. This is the right thing for `/api/webhooks/events`, but not so much for every other endpoint.
<!-- Raise an issue to propose your change (https://github.com/cvat-ai/cvat/issues). It helps to avoid duplication of efforts from multiple independent contributors. Discuss your ideas with maintainers to be sure that changes will be approved and merged. Read the [Contribution guide](https://docs.cvat.ai/docs/contributing/). --> <!-- Provide a general summary of your changes in the Title above --> ### Motivation and context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. Describe your changes in detail, add screenshots. --> ### How has this been tested? <!-- Please describe in detail how you tested your changes. Include details of your testing environment, and the tests you ran to see how your change affects other areas of the code, etc. --> ### Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. If an item isn't applicable for some reason, then ~~explicitly strikethrough~~ the whole line. If you don't do that, GitHub will show incorrect progress for the pull request. If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [x] I submit my changes into the `develop` branch - [ ] I have created a changelog fragment <!-- see top comment in CHANGELOG.md --> - [ ] I have updated the documentation accordingly - [ ] I have added tests to cover my changes - [ ] I have linked related issues (see [GitHub docs]( https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword)) - [ ] I have increased versions of npm packages if it is necessary ([cvat-canvas](https://github.com/cvat-ai/cvat/tree/develop/cvat-canvas#versioning), [cvat-core](https://github.com/cvat-ai/cvat/tree/develop/cvat-core#versioning), [cvat-data](https://github.com/cvat-ai/cvat/tree/develop/cvat-data#versioning) and [cvat-ui](https://github.com/cvat-ai/cvat/tree/develop/cvat-ui#versioning)) ### License - [x] I submit _my code changes_ under the same [MIT License]( https://github.com/cvat-ai/cvat/blob/develop/LICENSE) that covers the project. Feel free to contact the maintainers if that's a concern. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Documentation** - Updated the backup and restoration guide for CVAT data to clarify the use of Docker volumes. - Renamed the volume from `cvat_events` to `cvat_events_db` for better accuracy regarding its function. - Streamlined instructions by removing references to Elasticsearch, focusing solely on Clickhouse database backups. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
With almost all of the `get_scopes` methods, an unknown (action, method) combination will result in an array like `[None]` being returned (sometimes with other elements as well). If that happens, the OPA input will then have `"scope": null`, and so the policy evaluation will fail, unless the user is an admin. Because of this, it's really easy to accidentally make a view admin-only, by forgetting to add/update an entry in `get_scopes` when making changes. `TaskPermission`, `MembershipPermission` and `WebhookPermission` are even worse, because they will just return an empty list of scopes, which will later translate to an empty list of permissions, which means that everyone will be permitted to perform the action. This can lead to vulnerabilities like CVE-2024-45393. Fix this by replacing all `.get` calls with indexing, which will cause a crash if the (action, method) combo is unknown. This breaks one endpoint (`/api/webhooks/events`), which is supposed to be publicly accessible; fix that by disabling authorization for it.
…7459) This is a followup to cvat-ai#7442. I didn't realize there were so many outdated actions. 🙂 This should update every remaining action with a Node 12/16 dependency.
Quality Gate passedIssues Measures |
@@ -254,6 +256,10 @@ def export( | |||
if not local_downloading: | |||
query_params["filename"] = str(filename) | |||
|
|||
if save_images and only_annotated: |
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.
How these 2 parameters are related?
if only_annotated: | ||
dataset_type += "-annotated_only" |
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 update parse_export_file_path
to support this?
if save_images and not only_annotated: | ||
return dm.views.export_project_as_dataset | ||
elif save_images: | ||
return dm.views.export_project_as_dataset_only_annotated |
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.
Why a new function was needed here? It doesn't look like a new use case.
@@ -148,6 +149,34 @@ def test_can_export_dataset( | |||
request=request, | |||
cloud_storages=cloud_storages, | |||
) | |||
|
|||
@pytest.mark.parametrize("format_name", ("CVAT for images 1.1",)) |
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 makes sense to test this with all formats, not only one
- This functionality if not specific to SDK, so it's better to move it either into server API tests or server unit tests.
Added radio buttons to export either all images or only annotated images when "Save Images" is selected during export process.
The default is set to True to match with the previous behavior when saving images.
Motivation and context
This is a useful addition when creating and adding to datasets. We had been using a work around to export only the annotated images but decided doing the work to implement this would be worthwhile.
How has this been tested?
Manual testing, exporting projects, tasks, and jobs have all 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 andcvat-ui)License
Feel free to contact the maintainers if that's a concern.
Summary by CodeRabbit
New Features
allImages
parameter for dataset export, allowing users to choose whether to export all images or only those with annotations across various export functions.Bug Fixes
allImages
parameter is correctly applied.Documentation
allImages
parameter, providing clarity on its purpose and default value.Style