From 330f123785f21ea531dc8e0047ec9a9171dff59a Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Thu, 19 Jan 2023 11:35:38 +0300 Subject: [PATCH] Fix some typos (#5601) --- .github/workflows/helm.yml | 2 +- CHANGELOG.md | 10 +++++----- cvat-core/src/annotations-objects.ts | 2 +- cvat-ui/src/actions/cloud-storage-actions.ts | 12 ++++++------ cvat-ui/src/actions/import-actions.ts | 4 ++-- cvat-ui/src/actions/jobs-actions.ts | 12 ++++++------ cvat-ui/src/actions/projects-actions.ts | 14 +++++++------- .../controls-side-bar/opencv-control.tsx | 10 +++++----- .../controls-side-bar/tools-control.tsx | 18 +++++++++--------- .../objects-side-bar/issues-list.tsx | 8 ++++---- .../create-task-page/create-task-content.tsx | 8 ++++---- cvat-ui/src/components/cvat-app.tsx | 2 +- .../label-selector/label-selector.tsx | 4 ++-- .../components/labels-editor/raw-viewer.tsx | 6 +++--- .../components/project-page/project-page.tsx | 4 ++-- .../components/projects-page/project-item.tsx | 2 +- .../src/components/projects-page/styles.scss | 2 +- cvat-ui/src/components/tasks-page/top-bar.tsx | 4 ++-- .../components/webhooks-page/webhook-item.tsx | 4 ++-- cvat-ui/src/config.tsx | 2 +- .../annotation-page/top-bar/top-bar.tsx | 2 +- cvat-ui/src/cvat-store.ts | 6 ++++-- cvat-ui/src/icons.tsx | 2 +- cvat-ui/src/reducers/notifications-reducer.ts | 2 +- .../utils/{enviroment.ts => environment.ts} | 0 cvat-ui/src/utils/files.ts | 6 +++--- cvat-ui/src/utils/platform-checker.ts | 4 ++-- cvat/apps/dataset_repo/dataset_repo.py | 2 +- cvat/apps/engine/views.py | 4 ++-- docker-compose.yml | 6 +++--- .../shiyinzhang/iog/nuclio/function.yaml | 2 +- .../case_97_export_import_task.js | 2 +- ...sers.js => case_4_assign_task_job_users.js} | 0 tests/cypress/support/commands_projects.js | 4 ++-- 34 files changed, 87 insertions(+), 85 deletions(-) rename cvat-ui/src/utils/{enviroment.ts => environment.ts} (100%) rename tests/cypress/integration/actions_users/registration_involved/{case_4_assign_taks_job_users.js => case_4_assign_task_job_users.js} (100%) diff --git a/.github/workflows/helm.yml b/.github/workflows/helm.yml index 28f02c1e..2a0f8050 100644 --- a/.github/workflows/helm.yml +++ b/.github/workflows/helm.yml @@ -76,7 +76,7 @@ jobs: gen/generate.sh cd .. - - name: Install test requrements + - name: Install test requirements run: | pip3 install --user cvat-sdk/ pip3 install --user cvat-cli/ diff --git a/CHANGELOG.md b/CHANGELOG.md index e0fe0783..0cad861d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -102,7 +102,7 @@ non-ascii paths while adding files from "Connected file share" (issue #4428) () - HRNET serverless function () - Invalid export of segmentation masks when the `background` label gets nonzero id () -- A trailing slash in hostname does't allow SDK to send some requests +- A trailing slash in hostname doesn't allow SDK to send some requests () - Double modal export/backup a task/project () - Fixed bug of computing Job's unsolved/resolved issues numbers () @@ -137,7 +137,7 @@ non-ascii paths while adding files from "Connected file share" (issue #4428) - An exception when run export for an empty task () - Fixed FBRS serverless function runtime error on images with alpha channel () - Attaching manifest with custom name () -- Uploading non-zip annotaion files () +- Uploading non-zip annotation files () - Loss of rotation in CVAT format () - A permission problem with interactive model launches for workers in orgs () - Fix chart not being upgradable () @@ -222,7 +222,7 @@ Skeleton (), (=1.22 () ### Fixed -- Permission error occured when accessing the JobCommits () +- Permission error occurred when accessing the JobCommits () - job assignee can remove or update any issue created by the task owner () - Bug: Incorrect point deletion with keyboard shortcut () - some AI Tools were not sending responses properly () @@ -307,7 +307,7 @@ Skeleton (), () - Kibana requests are not proxied due to django-revproxy incompatibility with Django >3.2.x () - Content type for getting frame with tasks/{id}/data/ endpoint () -- Bug: Permission error occured when accessing the comments of a specific issue () +- Bug: Permission error occurred when accessing the comments of a specific issue () ### Security @@ -362,7 +362,7 @@ Skeleton (), () -- Notification if the browser does not support nesassary API +- Notification if the browser does not support necessary API - Added ability to export project as a dataset () and project with 3D tasks () - Additional inline tips in interactors with demo gifs () diff --git a/cvat-core/src/annotations-objects.ts b/cvat-core/src/annotations-objects.ts index fea9be2a..c390f3c5 100644 --- a/cvat-core/src/annotations-objects.ts +++ b/cvat-core/src/annotations-objects.ts @@ -2977,7 +2977,7 @@ export class SkeletonTrack extends Track { ); if (errors.length) { - throw new Error(`Several errors occured during saving skeleton:\n ${errors.join(';\n')}`); + throw new Error(`Several errors occurred during saving skeleton:\n ${errors.join(';\n')}`); } }; diff --git a/cvat-ui/src/actions/cloud-storage-actions.ts b/cvat-ui/src/actions/cloud-storage-actions.ts index ef438afe..e8d95870 100644 --- a/cvat-ui/src/actions/cloud-storage-actions.ts +++ b/cvat-ui/src/actions/cloud-storage-actions.ts @@ -88,13 +88,13 @@ const cloudStoragesActions = { getCloudStorageStatusFailed: (cloudStorageID: number, error: any) => ( createAction(CloudStorageActionTypes.GET_CLOUD_STORAGE_STATUS_FAILED, { cloudStorageID, error }) ), - getCloudStoragePreiew: (cloudStorageID: number) => ( + getCloudStoragePreview: (cloudStorageID: number) => ( createAction(CloudStorageActionTypes.GET_CLOUD_STORAGE_PREVIEW, { cloudStorageID }) ), - getCloudStoragePreiewSuccess: (cloudStorageID: number, preview: string) => ( + getCloudStoragePreviewSuccess: (cloudStorageID: number, preview: string) => ( createAction(CloudStorageActionTypes.GET_CLOUD_STORAGE_PREVIEW_SUCCESS, { cloudStorageID, preview }) ), - getCloudStoragePreiewFailed: (cloudStorageID: number, error: any) => ( + getCloudStoragePreviewFailed: (cloudStorageID: number, error: any) => ( createAction(CloudStorageActionTypes.GET_CLOUD_STORAGE_PREVIEW_FAILED, { cloudStorageID, error }) ), }; @@ -199,12 +199,12 @@ export function getCloudStorageStatusAsync(cloudStorage: CloudStorage): ThunkAct export function getCloudStoragePreviewAsync(cloudStorage: CloudStorage): ThunkAction { return async (dispatch: ActionCreator): Promise => { - dispatch(cloudStoragesActions.getCloudStoragePreiew(cloudStorage.id)); + dispatch(cloudStoragesActions.getCloudStoragePreview(cloudStorage.id)); try { const result = await cloudStorage.getPreview(); - dispatch(cloudStoragesActions.getCloudStoragePreiewSuccess(cloudStorage.id, result)); + dispatch(cloudStoragesActions.getCloudStoragePreviewSuccess(cloudStorage.id, result)); } catch (error) { - dispatch(cloudStoragesActions.getCloudStoragePreiewFailed(cloudStorage.id, error)); + dispatch(cloudStoragesActions.getCloudStoragePreviewFailed(cloudStorage.id, error)); } }; } diff --git a/cvat-ui/src/actions/import-actions.ts b/cvat-ui/src/actions/import-actions.ts index 7e40afbf..9b8ce1c4 100644 --- a/cvat-ui/src/actions/import-actions.ts +++ b/cvat-ui/src/actions/import-actions.ts @@ -159,8 +159,8 @@ export const importBackupAsync = (instanceType: 'project' | 'task', storage: Sto async (dispatch) => { dispatch(importActions.importBackup()); try { - const inctanceClass = (instanceType === 'task') ? core.classes.Task : core.classes.Project; - const instance = await inctanceClass.restore(storage, file); + const instanceClass = (instanceType === 'task') ? core.classes.Task : core.classes.Project; + const instance = await instanceClass.restore(storage, file); dispatch(importActions.importBackupSuccess(instance.id, instanceType)); } catch (error) { dispatch(importActions.importBackupFailed(instanceType, error)); diff --git a/cvat-ui/src/actions/jobs-actions.ts b/cvat-ui/src/actions/jobs-actions.ts index 24543227..1a2d0948 100644 --- a/cvat-ui/src/actions/jobs-actions.ts +++ b/cvat-ui/src/actions/jobs-actions.ts @@ -27,13 +27,13 @@ const jobsActions = { createAction(JobsActionTypes.GET_JOBS_SUCCESS, { jobs }) ), getJobsFailed: (error: any) => createAction(JobsActionTypes.GET_JOBS_FAILED, { error }), - getJobPreiew: (jobID: number) => ( + getJobPreview: (jobID: number) => ( createAction(JobsActionTypes.GET_JOB_PREVIEW, { jobID }) ), - getJobPreiewSuccess: (jobID: number, preview: string) => ( + getJobPreviewSuccess: (jobID: number, preview: string) => ( createAction(JobsActionTypes.GET_JOB_PREVIEW_SUCCESS, { jobID, preview }) ), - getJobPreiewFailed: (jobID: number, error: any) => ( + getJobPreviewFailed: (jobID: number, error: any) => ( createAction(JobsActionTypes.GET_JOB_PREVIEW_FAILED, { jobID, error }) ), }; @@ -59,11 +59,11 @@ export const getJobsAsync = (query: JobsQuery): ThunkAction => async (dispatch) }; export const getJobPreviewAsync = (job: Job): ThunkAction => async (dispatch) => { - dispatch(jobsActions.getJobPreiew(job.id)); + dispatch(jobsActions.getJobPreview(job.id)); try { const result = await job.frames.preview(); - dispatch(jobsActions.getJobPreiewSuccess(job.id, result)); + dispatch(jobsActions.getJobPreviewSuccess(job.id, result)); } catch (error) { - dispatch(jobsActions.getJobPreiewFailed(job.id, error)); + dispatch(jobsActions.getJobPreviewFailed(job.id, error)); } }; diff --git a/cvat-ui/src/actions/projects-actions.ts b/cvat-ui/src/actions/projects-actions.ts index faac8417..d07fecbd 100644 --- a/cvat-ui/src/actions/projects-actions.ts +++ b/cvat-ui/src/actions/projects-actions.ts @@ -61,13 +61,13 @@ const projectActions = { deleteProjectFailed: (projectId: number, error: any) => ( createAction(ProjectsActionTypes.DELETE_PROJECT_FAILED, { projectId, error }) ), - getProjectPreiew: (projectID: number) => ( + getProjectPreview: (projectID: number) => ( createAction(ProjectsActionTypes.GET_PROJECT_PREVIEW, { projectID }) ), - getProjectPreiewSuccess: (projectID: number, preview: string) => ( + getProjectPreviewSuccess: (projectID: number, preview: string) => ( createAction(ProjectsActionTypes.GET_PROJECT_PREVIEW_SUCCESS, { projectID, preview }) ), - getProjectPreiewFailed: (projectID: number, error: any) => ( + getProjectPreviewFailed: (projectID: number, error: any) => ( createAction(ProjectsActionTypes.GET_PROJECT_PREVIEW_FAILED, { projectID, error }) ), }; @@ -123,7 +123,7 @@ export function getProjectsAsync( dispatch(projectActions.getProjectsSuccess(array, result.count)); - // Appropriate tasks fetching proccess needs with retrieving only a single project + // Appropriate tasks fetching process needs with retrieving only a single project if (Object.keys(filteredQuery).includes('id') && typeof filteredQuery.id === 'number') { dispatch(getProjectTasksAsync({ ...tasksQuery, @@ -184,11 +184,11 @@ export function deleteProjectAsync(projectInstance: any): ThunkAction { } export const getProjectsPreviewAsync = (project: any): ThunkAction => async (dispatch) => { - dispatch(projectActions.getProjectPreiew(project.id)); + dispatch(projectActions.getProjectPreview(project.id)); try { const result = await project.preview(); - dispatch(projectActions.getProjectPreiewSuccess(project.id, result)); + dispatch(projectActions.getProjectPreviewSuccess(project.id, result)); } catch (error) { - dispatch(projectActions.getProjectPreiewFailed(project.id, error)); + dispatch(projectActions.getProjectPreviewFailed(project.id, error)); } }; diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/opencv-control.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/opencv-control.tsx index c3fbe9e7..47eff325 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/opencv-control.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/opencv-control.tsx @@ -290,7 +290,7 @@ class OpenCVControlComponent extends React.PureComponent { approxPolyAccuracy: props.defaultApproxPolyAccuracy, trackedShapes: [], fetching: false, - pointsRecieved: false, + pointsReceived: false, mode: 'interaction', portals: [], }; @@ -294,7 +294,7 @@ export class ToolsControlComponent extends React.PureComponent { this.setState({ approxPolyAccuracy: defaultApproxPolyAccuracy, - pointsRecieved: false, + pointsReceived: false, }); window.addEventListener('contextmenu', this.contextmenuDisabler); } @@ -386,7 +386,7 @@ export class ToolsControlComponent extends React.PureComponent { }; this.interaction.lastestApproximatedPoints = approximated; - this.setState({ pointsRecieved: !!response.points.length }); + this.setState({ pointsReceived: !!response.points.length }); } finally { if (this.interaction.id === interactionId && this.interaction.hideMessage) { this.interaction.hideMessage(); @@ -416,7 +416,7 @@ export class ToolsControlComponent extends React.PureComponent { } catch (err: any) { notification.error({ description: err.toString(), - message: 'Interaction error occured', + message: 'Interaction error occurred', }); } }; @@ -508,7 +508,7 @@ export class ToolsControlComponent extends React.PureComponent { } catch (err: any) { notification.error({ description: err.toString(), - message: 'Tracking error occured', + message: 'Tracking error occurred', }); } }; @@ -663,7 +663,7 @@ export class ToolsControlComponent extends React.PureComponent { if (prevProps.frame !== frame && trackedShapes.length) { // 1. find all trackable objects on the current frame - // 2. devide them into two groups: with relevant state, without relevant state + // 2. divide them into two groups: with relevant state, without relevant state const trackingData = trackedShapes.reduce( (acc: AccumulatorType, trackedShape: TrackedShape): AccumulatorType => { const { @@ -1277,7 +1277,7 @@ export class ToolsControlComponent extends React.PureComponent { interactors, detectors, trackers, isActivated, canvasInstance, labels, frameIsDeleted, } = this.props; const { - fetching, approxPolyAccuracy, pointsRecieved, mode, portals, convertMasksToPolygons, + fetching, approxPolyAccuracy, pointsReceived, mode, portals, convertMasksToPolygons, } = this.state; if (![...interactors, ...detectors, ...trackers].length) return null; @@ -1302,7 +1302,7 @@ export class ToolsControlComponent extends React.PureComponent { }; const showAnyContent = labels.length && !frameIsDeleted; - const showInteractionContent = isActivated && mode === 'interaction' && pointsRecieved && convertMasksToPolygons; + const showInteractionContent = isActivated && mode === 'interaction' && pointsReceived && convertMasksToPolygons; const showDetectionContent = fetching && mode === 'detection'; const interactionContent: JSX.Element | null = showInteractionContent ? ( diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/issues-list.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/issues-list.tsx index fb9d7eac..295ae3c5 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/issues-list.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/issues-list.tsx @@ -25,7 +25,7 @@ export default function LabelsListComponent(): JSX.Element { const issuesResolvedHidden = useSelector((state: CombinedState): any => state.review.issuesResolvedHidden); const frames = issues.map((issue: any): number => issue.frame).sort((a: number, b: number) => +a - +b); const nearestLeft = frames.filter((_frame: number): boolean => _frame < frame).reverse()[0]; - const dinamicLeftProps: any = Number.isInteger(nearestLeft) ? + const dynamicLeftProps: any = Number.isInteger(nearestLeft) ? { onClick: () => dispatch(changeFrameAsync(nearestLeft)), } : @@ -37,7 +37,7 @@ export default function LabelsListComponent(): JSX.Element { }; const nearestRight = frames.filter((_frame: number): boolean => _frame > frame)[0]; - const dinamicRightProps: any = Number.isInteger(nearestRight) ? + const dynamicRightProps: any = Number.isInteger(nearestRight) ? { onClick: () => dispatch(changeFrameAsync(nearestRight)), } : @@ -54,12 +54,12 @@ export default function LabelsListComponent(): JSX.Element { - + - + diff --git a/cvat-ui/src/components/create-task-page/create-task-content.tsx b/cvat-ui/src/components/create-task-page/create-task-content.tsx index 33bd6264..f88889ca 100644 --- a/cvat-ui/src/components/create-task-page/create-task-content.tsx +++ b/cvat-ui/src/components/create-task-page/create-task-content.tsx @@ -547,7 +547,7 @@ class CreateTaskContent extends React.PureComponent { + private handleSubmitMultiTasks = (): void => { this.validateBlocks() .then(() => { this.addMultiTasks(); @@ -852,7 +852,7 @@ class CreateTaskContent extends React.PureComponent Submit  @@ -911,7 +911,7 @@ class CreateTaskContent extends React.PureComponent - {many ? this.renderFooterMutliTasks() : this.renderFooterSingleTask() } + {many ? this.renderFooterMultiTasks() : this.renderFooterSingleTask() } ); diff --git a/cvat-ui/src/components/cvat-app.tsx b/cvat-ui/src/components/cvat-app.tsx index ce72964a..061200ae 100644 --- a/cvat-ui/src/components/cvat-app.tsx +++ b/cvat-ui/src/components/cvat-app.tsx @@ -61,7 +61,7 @@ import AnnotationPageContainer from 'containers/annotation-page/annotation-page' import { getCore } from 'cvat-core-wrapper'; import GlobalHotKeys, { KeyMap } from 'utils/mousetrap-react'; import { NotificationsState } from 'reducers'; -import { customWaViewHit } from 'utils/enviroment'; +import { customWaViewHit } from 'utils/environment'; import showPlatformNotification, { platformInfo, stopNotifications, diff --git a/cvat-ui/src/components/label-selector/label-selector.tsx b/cvat-ui/src/components/label-selector/label-selector.tsx index e261c6b7..40e4117c 100644 --- a/cvat-ui/src/components/label-selector/label-selector.tsx +++ b/cvat-ui/src/components/label-selector/label-selector.tsx @@ -18,7 +18,7 @@ export default function LabelSelector(props: Props): JSX.Element { const { labels, value, onChange, onEnterPress, ...rest } = props; - const dinamicProps = value ? + const dynamicProps = value ? { value: typeof value === 'number' ? value : value.id, } : @@ -37,7 +37,7 @@ export default function LabelSelector(props: Props): JSX.Element {