diff --git a/backend/api/tasks.py b/backend/api/tasks.py index 5038e254..1c6ec0ea 100644 --- a/backend/api/tasks.py +++ b/backend/api/tasks.py @@ -89,7 +89,7 @@ class DataFactory: @shared_task -def injest_data(user_id, project_id, filenames, format: str, **kwargs): +def ingest_data(user_id, project_id, filenames, format: str, **kwargs): project = get_object_or_404(Project, pk=project_id) user = get_object_or_404(get_user_model(), pk=user_id) response = {'error': []} diff --git a/backend/api/tests/test_tasks.py b/backend/api/tests/test_tasks.py index 135a20c5..f3015232 100644 --- a/backend/api/tests/test_tasks.py +++ b/backend/api/tests/test_tasks.py @@ -4,7 +4,7 @@ from django.test import TestCase from ..models import (DOCUMENT_CLASSIFICATION, SEQ2SEQ, SEQUENCE_LABELING, Category, Example, Label, Span) -from ..tasks import injest_data +from ..tasks import ingest_data from .api.utils import prepare_project @@ -20,7 +20,7 @@ class TestIngestData(TestCase): def ingest_data(self, filename, file_format, kwargs=None): filenames = [str(self.data_path / filename)] kwargs = kwargs or {} - return injest_data(self.user.id, self.project.item.id, filenames, file_format, **kwargs) + return ingest_data(self.user.id, self.project.item.id, filenames, file_format, **kwargs) class TestIngestClassificationData(TestIngestData): diff --git a/backend/api/views/import_dataset.py b/backend/api/views/import_dataset.py index 241ee5fc..c58da24f 100644 --- a/backend/api/views/import_dataset.py +++ b/backend/api/views/import_dataset.py @@ -10,7 +10,7 @@ from rest_framework.views import APIView from ..models import Project from ..permissions import IsProjectAdmin -from ..tasks import injest_data +from ..tasks import ingest_data from .upload.catalog import Options @@ -41,7 +41,7 @@ class UploadAPI(APIView): for tu in tus ] filenames = [su.file.path for su in sus] - task = injest_data.delay( + task = ingest_data.delay( user_id=request.user.id, project_id=project_id, filenames=filenames, diff --git a/frontend/pages/projects/_id/upload/index.vue b/frontend/pages/projects/_id/upload/index.vue index e54befa5..f98da156 100644 --- a/frontend/pages/projects/_id/upload/index.vue +++ b/frontend/pages/projects/_id/upload/index.vue @@ -87,7 +87,7 @@ :disabled="isDisabled" @click="injest" > - Injest + Ingest