Skip to content
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

API to download export results #9075

Merged
merged 57 commits into from
Mar 13, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
2a2dc86
Add new API && remove deprecated && refactor working with rq meta
Marishka17 Feb 7, 2025
e3d6da9
Remove outdated tests
Marishka17 Feb 7, 2025
a01a8a8
Resolve conflicts
Marishka17 Feb 7, 2025
0f71c08
Rename method
Marishka17 Feb 7, 2025
a22e10f
Split RQMeta into several classes && small fixes
Marishka17 Feb 9, 2025
19a322a
Black code
Marishka17 Feb 9, 2025
f535d32
f
Marishka17 Feb 9, 2025
3c9895b
Fix typo
Marishka17 Feb 9, 2025
a896dfd
Resolve conflicts
Marishka17 Feb 14, 2025
5aceaf4
Fix merge
Marishka17 Feb 14, 2025
f05f591
Resolve conflicts
Marishka17 Feb 25, 2025
1ea77dc
Fix missing import
Marishka17 Feb 25, 2025
24d1c87
Store result filename in RQ meta
Marishka17 Feb 25, 2025
f503d49
Fix func signature
Marishka17 Feb 27, 2025
69b1f9f
Update permissions
Marishka17 Feb 27, 2025
b909919
Fix typos
Marishka17 Feb 27, 2025
347251f
Do not disable request card after downloading file
Marishka17 Feb 27, 2025
0c1e928
Update tests
Marishka17 Feb 27, 2025
2688ae4
Fix typos
Marishka17 Feb 27, 2025
5f52083
Revert back checking dataset import status by old API
Marishka17 Feb 27, 2025
af4ad59
Add redis migration
Marishka17 Feb 27, 2025
9bfe8b6
Remove unused imports
Marishka17 Feb 27, 2025
b8f35f8
Drop unrelated chnages
Marishka17 Feb 28, 2025
5e2569b
Update server schema
Marishka17 Feb 28, 2025
27f7ad9
Use result_url && result_filename in meta
Marishka17 Feb 28, 2025
e48743c
Try to fix cypress tests
Marishka17 Feb 28, 2025
7f0406b
[unit tests] Update test_rest_api_3D.py
Marishka17 Feb 28, 2025
32cd6dd
typos
Marishka17 Feb 28, 2025
9ea13d1
Update engine.tests.test_rest_api.TaskImportExportAPITestCase
Marishka17 Mar 3, 2025
b0e80d7
Update remaining unit tests
Marishka17 Mar 3, 2025
3c06e58
Reduce code duplication in tests
Marishka17 Mar 3, 2025
8177944
Fix ExportBehaviorTest::test_concurrent_download_and_cleanup
Marishka17 Mar 3, 2025
41d56b3
Remove csrf workaround
Marishka17 Mar 3, 2025
acbbfae
Black tests
Marishka17 Mar 3, 2025
c228c1f
Disable pylint warning
Marishka17 Mar 3, 2025
dec3676
Remove unused imports
Marishka17 Mar 3, 2025
662a529
cleanup the code
Marishka17 Mar 3, 2025
5ab096b
Merge branch 'develop' into mk/api_to_download_export_results
Marishka17 Mar 3, 2025
703d871
unused import
Marishka17 Mar 3, 2025
9e3f831
typos
Marishka17 Mar 3, 2025
4198bef
Add chnagelog fragment
Marishka17 Mar 4, 2025
ea498ae
Update changelog
Marishka17 Mar 7, 2025
d1ee24b
Apply comments
Marishka17 Mar 11, 2025
c42385b
Fix typo and pylint issue
Marishka17 Mar 11, 2025
3946e6f
Fix server schema
Marishka17 Mar 11, 2025
22c4783
Small fixes in server schema
Marishka17 Mar 11, 2025
397939c
Reduce code duplication in tests && small fixes
Marishka17 Mar 11, 2025
d14d047
Merge branch 'develop' into mk/api_to_download_export_results
Marishka17 Mar 11, 2025
8222969
Fix unit tests
Marishka17 Mar 12, 2025
d321c01
Cleanup code
Marishka17 Mar 12, 2025
4dee705
Fix redis migration
Marishka17 Mar 12, 2025
4b01053
Refactor redis migration a bit
Marishka17 Mar 12, 2025
13507c2
Remove outdated comment
Marishka17 Mar 12, 2025
1ad1f80
Remove <> from response
Marishka17 Mar 13, 2025
54558fc
Update description of deprecated query params
Marishka17 Mar 13, 2025
570b60f
Do not wait requests to be finished in tests
Marishka17 Mar 13, 2025
10cd428
Merge branch 'develop' into mk/api_to_download_export_results
Marishka17 Mar 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename method
  • Loading branch information
Marishka17 committed Feb 7, 2025
commit 0f71c087806c0d9760c12bb1fdde73391b18431f
4 changes: 2 additions & 2 deletions cvat/apps/engine/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ class DatasetMixin:
},
)
@action(detail=True, methods=['POST'], serializer_class=None, url_path='dataset/export')
def initialize_dataset_export(self, request: PatchedRequest, pk: int):
def initiate_dataset_export(self, request: PatchedRequest, pk: int):
self._object = self.get_object() # force call of check_object_permissions()

save_images = is_dataset_export(request)
Expand Down Expand Up @@ -542,7 +542,7 @@ def import_backup_v1(self, request: PatchedRequest, import_func: Callable) -> Re
},
)
@action(detail=True, methods=['POST'], serializer_class=None, url_path='backup/export')
def initialize_backup_export(self, request: PatchedRequest, pk: int):
def initiate_backup_export(self, request: PatchedRequest, pk: int):
db_object = self.get_object() # force to call check_object_permissions
export_manager = BackupExportManager(db_object, request)
export_manager.initialize_export_args()
Expand Down
10 changes: 5 additions & 5 deletions cvat/apps/engine/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ def get_scopes(request, view, obj):
('dataset', 'POST'): Scopes.IMPORT_DATASET,
('append_dataset_chunk', 'HEAD'): Scopes.IMPORT_DATASET,
('append_dataset_chunk', 'PATCH'): Scopes.IMPORT_DATASET,
('initialize_dataset_export', 'POST'): Scopes.EXPORT_DATASET if is_dataset_export(request) else Scopes.EXPORT_ANNOTATIONS,
('initialize_backup_export', 'POST'): Scopes.EXPORT_BACKUP,
('initiate_dataset_export', 'POST'): Scopes.EXPORT_DATASET if is_dataset_export(request) else Scopes.EXPORT_ANNOTATIONS,
('initiate_backup_export', 'POST'): Scopes.EXPORT_BACKUP,
('import_backup', 'POST'): Scopes.IMPORT_BACKUP,
('append_backup_chunk', 'PATCH'): Scopes.IMPORT_BACKUP,
('append_backup_chunk', 'HEAD'): Scopes.IMPORT_BACKUP,
Expand Down Expand Up @@ -541,7 +541,7 @@ def get_scopes(request, view, obj) -> list[Scopes]:
('annotations', 'POST'): Scopes.IMPORT_ANNOTATIONS,
('append_annotations_chunk', 'PATCH'): Scopes.UPDATE_ANNOTATIONS,
('append_annotations_chunk', 'HEAD'): Scopes.UPDATE_ANNOTATIONS,
('initialize_dataset_export', 'POST'): Scopes.EXPORT_DATASET if is_dataset_export(request) else Scopes.EXPORT_ANNOTATIONS,
('initiate_dataset_export', 'POST'): Scopes.EXPORT_DATASET if is_dataset_export(request) else Scopes.EXPORT_ANNOTATIONS,
('metadata', 'GET'): Scopes.VIEW_METADATA,
('metadata', 'PATCH'): Scopes.UPDATE_METADATA,
('data', 'GET'): Scopes.VIEW_DATA,
Expand All @@ -552,7 +552,7 @@ def get_scopes(request, view, obj) -> list[Scopes]:
('import_backup', 'POST'): Scopes.IMPORT_BACKUP,
('append_backup_chunk', 'PATCH'): Scopes.IMPORT_BACKUP,
('append_backup_chunk', 'HEAD'): Scopes.IMPORT_BACKUP,
('initialize_backup_export', 'POST'): Scopes.EXPORT_BACKUP,
('initiate_backup_export', 'POST'): Scopes.EXPORT_BACKUP,
('preview', 'GET'): Scopes.VIEW,
('validation_layout', 'GET'): Scopes.VIEW_VALIDATION_LAYOUT,
('validation_layout', 'PATCH'): Scopes.UPDATE_VALIDATION_LAYOUT,
Expand Down Expand Up @@ -787,7 +787,7 @@ def get_scopes(request, view, obj):
('metadata','GET'): Scopes.VIEW_METADATA,
('metadata','PATCH'): Scopes.UPDATE_METADATA,
('issues', 'GET'): Scopes.VIEW,
('initialize_dataset_export', 'POST'): Scopes.EXPORT_DATASET if is_dataset_export(request) else Scopes.EXPORT_ANNOTATIONS,
('initiate_dataset_export', 'POST'): Scopes.EXPORT_DATASET if is_dataset_export(request) else Scopes.EXPORT_ANNOTATIONS,
('preview', 'GET'): Scopes.VIEW,
('validation_layout', 'GET'): Scopes.VIEW_VALIDATION_LAYOUT,
('validation_layout', 'PATCH'): Scopes.UPDATE_VALIDATION_LAYOUT,
Expand Down